Message ID | Pine.LNX.4.64.0906040050120.6782@oizys.tordivel.org |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
From: oftedal <oftedal@gmail.com> Date: Thu, 4 Jun 2009 01:14:33 +0200 (CEST) > As mentioned in the bug-report(#13444) the sun4d-SMP code on > 2.4-series kernels(2.4.37) uses the physical cpu-mapping when > inserting tasks into the init_tasks array. > And the scheduler uses the logical cpu-mapping which will cause a > kernel nullpointer when there are gaps in the physical cpu-mapping. > > The attached patch uses the cpucount variable, which can be used to > find the next logical slot in the init_tasks array. As it is only > incremented > when a cpu is successfully started. > > (I hope this was more compliant with kernel-bugfixing standards. I am > new to this) > > Signed-off-by: Kjetil Oftedal <oftedal@gmail.com> I don't think we're handling 2.4.x patches at this point. :-) If the bug exists in 2.6.x as well I'd be happy to review such a patch and apply it for you. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 3 Jun 2009, David Miller wrote: > From: oftedal <oftedal@gmail.com> > Date: Thu, 4 Jun 2009 01:14:33 +0200 (CEST) > >> As mentioned in the bug-report(#13444) the sun4d-SMP code on >> 2.4-series kernels(2.4.37) uses the physical cpu-mapping when >> inserting tasks into the init_tasks array. >> And the scheduler uses the logical cpu-mapping which will cause a >> kernel nullpointer when there are gaps in the physical cpu-mapping. >> >> The attached patch uses the cpucount variable, which can be used to >> find the next logical slot in the init_tasks array. As it is only >> incremented >> when a cpu is successfully started. >> >> (I hope this was more compliant with kernel-bugfixing standards. I am >> new to this) >> >> Signed-off-by: Kjetil Oftedal <oftedal@gmail.com> > > I don't think we're handling 2.4.x patches at this point. :-) > > If the bug exists in 2.6.x as well I'd be happy to review such > a patch and apply it for you. > Yeah. 2.4.x is a "bit" old. But it was easier to fix. As the 2.6.x-series is giving me all kinds of trouble. The SMP-code was redesigned for 2.6, and I havn't been able to confirm if it works or not. I could have a go at it if someone could give me a small pointer in how to get the piggyback_32 utility working with 2.6s System.map. (looks like "A end" is missing from it) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Yeah. 2.4.x is a "bit" old. But it was easier to fix. As the 2.6.x-series > is giving me all kinds of trouble. The SMP-code was redesigned for 2.6, > and I havn't been able to confirm if it works or not. > I could have a go at it if someone could give me a small pointer in how to > get the piggyback_32 utility working with 2.6s System.map. > (looks like "A end" is missing from it) Just a quick guess.. Try to add: end = .; to arch/sparc/kernel/vmlinux.lds.S Do this above the definition of _end. Or better change piggyback_32 to support _end. Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 9bb7f78..5b9b34e 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -221,7 +221,9 @@ void __init smp4d_boot_cpus(void) cpucount++; p = init_task.prev_task; - init_tasks[i] = p; + + /* The scheduler uses the logical cpu mapping when accessing this array */ + init_tasks[cpucount] = p; p->processor = i; p->cpus_runnable = 1 << i; /* we schedule the first task manually */