diff options
-rw-r--r-- | sys/arch/i386/include/param.h | 5 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.h | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h index 63ecde8ec2e..dc8a640568b 100644 --- a/sys/arch/i386/include/param.h +++ b/sys/arch/i386/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.41 2007/09/01 15:14:44 martin Exp $ */ +/* $OpenBSD: param.h,v 1.42 2007/10/01 12:10:55 martin Exp $ */ /* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */ /*- @@ -116,9 +116,6 @@ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) #define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) -/* bytes to pages */ -#define btoc(x) (((x) + PGOFSET) >> PGSHIFT) - /* bytes to disk blocks */ #define dbtob(x) ((x) << DEV_BSHIFT) #define btodb(x) ((x) >> DEV_BSHIFT) diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index f4ab4ee9b3b..3a46429143e 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_misc.c,v 1.48 2007/09/01 15:14:44 martin Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.49 2007/10/01 12:10:55 martin Exp $ */ /* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */ /* @@ -693,11 +693,11 @@ svr4_sys_break(p, v, retval) uprintf("sbrk: grow failed, return = %d\n", error); return error; } - vm->vm_dsize += btoc(diff); + vm->vm_dsize += atop(diff); } else if (diff < 0) { diff = -diff; uvm_deallocate(&vm->vm_map, new, diff); - vm->vm_dsize -= btoc(diff); + vm->vm_dsize -= atop(diff); } return 0; } diff --git a/sys/dev/ic/aic79xx_openbsd.h b/sys/dev/ic/aic79xx_openbsd.h index e34879a091c..b6df42a1310 100644 --- a/sys/dev/ic/aic79xx_openbsd.h +++ b/sys/dev/ic/aic79xx_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.h,v 1.16 2005/12/10 11:45:43 miod Exp $ */ +/* $OpenBSD: aic79xx_openbsd.h,v 1.17 2007/10/01 12:10:55 martin Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -132,7 +132,7 @@ typedef struct pci_attach_args * ahd_dev_softc_t; * multiple of 16 which should align us on even the largest of cacheline * boundaries. */ -#define AHD_NSEG (roundup(btoc(MAXPHYS) + 1, 16)) +#define AHD_NSEG (roundup(atop(MAXPHYS) + 1, 16)) /* This driver supports target mode */ // #define AHD_TARGET_MODE 1 |