From 14491f27dd65ae769cd7860ad19d0b08877e91a8 Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 1 Apr 2003 20:47:25 +0000 Subject: [PATCH] * Define PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK in , not in . * Define NBPG in terms of PGSHIFT. --- sys/arch/hppa/include/param.h | 10 +++------- sys/arch/hppa/include/vmparam.h | 11 ++++++++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/arch/hppa/include/param.h b/sys/arch/hppa/include/param.h index fc66a0388da6..acf9a3d2cf9c 100644 --- a/sys/arch/hppa/include/param.h +++ b/sys/arch/hppa/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.1 2002/06/05 01:04:22 fredette Exp $ */ +/* $NetBSD: param.h,v 1.2 2003/04/01 20:47:25 thorpej Exp $ */ /* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */ @@ -46,13 +46,9 @@ #define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t) - 1)) == 0) -#define PAGE_SIZE 4096 -#define PAGE_MASK (PAGE_SIZE-1) -#define PAGE_SHIFT 12 - -#define NBPG 4096 /* bytes/page */ -#define PGOFSET (NBPG-1) /* byte offset into page */ #define PGSHIFT 12 /* LOG2(NBPG) */ +#define NBPG (1 << PGSHIFT) /* bytes/page */ +#define PGOFSET (NBPG-1) /* byte offset into page */ #define SEGSHIFT (PGSHIFT + (PGSHIFT-PTESHIFT)) /* LOG2(NBSEG) */ #define NBSEG (1 << SEGSHIFT) /* bytes/segment (quadrant) */ diff --git a/sys/arch/hppa/include/vmparam.h b/sys/arch/hppa/include/vmparam.h index 9f1ef4e9a359..46a8a9cf0f9e 100644 --- a/sys/arch/hppa/include/vmparam.h +++ b/sys/arch/hppa/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.3 2002/12/10 05:14:28 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.4 2003/04/01 20:47:25 thorpej Exp $ */ /* $OpenBSD: vmparam.h,v 1.17 2001/09/22 18:00:09 miod Exp $ */ @@ -31,6 +31,15 @@ /* * Machine dependent constants for HP PA */ + +/* + * We use 4K pages on the HP PHA. Override the PAGE_* definitions + * to be compile-time constants. + */ +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1 << PAGE_SHIFT) +#define PAGE_MASK (PAGE_SIZE - 1) + /* * USRSTACK is the top (end) of the user stack. */