aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/paca.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/paca.h')
-rw-r--r--include/asm-powerpc/paca.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index c6a5b1735666..fcd7b428ed0b 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -21,7 +21,18 @@
21#include <asm/mmu.h> 21#include <asm/mmu.h>
22 22
23register struct paca_struct *local_paca asm("r13"); 23register struct paca_struct *local_paca asm("r13");
24
25#if defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_SMP)
26extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */
27/*
28 * Add standard checks that preemption cannot occur when using get_paca():
29 * otherwise the paca_struct it points to may be the wrong one just after.
30 */
31#define get_paca() ((void) debug_smp_processor_id(), local_paca)
32#else
24#define get_paca() local_paca 33#define get_paca() local_paca
34#endif
35
25#define get_lppaca() (get_paca()->lppaca_ptr) 36#define get_lppaca() (get_paca()->lppaca_ptr)
26#define get_slb_shadow() (get_paca()->slb_shadow_ptr) 37#define get_slb_shadow() (get_paca()->slb_shadow_ptr)
27 38