Author: imp
Date: Fri Jul 27 18:34:20 2018
New Revision: 336774
URL: https://svnweb.freebsd.org/changeset/base/336774

Log:
  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

Modified:
  head/sys/amd64/include/vmparam.h
  head/sys/i386/include/vmparam.h
  head/sys/vm/vm_phys.c

Modified: head/sys/amd64/include/vmparam.h
==============================================================================
--- head/sys/amd64/include/vmparam.h    Fri Jul 27 18:33:09 2018        
(r336773)
+++ head/sys/amd64/include/vmparam.h    Fri Jul 27 18:34:20 2018        
(r336774)
@@ -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

Modified: head/sys/i386/include/vmparam.h
==============================================================================
--- head/sys/i386/include/vmparam.h     Fri Jul 27 18:33:09 2018        
(r336773)
+++ head/sys/i386/include/vmparam.h     Fri Jul 27 18:34:20 2018        
(r336774)
@@ -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.

Modified: head/sys/vm/vm_phys.c
==============================================================================
--- head/sys/vm/vm_phys.c       Fri Jul 27 18:33:09 2018        (r336773)
+++ head/sys/vm/vm_phys.c       Fri Jul 27 18:34:20 2018        (r336774)
@@ -115,9 +115,6 @@ static int __read_mostly vm_freelist_to_flind[VM_NFREE
 
 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;
@@ -540,13 +523,6 @@ vm_phys_init(void)
                npages += atop(seg->end - seg->start);
 #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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to