Page MenuHomeFreeBSD

D16290.diff
No OneTemporary

D16290.diff

Index: sys/amd64/include/vmparam.h
===================================================================
--- sys/amd64/include/vmparam.h
+++ 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 << 10) /* 16MB ISA DMA limit */
/*
* Create the DMA32 free list only if the number of physical pages above
Index: sys/arm64/include/vmparam.h
===================================================================
--- sys/arm64/include/vmparam.h
+++ sys/arm64/include/vmparam.h
@@ -67,10 +67,7 @@
#define VM_PHYSSEG_SPARSE
/*
- * The number of PHYSSEG entries must be one greater than the number
- * of phys_avail entries because the phys_avail entry that spans the
- * largest physical address that is accessible by ISA DMA is split
- * into two PHYSSEG entries.
+ * The number of PHYSSEG entries.
*/
#define VM_PHYSSEG_MAX 64
@@ -85,14 +82,11 @@
#define VM_FREEPOOL_DIRECT 1
/*
- * 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
- * that are below that address.
+ * Create oone free page lists: VM_FREELIST_DEFAULT is for all physical
+ * pages.
*/
-#define VM_NFREELIST 2
+#define VM_NFREELIST 1
#define VM_FREELIST_DEFAULT 0
-#define VM_FREELIST_ISADMA 1
/*
* An allocation size of 16MB is supported in order to optimize the
Index: sys/i386/include/vmparam.h
===================================================================
--- sys/i386/include/vmparam.h
+++ 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 << 10) /* 16MB ISA DMA limit */
/*
* The largest allocation size is 2MB under PAE and 4MB otherwise.
Index: sys/riscv/include/vmparam.h
===================================================================
--- sys/riscv/include/vmparam.h
+++ sys/riscv/include/vmparam.h
@@ -67,10 +67,7 @@
#define VM_PHYSSEG_SPARSE
/*
- * The number of PHYSSEG entries must be one greater than the number
- * of phys_avail entries because the phys_avail entry that spans the
- * largest physical address that is accessible by ISA DMA is split
- * into two PHYSSEG entries.
+ * The number of PHYSSEG entries.
*/
#define VM_PHYSSEG_MAX 64
@@ -85,14 +82,11 @@
#define VM_FREEPOOL_DIRECT 1
/*
- * 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
- * that are below that address.
+ * Create one free page list: VM_FREELIST_DEFAULT is for all physical
+ * pages.
*/
-#define VM_NFREELIST 2
+#define VM_NFREELIST 1
#define VM_FREELIST_DEFAULT 0
-#define VM_FREELIST_ISADMA 1
/*
* An allocation size of 16MB is supported in order to optimize the
Index: sys/sparc64/include/vmparam.h
===================================================================
--- sys/sparc64/include/vmparam.h
+++ sys/sparc64/include/vmparam.h
@@ -87,14 +87,11 @@
#define VM_FREEPOOL_DIRECT 1
/*
- * 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
- * that are below that address.
+ * Create one free page lists: VM_FREELIST_DEFAULT is for all physical
+ * pages.
*/
-#define VM_NFREELIST 2
+#define VM_NFREELIST 1
#define VM_FREELIST_DEFAULT 0
-#define VM_FREELIST_ISADMA 1
/*
* An allocation size of 16MB is supported in order to optimize the
Index: sys/vm/vm_phys.c
===================================================================
--- sys/vm/vm_phys.c
+++ sys/vm/vm_phys.c
@@ -115,9 +115,6 @@
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 @@
* 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 @@
* 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 @@
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 @@
#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];

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 4:55 PM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15771191
Default Alt Text
D16290.diff (5 KB)

Event Timeline