* [PATCH] enable platform dependent MCA handling
@ 2003-11-11 0:12 Hidetoshi Seto
2003-11-11 0:25 ` Keith Owens
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Hidetoshi Seto @ 2003-11-11 0:12 UTC (permalink / raw)
To: linux-ia64
Hi.
This is a patch that makes #ifdef mechanism in /arch/ia64/kernel/mca.c
to work properly, and enable switching platform dependent error handling.
For example, this supports OS to have an OEM call-back function for MCAs.
Since this is a roughly scratched prototype, please give me your comments.
------
H.Seto <seto.hidetoshi@jp.fujitsu.com>
diff -Nur linux-2.6.0-test9.org/arch/ia64/Kconfig
linux-2.6.0-test9/arch/ia64/Kconfig
--- linux-2.6.0-test9.org/arch/ia64/Kconfig 2003-10-26 03:44:46.000000000 +0900
+++ linux-2.6.0-test9/arch/ia64/Kconfig 2003-11-10 16:52:37.257689953 +0900
@@ -250,6 +250,11 @@
Say Y here to enable machine check support for IA-64. If you're
unsure, answer Y.
+config PLATFORM_MCA_HANDLERS
+ bool "Enable platform dependent error handling"
+ depends on IA64_MCA
+ default n
+
config PM
bool "Power Management support"
depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
diff -Nur linux-2.6.0-test9.org/arch/ia64/kernel/Makefile
linux-2.6.0-test9/arch/ia64/kernel/Makefile
--- linux-2.6.0-test9.org/arch/ia64/kernel/Makefile 2003-10-26
03:44:55.000000000 +0900
+++ linux-2.6.0-test9/arch/ia64/kernel/Makefile 2003-11-10 14:30:51.884747269
+0900
@@ -13,6 +13,7 @@
obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o
obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o
+obj-$(CONFIG_PLATFORM_MCA_HANDLERS) += plat_mca.o
obj-$(CONFIG_IA64_PALINFO) += palinfo.o
obj-$(CONFIG_IA64_SALINFO) += salinfo.o
obj-$(CONFIG_IOSAPIC) += iosapic.o
diff -Nur linux-2.6.0-test9.org/arch/ia64/kernel/mca.c
linux-2.6.0-test9/arch/ia64/kernel/mca.c
--- linux-2.6.0-test9.org/arch/ia64/kernel/mca.c 2003-10-26 03:43:35.000000000
+0900
+++ linux-2.6.0-test9/arch/ia64/kernel/mca.c 2003-11-10 16:51:07.314331680 +0900
@@ -186,7 +186,18 @@
/*
* platform dependent error handling
*/
-#ifndef PLATFORM_MCA_HANDLERS
+#ifdef CONFIG_PLATFORM_MCA_HANDLERS
+extern void mca_handler_platform(void);
+extern irqreturn_t ia64_mca_cpe_int_handler(int cpe_t,
+ void *arg, struct pt_regs *ptregs);
+extern void init_handler_platform(pal_min_state_area_t *ms,
+ struct pt_regs *pt, struct switch_stack *sw);
+extern void ia64_mca_init_platform(void);
+extern int ia64_mca_check_errors(void);
+#ifdef CONFIG_ACPI
+extern void ia64_mca_register_cpev(int cpev);
+#endif /* CONFIG_ACPI */
+#else
void
mca_handler_platform (void)
{
@@ -461,7 +472,7 @@
}
#endif /* CONFIG_ACPI */
-#endif /* PLATFORM_MCA_HANDLERS */
+#endif /* CONFIG_PLATFORM_MCA_HANDLERS */
/*
* ia64_mca_cmc_vector_setup
diff -Nur linux-2.6.0-test9.org/arch/ia64/kernel/plat_mca.c
linux-2.6.0-test9/arch/ia64/kernel/plat_mca.c
--- linux-2.6.0-test9.org/arch/ia64/kernel/plat_mca.c 1970-01-01
09:00:00.000000000 +0900
+++ linux-2.6.0-test9/arch/ia64/kernel/plat_mca.c 2003-11-10 16:51:35.258667275
+0900
@@ -0,0 +1,47 @@
+/*
+ * File: plat_mca.c
+ * Purpose: platform dependent error handling
+ *
+ */
+#include <linux/irq.h>
+#include <asm/ptrace.h>
+#include <asm/sal.h>
+
+void
+mca_handler_platform (void)
+{
+
+}
+
+irqreturn_t
+ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
+{
+
+}
+
+void
+init_handler_platform (pal_min_state_area_t *ms,
+ struct pt_regs *pt, struct switch_stack *sw)
+{
+
+}
+
+void
+ia64_mca_init_platform (void)
+{
+
+}
+
+int
+ia64_mca_check_errors (void)
+{
+
+}
+
+#ifdef CONFIG_ACPI
+void
+ia64_mca_register_cpev (int cpev)
+{
+
+}
+#endif /* CONFIG_ACPI */
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] enable platform dependent MCA handling
2003-11-11 0:12 [PATCH] enable platform dependent MCA handling Hidetoshi Seto
@ 2003-11-11 0:25 ` Keith Owens
2003-11-11 0:59 ` David Mosberger
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Keith Owens @ 2003-11-11 0:25 UTC (permalink / raw)
To: linux-ia64
On Tue, 11 Nov 2003 09:12:20 +0900,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> wrote:
>This is a patch that makes #ifdef mechanism in /arch/ia64/kernel/mca.c
>to work properly, and enable switching platform dependent error handling.
>For example, this supports OS to have an OEM call-back function for MCAs.
>Since this is a roughly scratched prototype, please give me your comments.
Defining any platform specific handlers at compile time is a problem for
generic kernels. If you want a generic ia64 kernel (CONFIG_IA64_GENERIC=y)
to run on any hardware then all the platform specific code should be
chosen at run time, not at compile time. That is, use ia64_platform_is()
to select platform specific code at run time.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] enable platform dependent MCA handling
2003-11-11 0:12 [PATCH] enable platform dependent MCA handling Hidetoshi Seto
2003-11-11 0:25 ` Keith Owens
@ 2003-11-11 0:59 ` David Mosberger
2003-11-11 7:17 ` Hidetoshi Seto
2003-11-11 22:31 ` David Mosberger
3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2003-11-11 0:59 UTC (permalink / raw)
To: linux-ia64
>>>>> On Tue, 11 Nov 2003 09:12:20 +0900, Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> said:
Hidetoshi> Hi. This is a patch that makes #ifdef mechanism in
Hidetoshi> /arch/ia64/kernel/mca.c to work properly, and enable
Hidetoshi> switching platform dependent error handling. For
Hidetoshi> example, this supports OS to have an OEM call-back
Hidetoshi> function for MCAs. Since this is a roughly scratched
Hidetoshi> prototype, please give me your comments.
I think you ought to be machvecs for this purpose.
--david
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] enable platform dependent MCA handling
2003-11-11 0:12 [PATCH] enable platform dependent MCA handling Hidetoshi Seto
2003-11-11 0:25 ` Keith Owens
2003-11-11 0:59 ` David Mosberger
@ 2003-11-11 7:17 ` Hidetoshi Seto
2003-11-11 22:31 ` David Mosberger
3 siblings, 0 replies; 5+ messages in thread
From: Hidetoshi Seto @ 2003-11-11 7:17 UTC (permalink / raw)
To: linux-ia64
I think it is more flexible that the plan that generic kernel have all the
platform specific code and have choices at run time, Keith said.
BTW, as doubt still I have, how I use this #ifdef in mca.c? Is it obsolete?
For the present, I'll try to use machvecs for this switching.
I have read through machvec.h briefly, and I could find following three
definitions:
platform_mca_init (maybe, for INIT)
platform_mca_handler (for MCA)
platform_cmci_handler (for CMCI)
...Are there any plans to implement "platform_cpei_handler (for CPEI)"?
David?
Thanks.
------
H.Seto <seto.hidetoshi@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] enable platform dependent MCA handling
2003-11-11 0:12 [PATCH] enable platform dependent MCA handling Hidetoshi Seto
` (2 preceding siblings ...)
2003-11-11 7:17 ` Hidetoshi Seto
@ 2003-11-11 22:31 ` David Mosberger
3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2003-11-11 22:31 UTC (permalink / raw)
To: linux-ia64
>>>>> On Tue, 11 Nov 2003 16:17:11 +0900, Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> said:
Hidetoshi> I think it is more flexible that the plan that generic
Hidetoshi> kernel have all the platform specific code and have
Hidetoshi> choices at run time, Keith said.
That's what machvec gives you. The only question is whether some
vendors will have to split up DIG into something more finer-grained.
Hidetoshi> ...Are there any plans to implement
Hidetoshi> "platform_cpei_handler (for CPEI)"? David?
I'm not, but adding new (well-defined) machvec entries is fine (within
reason).
--david
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-11-11 22:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 0:12 [PATCH] enable platform dependent MCA handling Hidetoshi Seto
2003-11-11 0:25 ` Keith Owens
2003-11-11 0:59 ` David Mosberger
2003-11-11 7:17 ` Hidetoshi Seto
2003-11-11 22:31 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox