unsigned long *pending_ipis = &__ia64_per_cpu_var(ipi_operation);
unsigned long ops;
- /* Count this now; we may make a call that never returns. */
- local_cpu_data->ipi_count++;
-
mb(); /* Order interrupt and bit testing. */
while ((ops = xchg(pending_ipis, 0)) != 0) {
mb(); /* Order bit clearing and data access. */
}
EXPORT_SYMBOL(smp_call_function);
-void
-smp_do_timer (struct pt_regs *regs)
-{
- int user = user_mode(regs);
-
- if (--local_cpu_data->prof_counter <= 0) {
- local_cpu_data->prof_counter = local_cpu_data->prof_multiplier;
- update_process_times(user);
- }
-}
-
/*
* this function calls the 'stop' function on all other CPUs in the system.
*/
static inline void __init
smp_setup_percpu_timer (void)
{
- local_cpu_data->prof_counter = 1;
- local_cpu_data->prof_multiplier = 1;
}
static void __init
ia64_do_profile(regs);
while (1) {
-
#ifdef CONFIG_SMP
- smp_do_timer(regs);
+ /*
+ * For UP, this is done in do_timer(). Weird, but
+ * fixing that would require updates to all
+ * platforms.
+ */
+ update_process_times(user_mode(regs));
#endif
new_itm += local_cpu_data->itm_delta;
}
do {
- /*
- * If we're too close to the next clock tick for comfort, we increase the
- * safety margin by intentionally dropping the next tick(s). We do NOT update
- * itm.next because that would force us to call do_timer() which in turn would
- * let our clock run too fast (with the potentially devastating effect of
- * losing monotony of time).
- */
- while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2))
- new_itm += local_cpu_data->itm_delta;
- ia64_set_itm(new_itm);
- /* double check, in case we got hit by a (slow) PMI: */
+ /*
+ * If we're too close to the next clock tick for
+ * comfort, we increase the safety margin by
+ * intentionally dropping the next tick(s). We do NOT
+ * update itm.next because that would force us to call
+ * do_timer() which in turn would let our clock run
+ * too fast (with the potentially devastating effect
+ * of losing monotony of time).
+ */
+ while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2))
+ new_itm += local_cpu_data->itm_delta;
+ ia64_set_itm(new_itm);
+ /* double check, in case we got hit by a (slow) PMI: */
} while (time_after_eq(ia64_get_itc(), new_itm));
return IRQ_HANDLED;
}
__u32 softirq_pending;
__u64 itm_delta; /* # of clock cycles between clock ticks */
__u64 itm_next; /* interval timer mask value to use for next clock tick */
+ __u64 nsec_per_cyc; /* (1000000000<<IA64_NSEC_PER_CYC_SHIFT)/itc_freq */
+ __u64 unimpl_va_mask; /* mask of unimplemented virtual address bits (from PAL) */
+ __u64 unimpl_pa_mask; /* mask of unimplemented physical address bits (from PAL) */
__u64 *pgd_quick;
__u64 *pmd_quick;
__u64 pgtable_cache_sz;
- /* CPUID-derived information: */
- __u64 ppn;
- __u64 features;
- __u8 number;
- __u8 revision;
- __u8 model;
- __u8 family;
- __u8 archrev;
- char vendor[16];
__u64 itc_freq; /* frequency of ITC counter */
__u64 proc_freq; /* frequency of processor */
__u64 cyc_per_usec; /* itc_freq/1000000 */
- __u64 nsec_per_cyc; /* (1000000000<<IA64_NSEC_PER_CYC_SHIFT)/itc_freq */
- __u64 unimpl_va_mask; /* mask of unimplemented virtual address bits (from PAL) */
- __u64 unimpl_pa_mask; /* mask of unimplemented physical address bits (from PAL) */
__u64 ptce_base;
__u32 ptce_count[2];
__u32 ptce_stride[2];
struct task_struct *ksoftirqd; /* kernel softirq daemon for this CPU */
+
#ifdef CONFIG_SMP
- int cpu;
__u64 loops_per_jiffy;
- __u64 ipi_count;
- __u64 prof_counter;
- __u64 prof_multiplier;
+ int cpu;
#endif
+
+ /* CPUID-derived information: */
+ __u64 ppn;
+ __u64 features;
+ __u8 number;
+ __u8 revision;
+ __u8 model;
+ __u8 family;
+ __u8 archrev;
+ char vendor[16];
+
#ifdef CONFIG_NUMA
struct ia64_node_data *node_data;
#endif