From: Andi Kleen <andi@firstfloor.org>
To: masbock@linux.vnet.ibm.com, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [4/9] MCE: Call 64bit machine check through a call vector
Date: Fri, 4 Jul 2008 23:20:28 +0200 (CEST) [thread overview]
Message-ID: <20080704212028.BCCA91B431F@basil.firstfloor.org> (raw)
In-Reply-To: <200807041120.678642023@firstfloor.org>
The 32bit mce code still needs that to interface to the WinChip
and P5 machine check handlers. On 64bit it's not strictly needed, but
also doesn't really hurt.
This way avoids some special cases for 32bit.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/kernel/cpu/mcheck/mce_64.c | 9 +++++++++
arch/x86/kernel/entry_64.S | 2 +-
include/asm-x86/mce.h | 2 ++
3 files changed, 12 insertions(+), 1 deletion(-)
Index: linux/arch/x86/kernel/cpu/mcheck/mce_64.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ linux/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -317,6 +317,13 @@ void do_machine_check(struct pt_regs * r
atomic_dec(&mce_entry);
}
+static void ignore_machine_check(struct pt_regs *regs, long error_code)
+{
+}
+
+void (*machine_check_vector)(struct pt_regs *regs, long error_code) =
+ ignore_machine_check;
+
#ifdef CONFIG_X86_MCE_INTEL
/***
* mce_log_therm_throt_event - Logs the thermal throttling event to mcelog
@@ -533,6 +540,8 @@ void __cpuinit mcheck_init(struct cpuinf
!mce_available(c))
return;
+ machine_check_vector = do_machine_check;
+
mce_init(NULL);
mce_cpu_features(c);
}
Index: linux/arch/x86/kernel/entry_64.S
===================================================================
--- linux.orig/arch/x86/kernel/entry_64.S
+++ linux/arch/x86/kernel/entry_64.S
@@ -1170,7 +1170,7 @@ ENTRY(machine_check)
INTR_FRAME
pushq $0
CFI_ADJUST_CFA_OFFSET 8
- paranoidentry do_machine_check
+ paranoidentry *machine_check_vector(%rip)
jmp paranoid_exit1
CFI_ENDPROC
END(machine_check)
Index: linux/include/asm-x86/mce.h
===================================================================
--- linux.orig/include/asm-x86/mce.h
+++ linux/include/asm-x86/mce.h
@@ -107,6 +107,8 @@ static inline void mce_amd_feature_init(
void mce_log_therm_throt_event(unsigned int cpu, __u64 status);
+extern void (*machine_check_vector)(struct pt_regs *, long error_code);
+
extern atomic_t mce_entry;
extern void do_machine_check(struct pt_regs *, long);
next prev parent reply other threads:[~2008-07-04 21:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 21:20 [PATCH] [0/9] Use 64bit x86 machine check code for 32bit too Andi Kleen
2008-07-04 21:20 ` [PATCH] [1/9] MCE: Make 64bit mce code 32bit clean Andi Kleen
2008-07-04 21:20 ` [PATCH] [2/9] MCE: Implement the PPro bank 0 quirk in the 64bit machine check code Andi Kleen
2008-07-04 21:20 ` [PATCH] [3/9] MCE: Port K7 bank 0 quirk to 64bit mce code Andi Kleen
2008-07-04 21:20 ` Andi Kleen [this message]
2008-07-04 21:20 ` [PATCH] [5/9] MCE: Rename mce_dont_init on 64bit to mce_disabled Andi Kleen
2008-07-04 21:20 ` [PATCH] [6/9] MCE: Provide exit_idle dummy functions for 32bit Andi Kleen
2008-07-04 21:20 ` [PATCH] [7/9] MCE: Remove machine check handler idle notify on 64bit Andi Kleen
2008-07-04 21:20 ` [PATCH] [8/9] MCE: Remove oops_begin() use in 64bit machine check Andi Kleen
2008-07-04 21:20 ` [PATCH] [9/9] MCE: Use 64bit machine check code on 32bit Andi Kleen
2008-07-05 9:50 ` Bert Wesarg
2008-07-05 9:54 ` Andi Kleen
2008-07-05 10:17 ` Bert Wesarg
2008-07-05 10:55 ` Andi Kleen
2008-07-10 18:23 ` Pavel Machek
2008-07-07 21:26 ` [PATCH] [0/9] Use 64bit x86 machine check code for 32bit too H. Peter Anvin
2008-07-07 21:37 ` H. Peter Anvin
2008-07-08 0:00 ` Max Asbock
2008-07-08 0:25 ` Andi Kleen
2008-07-07 22:09 ` Andi Kleen
2008-07-07 6:28 Andi Kleen
2008-07-07 6:28 ` [PATCH] [4/9] MCE: Call 64bit machine check through a call vector Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080704212028.BCCA91B431F@basil.firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masbock@linux.vnet.ibm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome