summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-04-07 22:34:24 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-04-07 22:34:24 +0000
commitaf4c22c8744ba408af707eee2bc811951090c4cc (patch)
tree9c2dda3b3c7261565845a3aabda6aea130acd1af /sys/arch
parent5b094a47c690d60d925bff364955b78fead69826 (diff)
Since uncached virtual addresses will depend upon space identifiers on R1xk
systems, switch to the PHYS_TO_UNCACHED macro to compute proper addresses. Not really necessary for the O2 which does not implement spaces, but can't hurt either.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/dev/gbe.c12
-rw-r--r--sys/arch/sgi/localbus/macebus.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c
index f189416b562..eca78c98b55 100644
--- a/sys/arch/sgi/dev/gbe.c
+++ b/sys/arch/sgi/dev/gbe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gbe.c,v 1.5 2008/02/20 18:46:20 miod Exp $ */
+/* $OpenBSD: gbe.c,v 1.6 2008/04/07 22:34:21 miod Exp $ */
/*
* Copyright (c) 2007, Joel Sing <jsing@openbsd.org>
@@ -201,7 +201,7 @@ gbe_attach(struct device *parent, struct device *self, void *aux)
* We've already been setup via gbe_cnattach().
*/
- gsc->ioh = PHYS_TO_XKPHYS(GBE_BASE, CCA_NC);
+ gsc->ioh = PHYS_TO_UNCACHED(GBE_BASE);
gsc->rev = bus_space_read_4(gsc->iot, gsc->ioh, GBE_CTRL_STAT)
& 0xf;
@@ -834,7 +834,7 @@ gbe_cnprobe(bus_space_tag_t iot, bus_addr_t addr)
int val, width, height;
/* Setup bus space mapping. */
- ioh = PHYS_TO_XKPHYS(addr, CCA_NC);
+ ioh = PHYS_TO_UNCACHED(addr);
/* Determine resolution configured by firmware. */
val = bus_space_read_4(iot, ioh, GBE_VT_HCMAP);
@@ -866,7 +866,7 @@ gbe_cnattach(bus_space_tag_t iot, bus_addr_t addr)
/* Setup bus space mapping. */
gsc.iot = iot;
- gsc.ioh = PHYS_TO_XKPHYS(addr, CCA_NC);
+ gsc.ioh = PHYS_TO_UNCACHED(addr);
/* Determine GBE revision. */
gsc.rev = bus_space_read_4(gsc.iot, gsc.ioh, GBE_CTRL_STAT) & 0xf;
@@ -893,7 +893,7 @@ gbe_cnattach(bus_space_tag_t iot, bus_addr_t addr)
va = pmap_steal_memory(gbe_consdata.tm_size + 65536, NULL, NULL);
pmap_extract(pmap_kernel(), va, &pa);
gbe_consdata.tm_phys = ((pa >> 16) + 1) << 16;
- gbe_consdata.tm = (caddr_t)PHYS_TO_XKPHYS(gbe_consdata.tm_phys, CCA_NC);
+ gbe_consdata.tm = (caddr_t)PHYS_TO_UNCACHED(gbe_consdata.tm_phys);
/*
* Steal memory for framebuffer - 64KB aligned and coherent.
@@ -901,7 +901,7 @@ gbe_cnattach(bus_space_tag_t iot, bus_addr_t addr)
va = pmap_steal_memory(gbe_consdata.fb_size + 65536, NULL, NULL);
pmap_extract(pmap_kernel(), va, &pa);
gbe_consdata.fb_phys = ((pa >> 16) + 1) << 16;
- gbe_consdata.fb = (caddr_t)PHYS_TO_XKPHYS(gbe_consdata.fb_phys, CCA_NC);
+ gbe_consdata.fb = (caddr_t)PHYS_TO_UNCACHED(gbe_consdata.fb_phys);
/*
* Setup GBE hardware.
diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c
index 96d6f504833..d7420aea779 100644
--- a/sys/arch/sgi/localbus/macebus.c
+++ b/sys/arch/sgi/localbus/macebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macebus.c,v 1.35 2008/03/30 20:14:40 miod Exp $ */
+/* $OpenBSD: macebus.c,v 1.36 2008/04/07 22:34:23 miod Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
@@ -221,7 +221,7 @@ macebusattach(struct device *parent, struct device *self, void *aux)
printf(": cannot map CRIME control registers\n");
return;
}
- hwmask_addr = (void *)(PHYS_TO_XKPHYS(CRIMEBUS_BASE, CCA_NC) +
+ hwmask_addr = (void *)(PHYS_TO_UNCACHED(CRIMEBUS_BASE) +
CRIME_INT_MASK);
creg = bus_space_read_8(&crimebus_tag, crime_h, CRIME_REVISION);
@@ -331,7 +331,7 @@ mace_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size,
(bpa + size) < (MACEBUS_BASE + MACE_IO_OFFS + MACE_IO_SIZE))
|| (bpa >= (MACEBUS_BASE + MACE_ISAX_OFFS) &&
(bpa + size) < (MACEBUS_BASE + MACE_ISAX_OFFS + MACE_ISAX_SIZE))) {
- *bshp = PHYS_TO_XKPHYS(bpa, CCA_NC);
+ *bshp = PHYS_TO_UNCACHED(bpa);
return 0;
}