X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fsparc64%2Fkernel%2Fsmp.c;h=474c4edd4d315d9d1f11e7bfc4b77695f0bff96f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=f2bbaafd8d57ab69a2ab7c9b807edbb9ca37063b;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index f2bbaafd8..474c4edd4 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -103,15 +103,6 @@ extern void inherit_locked_prom_mappings(int save_p); void __init smp_callin(void) { int cpuid = hard_smp_processor_id(); - extern int bigkernel; - extern unsigned long kern_locked_tte_data; - - if (bigkernel) { - prom_dtlb_load(sparc64_highest_locked_tlbent()-1, - kern_locked_tte_data + 0x400000, KERNBASE + 0x400000); - prom_itlb_load(sparc64_highest_locked_tlbent()-1, - kern_locked_tte_data + 0x400000, KERNBASE + 0x400000); - } inherit_locked_prom_mappings(0); @@ -163,7 +154,7 @@ static unsigned long current_tick_offset; #define NUM_ROUNDS 64 /* magic value */ #define NUM_ITERS 5 /* likewise */ -static spinlock_t itc_sync_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(itc_sync_lock); static unsigned long go[SLAVE + 1]; #define DEBUG_TICK_SYNC 0 @@ -555,7 +546,7 @@ struct call_data_struct { int wait; }; -static spinlock_t call_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(call_lock); static struct call_data_struct *call_data; extern unsigned long xcall_call_function; @@ -903,9 +894,8 @@ static unsigned long penguins_are_doing_time; void smp_capture(void) { - int result = __atomic_add(1, &smp_capture_depth); + int result = atomic_add_ret(1, &smp_capture_depth); - membar("#StoreStore | #LoadStore"); if (result == 1) { int ncpus = num_online_cpus(); @@ -1155,7 +1145,7 @@ report: } /* /proc/profile writes can call this, don't __init it please. */ -static spinlock_t prof_setup_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(prof_setup_lock); int setup_profiling_timer(unsigned int multiplier) {