X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-powerpc%2Fpaca.h;h=f6dfce025adfe4d117587321782b607028142bbf;hb=68d315f5975c05595af52e3b758b5b6ebae1a266;hp=cf95274f735e43ea3e9120b9697e0b0be75177bf;hpb=d6454706c382ab74e2ecad7803c434cc6bd30343;p=linux-2.6 diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index cf95274f73..f6dfce025a 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h @@ -21,7 +21,18 @@ #include register struct paca_struct *local_paca asm("r13"); + +#if defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_SMP) +extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */ +/* + * Add standard checks that preemption cannot occur when using get_paca(): + * otherwise the paca_struct it points to may be the wrong one just after. + */ +#define get_paca() ((void) debug_smp_processor_id(), local_paca) +#else #define get_paca() local_paca +#endif + #define get_lppaca() (get_paca()->lppaca_ptr) #define get_slb_shadow() (get_paca()->slb_shadow_ptr) @@ -83,8 +94,8 @@ struct paca_struct { mm_context_t context; u16 vmalloc_sllp; - u16 slb_cache[SLB_CACHE_ENTRIES]; u16 slb_cache_ptr; + u16 slb_cache[SLB_CACHE_ENTRIES]; /* * then miscellaneous read-write fields @@ -103,11 +114,12 @@ struct paca_struct { u64 user_time; /* accumulated usermode TB ticks */ u64 system_time; /* accumulated system TB ticks */ u64 startpurr; /* PURR/TB value snapshot */ + u64 startspurr; /* SPURR value snapshot */ + u64 purrdelta; /* FIXME: document */ + u64 spurrdelta; /* FIXME: document */ }; extern struct paca_struct paca[]; -void setup_boot_paca(void); - #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_PACA_H */