diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-09-30 19:32:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-09-30 19:32:12 +0000 |
commit | 2d69e07631054280790f3f101b931a1a7010170e (patch) | |
tree | 8d277a29e17122adf417a62137097f0a01ce2b3d /sys | |
parent | 971d164a194b5eb78b04ef2c0f8b5a34a98ded3c (diff) |
Clear sticky error status after recoverable machine check.
From FreeBSD.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/pci/lca.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/arch/alpha/pci/lca.c b/sys/arch/alpha/pci/lca.c index 66029e2c3de..0f59e3966dc 100644 --- a/sys/arch/alpha/pci/lca.c +++ b/sys/arch/alpha/pci/lca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lca.c,v 1.21 2009/03/30 21:43:13 kettenis Exp $ */ +/* $OpenBSD: lca.c,v 1.22 2009/09/30 19:32:11 miod Exp $ */ /* $NetBSD: lca.c,v 1.14 1996/12/05 01:39:35 cgd Exp $ */ /*- @@ -66,6 +66,7 @@ #include <uvm/uvm_extern.h> #include <machine/autoconf.h> +#include <machine/cpuconf.h> #include <machine/rpb.h> #include <dev/isa/isareg.h> @@ -102,6 +103,8 @@ int lcaprint(void *, const char *pnp); int lca_bus_get_window(int, int, struct alpha_bus_space_translation *); #endif +void lca_machine_check(unsigned long, struct trapframe *, unsigned long, + unsigned long); /* There can be only one. */ int lcafound; @@ -220,6 +223,9 @@ lcaattach(parent, self, aux) lca_dma_init(lcp); + /* safe to override since LCA machines do not set mcheck_handler */ + platform.mcheck_handler = lca_machine_check; + switch (cputype) { #ifdef DEC_AXPPCI_33 case ST_DEC_AXPPCI_33: @@ -296,3 +302,15 @@ lca_bus_get_window(type, window, abst) return (alpha_bus_space_get_window(st, window, abst)); } #endif + +void +lca_machine_check(unsigned long mces, struct trapframe *framep, + unsigned long vector, unsigned long param) +{ + int64_t stat0; + + machine_check(mces, framep, vector, param); + /* clear error flags in IOC_STATUS0 register */ + stat0 = REGVAL64(LCA_IOC_STAT0); + REGVAL64(LCA_IOC_STAT0) = stat0; +} |