diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-12-08 12:32:27 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-12-21 15:38:53 -0500 |
commit | 1fd466efc88c48f50e5ee29f4dbb4e210a889172 (patch) | |
tree | b2ab7a342ca8eeda6fb62475011105fba5b29141 /arch/x86/kernel/entry_64.S | |
parent | 549c89b98c4530b278dde1a3f68ce5ebbb1e6304 (diff) |
x86: Document the NMI handler about not using paranoid_exit
Linus cleaned up the NMI handler but it still needs some comments to
explain why it uses save_paranoid but not paranoid_exit. Just to keep
others from adding that in the future, document why it's not used.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 3819ea907339..d1d5434e7f6a 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1480,9 +1480,16 @@ END(error_exit) | |||
1480 | ENTRY(nmi) | 1480 | ENTRY(nmi) |
1481 | INTR_FRAME | 1481 | INTR_FRAME |
1482 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1482 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1483 | pushq_cfi $-1 | 1483 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ |
1484 | subq $ORIG_RAX-R15, %rsp | 1484 | subq $ORIG_RAX-R15, %rsp |
1485 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 | 1485 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 |
1486 | /* | ||
1487 | * Use save_paranoid to handle SWAPGS, but no need to use paranoid_exit | ||
1488 | * as we should not be calling schedule in NMI context. | ||
1489 | * Even with normal interrupts enabled. An NMI should not be | ||
1490 | * setting NEED_RESCHED or anything that normal interrupts and | ||
1491 | * exceptions might do. | ||
1492 | */ | ||
1486 | call save_paranoid | 1493 | call save_paranoid |
1487 | DEFAULT_FRAME 0 | 1494 | DEFAULT_FRAME 0 |
1488 | /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ | 1495 | /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ |