diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-27 20:59:16 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-27 20:59:16 +0000 |
commit | 9f75c2cfdf250b9b71d0da4ae996a042380c98b1 (patch) | |
tree | a60ec1fa2945261a85bde36453d43e398577288a /sys | |
parent | 50ab71e8a945c1ff906b05eec9727781138b4280 (diff) |
this bit is defined as prefetchable and not cachable and thus rename and use appropriately
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cardbus/cardbus_map.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/pci_map.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/pcireg.h | 8 |
3 files changed, 17 insertions, 11 deletions
diff --git a/sys/dev/cardbus/cardbus_map.c b/sys/dev/cardbus/cardbus_map.c index 413d572bad4..be75945518c 100644 --- a/sys/dev/cardbus/cardbus_map.c +++ b/sys/dev/cardbus/cardbus_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbus_map.c,v 1.2 2002/03/14 01:26:52 millert Exp $ */ +/* $OpenBSD: cardbus_map.c,v 1.3 2003/08/27 20:59:15 mickey Exp $ */ /* $NetBSD: cardbus_map.c,v 1.10 2000/03/07 00:31:46 mycroft Exp $ */ /* @@ -219,7 +219,12 @@ cardbus_mem_find(cc, cf, tag, reg, type, basep, sizep, flagsp) *sizep = PCI_MAPREG_MEM_SIZE(mask); } if (flagsp != 0) { - *flagsp = PCI_MAPREG_MEM_CACHEABLE(address); + *flagsp = +#ifdef BUS_SPACE_MAP_PREFETCHABLE + PCI_MAPREG_MEM_PREFETCHABLE(address) ? + BUS_SPACE_MAP_PREFETCHABLE : +#endif + 0; } return 0; diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c index 7fc81130bb2..37ff92e32b7 100644 --- a/sys/dev/pci/pci_map.c +++ b/sys/dev/pci/pci_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_map.c,v 1.9 2003/02/28 15:26:23 mickey Exp $ */ +/* $OpenBSD: pci_map.c,v 1.10 2003/08/27 20:59:15 mickey Exp $ */ /* $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $ */ /*- @@ -208,11 +208,12 @@ nbsd_pci_mem_find(pc, tag, reg, type, basep, sizep, flagsp) *sizep = PCI_MAPREG_MEM64_SIZE(wmask); } if (flagsp != 0) - *flagsp = PCI_MAPREG_MEM_CACHEABLE(address) -#ifndef __OpenBSD__ - ? BUS_SPACE_MAP_CACHEABLE : 0 + *flagsp = +#ifdef BUS_SPACE_MAP_PREFETCHABLE + PCI_MAPREG_MEM_PREFETCHABLE(address) ? + BUS_SPACE_MAP_PREFETCHABLE : #endif - ; + 0; return (0); } diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 36b9e042ce1..8b305462bb2 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcireg.h,v 1.22 2003/04/02 21:40:35 grange Exp $ */ +/* $OpenBSD: pcireg.h,v 1.23 2003/08/27 20:59:15 mickey Exp $ */ /* $NetBSD: pcireg.h,v 1.26 2000/05/10 16:58:42 thorpej Exp $ */ /* @@ -399,9 +399,9 @@ typedef u_int8_t pci_revision_t; #define PCI_MAPREG_MEM_TYPE_32BIT_1M 0x00000002 #define PCI_MAPREG_MEM_TYPE_64BIT 0x00000004 -#define PCI_MAPREG_MEM_CACHEABLE(mr) \ - (((mr) & PCI_MAPREG_MEM_CACHEABLE_MASK) != 0) -#define PCI_MAPREG_MEM_CACHEABLE_MASK 0x00000008 +#define PCI_MAPREG_MEM_PREFETCHABLE(mr) \ + (((mr) & PCI_MAPREG_MEM_PREFETCHABLE_MASK) != 0) +#define PCI_MAPREG_MEM_PREFETCHABLE_MASK 0x00000008 #define PCI_MAPREG_MEM_ADDR(mr) \ ((mr) & PCI_MAPREG_MEM_ADDR_MASK) |