From 4f1e7152480411282686f0dd69f4ab79cf24bb1c Mon Sep 17 00:00:00 2001 From: drochner Date: Tue, 25 Jan 2000 22:30:04 +0000 Subject: [PATCH] use BUS_SPACE_MAP_PREFETCHABLE instead BUS_SPACE_MAP_CACHEABLE where the PCI BAR bit is referred to --- sys/dev/pci/pci_map.c | 6 +++--- sys/dev/pci/pci_subr.c | 12 ++++++------ sys/dev/pci/pcireg.h | 8 ++++---- sys/dev/pci/tga.c | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c index e768e16c7c90..a2ef2aae7c9e 100644 --- a/sys/dev/pci/pci_map.c +++ b/sys/dev/pci/pci_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_map.c,v 1.5 1998/08/15 10:10:54 mycroft Exp $ */ +/* $NetBSD: pci_map.c,v 1.6 2000/01/25 22:30:04 drochner Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -171,8 +171,8 @@ pci_mem_find(pc, tag, reg, type, basep, sizep, flagsp) if (sizep != 0) *sizep = PCI_MAPREG_MEM_SIZE(mask); if (flagsp != 0) - *flagsp = PCI_MAPREG_MEM_CACHEABLE(address) ? - BUS_SPACE_MAP_CACHEABLE : 0; + *flagsp = PCI_MAPREG_MEM_PREFETCHABLE(address) ? + BUS_SPACE_MAP_PREFETCHABLE : 0; return (0); } diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index f48a7ff99592..594d447886bb 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.33 1999/12/15 12:27:26 kleink Exp $ */ +/* $NetBSD: pci_subr.c,v 1.34 2000/01/25 22:30:04 drochner Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -578,7 +578,7 @@ pci_conf_print_bar(pc, tag, regs, reg, name) } printf("type: "); if (PCI_MAPREG_TYPE(rval) == PCI_MAPREG_TYPE_MEM) { - const char *type, *cache; + const char *type, *prefetch; switch (PCI_MAPREG_MEM_TYPE(rval)) { case PCI_MAPREG_MEM_TYPE_32BIT: @@ -594,11 +594,11 @@ pci_conf_print_bar(pc, tag, regs, reg, name) type = "unknown (XXX)"; break; } - if (PCI_MAPREG_MEM_CACHEABLE(rval)) - cache = ""; + if (PCI_MAPREG_MEM_PREFETCHABLE(rval)) + prefetch = ""; else - cache = "non"; - printf("%s %scacheable memory\n", type, cache); + prefetch = "non"; + printf("%s %sprefetchable memory\n", type, prefetch); printf(" base: 0x%08x, size: 0x%08x\n", PCI_MAPREG_MEM_ADDR(rval), PCI_MAPREG_MEM_SIZE(mask)); diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 3be3c031051f..334ce839ee24 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.22 1999/11/16 02:13:02 enami Exp $ */ +/* $NetBSD: pcireg.h,v 1.23 2000/01/25 22:30:05 drochner Exp $ */ /* * Copyright (c) 1995, 1996, 1999 @@ -314,9 +314,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) diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index 63a21946543c..6bb1367fbc6f 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $NetBSD: tga.c,v 1.15 1999/12/06 19:25:59 drochner Exp $ */ +/* $NetBSD: tga.c,v 1.16 2000/01/25 22:30:05 drochner Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -168,11 +168,11 @@ tga_getdevconfig(memt, pc, tag, dc) PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, &dc->dc_pcipaddr, &pcisize, &flags)) return; - if ((flags & BUS_SPACE_MAP_CACHEABLE) == 0) /* XXX */ - panic("tga memory not cacheable"); + if ((flags & BUS_SPACE_MAP_PREFETCHABLE) == 0) /* XXX */ + panic("tga memory not prefetchable"); if (bus_space_map(memt, dc->dc_pcipaddr, pcisize, - BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_vaddr)) + BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_vaddr)) return; #ifdef __alpha__ dc->dc_paddr = ALPHA_K0SEG_TO_PHYS(dc->dc_vaddr); /* XXX */