]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/paca.h
taskstats scaled time cleanup
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / paca.h
index c6a5b173566676c5d5bef92336f687c95bc13142..748b35ab37b5aa7fdf02291149777d3117803467 100644 (file)
 #include       <asm/mmu.h>
 
 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)
 
@@ -103,11 +114,10 @@ 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 */
 };
 
 extern struct paca_struct paca[];
 
-void setup_boot_paca(void);
-
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_PACA_H */