diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2013-09-06 22:53:35 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-09-06 22:53:35 -0400 |
commit | eeca9fad52fc4bfdf42c38bfcf383e932eb3e9d6 (patch) | |
tree | cc51c880459d41c0e8d7576405bef4c987bc7aa0 /arch/x86/kernel/smp.c | |
parent | ff6f83fc9d44db09997937c3475d525a6866fbb4 (diff) | |
parent | b48a97be8e6c2afdba2f3b61fd88c3c7743fbd73 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge upstream tree in order to reinstate crct10dif.
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r-- | arch/x86/kernel/smp.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index f4fe0b8879e0..cdaa347dfcad 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -265,23 +265,30 @@ void smp_reschedule_interrupt(struct pt_regs *regs) | |||
265 | */ | 265 | */ |
266 | } | 266 | } |
267 | 267 | ||
268 | void smp_trace_reschedule_interrupt(struct pt_regs *regs) | 268 | static inline void smp_entering_irq(void) |
269 | { | 269 | { |
270 | ack_APIC_irq(); | 270 | ack_APIC_irq(); |
271 | irq_enter(); | ||
272 | } | ||
273 | |||
274 | void smp_trace_reschedule_interrupt(struct pt_regs *regs) | ||
275 | { | ||
276 | /* | ||
277 | * Need to call irq_enter() before calling the trace point. | ||
278 | * __smp_reschedule_interrupt() calls irq_enter/exit() too (in | ||
279 | * scheduler_ipi(). This is OK, since those functions are allowed | ||
280 | * to nest. | ||
281 | */ | ||
282 | smp_entering_irq(); | ||
271 | trace_reschedule_entry(RESCHEDULE_VECTOR); | 283 | trace_reschedule_entry(RESCHEDULE_VECTOR); |
272 | __smp_reschedule_interrupt(); | 284 | __smp_reschedule_interrupt(); |
273 | trace_reschedule_exit(RESCHEDULE_VECTOR); | 285 | trace_reschedule_exit(RESCHEDULE_VECTOR); |
286 | exiting_irq(); | ||
274 | /* | 287 | /* |
275 | * KVM uses this interrupt to force a cpu out of guest mode | 288 | * KVM uses this interrupt to force a cpu out of guest mode |
276 | */ | 289 | */ |
277 | } | 290 | } |
278 | 291 | ||
279 | static inline void call_function_entering_irq(void) | ||
280 | { | ||
281 | ack_APIC_irq(); | ||
282 | irq_enter(); | ||
283 | } | ||
284 | |||
285 | static inline void __smp_call_function_interrupt(void) | 292 | static inline void __smp_call_function_interrupt(void) |
286 | { | 293 | { |
287 | generic_smp_call_function_interrupt(); | 294 | generic_smp_call_function_interrupt(); |
@@ -290,14 +297,14 @@ static inline void __smp_call_function_interrupt(void) | |||
290 | 297 | ||
291 | void smp_call_function_interrupt(struct pt_regs *regs) | 298 | void smp_call_function_interrupt(struct pt_regs *regs) |
292 | { | 299 | { |
293 | call_function_entering_irq(); | 300 | smp_entering_irq(); |
294 | __smp_call_function_interrupt(); | 301 | __smp_call_function_interrupt(); |
295 | exiting_irq(); | 302 | exiting_irq(); |
296 | } | 303 | } |
297 | 304 | ||
298 | void smp_trace_call_function_interrupt(struct pt_regs *regs) | 305 | void smp_trace_call_function_interrupt(struct pt_regs *regs) |
299 | { | 306 | { |
300 | call_function_entering_irq(); | 307 | smp_entering_irq(); |
301 | trace_call_function_entry(CALL_FUNCTION_VECTOR); | 308 | trace_call_function_entry(CALL_FUNCTION_VECTOR); |
302 | __smp_call_function_interrupt(); | 309 | __smp_call_function_interrupt(); |
303 | trace_call_function_exit(CALL_FUNCTION_VECTOR); | 310 | trace_call_function_exit(CALL_FUNCTION_VECTOR); |
@@ -312,14 +319,14 @@ static inline void __smp_call_function_single_interrupt(void) | |||
312 | 319 | ||
313 | void smp_call_function_single_interrupt(struct pt_regs *regs) | 320 | void smp_call_function_single_interrupt(struct pt_regs *regs) |
314 | { | 321 | { |
315 | call_function_entering_irq(); | 322 | smp_entering_irq(); |
316 | __smp_call_function_single_interrupt(); | 323 | __smp_call_function_single_interrupt(); |
317 | exiting_irq(); | 324 | exiting_irq(); |
318 | } | 325 | } |
319 | 326 | ||
320 | void smp_trace_call_function_single_interrupt(struct pt_regs *regs) | 327 | void smp_trace_call_function_single_interrupt(struct pt_regs *regs) |
321 | { | 328 | { |
322 | call_function_entering_irq(); | 329 | smp_entering_irq(); |
323 | trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); | 330 | trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); |
324 | __smp_call_function_single_interrupt(); | 331 | __smp_call_function_single_interrupt(); |
325 | trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR); | 332 | trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR); |