[PATCH] use _smp_processor_id() in idle loops

Nathan Lynch nathanl at austin.ibm.com
Wed Feb 16 12:23:47 EST 2005

On Sat, 2005-01-29 at 16:24 -0600, Nathan Lynch wrote:
> On Thu, 2005-01-27 at 16:23 -0600, Nathan Lynch wrote:
> > With 2.6.11-rc2-mm1 and 2.6-bk kernels with CONFIG_DEBUG_PREEMPT I'm
> > seeing lots of smp_processor_id warnings from the idle loops:
> > 
> > BUG: using smp_processor_id() in preemptible [00000001] code:
> > swapper/0
> > caller is .dedicated_idle+0x64/0x228
> > Call Trace:
> > [c0000000004a3c50] [ffffffffffffffff] 0xffffffffffffffff (unreliable)
> > [c0000000004a3cd0] [c0000000001d179c] .smp_processor_id+0x154/0x168
> > [c0000000004a3d90] [c00000000000f990] .dedicated_idle+0x64/0x228
> > [c0000000004a3e80] [c00000000000fce0] .cpu_idle+0x34/0x4c
> > [c0000000004a3f00] [c00000000003a908] .start_secondary+0x10c/0x150
> > [c0000000004a3f90] [c00000000000bd28] .enable_64b_mode+0x0/0x28
> This appears to be fixed in 2.6.11-rc2-mm2, so I guess my patch isn't
> necessary now.

Ok I'm a moron.  This patch is still needed.  With latest 2.6-bk I see
the warning whenever I online a cpu, and it's incessant in shared
processor mode (no hotplugging of cpus required to trigger it).  This is
because of the second use of smp_processor_id in the shared_idle
function.  I think I confused myself by switching a test partition
between shared and dedicated processor modes and not taking that into
account.  Sorry for the mixup.


More information about the Linuxppc64-dev mailing list