IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
[powerpc.git] / kernel / profile.c
index fb660c7..857300a 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mutex.h>
 #include <asm/sections.h>
 #include <asm/semaphore.h>
+#include <asm/irq_regs.h>
 
 struct profile_hit {
        u32 pc, hits;
@@ -366,8 +367,10 @@ void profile_hit(int type, void *__pc)
 }
 #endif /* !CONFIG_SMP */
 
-void profile_tick(int type, struct pt_regs *regs)
+void profile_tick(int type)
 {
+       struct pt_regs *regs = get_irq_regs();
+
        if (type == CPU_PROFILING && timer_hook)
                timer_hook(regs);
        if (!user_mode(regs) && cpu_isset(smp_processor_id(), prof_cpu_mask))