diff --git a/sys/arch/acorn32/include/vmparam.h b/sys/arch/acorn32/include/vmparam.h index 5e21564aa19a..246577c6874c 100644 --- a/sys/arch/acorn32/include/vmparam.h +++ b/sys/arch/acorn32/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.16 2003/05/21 22:48:21 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.17 2003/05/22 05:25:48 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -76,12 +76,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - ((KERNEL_VM_SIZE) * 4 / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) diff --git a/sys/arch/arm/include/arm32/vmparam.h b/sys/arch/arm/include/arm32/vmparam.h index 5269ac8fdf35..9c3daf294922 100644 --- a/sys/arch/arm/include/arm32/vmparam.h +++ b/sys/arch/arm/include/arm32/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.18 2003/05/21 18:04:44 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.19 2003/05/22 05:25:48 thorpej Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -92,6 +92,15 @@ #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) KERNEL_BASE) #define VM_MAX_KERNEL_ADDRESS ((vaddr_t) 0xffffffff) +/* XXX max. amount of KVM to be used by buffers. */ +#ifndef VM_MAX_KERNEL_BUF +extern vaddr_t virtual_avail; +extern vaddr_t virtual_end; + +#define VM_MAX_KERNEL_BUF \ + ((virtual_end - virtual_avail) * 4 / 10) +#endif + /* * pmap-specific data store in the vm_page structure. */ diff --git a/sys/arch/cats/include/vmparam.h b/sys/arch/cats/include/vmparam.h index e1802bada013..931929c4ac17 100644 --- a/sys/arch/cats/include/vmparam.h +++ b/sys/arch/cats/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.21 2003/05/21 22:48:21 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.22 2003/05/22 05:25:49 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -81,12 +81,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - (((KERNEL_VM_SIZE) * 4) / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) diff --git a/sys/arch/evbarm/include/vmparam.h b/sys/arch/evbarm/include/vmparam.h index 0eec883b9789..9861ff76ceed 100644 --- a/sys/arch/evbarm/include/vmparam.h +++ b/sys/arch/evbarm/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.19 2003/05/21 22:48:21 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.20 2003/05/22 05:25:49 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -76,12 +76,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - ((KERNEL_VM_SIZE) * 4 / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) diff --git a/sys/arch/hpcarm/include/vmparam.h b/sys/arch/hpcarm/include/vmparam.h index 2fe990d90da7..c5db2283418c 100644 --- a/sys/arch/hpcarm/include/vmparam.h +++ b/sys/arch/hpcarm/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.23 2003/05/21 22:48:23 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.24 2003/05/22 05:25:50 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -72,12 +72,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - ((KERNEL_VM_SIZE) * 4 / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) diff --git a/sys/arch/netwinder/include/vmparam.h b/sys/arch/netwinder/include/vmparam.h index eeea01ecaf5a..c5cea738be09 100644 --- a/sys/arch/netwinder/include/vmparam.h +++ b/sys/arch/netwinder/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.19 2003/05/21 22:48:23 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.20 2003/05/22 05:25:50 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -76,12 +76,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - ((KERNEL_VM_SIZE) * 4 / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) diff --git a/sys/arch/shark/include/vmparam.h b/sys/arch/shark/include/vmparam.h index 9866f324ca1e..4ccfe39eeac1 100644 --- a/sys/arch/shark/include/vmparam.h +++ b/sys/arch/shark/include/vmparam.h @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.11 2003/05/21 22:48:24 thorpej Exp $ */ +/* $NetBSD: vmparam.h,v 1.12 2003/05/22 05:25:51 thorpej Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -67,12 +67,6 @@ #define USRIOSIZE 300 -/* XXX max. amount of KVM to be used by buffers. */ -#ifndef VM_MAX_KERNEL_BUF -#define VM_MAX_KERNEL_BUF \ - ((KERNEL_VM_SIZE) * 4 / 10) -#endif - /* virtual sizes (bytes) for various kernel submaps */ #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)