lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <86802c440709211525x70d4ff66n3e7df59c44166102@mail.gmail.com>
Date:	Fri, 21 Sep 2007 15:25:47 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	mm-commits@...r.kernel.org, travis@....com, ak@...e.de,
	clameter@....com
Subject: Re: + x86-convert-cpuinfo_x86-array-to-a-per_cpu-array-v2.patch added to -mm tree

On 9/21/07, akpm@...ux-foundation.org <akpm@...ux-foundation.org> wrote:
>
> The patch titled
>      x86: Convert cpuinfo_x86 array to a per_cpu array
> has been added to the -mm tree.  Its filename is
>      x86-convert-cpuinfo_x86-array-to-a-per_cpu-array-v2.patch
>
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
> See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
> out what to do about this
>
> ------------------------------------------------------
> Subject: x86: Convert cpuinfo_x86 array to a per_cpu array
> From: travis@....com
>
> cpu_data is currently an array defined using NR_CPUS.  This means that we
> overallocate since we will rarely really use maximum configured cpus.  When
> NR_CPU count is raised to 4096 the size of cpu_data becomes 3,145,728
> bytes.
>
> These changes were adopted from the sparc64 (and ia64) code.  An additional
> field was added to cpuinfo_x86 to be a non-ambiguous cpu index.  This
> corresponds to the index into a cpumask_t as well as the per_cpu index.
> It's used in various places like show_cpuinfo().
>
> cpu_data is defined to be the boot_cpu_data structure for the
> NON-SMP case.
>
> This patch is based on 2.6.23-rc6 with the prior per_cpu patches
> applied.  I can also provide a version based on 2.6.23-rc4-mm1
> which has some different changes.
>
> Signed-off-by: Mike Travis <travis@....com>
> Acked-by: Christoph Lameter <clameter@....com>
> Cc: Andi Kleen <ak@...e.de>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
>
>  arch/i386/kernel/acpi/cstate.c                    |    4 -
>  arch/i386/kernel/acpi/processor.c                 |    2
>  arch/i386/kernel/alternative.c                    |    6 -
>  arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c       |    4 -
>  arch/i386/kernel/cpu/cpufreq/e_powersaver.c       |    2
>  arch/i386/kernel/cpu/cpufreq/elanfreq.c           |    4 -
>  arch/i386/kernel/cpu/cpufreq/longhaul.c           |    4 -
>  arch/i386/kernel/cpu/cpufreq/longrun.c            |    4 -
>  arch/i386/kernel/cpu/cpufreq/p4-clockmod.c        |    4 -
>  arch/i386/kernel/cpu/cpufreq/powernow-k6.c        |    2
>  arch/i386/kernel/cpu/cpufreq/powernow-k7.c        |    2
>  arch/i386/kernel/cpu/cpufreq/sc520_freq.c         |    4 -
>  arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c |    6 -
>  arch/i386/kernel/cpu/cpufreq/speedstep-lib.c      |    2
>  arch/i386/kernel/cpu/intel_cacheinfo.c            |    8 +-
>  arch/i386/kernel/cpu/proc.c                       |    9 +-
>  arch/i386/kernel/cpuid.c                          |    2
>  arch/i386/kernel/microcode.c                      |    6 -
>  arch/i386/kernel/msr.c                            |    2
>  arch/i386/kernel/sched-clock.c                    |    2
>  arch/i386/kernel/smp.c                            |    2
>  arch/i386/kernel/smpboot.c                        |   45 ++++++------
>  arch/i386/kernel/tsc.c                            |    8 +-
>  arch/i386/lib/delay.c                             |    2
>  arch/i386/mach-voyager/voyager_smp.c              |   12 +--
>  arch/x86_64/kernel/mce.c                          |    2
>  arch/x86_64/kernel/mce_amd.c                      |    4 -
>  arch/x86_64/kernel/setup.c                        |   18 ++--
>  arch/x86_64/kernel/smpboot.c                      |   44 +++++------
>  arch/x86_64/kernel/tsc.c                          |    4 -
>  arch/x86_64/kernel/vsyscall.c                     |    2
>  arch/x86_64/lib/delay.c                           |    2
>  drivers/hwmon/coretemp.c                          |    6 -
>  drivers/hwmon/hwmon-vid.c                         |    2
>  drivers/input/gameport/gameport.c                 |    2
>  drivers/video/geode/video_gx.c                    |    2
>  include/asm-i386/processor.h                      |   10 +-
>  include/asm-i386/topology.h                       |    4 -
>  include/asm-x86_64/processor.h                    |   10 +-
>  include/asm-x86_64/topology.h                     |    4 -
>  40 files changed, 138 insertions(+), 126 deletions(-)
>
> +++ a/arch/i386/kernel/cpu/cpufreq/elanfreq.c
> @@ -199,7 +199,7 @@ static int elanfreq_target (struct cpufr
>
>  static int elanfreq_cpu_init(struct cpufreq_policy *policy)
>  {
> -       struct cpuinfo_x86 *c = cpu_data;
> +       struct cpuinfo_x86 *c = &cpu_data(cpu);
>         unsigned int i;
>         int result;
>
> @@ -280,7 +280,7 @@ static struct cpufreq_driver elanfreq_dr
>
>  static int __init elanfreq_init(void)
>  {
> -       struct cpuinfo_x86 *c = cpu_data;
> +       struct cpuinfo_x86 *c = &cpu_data(cpu);

this is confusing, can you check simmiliar &cpu_data(cpu) to
&cpu_data(0) instead...

YH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ