summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-11-21 03:25:31 +0000
committergallatin <gallatin@FreeBSD.org>2000-11-21 03:25:31 +0000
commitfe55c5e105e7c838b777d35d24d60e7e6786489f (patch)
tree5e86fb3300ca081d1d6bf1367d22d28e7829b1ab
parent5ba11f0e010d687a587c78e873e939931ac1e00b (diff)
downloadFreeBSD-src-fe55c5e105e7c838b777d35d24d60e7e6786489f.zip
FreeBSD-src-fe55c5e105e7c838b777d35d24d60e7e6786489f.tar.gz
fix isa DMA on pyxis based machines:
- move the call to cia_init_sgmap() to after we've determined if we're a pyxis - convert needed splhigh() in cia_sgmap_invalidate_pyxis() to disable_intr() Previously, any isa DMA on a pyxis based machine would cause a panic in cia_sgmap_invalidate_pyxis() because the pyxis workaround was never setup. - while i'm at it, convert needed splhigh() in cia_swiz_set_hae_mem to disable_intr()
-rw-r--r--sys/alpha/pci/cia.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c
index 84a671f..1bd9196 100644
--- a/sys/alpha/pci/cia.c
+++ b/sys/alpha/pci/cia.c
@@ -155,12 +155,13 @@ cia_swiz_set_hae_mem(void *arg, u_int32_t pa)
* Seems fairly paranoid but this is what Linux does...
*/
u_int32_t msb = pa & REG1;
- int s = splhigh();
+ int s = save_intr();
+ disable_intr();
cia_hae_mem = (cia_hae_mem & ~REG1) | msb;
REGVAL(CIA_CSR_HAE_MEM) = cia_hae_mem;
alpha_mb();
cia_hae_mem = REGVAL(CIA_CSR_HAE_MEM);
- splx(s);
+ restore_intr(s);
}
return pa & ~REG1;
}
@@ -228,8 +229,9 @@ cia_sgmap_invalidate_pyxis(void)
u_int32_t ctrl;
int i, s;
- s = splhigh();
-
+ s = save_intr();
+ disable_intr();
+
/*
* Put the Pyxis into PCI loopback mode.
*/
@@ -259,7 +261,7 @@ cia_sgmap_invalidate_pyxis(void)
REGVAL(CIA_CSR_CTRL) = ctrl;
alpha_mb();
- splx(s);
+ restore_intr(s);
}
static void
@@ -391,7 +393,6 @@ cia_probe(device_t dev)
pci_init_resources();
isa_init_intr();
- cia_init_sgmap();
cia_rev = REGVAL(CIA_CSR_REV) & REV_MASK;
@@ -406,8 +407,8 @@ cia_probe(device_t dev)
cia_ispyxis = TRUE;
else
cia_ispyxis = FALSE;
-
+ cia_init_sgmap();
/*
* ALCOR/ALCOR2 Revisions >= 2 and Pyxis have the CNFG register.
OpenPOWER on IntegriCloud