Rename VM_FREELIST_ISADMA to VM_FREELIST_LOWMEM.

There's no differene between VM_FREELIST_ISADMA and VM_FREELIST_LOWMEM
except for the default boundary (16MB on x86 and 256MB on MIPS, but
they are otherwise the same). We don't need both for any system we
support (there were some really old ARC systems that did have ISA/EISA
bus, but we never ran on them and they are too old to ever grow
support for).

Differential Review: https://reviews.freebsd.org/D16290
This commit is contained in:
Warner Losh 2018-07-27 18:34:20 +00:00
parent 626930c2fd
commit 67d33338c0
3 changed files with 7 additions and 27 deletions

View File

@ -110,7 +110,9 @@
#define VM_NFREELIST 3
#define VM_FREELIST_DEFAULT 0
#define VM_FREELIST_DMA32 1
#define VM_FREELIST_ISADMA 2
#define VM_FREELIST_LOWMEM 2
#define VM_LOWMEM_BOUNDARY (16 << 20) /* 16MB ISA DMA limit */
/*
* Create the DMA32 free list only if the number of physical pages above

View File

@ -97,12 +97,14 @@
/*
* Create two free page lists: VM_FREELIST_DEFAULT is for physical
* pages that are above the largest physical address that is
* accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages
* accessible by ISA DMA and VM_FREELIST_LOWMEM is for physical pages
* that are below that address.
*/
#define VM_NFREELIST 2
#define VM_FREELIST_DEFAULT 0
#define VM_FREELIST_ISADMA 1
#define VM_FREELIST_LOWMEM 1
#define VM_LOWMEM_BOUNDARY (16 << 20) /* 16MB ISA DMA limit */
/*
* The largest allocation size is 2MB under PAE and 4MB otherwise.

View File

@ -115,9 +115,6 @@ static int __read_mostly vm_freelist_to_flind[VM_NFREELIST];
CTASSERT(VM_FREELIST_DEFAULT == 0);
#ifdef VM_FREELIST_ISADMA
#define VM_ISADMA_BOUNDARY 16777216
#endif
#ifdef VM_FREELIST_DMA32
#define VM_DMA32_BOUNDARY ((vm_paddr_t)1 << 32)
#endif
@ -126,9 +123,6 @@ CTASSERT(VM_FREELIST_DEFAULT == 0);
* Enforce the assumptions made by vm_phys_add_seg() and vm_phys_init() about
* the ordering of the free list boundaries.
*/
#if defined(VM_ISADMA_BOUNDARY) && defined(VM_LOWMEM_BOUNDARY)
CTASSERT(VM_ISADMA_BOUNDARY < VM_LOWMEM_BOUNDARY);
#endif
#if defined(VM_LOWMEM_BOUNDARY) && defined(VM_DMA32_BOUNDARY)
CTASSERT(VM_LOWMEM_BOUNDARY < VM_DMA32_BOUNDARY);
#endif
@ -442,12 +436,6 @@ vm_phys_add_seg(vm_paddr_t start, vm_paddr_t end)
* list boundaries.
*/
paddr = start;
#ifdef VM_FREELIST_ISADMA
if (paddr < VM_ISADMA_BOUNDARY && end > VM_ISADMA_BOUNDARY) {
vm_phys_create_seg(paddr, VM_ISADMA_BOUNDARY);
paddr = VM_ISADMA_BOUNDARY;
}
#endif
#ifdef VM_FREELIST_LOWMEM
if (paddr < VM_LOWMEM_BOUNDARY && end > VM_LOWMEM_BOUNDARY) {
vm_phys_create_seg(paddr, VM_LOWMEM_BOUNDARY);
@ -486,11 +474,6 @@ vm_phys_init(void)
npages = 0;
for (segind = vm_phys_nsegs - 1; segind >= 0; segind--) {
seg = &vm_phys_segs[segind];
#ifdef VM_FREELIST_ISADMA
if (seg->end <= VM_ISADMA_BOUNDARY)
vm_freelist_to_flind[VM_FREELIST_ISADMA] = 1;
else
#endif
#ifdef VM_FREELIST_LOWMEM
if (seg->end <= VM_LOWMEM_BOUNDARY)
vm_freelist_to_flind[VM_FREELIST_LOWMEM] = 1;
@ -541,13 +524,6 @@ vm_phys_init(void)
#else
seg->first_page = PHYS_TO_VM_PAGE(seg->start);
#endif
#ifdef VM_FREELIST_ISADMA
if (seg->end <= VM_ISADMA_BOUNDARY) {
flind = vm_freelist_to_flind[VM_FREELIST_ISADMA];
KASSERT(flind >= 0,
("vm_phys_init: ISADMA flind < 0"));
} else
#endif
#ifdef VM_FREELIST_LOWMEM
if (seg->end <= VM_LOWMEM_BOUNDARY) {
flind = vm_freelist_to_flind[VM_FREELIST_LOWMEM];