X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fkernel%2Ftime.c;h=96a6138e4109e734f05b84db0eb174349d8c03be;hb=1be35e94e1da3669db492995cd2c8b1a37016b11;hp=cfeff0479c2e6a972839a19e39c6bd536b51e0ca;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index cfeff0479..96a6138e4 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c @@ -56,7 +56,6 @@ #include #include #include -#include #include #include @@ -108,23 +107,17 @@ static inline int tb_delta(unsigned *jiffy_stamp) { return delta; } +extern unsigned long prof_cpu_mask; +extern unsigned int * prof_buffer; +extern unsigned long prof_len; +extern unsigned long prof_shift; extern char _stext; -static inline void ppc_do_profile (struct pt_regs *regs) +static inline void ppc_do_profile (unsigned long nip) { - unsigned long nip; - extern unsigned long prof_cpu_mask; - - profile_hook(regs); - - if (user_mode(regs)) - return; - if (!prof_buffer) return; - nip = instruction_pointer(regs); - /* * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. * (default is all CPUs.) @@ -163,9 +156,8 @@ void timer_interrupt(struct pt_regs * regs) while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) { jiffy_stamp += tb_ticks_per_jiffy; - - ppc_do_profile(regs); - + if (!user_mode(regs)) + ppc_do_profile(instruction_pointer(regs)); if (smp_processor_id()) continue;