aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-21 07:33:18 -0400
committerIngo Molnar <mingo@elte.hu>2012-03-01 04:28:03 -0500
commitbd2f55361f18347e890d52ff9cfd8895455ec11b (patch)
tree5725e83f96934da2c2d741255db929df34f153eb /arch
parentc5491ea779793f977d282754db478157cc409d82 (diff)
sched/rt: Use schedule_preempt_disabled()
Coccinelle based conversion. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/process.c4
-rw-r--r--arch/avr32/kernel/process.c4
-rw-r--r--arch/blackfin/kernel/process.c4
-rw-r--r--arch/cris/kernel/process.c4
-rw-r--r--arch/frv/kernel/process.c4
-rw-r--r--arch/h8300/kernel/process.c4
-rw-r--r--arch/ia64/kernel/process.c4
-rw-r--r--arch/m32r/kernel/process.c4
-rw-r--r--arch/m68k/kernel/process_mm.c4
-rw-r--r--arch/m68k/kernel/process_no.c4
-rw-r--r--arch/microblaze/kernel/process.c4
-rw-r--r--arch/mips/kernel/process.c4
-rw-r--r--arch/mn10300/kernel/process.c4
-rw-r--r--arch/parisc/kernel/process.c4
-rw-r--r--arch/powerpc/kernel/idle.c8
-rw-r--r--arch/powerpc/platforms/iseries/setup.c8
-rw-r--r--arch/s390/kernel/process.c4
-rw-r--r--arch/score/kernel/process.c4
-rw-r--r--arch/sh/kernel/idle.c4
-rw-r--r--arch/sparc/kernel/process_32.c8
-rw-r--r--arch/sparc/kernel/process_64.c10
-rw-r--r--arch/tile/kernel/process.c4
-rw-r--r--arch/x86/kernel/process_32.c4
-rw-r--r--arch/x86/kernel/process_64.c4
-rw-r--r--arch/xtensa/kernel/process.c4
25 files changed, 33 insertions, 85 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 971d65c253a..c2ae3cd331f 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -239,9 +239,7 @@ void cpu_idle(void)
239 leds_event(led_idle_end); 239 leds_event(led_idle_end);
240 rcu_idle_exit(); 240 rcu_idle_exit();
241 tick_nohz_idle_exit(); 241 tick_nohz_idle_exit();
242 preempt_enable_no_resched(); 242 schedule_preempt_disabled();
243 schedule();
244 preempt_disable();
245 } 243 }
246} 244}
247 245
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index ea339575032..92c5af98a6f 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -40,9 +40,7 @@ void cpu_idle(void)
40 cpu_idle_sleep(); 40 cpu_idle_sleep();
41 rcu_idle_exit(); 41 rcu_idle_exit();
42 tick_nohz_idle_exit(); 42 tick_nohz_idle_exit();
43 preempt_enable_no_resched(); 43 schedule_preempt_disabled();
44 schedule();
45 preempt_disable();
46 } 44 }
47} 45}
48 46
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 8dd0416673c..a80a643f369 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -94,9 +94,7 @@ void cpu_idle(void)
94 idle(); 94 idle();
95 rcu_idle_exit(); 95 rcu_idle_exit();
96 tick_nohz_idle_exit(); 96 tick_nohz_idle_exit();
97 preempt_enable_no_resched(); 97 schedule_preempt_disabled();
98 schedule();
99 preempt_disable();
100 } 98 }
101} 99}
102 100
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index aa585e4e979..d8f50ff6fad 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -115,9 +115,7 @@ void cpu_idle (void)
115 idle = default_idle; 115 idle = default_idle;
116 idle(); 116 idle();
117 } 117 }
118 preempt_enable_no_resched(); 118 schedule_preempt_disabled();
119 schedule();
120 preempt_disable();
121 } 119 }
122} 120}
123 121
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 3901df1213c..29cc4978378 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -92,9 +92,7 @@ void cpu_idle(void)
92 idle(); 92 idle();
93 } 93 }
94 94
95 preempt_enable_no_resched(); 95 schedule_preempt_disabled();
96 schedule();
97 preempt_disable();
98 } 96 }
99} 97}
100 98
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index 933bd388efb..1a173b35f47 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -81,9 +81,7 @@ void cpu_idle(void)
81 while (1) { 81 while (1) {
82 while (!need_resched()) 82 while (!need_resched())
83 idle(); 83 idle();
84 preempt_enable_no_resched(); 84 schedule_preempt_disabled();
85 schedule();
86 preempt_disable();
87 } 85 }
88} 86}
89 87
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 6d33c5cc94f..9dc52b63fc8 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -330,9 +330,7 @@ cpu_idle (void)
330 normal_xtp(); 330 normal_xtp();
331#endif 331#endif
332 } 332 }
333 preempt_enable_no_resched(); 333 schedule_preempt_disabled();
334 schedule();
335 preempt_disable();
336 check_pgt_cache(); 334 check_pgt_cache();
337 if (cpu_is_offline(cpu)) 335 if (cpu_is_offline(cpu))
338 play_dead(); 336 play_dead();
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 422bea9f1db..3a4a32b2720 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -90,9 +90,7 @@ void cpu_idle (void)
90 90
91 idle(); 91 idle();
92 } 92 }
93 preempt_enable_no_resched(); 93 schedule_preempt_disabled();
94 schedule();
95 preempt_disable();
96 } 94 }
97} 95}
98 96
diff --git a/arch/m68k/kernel/process_mm.c b/arch/m68k/kernel/process_mm.c
index 099283ee1a8..fe4186b5fc3 100644
--- a/arch/m68k/kernel/process_mm.c
+++ b/arch/m68k/kernel/process_mm.c
@@ -78,9 +78,7 @@ void cpu_idle(void)
78 while (1) { 78 while (1) {
79 while (!need_resched()) 79 while (!need_resched())
80 idle(); 80 idle();
81 preempt_enable_no_resched(); 81 schedule_preempt_disabled();
82 schedule();
83 preempt_disable();
84 } 82 }
85} 83}
86 84
diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c
index 5e1078cabe0..f7fe6c34859 100644
--- a/arch/m68k/kernel/process_no.c
+++ b/arch/m68k/kernel/process_no.c
@@ -73,9 +73,7 @@ void cpu_idle(void)
73 /* endless idle loop with no priority at all */ 73 /* endless idle loop with no priority at all */
74 while (1) { 74 while (1) {
75 idle(); 75 idle();
76 preempt_enable_no_resched(); 76 schedule_preempt_disabled();
77 schedule();
78 preempt_disable();
79 } 77 }
80} 78}
81 79
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 7dcb5bfffb7..9155f7d9266 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -110,9 +110,7 @@ void cpu_idle(void)
110 rcu_idle_exit(); 110 rcu_idle_exit();
111 tick_nohz_idle_exit(); 111 tick_nohz_idle_exit();
112 112
113 preempt_enable_no_resched(); 113 schedule_preempt_disabled();
114 schedule();
115 preempt_disable();
116 check_pgt_cache(); 114 check_pgt_cache();
117 } 115 }
118} 116}
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 7955409051c..61f1cb45a1d 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -80,9 +80,7 @@ void __noreturn cpu_idle(void)
80#endif 80#endif
81 rcu_idle_exit(); 81 rcu_idle_exit();
82 tick_nohz_idle_exit(); 82 tick_nohz_idle_exit();
83 preempt_enable_no_resched(); 83 schedule_preempt_disabled();
84 schedule();
85 preempt_disable();
86 } 84 }
87} 85}
88 86
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 28eec310253..cac401d37f7 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -123,9 +123,7 @@ void cpu_idle(void)
123 idle(); 123 idle();
124 } 124 }
125 125
126 preempt_enable_no_resched(); 126 schedule_preempt_disabled();
127 schedule();
128 preempt_disable();
129 } 127 }
130} 128}
131 129
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 62c60b87d03..d4b94b395c1 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -71,9 +71,7 @@ void cpu_idle(void)
71 while (1) { 71 while (1) {
72 while (!need_resched()) 72 while (!need_resched())
73 barrier(); 73 barrier();
74 preempt_enable_no_resched(); 74 schedule_preempt_disabled();
75 schedule();
76 preempt_disable();
77 check_pgt_cache(); 75 check_pgt_cache();
78 } 76 }
79} 77}
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 0a48bf5db6c..65035141552 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -101,11 +101,11 @@ void cpu_idle(void)
101 ppc64_runlatch_on(); 101 ppc64_runlatch_on();
102 rcu_idle_exit(); 102 rcu_idle_exit();
103 tick_nohz_idle_exit(); 103 tick_nohz_idle_exit();
104 preempt_enable_no_resched(); 104 if (cpu_should_die()) {
105 if (cpu_should_die()) 105 preempt_enable_no_resched();
106 cpu_die(); 106 cpu_die();
107 schedule(); 107 }
108 preempt_disable(); 108 schedule_preempt_disabled();
109 } 109 }
110} 110}
111 111
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 8fc62586a97..a5fbf4cb632 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -584,9 +584,7 @@ static void iseries_shared_idle(void)
584 if (hvlpevent_is_pending()) 584 if (hvlpevent_is_pending())
585 process_iSeries_events(); 585 process_iSeries_events();
586 586
587 preempt_enable_no_resched(); 587 schedule_preempt_disabled();
588 schedule();
589 preempt_disable();
590 } 588 }
591} 589}
592 590
@@ -615,9 +613,7 @@ static void iseries_dedicated_idle(void)
615 ppc64_runlatch_on(); 613 ppc64_runlatch_on();
616 rcu_idle_exit(); 614 rcu_idle_exit();
617 tick_nohz_idle_exit(); 615 tick_nohz_idle_exit();
618 preempt_enable_no_resched(); 616 schedule_preempt_disabled();
619 schedule();
620 preempt_disable();
621 } 617 }
622} 618}
623 619
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index e795933eb2c..7618085b416 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -97,9 +97,7 @@ void cpu_idle(void)
97 tick_nohz_idle_exit(); 97 tick_nohz_idle_exit();
98 if (test_thread_flag(TIF_MCCK_PENDING)) 98 if (test_thread_flag(TIF_MCCK_PENDING))
99 s390_handle_mcck(); 99 s390_handle_mcck();
100 preempt_enable_no_resched(); 100 schedule_preempt_disabled();
101 schedule();
102 preempt_disable();
103 } 101 }
104} 102}
105 103
diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
index 25d08030a88..2707023c756 100644
--- a/arch/score/kernel/process.c
+++ b/arch/score/kernel/process.c
@@ -53,9 +53,7 @@ void __noreturn cpu_idle(void)
53 while (!need_resched()) 53 while (!need_resched())
54 barrier(); 54 barrier();
55 55
56 preempt_enable_no_resched(); 56 schedule_preempt_disabled();
57 schedule();
58 preempt_disable();
59 } 57 }
60} 58}
61 59
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 406508d4ce7..7e489282656 100644
--- a/arch/sh/kernel/idle.c
+++ b/arch/sh/kernel/idle.c
@@ -114,9 +114,7 @@ void cpu_idle(void)
114 114
115 rcu_idle_exit(); 115 rcu_idle_exit();
116 tick_nohz_idle_exit(); 116 tick_nohz_idle_exit();
117 preempt_enable_no_resched(); 117 schedule_preempt_disabled();
118 schedule();
119 preempt_disable();
120 } 118 }
121} 119}
122 120
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index f793742eec2..935fdbcd88c 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -113,9 +113,7 @@ void cpu_idle(void)
113 while (!need_resched()) 113 while (!need_resched())
114 cpu_relax(); 114 cpu_relax();
115 } 115 }
116 preempt_enable_no_resched(); 116 schedule_preempt_disabled();
117 schedule();
118 preempt_disable();
119 check_pgt_cache(); 117 check_pgt_cache();
120 } 118 }
121} 119}
@@ -138,9 +136,7 @@ void cpu_idle(void)
138 while (!need_resched()) 136 while (!need_resched())
139 cpu_relax(); 137 cpu_relax();
140 } 138 }
141 preempt_enable_no_resched(); 139 schedule_preempt_disabled();
142 schedule();
143 preempt_disable();
144 check_pgt_cache(); 140 check_pgt_cache();
145 } 141 }
146} 142}
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index 39d8b05201a..ab9a2926821 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -104,15 +104,13 @@ void cpu_idle(void)
104 rcu_idle_exit(); 104 rcu_idle_exit();
105 tick_nohz_idle_exit(); 105 tick_nohz_idle_exit();
106 106
107 preempt_enable_no_resched();
108
109#ifdef CONFIG_HOTPLUG_CPU 107#ifdef CONFIG_HOTPLUG_CPU
110 if (cpu_is_offline(cpu)) 108 if (cpu_is_offline(cpu)) {
109 preempt_enable_no_resched();
111 cpu_play_dead(); 110 cpu_play_dead();
111 }
112#endif 112#endif
113 113 schedule_preempt_disabled();
114 schedule();
115 preempt_disable();
116 } 114 }
117} 115}
118 116
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 4c1ac6e5347..6ae495ef2b9 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -108,9 +108,7 @@ void cpu_idle(void)
108 } 108 }
109 rcu_idle_exit(); 109 rcu_idle_exit();
110 tick_nohz_idle_exit(); 110 tick_nohz_idle_exit();
111 preempt_enable_no_resched(); 111 schedule_preempt_disabled();
112 schedule();
113 preempt_disable();
114 } 112 }
115} 113}
116 114
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index c08d1ff12b7..49888fefe79 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -119,9 +119,7 @@ void cpu_idle(void)
119 } 119 }
120 rcu_idle_exit(); 120 rcu_idle_exit();
121 tick_nohz_idle_exit(); 121 tick_nohz_idle_exit();
122 preempt_enable_no_resched(); 122 schedule_preempt_disabled();
123 schedule();
124 preempt_disable();
125 } 123 }
126} 124}
127 125
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index cfa5c90c01d..e34257c70c2 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -156,9 +156,7 @@ void cpu_idle(void)
156 } 156 }
157 157
158 tick_nohz_idle_exit(); 158 tick_nohz_idle_exit();
159 preempt_enable_no_resched(); 159 schedule_preempt_disabled();
160 schedule();
161 preempt_disable();
162 } 160 }
163} 161}
164 162
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index 47041e7c088..2c9004770c4 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -113,9 +113,7 @@ void cpu_idle(void)
113 while (1) { 113 while (1) {
114 while (!need_resched()) 114 while (!need_resched())
115 platform_idle(); 115 platform_idle();
116 preempt_enable_no_resched(); 116 schedule_preempt_disabled();
117 schedule();
118 preempt_disable();
119 } 117 }
120} 118}
121 119