X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc64%2Fkernel%2Fsmp.c;h=fc99f7b8012f46157461cae1061a8c1544e30909;hb=refs%2Fheads%2Fvserver;hp=f62bf3a2de1a552f9b4bb5d46ab5037b9e53696b;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index f62bf3a2d..fc99f7b80 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -1187,6 +1188,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs) unsigned long compare, tick, pstate; int cpu = smp_processor_id(); int user = user_mode(regs); + struct pt_regs *old_regs; /* * Check for level 14 softint. @@ -1203,8 +1205,9 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs) clear_softint(tick_mask); } + old_regs = set_irq_regs(regs); do { - profile_tick(CPU_PROFILING, regs); + profile_tick(CPU_PROFILING); if (!--prof_counter(cpu)) { irq_enter(); @@ -1236,6 +1239,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs) : /* no outputs */ : "r" (pstate)); } while (time_after_eq(tick, compare)); + set_irq_regs(old_regs); } static void __init smp_setup_percpu_timer(void) @@ -1384,7 +1388,7 @@ void __devinit smp_prepare_boot_cpu(void) { } -int __devinit __cpu_up(unsigned int cpu) +int __cpuinit __cpu_up(unsigned int cpu) { int ret = smp_boot_one_cpu(cpu); @@ -1443,11 +1447,8 @@ void __init setup_per_cpu_areas(void) char *ptr; /* Copy section for each CPU (we discard the original) */ - goal = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); -#ifdef CONFIG_MODULES - if (goal < PERCPU_ENOUGH_ROOM) - goal = PERCPU_ENOUGH_ROOM; -#endif + goal = PERCPU_ENOUGH_ROOM; + __per_cpu_shift = 0; for (size = 1UL; size < goal; size <<= 1UL) __per_cpu_shift++;