From 67d33338c0b29cc5c64af79f31d79b8e5c7125da Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 27 Jul 2018 18:34:20 +0000 Subject: [PATCH] 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 --- sys/amd64/include/vmparam.h | 4 +++- sys/i386/include/vmparam.h | 6 ++++-- sys/vm/vm_phys.c | 24 ------------------------ 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index abfee488daf4..136e235cde45 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -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 diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index 1a811267be63..a21cd63d07ed 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -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. diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 6d008d4d9114..6f0440cfdc2d 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -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];