diff options
author | Keith Owens <kaos@sgi.com> | 2006-06-26 07:59:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:22 -0400 |
commit | 45486f81c9aa07218b73a38cbcf62ffa66e99088 (patch) | |
tree | 8fc03b93b941c6ba3131bb016fe126f2f95e3c86 /arch/i386/kernel/smp.c | |
parent | 9c63f8738734eb7e6d3f76ca03186f16ef88edf5 (diff) |
[PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
x86_64 and i386 behave inconsistently when sending an IPI on vector 2
(NMI_VECTOR). Make both behave the same, so IPI 2 is sent as NMI.
The crash code was abusing send_IPI_allbutself() by passing a code
instead of a vector, it only worked because crash knew about the
internal code of send_IPI_allbutself(). Change crash to use NMI_VECTOR
instead, and remove the comment about how crash was abusing the function.
This patch is a pre-requisite for fixing the problem where sending an
IPI as NMI would reboot some Dell Xeon systems. I cannot fix that
problem while crash continus to abuse send_IPI_allbutself().
It also removes the inconsistency between i386 and x86_64 for
NMI_VECTOR. That will simplify all the RAS code that needs to bring
all the cpus to a clean stop, even when one or more cpus are spinning
disabled.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/smp.c')
-rw-r--r-- | arch/i386/kernel/smp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index d134e9643a58..c10789d7a9d3 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c | |||
@@ -114,7 +114,17 @@ DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { &init_m | |||
114 | 114 | ||
115 | static inline int __prepare_ICR (unsigned int shortcut, int vector) | 115 | static inline int __prepare_ICR (unsigned int shortcut, int vector) |
116 | { | 116 | { |
117 | return APIC_DM_FIXED | shortcut | vector | APIC_DEST_LOGICAL; | 117 | unsigned int icr = shortcut | APIC_DEST_LOGICAL; |
118 | |||
119 | switch (vector) { | ||
120 | default: | ||
121 | icr |= APIC_DM_FIXED | vector; | ||
122 | break; | ||
123 | case NMI_VECTOR: | ||
124 | icr |= APIC_DM_NMI; | ||
125 | break; | ||
126 | } | ||
127 | return icr; | ||
118 | } | 128 | } |
119 | 129 | ||
120 | static inline int __prepare_ICR2 (unsigned int mask) | 130 | static inline int __prepare_ICR2 (unsigned int mask) |