summaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/smpboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/kernel/smpboot.c')
-rw-r--r--arch/tile/kernel/smpboot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/tile/kernel/smpboot.c b/arch/tile/kernel/smpboot.c
index 44bab29bf2f3..dee7f13c5854 100644
--- a/arch/tile/kernel/smpboot.c
+++ b/arch/tile/kernel/smpboot.c
@@ -142,13 +142,15 @@ static struct cpumask cpu_started __cpuinitdata;
*/
static void __cpuinit start_secondary(void)
{
- int cpuid = smp_processor_id();
+ int cpuid;
+
+ preempt_disable();
+
+ cpuid = smp_processor_id();
/* Set our thread pointer appropriately. */
set_my_cpu_offset(__per_cpu_offset[cpuid]);
- preempt_disable();
-
/*
* In large machines even this will slow us down, since we
* will be contending for for the printk spinlock.