diff options
27 files changed, 38 insertions, 337 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 02410e92330..3e88b32afe3 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.131 2011/05/30 22:25:20 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.132 2011/06/05 19:41:06 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -128,20 +128,6 @@ void identifycpu(void); void regdump(struct trapframe *framep); void printregs(struct reg *); -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range isa_constraint = { 0x0, 0x00ffffffUL }; struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 6285a1d91ae..24fa0f12b5e 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.142 2011/05/30 22:25:20 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.143 2011/06/05 19:41:06 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -195,17 +195,6 @@ extern struct vm_map *lkm_map; struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - /* UVM constraint ranges. */ struct uvm_constraint_range isa_constraint = { 0x0, 0x00ffffffUL }; struct uvm_constraint_range dma_constraint = { 0x0, 0xffffffffUL }; diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c index 4384132dec3..a04518a8175 100644 --- a/sys/arch/arm/arm/arm32_machdep.c +++ b/sys/arch/arm/arm/arm32_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arm32_machdep.c,v 1.36 2010/11/28 20:44:15 miod Exp $ */ +/* $OpenBSD: arm32_machdep.c,v 1.37 2011/06/05 19:41:09 deraadt Exp $ */ /* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */ /* @@ -75,17 +75,6 @@ struct vm_map *phys_map = NULL; extern int physmem; -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index bedc7debfdf..5cc557fa887 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.43 2011/05/30 22:25:20 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.44 2011/06/05 19:41:06 deraadt Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -133,20 +133,6 @@ __cpu_simple_lock_t cpu_hatch_mutex = __SIMPLELOCK_LOCKED; __cpu_simple_lock_t cpu_boot_mutex = __SIMPLELOCK_LOCKED; #endif -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 696ff3e61d0..fad8eed9097 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.130 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.131 2011/06/05 19:41:06 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -99,20 +99,6 @@ struct vm_map *phys_map = NULL; extern paddr_t avail_start, avail_end; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - int physmem; /* size of physical memory, in pages */ struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 332dd8deaec..ba91d7693cb 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.201 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.202 2011/06/05 19:41:06 deraadt Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -77,20 +77,6 @@ #include <hppa/dev/cpudevs.h> /* - * Patchable buffer cache parameters - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif /* BUFCACHEPERCENT */ - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - -/* * Different kinds of flags used throughout the kernel. */ int cold = 1; /* unset when engine is up to go */ diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index 35cf9a595d6..169737b00a5 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.36 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.37 2011/06/05 19:41:06 deraadt Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -69,20 +69,6 @@ #include <hppa/dev/cpudevs.h> /* - * Patchable buffer cache parameters - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif /* BUFCACHEPERCENT */ - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - -/* * Different kinds of flags used throughout the kernel. */ int cold = 1; /* unset when engine is up to go */ diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 4951ce16a9f..be2d0b94c7f 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.499 2011/06/05 15:00:37 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.500 2011/06/05 19:41:07 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -185,17 +185,6 @@ int cpu_apmhalt = 0; /* sysctl'd to 1 for halt -p hack */ int user_ldt_enable = 0; /* sysctl'd to 1 to enable */ #endif -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range isa_constraint = { 0x0, 0x00ffffffUL }; struct uvm_constraint_range dma_constraint = { 0x0, 0xffffffffUL }; struct uvm_constraint_range *uvm_md_constraints[] = { diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index 74f99318e05..30d0d63dd38 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.29 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.30 2011/06/05 19:41:07 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -83,18 +83,6 @@ char cpu_model[30]; char pmon_bootp[80]; /* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 /* Can be changed in config. */ -#endif -#ifndef BUFPAGES -#define BUFPAGES 0 /* Can be changed in config. */ -#endif -int bufpages = BUFPAGES; -int bufcachepercent = BUFCACHEPERCENT; - -/* * Even though the system is 64bit, the hardware is constrained to up * to 2G of contigous physical memory (direct 2GB DMA area), so there * is no particular constraint. paddr_t is long so: diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 3c7191a8ed7..7f24927630f 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.76 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.77 2011/06/05 19:41:07 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -180,20 +180,6 @@ struct vm_map *phys_map = NULL; __cpu_simple_lock_t cpu_mutex = __SIMPLELOCK_UNLOCKED; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index c58b5cdf86a..d48fdfa41b2 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.157 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.158 2011/06/05 19:41:07 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */ /* @@ -169,20 +169,6 @@ caddr_t mac68k_bell_cookie; struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - int physmem; /* size of physical memory, in pages */ struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index cfcd9e317de..2de48354e1f 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.126 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.127 2011/06/05 19:41:07 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -92,20 +92,6 @@ extern struct user *proc0paddr; struct pool ppc_vecpl; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 5f6657c1bff..26226acb906 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.124 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.125 2011/06/05 19:41:07 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -125,20 +125,6 @@ struct vm_map *phys_map = NULL; extern vaddr_t avail_end; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - int physmem; /* size of physical memory, in pages */ struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 89ba6cd5ba4..b44065b4c3e 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.242 2011/05/30 22:25:21 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.243 2011/06/05 19:41:07 deraadt Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -146,20 +146,6 @@ __cpu_simple_lock_t cpu_boot_mutex = __SIMPLELOCK_LOCKED; #endif /* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - -/* * 32 or 34 bit physical address bus depending upon the CPU flavor. * 32 bit DMA. "I am not aware of any system where the upper 2 bits * have ever been used" - miod@ diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index c85a9859dfb..849639a665e 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.66 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.67 2011/06/05 19:41:07 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -102,20 +102,6 @@ static struct consdev bootcons = { CN_LOWPRI, }; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct bat battable[16]; struct vm_map *exec_map = NULL; diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index 3e1a86ef077..ac4bc21ea6b 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.12 2011/05/30 22:25:22 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.13 2011/06/05 19:41:07 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -154,18 +154,6 @@ char cpu_model[30]; char pmon_bootp[80]; /* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 /* Can be changed in config. */ -#endif -#ifndef BUFPAGES -#define BUFPAGES 0 /* Can be changed in config. */ -#endif -int bufpages = BUFPAGES; -int bufcachepercent = BUFCACHEPERCENT; - -/* * Even though the system is 64bit, the hardware is constrained to up * to 2G of contigous physical memory (direct 2GB DMA area), so there * is no particular constraint. paddr_t is long so: diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index cc03a82afb2..e3e817b53ba 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.109 2011/05/30 22:25:22 oga Exp $ */ +/* $OpenBSD: machdep.c,v 1.110 2011/06/05 19:41:08 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -82,19 +82,6 @@ void dump_tlb(void); char machine[] = MACHINE; /* Machine "architecture" */ char cpu_model[30]; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 /* Can be changed in config. */ -#endif -#ifndef BUFPAGES -#define BUFPAGES 0 /* Can be changed in config. */ -#endif - -int bufpages = BUFPAGES; -int bufcachepercent = BUFCACHEPERCENT; - /* low 32 bits range. */ struct uvm_constraint_range dma_constraint = { 0x0, 0x7fffffff }; struct uvm_constraint_range *uvm_md_constraints[] = { diff --git a/sys/arch/sh/sh/sh_machdep.c b/sys/arch/sh/sh/sh_machdep.c index 9f8137d62c4..f1e52fa8821 100644 --- a/sys/arch/sh/sh/sh_machdep.c +++ b/sys/arch/sh/sh/sh_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sh_machdep.c,v 1.29 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: sh_machdep.c,v 1.30 2011/06/05 19:41:10 deraadt Exp $ */ /* $NetBSD: sh3_machdep.c,v 1.59 2006/03/04 01:13:36 uwe Exp $ */ /* @@ -113,17 +113,6 @@ #include <sh/intr.h> #include <sh/kcore.h> -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - /* Our exported CPU info; we can have only one. */ int cpu_arch; int cpu_product; diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index 19e2695776d..461349e2a37 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.29 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.30 2011/06/05 19:41:08 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -71,20 +71,6 @@ */ extern struct user *proc0paddr; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c index ef730561f65..8ed93171043 100644 --- a/sys/arch/solbourne/solbourne/machdep.c +++ b/sys/arch/solbourne/solbourne/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.18 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.19 2011/06/05 19:41:08 deraadt Exp $ */ /* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */ /* @@ -88,20 +88,6 @@ struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - int physmem; /* sysctl settable */ diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 3cc31de8fec..7b6abc25661 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.134 2011/04/18 21:44:55 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.135 2011/06/05 19:41:08 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -101,20 +101,6 @@ struct vm_map *exec_map = NULL; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index de6c79bda84..f41fc4108aa 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.131 2011/04/18 21:44:56 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.132 2011/06/05 19:41:08 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -160,20 +160,6 @@ int bus_space_debug = 0; struct vm_map *exec_map = NULL; -/* - * Declare these as initialized data so we can patch them. - */ -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 10 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - struct uvm_constraint_range dma_constraint = { 0x0, (paddr_t)-1 }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index ae4883faebc..cc1708640b7 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.113 2011/04/18 21:44:56 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.114 2011/06/05 19:41:08 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -108,17 +108,6 @@ #include "led.h" -#ifndef BUFCACHEPERCENT -#define BUFCACHEPERCENT 5 -#endif - -#ifdef BUFPAGES -int bufpages = BUFPAGES; -#else -int bufpages = 0; -#endif -int bufcachepercent = BUFCACHEPERCENT; - extern int virtual_avail, virtual_end; /* * We do these external declarations here, maybe they should be done diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index aa4c3746596..b6eb3c6f7c7 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.67 2011/04/05 15:36:09 pirofti Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.68 2011/06/05 19:41:09 deraadt Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -1451,7 +1451,7 @@ linux_sys_sysinfo(p, v, retval) } */ *uap = v; struct linux_sysinfo si; struct loadavg *la; - extern int bufpages; + extern long bufpages; struct timeval tv; getmicrouptime(&tv); diff --git a/sys/conf/param.c b/sys/conf/param.c index 8a5db5ba90a..88a7575d869 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,4 +1,4 @@ -/* $OpenBSD: param.c,v 1.31 2009/12/08 22:12:06 miod Exp $ */ +/* $OpenBSD: param.c,v 1.32 2011/06/05 19:41:09 deraadt Exp $ */ /* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */ /* @@ -100,6 +100,15 @@ int mblowat = MBLOWAT; #endif int mcllowat = MCLLOWAT; +#ifndef BUFCACHEPERCENT +#define BUFCACHEPERCENT 42 +#endif +int bufcachepercent = BUFCACHEPERCENT; + +#ifndef BUFPAGES +#define BUFPAGES 0 +#endif +long bufpages = BUFPAGES; int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 045577708c5..fb3acc990a7 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.129 2011/04/07 19:07:42 beck Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.130 2011/06/05 19:41:04 deraadt Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -114,9 +114,6 @@ long buflowpages; /* bufpages low water mark */ long bufhighpages; /* bufpages high water mark */ long bufbackpages; /* number of pages we back off when asked to shrink */ -/* XXX - should be defined here. */ -extern int bufcachepercent; - vsize_t bufkvm; struct proc *cleanerproc; @@ -194,9 +191,6 @@ bufinit(void) u_int64_t dmapages; struct bqueues *dp; - /* XXX - for now */ - bufhighpages = buflowpages = bufpages = bufcachepercent = bufkvm = 0; - dmapages = uvm_pagecount(&dma_constraint); /* diff --git a/sys/sys/buf.h b/sys/sys/buf.h index f383fb6d135..34c17ca101c 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.76 2011/04/07 19:07:42 beck Exp $ */ +/* $OpenBSD: buf.h,v 1.77 2011/06/05 19:41:08 deraadt Exp $ */ /* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */ /* @@ -260,7 +260,7 @@ struct cluster_info { #ifdef _KERNEL __BEGIN_DECLS -extern int bufpages; /* Max number of pages for buffers' data */ +extern long bufpages; /* Max number of pages for buffers' data */ extern struct pool bufpool; extern struct bufhead bufhead; |