- remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h. ctod dtoc ctob btoc dbtob btodb
This commit is contained in:
parent
7ecca3ca2e
commit
e527ebac6f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.35 2005/12/11 12:16:16 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.36 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -161,26 +161,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.2 2006/02/12 01:12:48 chs Exp $ */
|
||||
/* $NetBSD: param.h,v 1.3 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifdef _LOCORE
|
||||
|
@ -109,26 +109,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((1 *1024 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* XXXfvdl the PD* stuff is different from i386.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.9 2005/12/11 12:16:37 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.10 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
|
@ -145,23 +145,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* pages ("clicks") to disk blocks
|
||||
*/
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/*
|
||||
* bytes to pages
|
||||
*/
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/*
|
||||
* bytes to disk blocks
|
||||
*/
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Some system constants
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.10 2005/12/11 12:16:47 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.11 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe.
|
||||
|
@ -105,29 +105,6 @@
|
|||
#define MAXPHYS 65536 /* max I/O transfer size */
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/*#define dtob(x) ((x) << DEV_BSHIFT)*/
|
||||
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
|
||||
/* bytes to pages */
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
|
||||
((bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
|
||||
((db) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.7 2005/12/11 12:17:37 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.8 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */
|
||||
|
||||
|
@ -99,25 +99,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((16 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((16 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
|
||||
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x)<<PGSHIFT)
|
||||
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
|
||||
|
||||
#define btodb(bytes) ((unsigned)(bytes) >> DEV_BSHIFT)
|
||||
#define dbtob(db) ((unsigned)(db) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.60 2006/06/04 15:41:53 perry Exp $ */
|
||||
/* $NetBSD: param.h,v 1.61 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -159,26 +159,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -131,18 +131,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((12 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.14 2005/12/11 12:17:53 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.15 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
|
@ -153,26 +153,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach-derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mips_param.h,v 1.22 2006/08/26 20:04:59 matt Exp $ */
|
||||
/* $NetBSD: mips_param.h,v 1.23 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/cpu.h>
|
||||
|
@ -50,26 +50,6 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.33 2006/05/12 06:05:23 simonb Exp $ */
|
||||
/* $NetBSD: param.h,v 1.34 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -130,26 +130,6 @@
|
|||
* Some macros for units conversion
|
||||
*/
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* clicks to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
/*
|
||||
* Mach derived conversion macros
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.3 2005/12/11 12:18:34 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.4 2006/08/28 13:43:35 yamt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
|
@ -136,28 +136,8 @@
|
|||
* Some macros for units conversion
|
||||
*/
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* clicks to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
|
||||
#define btop(x) (((unsigned)(x)) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((unsigned long)(x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((unsigned long)(x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and will be if we
|
||||
* add an entry to cdevsw/bdevsw for that purpose.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/intr.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.19 2005/12/11 12:18:43 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.20 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -122,21 +122,4 @@
|
|||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* pages ("clicks") to disk blocks
|
||||
*/
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
/*
|
||||
* bytes to pages
|
||||
*/
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/*
|
||||
* bytes to disk blocks
|
||||
*/
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
#endif /* _POWERPC_PARAM_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.14 2005/12/11 12:18:58 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.15 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
|
||||
|
@ -123,15 +123,4 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#endif /* !_SH3_PARAM_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.6 2005/12/11 12:19:00 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.7 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
|
||||
|
@ -127,16 +127,4 @@
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
#endif /* _SH5_PARAM_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.65 2006/03/04 03:39:02 uwe Exp $ */
|
||||
/* $NetBSD: param.h,v 1.66 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -144,26 +144,6 @@ extern int nbpg, pgofset, pgshift;
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((32 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
#ifndef _LOCORE
|
||||
extern void delay(unsigned int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.35 2006/02/20 19:00:27 cdi Exp $ */
|
||||
/* $NetBSD: param.h,v 1.36 2006/08/28 13:43:35 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -227,26 +227,6 @@ extern int nbpg, pgofset, pgshift;
|
|||
#define NKMEMPAGES_MIN_DEFAULT ((6 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* pages to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((vsize_t)(x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and should use the bsize
|
||||
* field from the disk label.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _LOCORE
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.53 2005/12/11 12:19:34 christos Exp $ */
|
||||
/* $NetBSD: param.h,v 1.54 2006/08/28 13:43:36 yamt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
|
@ -135,32 +135,12 @@
|
|||
* Some macros for units conversion
|
||||
*/
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* clicks to bytes */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
#define btop(x) ((x) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
|
||||
/* MD conversion macros */
|
||||
#define vax_btoc(x) (((unsigned)(x) + VAX_PGOFSET) >> VAX_PGSHIFT)
|
||||
#define vax_btop(x) (((unsigned)(x)) >> VAX_PGSHIFT)
|
||||
|
||||
/*
|
||||
* Map a ``block device block'' to a file system block.
|
||||
* This should be device dependent, and will be if we
|
||||
* add an entry to cdevsw/bdevsw for that purpose.
|
||||
* For now though just use DEV_BSIZE.
|
||||
*/
|
||||
|
||||
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/intr.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: param.h,v 1.237 2006/08/08 05:43:00 riz Exp $ */
|
||||
/* $NetBSD: param.h,v 1.238 2006/08/28 13:43:36 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -145,6 +145,18 @@
|
|||
#include <machine/param.h>
|
||||
#include <machine/limits.h>
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
|
||||
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
|
||||
|
||||
/* bytes to pages */
|
||||
#define ctob(x) ((x) << PGSHIFT)
|
||||
#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
|
||||
|
||||
/* bytes to disk blocks */
|
||||
#define dbtob(x) ((x) << DEV_BSHIFT)
|
||||
#define btodb(x) ((x) >> DEV_BSHIFT)
|
||||
|
||||
/*
|
||||
* Stack macros. On most architectures, the stack grows down,
|
||||
* towards lower addresses; it is the rare architecture where
|
||||
|
|
Loading…
Reference in New Issue