From: Osamu Tomita <tomita@cinet.co.jp>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] PC-9800 additional for 2.5.61-ac1 (21/21) traps
Date: Thu, 20 Feb 2003 21:39:14 +0900 [thread overview]
Message-ID: <20030220123914.GT1657@yuzuki.cinet.co.jp> (raw)
In-Reply-To: <20030220121620.GA1618@yuzuki.cinet.co.jp>
This is additional patch to support NEC PC-9800 subarchitecture
against 2.5.61-ac1. (21/21)
Support difference of NMI handling, using mach-* scheme.
diff -Nru linux-2.5.61-ac1/arch/i386/kernel/traps.c linux98-2.5.61/arch/i386/kernel/traps.c
--- linux-2.5.61-ac1/arch/i386/kernel/traps.c 2003-02-18 08:58:20.000000000 +0900
+++ linux98-2.5.61/arch/i386/kernel/traps.c 2003-02-18 13:50:05.000000000 +0900
@@ -50,6 +50,8 @@
#include <linux/irq.h>
#include <linux/module.h>
+#include "mach_traps.h"
+
asmlinkage int system_call(void);
asmlinkage void lcall7(void);
asmlinkage void lcall27(void);
@@ -387,8 +389,7 @@
printk("You probably have a hardware problem with your RAM chips\n");
/* Clear and disable the memory parity error line. */
- reason = (reason & 0xf) | 4;
- outb(reason, 0x61);
+ clear_mem_error(reason);
}
static void io_check_error(unsigned char reason, struct pt_regs * regs)
@@ -425,7 +426,7 @@
static void default_do_nmi(struct pt_regs * regs)
{
- unsigned char reason = inb(0x61);
+ unsigned char reason = get_nmi_reason();
if (!(reason & 0xc0)) {
#if CONFIG_X86_LOCAL_APIC
@@ -449,10 +450,7 @@
* Reassert NMI in case it became active meanwhile
* as it's edge-triggered.
*/
- outb(0x8f, 0x70);
- inb(0x71); /* dummy */
- outb(0x0f, 0x70);
- inb(0x71); /* dummy */
+ reassert_nmi();
}
static int dummy_nmi_callback(struct pt_regs * regs, int cpu)
diff -Nru linux/include/asm-i386/mach-default/mach_traps.h linux98/include/asm-i386/mach-default/mach_traps.h
--- linux/include/asm-i386/mach-default/mach_traps.h 1970-01-01 09:00:00.000000000 +0900
+++ linux98/include/asm-i386/mach-default/mach_traps.h 2002-11-05 22:42:05.000000000 +0900
@@ -0,0 +1,29 @@
+/*
+ * include/asm-i386/mach-default/mach_traps.h
+ *
+ * Machine specific NMI handling for generic.
+ * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp>
+ */
+#ifndef _MACH_TRAPS_H
+#define _MACH_TRAPS_H
+
+static inline void clear_mem_error(unsigned char reason)
+{
+ reason = (reason & 0xf) | 4;
+ outb(reason, 0x61);
+}
+
+static inline unsigned char get_nmi_reason(void)
+{
+ return inb(0x61);
+}
+
+static inline void reassert_nmi(void)
+{
+ outb(0x8f, 0x70);
+ inb(0x71); /* dummy */
+ outb(0x0f, 0x70);
+ inb(0x71); /* dummy */
+}
+
+#endif /* !_MACH_TRAPS_H */
diff -Nru linux/include/asm-i386/mach-pc9800/mach_traps.h linux98/include/asm-i386/mach-pc9800/mach_traps.h
--- linux/include/asm-i386/mach-pc9800/mach_traps.h 1970-01-01 09:00:00.000000000 +0900
+++ linux98/include/asm-i386/mach-pc9800/mach_traps.h 2002-11-05 22:46:55.000000000 +0900
@@ -0,0 +1,27 @@
+/*
+ * include/asm-i386/mach-pc9800/mach_traps.h
+ *
+ * Machine specific NMI handling for PC-9800.
+ * Written by Osamu Tomita <tomita@cinet.co.jp>
+ */
+#ifndef _MACH_TRAPS_H
+#define _MACH_TRAPS_H
+
+static inline void clear_mem_error(unsigned char reason)
+{
+ outb(0x08, 0x37);
+ outb(0x09, 0x37);
+}
+
+static inline unsigned char get_nmi_reason(void)
+{
+ return (inb(0x33) & 6) ? 0x80 : 0;
+}
+
+static inline void reassert_nmi(void)
+{
+ outb(0x09, 0x50); /* disable NMI once */
+ outb(0x09, 0x52); /* re-enable it */
+}
+
+#endif /* !_MACH_TRAPS_H */
prev parent reply other threads:[~2003-02-20 12:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 12:16 [PATCH] PC-9800 additional for 2.5.61-ac1 (0/21) summary Osamu Tomita
2003-02-20 12:22 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (1/21) ALSA Osamu Tomita
2003-02-20 12:22 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (2/21) APM Osamu Tomita
2003-02-20 12:23 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (3/21) console Osamu Tomita
2003-02-20 12:24 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (4/21) misc core Osamu Tomita
2003-02-20 12:25 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (5/21) Osamu Tomita
2003-02-20 12:26 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (6/21) fs/patition Osamu Tomita
2003-02-20 12:28 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (7/21) IDE Osamu Tomita
2003-02-20 12:29 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (8/21) kanji Osamu Tomita
2003-02-20 12:30 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (9/21) kconfig Osamu Tomita
2003-02-20 12:31 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (10/21) network card Osamu Tomita
2003-02-20 12:32 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (11/21) parport Osamu Tomita
2003-02-20 12:33 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (12/21) PCI Osamu Tomita
2003-02-20 12:34 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (13/21) PCMCIA Osamu Tomita
2003-02-20 12:34 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (14/21) PNP Osamu Tomita
2003-02-20 12:35 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (15/21) RTC Osamu Tomita
2003-02-20 12:36 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (17/21) serial Osamu Tomita
2003-02-20 12:37 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (18/21) setup Osamu Tomita
2003-02-20 12:38 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (19/21) SMP Osamu Tomita
2003-02-20 12:38 ` [PATCH] PC-9800 additional for 2.5.61-ac1 (20/21) timer Osamu Tomita
2003-02-20 12:39 ` Osamu Tomita [this message]
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=20030220123914.GT1657@yuzuki.cinet.co.jp \
--to=tomita@cinet.co.jp \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®