aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/process.c4
-rw-r--r--arch/sparc64/kernel/smp.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 7d10b0397091..2f89206e008f 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -74,7 +74,9 @@ void cpu_idle(void)
74 while (!need_resched()) 74 while (!need_resched())
75 barrier(); 75 barrier();
76 76
77 preempt_enable_no_resched();
77 schedule(); 78 schedule();
79 preempt_disable();
78 check_pgt_cache(); 80 check_pgt_cache();
79 } 81 }
80} 82}
@@ -93,7 +95,9 @@ void cpu_idle(void)
93 if (need_resched()) { 95 if (need_resched()) {
94 unidle_me(); 96 unidle_me();
95 clear_thread_flag(TIF_POLLING_NRFLAG); 97 clear_thread_flag(TIF_POLLING_NRFLAG);
98 preempt_enable_no_resched();
96 schedule(); 99 schedule();
100 preempt_disable();
97 set_thread_flag(TIF_POLLING_NRFLAG); 101 set_thread_flag(TIF_POLLING_NRFLAG);
98 check_pgt_cache(); 102 check_pgt_cache();
99 } 103 }
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 5d90ee9aebf1..8aca4b1dc04e 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -168,6 +168,9 @@ void __init smp_callin(void)
168 rmb(); 168 rmb();
169 169
170 cpu_set(cpuid, cpu_online_map); 170 cpu_set(cpuid, cpu_online_map);
171
172 /* idle thread is expected to have preempt disabled */
173 preempt_disable();
171} 174}
172 175
173void cpu_panic(void) 176void cpu_panic(void)