diff options
| author | thorpej <thorpej@NetBSD.org> | 2003-04-09 00:28:28 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2003-04-09 00:28:28 +0000 |
| commit | 24a4b8faa6fa523b56801bcbc6da93c4178274b4 (patch) | |
| tree | 4be7dc06c46208b3e1ba3f0b50eef9706f3c11e8 /sys/dev | |
| parent | cf9d21bf8e4f5bc7b15781a6ea5e141c35b6260f (diff) | |
Use PAGE_SIZE rather than NBPG.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/siopvar_common.h | 4 | ||||
| -rw-r--r-- | sys/dev/pci/siop_pci.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/siop_pci_common.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_general.h | 9 |
4 files changed, 15 insertions, 10 deletions
diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index 790d6a9c072..e6619b3c9bc 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,4 +1,4 @@ -/* $NetBSD: siopvar_common.h,v 1.23 2003/02/21 17:14:05 tsutsui Exp $ */ +/* $NetBSD: siopvar_common.h,v 1.24 2003/04/09 00:29:11 thorpej Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -45,7 +45,7 @@ typedef struct scr_table { } scr_table_t __attribute__((__packed__)); /* Number of scatter/gather entries */ -#define SIOP_NSG (MAXPHYS/NBPG + 1) /* XXX NBPG */ +#define SIOP_NSG (MAXPHYS/PAGE_SIZE + 1) /* XXX PAGE_SIZE */ /* * This structure interfaces the SCRIPT with the driver; it describes a full diff --git a/sys/dev/pci/siop_pci.c b/sys/dev/pci/siop_pci.c index 9c2adb9adc1..e92032f73af 100644 --- a/sys/dev/pci/siop_pci.c +++ b/sys/dev/pci/siop_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_pci.c,v 1.14 2002/10/02 16:51:54 thorpej Exp $ */ +/* $NetBSD: siop_pci.c,v 1.15 2003/04/09 00:29:30 thorpej Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -32,13 +32,15 @@ /* SYM53c8xx PCI-SCSI I/O Processors driver: PCI front-end */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop_pci.c,v 1.14 2002/10/02 16:51:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop_pci.c,v 1.15 2003/04/09 00:29:30 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/device.h> #include <sys/kernel.h> +#include <uvm/uvm_extern.h> + #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c index 4808451eae4..29b401d18aa 100644 --- a/sys/dev/pci/siop_pci_common.c +++ b/sys/dev/pci/siop_pci_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_pci_common.c,v 1.18 2003/01/31 00:07:43 thorpej Exp $ */ +/* $NetBSD: siop_pci_common.c,v 1.19 2003/04/09 00:29:30 thorpej Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -32,7 +32,7 @@ /* SYM53c8xx PCI-SCSI I/O Processors driver: PCI front-end */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop_pci_common.c,v 1.18 2003/01/31 00:07:43 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop_pci_common.c,v 1.19 2003/04/09 00:29:30 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -41,6 +41,8 @@ __KERNEL_RCSID(0, "$NetBSD: siop_pci_common.c,v 1.18 2003/01/31 00:07:43 thorpej #include <sys/buf.h> #include <sys/kernel.h> +#include <uvm/uvm_extern.h> + #include <machine/endian.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/raidframe/rf_general.h b/sys/dev/raidframe/rf_general.h index 24c459a19f0..400036ed6d1 100644 --- a/sys/dev/raidframe/rf_general.h +++ b/sys/dev/raidframe/rf_general.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_general.h,v 1.10 2002/09/14 17:53:57 oster Exp $ */ +/* $NetBSD: rf_general.h,v 1.11 2003/04/09 00:28:28 thorpej Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -41,7 +41,8 @@ /* error reporting and handling */ -#include<sys/systm.h> /* printf, sprintf, and friends */ +#include <sys/systm.h> /* printf, sprintf, and friends */ +#include <uvm/uvm_extern.h> /* PAGE_SIZE, PAGE_MASK */ #define RF_ERRORMSG(s) printf((s)) #define RF_ERRORMSG1(s,a) printf((s),(a)) @@ -89,8 +90,8 @@ extern char rf_panicbuf[]; #define RF_UL(x) ((unsigned long) (x)) -#define RF_PGMASK RF_UL(NBPG-1) -#define RF_BLIP(x) (NBPG - (RF_UL(x) & RF_PGMASK)) /* bytes left in page */ +#define RF_PGMASK PAGE_MASK +#define RF_BLIP(x) (PAGE_SIZE - (RF_UL(x) & RF_PGMASK)) /* bytes left in page */ #define RF_PAGE_ALIGNED(x) ((RF_UL(x) & RF_PGMASK) == 0) #ifdef __STDC__ |
