Make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK compile time constants; we only

support 8K page models at the moment anyway.
This commit is contained in:
thorpej 2003-04-08 23:35:48 +00:00
parent 9a8042f242
commit 04269f6445
2 changed files with 18 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.262 2003/04/01 02:18:51 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.263 2003/04/08 23:35:48 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.262 2003/04/01 02:18:51 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.263 2003/04/08 23:35:48 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -363,15 +363,13 @@ nobootinfo:
trap_init();
/*
* find out this system's page size
*/
PAGE_SIZE = hwrpb->rpb_page_size;
if (PAGE_SIZE != 8192)
panic("page size %d != 8192?!", PAGE_SIZE);
/*
* Initialize PAGE_SIZE-dependent variables.
* Find out this system's page size, and initialize
* PAGE_SIZE-dependent variables.
*/
if (hwrpb->rpb_page_size != ALPHA_PGBYTES)
panic("page size %lu != %d?!", hwrpb->rpb_page_size,
ALPHA_PGBYTES);
uvmexp.pagesize = hwrpb->rpb_page_size;
uvm_setpagesize();
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vmparam.h,v 1.25 2002/12/10 05:14:25 thorpej Exp $ */
/* $NetBSD: vmparam.h,v 1.26 2003/04/08 23:35:48 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -49,6 +49,14 @@
* Machine dependent constants for Alpha.
*/
/*
* All systypes currently supported by NetBSD/alpha have an 8K pages.
* Override the PAGE_* definitions to be compile-time constants.
*/
#define PAGE_SHIFT 13
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)
/*
* USRSTACK is the top (end) of the user stack.
*
@ -106,7 +114,7 @@
#define VM_MAX_KERNEL_ADDRESS trunc_page((vaddr_t)ALPHA_K1SEG_END)
/* virtual sizes (bytes) for various kernel submaps */
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
/* some Alpha-specific constants */
#define VPTBASE ((vaddr_t)0xfffffffc00000000) /* Virt. pg table */