Re: [patch 3/4] CPU Hotplug support for X86_64

Andi Kleen
2005-05-24T12:29:59Z

On Tue, May 24, 2005 at 01:11:16AM -0700, Ashok Raj wrote:
> ===================================================================
> --- linux-2.6.12-rc4-mm2.orig/arch/x86_64/kernel/smpboot.c
> +++ linux-2.6.12-rc4-mm2/arch/x86_64/kernel/smpboot.c
> @@ -62,9 +62,12 @@
> /* Number of siblings per CPU package */
> int smp_num_siblings = 1;
> /* Package ID of each logical CPU */
> -u8 phys_proc_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
> -u8 cpu_core_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
> +u8 phys_proc_id[NR_CPUS] __cacheline_aligned =
> + { [0 ... NR_CPUS-1] = BAD_APICID };

Why this change?

> EXPORT_SYMBOL(phys_proc_id);
> +
> +u8 cpu_core_id[NR_CPUS] __cacheline_aligned =
> + { [0 ... NR_CPUS-1] = BAD_APICID };

And that one?

It does not seem related to CPUhotplug. May as a separate patch,
but in this case the "per cpu readonly" section C.Lameter recently
added should be used for these which are near always read-only
(I hope the section made it into -mm* now)

-Andi