Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Modify mapiodev to take a third argument indicating...
details: https://anonhg.NetBSD.org/src/rev/3e9371635389
branches: trunk
changeset: 766681:3e9371635389
user: matt <matt%NetBSD.org@localhost>
date: Thu Jun 30 00:52:55 2011 +0000
description:
Modify mapiodev to take a third argument indicating whether the space
should be prefetchable (true) or not (false).
diffstat:
sys/arch/bebox/bebox/machdep.c | 6 +++---
sys/arch/bebox/include/autoconf.h | 3 +--
sys/arch/bebox/pci/pci_machdep.c | 8 ++++----
sys/arch/evbppc/evbppc/evbppc_machdep.c | 10 ++++++----
sys/arch/evbppc/mpc85xx/machdep.c | 8 +++++---
sys/arch/evbppc/pmppc/pci/pci_machdep.c | 8 ++++----
sys/arch/ibmnws/ibmnws/machdep.c | 6 +++---
sys/arch/ibmnws/include/autoconf.h | 7 +++----
sys/arch/ibmnws/pci/pci_machdep.c | 6 +++---
sys/arch/macppc/dev/adb.c | 6 +++---
sys/arch/macppc/dev/esp.c | 8 ++++----
sys/arch/macppc/dev/gpio.c | 7 ++++---
sys/arch/macppc/dev/if_bm.c | 8 ++++----
sys/arch/macppc/dev/if_mc.c | 8 ++++----
sys/arch/macppc/dev/mediabay.c | 6 +++---
sys/arch/macppc/dev/mesh.c | 8 ++++----
sys/arch/macppc/dev/nvram.c | 10 +++++-----
sys/arch/macppc/dev/zs.c | 8 ++++----
sys/arch/macppc/include/autoconf.h | 3 +--
sys/arch/macppc/macppc/cpu.c | 6 +++---
sys/arch/macppc/pci/bandit.c | 8 ++++----
sys/arch/macppc/pci/grackle.c | 8 ++++----
sys/arch/macppc/pci/u3.c | 4 ++--
sys/arch/macppc/pci/uninorth.c | 8 ++++----
sys/arch/mvmeppc/include/autoconf.h | 3 +--
sys/arch/mvmeppc/mvmeppc/machdep.c | 6 +++---
sys/arch/mvmeppc/pci/pci_machdep.c | 8 ++++----
sys/arch/ofppc/ofppc/mainbus.c | 14 +++++++-------
sys/arch/powerpc/booke/booke_machdep.c | 10 +++++-----
sys/arch/powerpc/booke/booke_stubs.c | 10 +++++-----
sys/arch/powerpc/booke/e500_tlb.c | 10 +++++-----
sys/arch/powerpc/ibm4xx/pmap.c | 16 ++++++++--------
sys/arch/powerpc/include/booke/cpuvar.h | 6 +++---
sys/arch/powerpc/include/booke/pmap.h | 3 +--
sys/arch/powerpc/include/booke/pte.h | 12 +++---------
sys/arch/powerpc/include/cpu.h | 4 ++--
sys/arch/powerpc/include/ibm4xx/pmap.h | 3 +--
sys/arch/powerpc/include/oea/pmap.h | 3 +--
sys/arch/powerpc/oea/oea_machdep.c | 9 +++++----
sys/arch/powerpc/oea/pmap.c | 8 ++++----
sys/arch/powerpc/oea/pmap_kernel.c | 8 ++++----
sys/arch/powerpc/pci/pchb.c | 6 +++---
sys/arch/powerpc/powerpc/bus_dma.c | 6 +++---
sys/arch/powerpc/powerpc/bus_space.c | 9 +++++----
sys/arch/prep/include/autoconf.h | 3 +--
sys/arch/prep/pci/pci_machdep.c | 8 ++++----
sys/arch/prep/prep/machdep.c | 12 ++++++------
sys/arch/rs6000/include/autoconf.h | 5 ++---
48 files changed, 171 insertions(+), 179 deletions(-)
diffs (truncated from 1396 to 300 lines):
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/bebox/bebox/machdep.c
--- a/sys/arch/bebox/bebox/machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/bebox/bebox/machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.100 2011/06/20 07:18:05 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.101 2011/06/30 00:52:55 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2011/06/20 07:18:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2011/06/30 00:52:55 matt Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -170,7 +170,7 @@
/*
* BeBox Mother Board's Register Mapping
*/
- bebox_mb_reg = (vaddr_t) mapiodev(BEBOX_INTR_REG, PAGE_SIZE);
+ bebox_mb_reg = (vaddr_t) mapiodev(BEBOX_INTR_REG, PAGE_SIZE, false);
if (!bebox_mb_reg)
panic("cpu_startup: no room for interrupt register");
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/bebox/include/autoconf.h
--- a/sys/arch/bebox/include/autoconf.h Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/bebox/include/autoconf.h Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.h,v 1.3 2007/10/17 19:53:59 garbled Exp $ */
+/* $NetBSD: autoconf.h,v 1.4 2011/06/30 00:52:56 matt Exp $ */
/*-
* Copyright (C) 1998 Internet Research Institute, Inc.
@@ -44,5 +44,4 @@
/* bus_space_tag_t ca_tag; */
};
-extern void *mapiodev(paddr_t, psize_t);
extern paddr_t kvtop(void *);
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/bebox/pci/pci_machdep.c
--- a/sys/arch/bebox/pci/pci_machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/bebox/pci/pci_machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.19 2011/06/22 18:06:32 matt Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.20 2011/06/30 00:52:56 matt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.19 2011/06/22 18:06:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.20 2011/06/30 00:52:56 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -92,8 +92,8 @@
pc->pc_decompose_tag = genppc_pci_indirect_decompose_tag;
pc->pc_conf_hook = genppc_pci_conf_hook;
- pc->pc_addr = mapiodev(PCI_MODE1_ADDRESS_REG, 4);
- pc->pc_data = mapiodev(PCI_MODE1_DATA_REG, 4);
+ pc->pc_addr = mapiodev(PCI_MODE1_ADDRESS_REG, 4, false);
+ pc->pc_data = mapiodev(PCI_MODE1_DATA_REG, 4, false);
pc->pc_bus = 0;
pc->pc_node = 0;
pc->pc_memt = 0;
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/evbppc/evbppc/evbppc_machdep.c
--- a/sys/arch/evbppc/evbppc/evbppc_machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/evbppc/evbppc/evbppc_machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: evbppc_machdep.c,v 1.11 2011/06/12 04:20:18 mrg Exp $ */
+/* $NetBSD: evbppc_machdep.c,v 1.12 2011/06/30 00:52:56 matt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.11 2011/06/12 04:20:18 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.12 2011/06/30 00:52:56 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -94,13 +94,15 @@
* mapping if one is found.
*/
void *
-mapiodev(paddr_t pa, psize_t len)
+mapiodev(paddr_t pa, psize_t len, bool prefetchable)
{
void *p;
paddr_t faddr;
vaddr_t taddr, va;
int off;
+ KASSERT(!prefetchable);
+
/*
* See if we have reserved TLB entry for the pa. This needs to be
* true for console as we can't use uvm during early bootstrap.
@@ -123,7 +125,7 @@
for (; len > 0; len -= PAGE_SIZE) {
pmap_kenter_pa(taddr, faddr,
- VM_PROT_READ|VM_PROT_WRITE|PME_NOCACHE, 0);
+ VM_PROT_READ|VM_PROT_WRITE, PMAP_NOCACHE);
faddr += PAGE_SIZE;
taddr += PAGE_SIZE;
}
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.14 2011/06/29 05:53:05 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.15 2011/06/30 00:52:56 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -398,8 +398,10 @@
}
static void *
-gur_tlb_mapiodev(paddr_t pa, psize_t len)
+gur_tlb_mapiodev(paddr_t pa, psize_t len, bool prefetchable)
{
+ if (prefetchable)
+ return NULL;
if (pa < gur_bst.pbs_offset)
return NULL;
if (pa + len > gur_bst.pbs_offset + gur_bst.pbs_limit)
@@ -407,7 +409,7 @@
return (void *)pa;
}
-static void *(* const early_tlb_mapiodev)(paddr_t, psize_t) = gur_tlb_mapiodev;
+static void *(* const early_tlb_mapiodev)(paddr_t, psize_t, bool) = gur_tlb_mapiodev;
static void
e500_cpu_reset(void)
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/evbppc/pmppc/pci/pci_machdep.c
--- a/sys/arch/evbppc/pmppc/pci/pci_machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/evbppc/pmppc/pci/pci_machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.4 2011/06/22 18:06:32 matt Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.5 2011/06/30 00:52:56 matt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.4 2011/06/22 18:06:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.5 2011/06/30 00:52:56 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -109,8 +109,8 @@
pc->pc_decompose_tag = genppc_pci_indirect_decompose_tag;
pc->pc_conf_hook = genppc_pci_conf_hook;
- pc->pc_addr = mapiodev(CPC_PCICFGADR, 4);
- pc->pc_data = mapiodev(CPC_PCICFGDATA, 4);
+ pc->pc_addr = mapiodev(CPC_PCICFGADR, 4, false);
+ pc->pc_data = mapiodev(CPC_PCICFGDATA, 4, false);
pc->pc_bus = 0;
pc->pc_node = 0;
pc->pc_memt = 0;
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/ibmnws/ibmnws/machdep.c
--- a/sys/arch/ibmnws/ibmnws/machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/ibmnws/ibmnws/machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.15 2011/06/20 07:18:06 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.16 2011/06/30 00:52:56 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2011/06/20 07:18:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2011/06/30 00:52:56 matt Exp $");
#include "opt_compat_netbsd.h"
@@ -160,7 +160,7 @@
/*
* Mapping PReP interrput vector register.
*/
- prep_intr_reg = (vaddr_t) mapiodev(PREP_INTR_REG, PAGE_SIZE);
+ prep_intr_reg = (vaddr_t) mapiodev(PREP_INTR_REG, PAGE_SIZE, false);
if (!prep_intr_reg)
panic("startup: no room for interrupt register");
prep_intr_reg_off = INTR_VECTOR_REG;
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/ibmnws/include/autoconf.h
--- a/sys/arch/ibmnws/include/autoconf.h Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/ibmnws/include/autoconf.h Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.h,v 1.5 2007/03/04 06:00:03 christos Exp $ */
+/* $NetBSD: autoconf.h,v 1.6 2011/06/30 00:52:56 matt Exp $ */
/*-
* Copyright (C) 1998 Internet Research Institute, Inc.
@@ -43,6 +43,5 @@
/* bus_space_tag_t ca_tag; */
};
-extern void *mapiodev(paddr_t, psize_t);
-extern paddr_t kvtop(void *);
-extern void *intr_establish(int, int, int, int (*)(void *), void *);
+paddr_t kvtop(void *);
+void *intr_establish(int, int, int, int (*)(void *), void *);
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/ibmnws/pci/pci_machdep.c
--- a/sys/arch/ibmnws/pci/pci_machdep.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/ibmnws/pci/pci_machdep.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.7 2011/06/22 18:06:33 matt Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.8 2011/06/30 00:52:57 matt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -84,8 +84,8 @@
pc->pc_decompose_tag = genppc_pci_indirect_decompose_tag;
pc->pc_conf_hook = ibmnws_pci_conf_hook;
- pc->pc_addr = mapiodev(PCI_MODE1_ADDRESS_REG, 4);
- pc->pc_data = mapiodev(PCI_MODE1_DATA_REG, 4);
+ pc->pc_addr = mapiodev(PCI_MODE1_ADDRESS_REG, 4, false);
+ pc->pc_data = mapiodev(PCI_MODE1_DATA_REG, 4, false);
pc->pc_bus = 0;
pc->pc_node = 0;
pc->pc_memt = 0;
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/macppc/dev/adb.c
--- a/sys/arch/macppc/dev/adb.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/macppc/dev/adb.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adb.c,v 1.30 2011/06/18 08:08:28 matt Exp $ */
+/* $NetBSD: adb.c,v 1.31 2011/06/30 00:52:57 matt Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.30 2011/06/18 08:08:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.31 2011/06/30 00:52:57 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -111,7 +111,7 @@
ca->ca_reg[0] += ca->ca_baseaddr;
- sc->sc_regbase = mapiodev(ca->ca_reg[0], ca->ca_reg[1]);
+ sc->sc_regbase = mapiodev(ca->ca_reg[0], ca->ca_reg[1], false);
Via1Base = sc->sc_regbase;
if (strcmp(ca->ca_name, "via-cuda") == 0)
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/macppc/dev/esp.c
--- a/sys/arch/macppc/dev/esp.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/macppc/dev/esp.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esp.c,v 1.30 2010/12/20 00:25:37 matt Exp $ */
+/* $NetBSD: esp.c,v 1.31 2011/06/30 00:52:57 matt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.30 2010/12/20 00:25:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.31 2011/06/30 00:52:57 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -180,8 +180,8 @@
* Map my registers in.
*/
reg = ca->ca_reg;
- esc->sc_reg = mapiodev(ca->ca_baseaddr + reg[0], reg[1]);
- esc->sc_dmareg = mapiodev(ca->ca_baseaddr + reg[2], reg[3]);
+ esc->sc_reg = mapiodev(ca->ca_baseaddr + reg[0], reg[1], false);
+ esc->sc_dmareg = mapiodev(ca->ca_baseaddr + reg[2], reg[3], false);
/* Allocate 16-byte aligned DMA command space */
esc->sc_dmacmd = dbdma_alloc(sizeof(dbdma_command_t) * 20);
diff -r 7e6b87c9d703 -r 3e9371635389 sys/arch/macppc/dev/gpio.c
--- a/sys/arch/macppc/dev/gpio.c Thu Jun 30 00:49:14 2011 +0000
+++ b/sys/arch/macppc/dev/gpio.c Thu Jun 30 00:52:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.10 2011/06/18 08:08:28 matt Exp $ */
Home |
Main Index |
Thread Index |
Old Index