X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fppc%2Fkernel%2Fsmp.c;h=7ed8a3bb81df4a5985d3a1d2233fa1d2b8cfeaa9;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=dae491743fb685cb697ac1dd89b74c6b64c41732;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index dae491743..7ed8a3bb8 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c @@ -42,8 +42,6 @@ struct cpuinfo_PPC cpu_data[NR_CPUS]; 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; @@ -60,7 +58,6 @@ static struct smp_ops_t *smp_ops; 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); @@ -89,16 +86,6 @@ smp_message_pass(int target, int msg, unsigned long data, int wait) /* * 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); @@ -176,7 +163,7 @@ void smp_send_stop(void) * 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); @@ -297,8 +284,6 @@ static void __devinit smp_store_cpu_info(int id) /* 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) @@ -358,7 +343,8 @@ int __devinit start_secondary(void *unused) 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)