struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
atomic_t ipi_recv;
atomic_t ipi_sent;
-DEFINE_PER_CPU(unsigned int, prof_multiplier);
-DEFINE_PER_CPU(unsigned int, prof_counter);
unsigned long cache_decay_ticks = HZ/100;
cpumask_t cpu_online_map;
cpumask_t cpu_possible_map;
volatile unsigned long cpu_callin_map[NR_CPUS];
int start_secondary(void *);
-extern int cpu_idle(void *unused);
void smp_call_function_interrupt(void);
static int __smp_call_function(void (*func) (void *info), void *info,
int wait, int target);
/*
* Common functions
*/
-void smp_local_timer_interrupt(struct pt_regs * regs)
-{
- int cpu = smp_processor_id();
-
- if (!--per_cpu(prof_counter, cpu)) {
- update_process_times(user_mode(regs));
- per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
- }
-}
-
void smp_message_recv(int msg, struct pt_regs *regs)
{
atomic_inc(&ipi_recv);
* static memory requirements. It also looks cleaner.
* Stolen from the i386 version.
*/
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
static struct call_data_struct {
void (*func) (void *info);
/* assume bogomips are same for everything */
c->loops_per_jiffy = loops_per_jiffy;
c->pvr = mfspr(PVR);
- per_cpu(prof_counter, id) = 1;
- per_cpu(prof_multiplier, id) = 1;
}
void __init smp_prepare_cpus(unsigned int max_cpus)
smp_ops->take_timebase();
printk("CPU %i done timebase take...\n", cpu);
- return cpu_idle(NULL);
+ cpu_idle();
+ return 0;
}
int __cpu_up(unsigned int cpu)