summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorpluknet <pluknet@FreeBSD.org>2011-01-21 10:26:26 +0000
committerpluknet <pluknet@FreeBSD.org>2011-01-21 10:26:26 +0000
commit5f536fc1d3dfb28e75a18d60bddcfacdf3f22617 (patch)
tree7eea8c732d50e7ebda3498e40f7ccad228cc1453 /sys/arm
parent8309d738784bb61d488dbea96837e5d407437cfc (diff)
downloadFreeBSD-src-5f536fc1d3dfb28e75a18d60bddcfacdf3f22617.zip
FreeBSD-src-5f536fc1d3dfb28e75a18d60bddcfacdf3f22617.tar.gz
Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/at91/at91_machdep.c8
-rw-r--r--sys/arm/econa/econa_machdep.c8
-rw-r--r--sys/arm/mv/mv_machdep.c5
-rw-r--r--sys/arm/s3c2xx0/s3c24x0_machdep.c7
-rw-r--r--sys/arm/xscale/i80321/ep80219_machdep.c6
-rw-r--r--sys/arm/xscale/i80321/iq31244_machdep.c6
-rw-r--r--sys/arm/xscale/i8134x/crb_machdep.c6
-rw-r--r--sys/arm/xscale/ixp425/avila_machdep.c6
-rw-r--r--sys/arm/xscale/pxa/pxa_machdep.c5
9 files changed, 21 insertions, 36 deletions
diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c
index bf686eb..5445450 100644
--- a/sys/arm/at91/at91_machdep.c
+++ b/sys/arm/at91/at91_machdep.c
@@ -43,8 +43,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -302,7 +300,7 @@ initarm(void *arg, void *arg2)
valloc_pages(abtstack, ABT_STACK_SIZE);
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
/*
* Now we start construction of the L1 page table
@@ -347,7 +345,7 @@ initarm(void *arg, void *arg2)
pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa,
- MSGBUF_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+ msgbufsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) {
pmap_map_chunk(l1pagetable, kernel_pt_table[loop].pv_va,
@@ -430,7 +428,7 @@ initarm(void *arg, void *arg2)
KERNVIRTADDR + 3 * memsize,
&kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
diff --git a/sys/arm/econa/econa_machdep.c b/sys/arm/econa/econa_machdep.c
index c4e9806..bbd615f 100644
--- a/sys/arm/econa/econa_machdep.c
+++ b/sys/arm/econa/econa_machdep.c
@@ -35,8 +35,6 @@
*
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -251,7 +249,7 @@ initarm(void *arg, void *arg2)
valloc_pages(abtstack, ABT_STACK_SIZE);
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
/*
* Now we start construction of the L1 page table
@@ -293,7 +291,7 @@ initarm(void *arg, void *arg2)
pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa,
- MSGBUF_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+ msgbufsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) {
pmap_map_chunk(l1pagetable, kernel_pt_table[loop].pv_va,
@@ -372,7 +370,7 @@ initarm(void *arg, void *arg2)
&kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index b2ec33b..4981d22 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -35,7 +35,6 @@
* from: FreeBSD: //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c, rev 45
*/
-#include "opt_msgbuf.h"
#include "opt_ddb.h"
#include "opt_platform.h"
@@ -427,7 +426,7 @@ initarm(void *mdp, void *unused __unused)
valloc_pages(abtstack, ABT_STACK_SIZE);
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
/*
* Now we start construction of the L1 page table
@@ -575,7 +574,7 @@ initarm(void *mdp, void *unused __unused)
pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
msgbufp = (void *)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
/*
diff --git a/sys/arm/s3c2xx0/s3c24x0_machdep.c b/sys/arm/s3c2xx0/s3c24x0_machdep.c
index 899222f..008d9399 100644
--- a/sys/arm/s3c2xx0/s3c24x0_machdep.c
+++ b/sys/arm/s3c2xx0/s3c24x0_machdep.c
@@ -43,7 +43,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
#include "opt_ddb.h"
#include <sys/cdefs.h>
@@ -298,7 +297,7 @@ initarm(void *arg, void *arg2)
valloc_pages(abtstack, ABT_STACK_SIZE);
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
/*
* Now we start construction of the L1 page table
* We start by mapping the L2 page tables into the L1.
@@ -338,7 +337,7 @@ initarm(void *arg, void *arg2)
pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa,
- MSGBUF_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+ msgbufsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) {
@@ -429,7 +428,7 @@ initarm(void *arg, void *arg2)
KERNVIRTADDR + 3 * memsize,
&kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
physmem = memsize / PAGE_SIZE;
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c
index ed77995..016da7f 100644
--- a/sys/arm/xscale/i80321/ep80219_machdep.c
+++ b/sys/arm/xscale/i80321/ep80219_machdep.c
@@ -45,8 +45,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -247,7 +245,7 @@ initarm(void *arg, void *arg2)
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
alloc_pages(minidataclean.pv_pa, 1);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
#ifdef ARM_USE_SMALL_ALLOC
freemempos -= PAGE_SIZE;
freemem_pt = trunc_page(freemem_pt);
@@ -397,7 +395,7 @@ initarm(void *arg, void *arg2)
pmap_bootstrap(pmap_curmaxkvaddr,
0xd0000000, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c
index cc89008..f417016 100644
--- a/sys/arm/xscale/i80321/iq31244_machdep.c
+++ b/sys/arm/xscale/i80321/iq31244_machdep.c
@@ -45,8 +45,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -247,7 +245,7 @@ initarm(void *arg, void *arg2)
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
alloc_pages(minidataclean.pv_pa, 1);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
#ifdef ARM_USE_SMALL_ALLOC
freemempos -= PAGE_SIZE;
freemem_pt = trunc_page(freemem_pt);
@@ -403,7 +401,7 @@ initarm(void *arg, void *arg2)
pmap_bootstrap(pmap_curmaxkvaddr,
0xd0000000, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
diff --git a/sys/arm/xscale/i8134x/crb_machdep.c b/sys/arm/xscale/i8134x/crb_machdep.c
index 8c57cc1..fd8aadd 100644
--- a/sys/arm/xscale/i8134x/crb_machdep.c
+++ b/sys/arm/xscale/i8134x/crb_machdep.c
@@ -45,8 +45,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -242,7 +240,7 @@ initarm(void *arg, void *arg2)
valloc_pages(abtstack, ABT_STACK_SIZE);
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
#ifdef ARM_USE_SMALL_ALLOC
freemempos -= PAGE_SIZE;
freemem_pt = trunc_page(freemem_pt);
@@ -375,7 +373,7 @@ initarm(void *arg, void *arg2)
pmap_bootstrap(pmap_curmaxkvaddr,
0xd0000000, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
diff --git a/sys/arm/xscale/ixp425/avila_machdep.c b/sys/arm/xscale/ixp425/avila_machdep.c
index 9ea4f4d..63ac46c 100644
--- a/sys/arm/xscale/ixp425/avila_machdep.c
+++ b/sys/arm/xscale/ixp425/avila_machdep.c
@@ -45,8 +45,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -314,7 +312,7 @@ initarm(void *arg, void *arg2)
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
alloc_pages(minidataclean.pv_pa, 1);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
#ifdef ARM_USE_SMALL_ALLOC
freemempos -= PAGE_SIZE;
freemem_pt = trunc_page(freemem_pt);
@@ -460,7 +458,7 @@ initarm(void *arg, void *arg2)
pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
diff --git a/sys/arm/xscale/pxa/pxa_machdep.c b/sys/arm/xscale/pxa/pxa_machdep.c
index e6d8bf4..c060596 100644
--- a/sys/arm/xscale/pxa/pxa_machdep.c
+++ b/sys/arm/xscale/pxa/pxa_machdep.c
@@ -45,7 +45,6 @@
* Created : 17/09/94
*/
-#include "opt_msgbuf.h"
#include "opt_ddb.h"
#include <sys/cdefs.h>
@@ -229,7 +228,7 @@ initarm(void *arg, void *arg2)
valloc_pages(undstack, UND_STACK_SIZE);
valloc_pages(kernelstack, KSTACK_PAGES);
alloc_pages(minidataclean.pv_pa, 1);
- valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
+ valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
#ifdef ARM_USE_SMALL_ALLOC
freemempos -= PAGE_SIZE;
freemem_pt = trunc_page(freemem_pt);
@@ -393,7 +392,7 @@ initarm(void *arg, void *arg2)
dump_avail[i] = 0;
pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
- msgbufinit(msgbufp, MSGBUF_SIZE);
+ msgbufinit(msgbufp, msgbufsize);
mutex_init();
i = 0;
OpenPOWER on IntegriCloud