From: Brian Gerst <bgerst@quark.didntduck.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] Regparm for x86 machine check handlers
Date: Mon, 15 Nov 2004 12:42:08 -0500 [thread overview]
Message-ID: <4198EA70.202@quark.didntduck.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
The patch to change traps and interrupts to the fastcall convention
missed the machine check handlers.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
[-- Attachment #2: mcheck-fastcall --]
[-- Type: text/plain, Size: 4627 bytes --]
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/k7.c linux/arch/i386/kernel/cpu/mcheck/k7.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/k7.c 2004-10-22 22:59:22.000000000 -0400
+++ linux/arch/i386/kernel/cpu/mcheck/k7.c 2004-11-06 19:14:22.000000000 -0500
@@ -18,7 +18,7 @@
#include "mce.h"
/* Machine Check Handler For AMD Athlon/Duron */
-static asmlinkage void k7_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void k7_machine_check(struct pt_regs * regs, long error_code)
{
int recover=1;
u32 alow, ahigh, high, low;
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/mce.c linux/arch/i386/kernel/cpu/mcheck/mce.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/mce.c 2004-06-23 18:05:51.000000000 -0400
+++ linux/arch/i386/kernel/cpu/mcheck/mce.c 2004-11-06 19:14:38.000000000 -0500
@@ -22,13 +22,13 @@
EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */
/* Handle unconfigured int18 (should never happen) */
-static asmlinkage void unexpected_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void unexpected_machine_check(struct pt_regs * regs, long error_code)
{
printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n", smp_processor_id());
}
/* Call the installed machine check handler for this CPU setup. */
-void asmlinkage (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;
+void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;
/* This has to be run for each processor */
void __init mcheck_init(struct cpuinfo_x86 *c)
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/mce.h linux/arch/i386/kernel/cpu/mcheck/mce.h
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/mce.h 2003-12-17 21:58:15.000000000 -0500
+++ linux/arch/i386/kernel/cpu/mcheck/mce.h 2004-11-06 19:15:18.000000000 -0500
@@ -7,7 +7,7 @@
void winchip_mcheck_init(struct cpuinfo_x86 *c);
/* Call the installed machine check handler for this CPU setup. */
-extern asmlinkage void (*machine_check_vector)(struct pt_regs *, long error_code);
+extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code);
extern int mce_disabled __initdata;
extern int nr_mce_banks;
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p4.c linux/arch/i386/kernel/cpu/mcheck/p4.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-06 20:02:10.000000000 -0500
+++ linux/arch/i386/kernel/cpu/mcheck/p4.c 2004-11-06 19:14:46.000000000 -0500
@@ -159,7 +159,7 @@
return mce_num_extended_msrs;
}
-static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
{
int recover=1;
u32 alow, ahigh, high, low;
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p5.c linux/arch/i386/kernel/cpu/mcheck/p5.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p5.c 2004-10-22 22:59:22.000000000 -0400
+++ linux/arch/i386/kernel/cpu/mcheck/p5.c 2004-11-06 19:14:52.000000000 -0500
@@ -17,7 +17,7 @@
#include "mce.h"
/* Machine check handler for Pentium class Intel */
-static asmlinkage void pentium_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void pentium_machine_check(struct pt_regs * regs, long error_code)
{
u32 loaddr, hi, lotype;
rdmsr(MSR_IA32_P5_MC_ADDR, loaddr, hi);
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p6.c linux/arch/i386/kernel/cpu/mcheck/p6.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/p6.c 2004-10-22 22:59:22.000000000 -0400
+++ linux/arch/i386/kernel/cpu/mcheck/p6.c 2004-11-06 19:14:57.000000000 -0500
@@ -17,7 +17,7 @@
#include "mce.h"
/* Machine Check Handler For PII/PIII */
-static asmlinkage void intel_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
{
int recover=1;
u32 alow, ahigh, high, low;
diff -urN linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/winchip.c linux/arch/i386/kernel/cpu/mcheck/winchip.c
--- linux-2.6.10-rc1-bk/arch/i386/kernel/cpu/mcheck/winchip.c 2004-10-22 22:59:22.000000000 -0400
+++ linux/arch/i386/kernel/cpu/mcheck/winchip.c 2004-11-06 19:15:01.000000000 -0500
@@ -16,7 +16,7 @@
#include "mce.h"
/* Machine check handler for WinChip C6 */
-static asmlinkage void winchip_machine_check(struct pt_regs * regs, long error_code)
+static fastcall void winchip_machine_check(struct pt_regs * regs, long error_code)
{
printk(KERN_EMERG "CPU0: Machine Check Exception.\n");
add_taint(TAINT_MACHINE_CHECK);
next reply other threads:[~2004-11-15 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-15 17:42 Brian Gerst [this message]
2004-11-15 20:05 ` [PATCH] Regparm for x86 machine check handlers Linus Torvalds
2004-11-15 21:54 ` Randy.Dunlap
2004-11-15 23:10 ` Linus Torvalds
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=4198EA70.202@quark.didntduck.org \
--to=bgerst@quark.didntduck.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.