Add the machine-specific definitions for configuring the new physical

memory allocator.

Set the size of phys_avail[] using one of these definitions.

Approved by:	re
This commit is contained in:
Alan Cox 2007-06-10 23:39:07 +00:00
parent f6cdab92db
commit 752bb3876c
2 changed files with 31 additions and 1 deletions

View File

@ -146,7 +146,9 @@ struct msgbuf *msgbufp=0;
long Maxmem = 0;
long realmem = 0;
vm_offset_t phys_avail[100];
#define PHYSMAP_SIZE (2 * VM_PHYSSEG_MAX)
vm_paddr_t phys_avail[PHYSMAP_SIZE + 2];
/* must be 2 less so 0 0 can signal end of chunks */
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)

View File

@ -115,6 +115,34 @@
*/
#define VM_PHYSSEG_SPARSE
/*
* The number of PHYSSEG entries is equal to the number of phys_avail
* entries.
*/
#define VM_PHYSSEG_MAX 49
/*
* Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool
* from which physical pages are allocated and VM_FREEPOOL_DIRECT is
* the pool from which physical pages for small UMA objects are
* allocated.
*/
#define VM_NFREEPOOL 2
#define VM_FREEPOOL_DEFAULT 0
#define VM_FREEPOOL_DIRECT 1
/*
* Create one free page list.
*/
#define VM_NFREELIST 1
#define VM_FREELIST_DEFAULT 0
/*
* An allocation size of 256MB is supported in order to optimize the
* use of the identity mappings in region 7 by UMA.
*/
#define VM_NFREEORDER 16
/*
* Manipulating region bits of an address.
*/