diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/kernel/smp.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r-- | arch/x86/kernel/smp.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 74cca6014c0e..ed4c4f54e2ae 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -174,10 +174,10 @@ asmlinkage void smp_reboot_interrupt(void) | |||
174 | irq_exit(); | 174 | irq_exit(); |
175 | } | 175 | } |
176 | 176 | ||
177 | static void native_smp_send_stop(void) | 177 | static void native_stop_other_cpus(int wait) |
178 | { | 178 | { |
179 | unsigned long flags; | 179 | unsigned long flags; |
180 | unsigned long wait; | 180 | unsigned long timeout; |
181 | 181 | ||
182 | if (reboot_force) | 182 | if (reboot_force) |
183 | return; | 183 | return; |
@@ -194,9 +194,12 @@ static void native_smp_send_stop(void) | |||
194 | if (num_online_cpus() > 1) { | 194 | if (num_online_cpus() > 1) { |
195 | apic->send_IPI_allbutself(REBOOT_VECTOR); | 195 | apic->send_IPI_allbutself(REBOOT_VECTOR); |
196 | 196 | ||
197 | /* Don't wait longer than a second */ | 197 | /* |
198 | wait = USEC_PER_SEC; | 198 | * Don't wait longer than a second if the caller |
199 | while (num_online_cpus() > 1 && wait--) | 199 | * didn't ask us to wait. |
200 | */ | ||
201 | timeout = USEC_PER_SEC; | ||
202 | while (num_online_cpus() > 1 && (wait || timeout--)) | ||
200 | udelay(1); | 203 | udelay(1); |
201 | } | 204 | } |
202 | 205 | ||
@@ -206,9 +209,7 @@ static void native_smp_send_stop(void) | |||
206 | } | 209 | } |
207 | 210 | ||
208 | /* | 211 | /* |
209 | * Reschedule call back. Nothing to do, | 212 | * Reschedule call back. |
210 | * all the work is done automatically when | ||
211 | * we return from the interrupt. | ||
212 | */ | 213 | */ |
213 | void smp_reschedule_interrupt(struct pt_regs *regs) | 214 | void smp_reschedule_interrupt(struct pt_regs *regs) |
214 | { | 215 | { |
@@ -216,6 +217,11 @@ void smp_reschedule_interrupt(struct pt_regs *regs) | |||
216 | /* LITMUS^RT: this IPI might need to trigger the sched state machine. */ | 217 | /* LITMUS^RT: this IPI might need to trigger the sched state machine. */ |
217 | sched_state_ipi(); | 218 | sched_state_ipi(); |
218 | inc_irq_stat(irq_resched_count); | 219 | inc_irq_stat(irq_resched_count); |
220 | /* | ||
221 | * LITMUS^RT: starting from 3.0 schedule_ipi() actually does something. | ||
222 | * This may increase IPI latencies compared with previous versions. | ||
223 | */ | ||
224 | scheduler_ipi(); | ||
219 | TS_SEND_RESCHED_END; | 225 | TS_SEND_RESCHED_END; |
220 | /* | 226 | /* |
221 | * KVM uses this interrupt to force a cpu out of guest mode | 227 | * KVM uses this interrupt to force a cpu out of guest mode |
@@ -254,7 +260,7 @@ struct smp_ops smp_ops = { | |||
254 | .smp_prepare_cpus = native_smp_prepare_cpus, | 260 | .smp_prepare_cpus = native_smp_prepare_cpus, |
255 | .smp_cpus_done = native_smp_cpus_done, | 261 | .smp_cpus_done = native_smp_cpus_done, |
256 | 262 | ||
257 | .smp_send_stop = native_smp_send_stop, | 263 | .stop_other_cpus = native_stop_other_cpus, |
258 | .smp_send_reschedule = native_smp_send_reschedule, | 264 | .smp_send_reschedule = native_smp_send_reschedule, |
259 | 265 | ||
260 | .cpu_up = native_cpu_up, | 266 | .cpu_up = native_cpu_up, |