powerpc: Avoid debug_smp_processor_id() check in SHARED_PROCESSOR
authorLi Zhong <zhong@linux.vnet.ibm.com>
Thu, 24 Jan 2013 21:51:13 +0000 (21:51 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 29 Jan 2013 00:35:06 +0000 (11:35 +1100)
Use local_paca directly in macro SHARED_PROCESSOR, as all processors
have the same value for the field shared_proc, so we don't need care
racy here.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/spinlock.h

index 7124fc06ad47d304303b93e725f0c4a1f822d0eb..5b23f910ee57ea06817815cf0f5688fc0c024b93 100644 (file)
@@ -96,7 +96,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
 
 #if defined(CONFIG_PPC_SPLPAR)
 /* We only yield to the hypervisor if we are in shared processor mode */
-#define SHARED_PROCESSOR (get_lppaca()->shared_proc)
+#define SHARED_PROCESSOR (local_paca->lppaca_ptr->shared_proc)
 extern void __spin_yield(arch_spinlock_t *lock);
 extern void __rw_yield(arch_rwlock_t *lock);
 #else /* SPLPAR */