lkml.org 
[lkml]   [2005]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.13-mm1
On Fri, 2 Sep 2005, Alexander Nyberg wrote:

> On Thu, Sep 01, 2005 at 03:55:42AM -0700 Andrew Morton wrote:
>
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13/2.6.13-mm1/
> >
>
> i386-boottime-for_each_cpu-broken.patch
> i386-boottime-for_each_cpu-broken-fix.patch
>
> The SMP version of __alloc_percpu checks the cpu_possible_map
> before allocating memory for a certain cpu. With the above patches
> the BSP cpuid is never set in cpu_possible_map which breaks CONFIG_SMP
> on uniprocessor machines (as soon as someone tries to dereference
> something allocated via __alloc_percpu, which in fact is never allocated
> since the cpu is not set in cpu_possible_map).

Yes indeed, if there is no mptable or madt we would have missed setting
it.

> The below fixes this, I'm not entirely sure about the voyager
> part, should the cpu_possible_map really be CPU_MASK_ALL to begin
> with there, Zwane?

I wanted to avoid breaking it wholesale and since i don't entirely
understand the voyager SMP boot sequence, i opted for the safe method.
cpu_possible_map is fine because it's supposed to cover all possible
processors, upto NR_CPUS.

> Signed-off-by: Alexander Nyberg <alexn@telia.com>

Thanks Alex,

Acked-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>

> Index: mm/arch/i386/kernel/smpboot.c
> ===================================================================
> --- mm.orig/arch/i386/kernel/smpboot.c 2005-09-02 15:28:20.000000000 +0200
> +++ mm/arch/i386/kernel/smpboot.c 2005-09-02 16:16:46.000000000 +0200
> @@ -1265,6 +1265,7 @@
> cpu_set(smp_processor_id(), cpu_online_map);
> cpu_set(smp_processor_id(), cpu_callout_map);
> cpu_set(smp_processor_id(), cpu_present_map);
> + cpu_set(smp_processor_id(), cpu_possible_map);
> per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
> }
>
> Index: mm/arch/i386/mach-voyager/voyager_smp.c
> ===================================================================
> --- mm.orig/arch/i386/mach-voyager/voyager_smp.c 2005-09-02 15:28:20.000000000 +0200
> +++ mm/arch/i386/mach-voyager/voyager_smp.c 2005-09-02 16:17:29.000000000 +0200
> @@ -1910,6 +1910,7 @@
> {
> cpu_set(smp_processor_id(), cpu_online_map);
> cpu_set(smp_processor_id(), cpu_callout_map);
> + cpu_set(smp_processor_id(), cpu_possible_map);
> }
>
> int __devinit
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-02 16:43    [W:0.219 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site