From 81b0d36c8784d1d29f69aaa66bcd9beeeb9ffdfa Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Fri, 30 Jan 1998 12:03:13 +0000 Subject: [PATCH] Sync with sys/i386/i386/machdep.c revision 1.285. --- sys/pc98/i386/machdep.c | 31 +++++++++++++++---------------- sys/pc98/pc98/machdep.c | 31 +++++++++++++++---------------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 7c43da58df1..d4ad6562a11 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.71 1998/01/24 06:53:32 kato Exp $ + * $Id: machdep.c,v 1.72 1998/01/25 12:01:38 kato Exp $ */ #include "apm.h" @@ -292,6 +292,20 @@ cpu_startup(dummy) (name) = (type *)v; v = (caddr_t)((name)+(num)) #define valloclim(name, type, num, lim) \ (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num))) + +#ifdef BOUNCE_BUFFERS + /* + * If there is more than 16MB of memory, allocate some bounce buffers + */ + if (Maxmem > 4096) { + if (bouncepages == 0) { + bouncepages = 64; + } + v = (caddr_t)((vm_offset_t)round_page(v)); + valloc(bouncememory, char, bouncepages * PAGE_SIZE); + } +#endif + valloc(callout, struct callout, ncallout); valloc(callwheel, struct callout_tailq, callwheelsize); #ifdef SYSVSHM @@ -320,21 +334,6 @@ cpu_startup(dummy) valloc(swbuf, struct buf, nswbuf); valloc(buf, struct buf, nbuf); -#ifdef BOUNCE_BUFFERS - /* - * If there is more than 16MB of memory, allocate some bounce buffers - */ - if (Maxmem > 4096) { - if (bouncepages == 0) { - bouncepages = 64; - bouncepages += ((Maxmem - 4096) / 2048) * 32; - if (bouncepages > 128) - bouncepages = 128; - } - v = (caddr_t)((vm_offset_t)round_page(v)); - valloc(bouncememory, char, bouncepages * PAGE_SIZE); - } -#endif /* * End of first pass, size has been calculated so allocate memory diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 7c43da58df1..d4ad6562a11 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.71 1998/01/24 06:53:32 kato Exp $ + * $Id: machdep.c,v 1.72 1998/01/25 12:01:38 kato Exp $ */ #include "apm.h" @@ -292,6 +292,20 @@ cpu_startup(dummy) (name) = (type *)v; v = (caddr_t)((name)+(num)) #define valloclim(name, type, num, lim) \ (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num))) + +#ifdef BOUNCE_BUFFERS + /* + * If there is more than 16MB of memory, allocate some bounce buffers + */ + if (Maxmem > 4096) { + if (bouncepages == 0) { + bouncepages = 64; + } + v = (caddr_t)((vm_offset_t)round_page(v)); + valloc(bouncememory, char, bouncepages * PAGE_SIZE); + } +#endif + valloc(callout, struct callout, ncallout); valloc(callwheel, struct callout_tailq, callwheelsize); #ifdef SYSVSHM @@ -320,21 +334,6 @@ cpu_startup(dummy) valloc(swbuf, struct buf, nswbuf); valloc(buf, struct buf, nbuf); -#ifdef BOUNCE_BUFFERS - /* - * If there is more than 16MB of memory, allocate some bounce buffers - */ - if (Maxmem > 4096) { - if (bouncepages == 0) { - bouncepages = 64; - bouncepages += ((Maxmem - 4096) / 2048) * 32; - if (bouncepages > 128) - bouncepages = 128; - } - v = (caddr_t)((vm_offset_t)round_page(v)); - valloc(bouncememory, char, bouncepages * PAGE_SIZE); - } -#endif /* * End of first pass, size has been calculated so allocate memory -- 2.45.2