-static inline void
-parisc_do_profile(struct pt_regs *regs)
-{
- unsigned long pc = regs->iaoq[0];
-#if 0
- extern unsigned long prof_cpu_mask;
-#endif
- extern char _stext;
-
- profile_hook(regs);
-
- if (user_mode(regs))
- return;
-
- if (!prof_buffer)
- return;
-
-#if 0
- /* FIXME: when we have irq affinity to cpu, we need to
- * only look at the cpus specified in this mask
- */
-
- if (!((1 << smp_processor_id()) & prof_cpu_mask))
- return;
-#endif
-
- pc -= (unsigned long) &_stext;
- pc >>= prof_shift;
- /*
- * Don't ignore out-of-bounds PC values silently,
- * put them into the last histogram slot, so if
- * present, they will show up as a sharp peak.
- */
- if (pc > prof_len - 1)
- pc = prof_len - 1;
- atomic_inc((atomic_t *)&prof_buffer[pc]);
-}
-