aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2026-06-17 12:16:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-17 12:16:28 -0700
commit21bd909c78241a61c991e1fb332cea04c340e5f0 (patch)
treee6e529ca05c673e05ac8446584155a4ab26ec069 /tools
parent0839c8963b7b28d25350bd5ea69bacde794124ab (diff)
parent00e06cb773fd81d4f2806a6ee69d1aef8f6dd5ca (diff)
downloadath-21bd909c78241a61c991e1fb332cea04c340e5f0.tar.gz
Merge tag 'memblock-v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock updates from Mike Rapoport: "Small fixes and a cleanup: - numa emulation: fix detection of under-allocated emulated nodes - memblock tests: fix NUMA tests to properly differentiate reserved areas with differnet flags - mm_init: use div64_ul() instead of do_div() to better express the intent of the division" * tag 'memblock-v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: mm: mm_init: use div64_ul() instead of do_div() tools/testing/memblock: fix stale NUMA reservation tests mm/fake-numa: fix under-allocation detection in uniform split
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/memblock/README5
-rw-r--r--tools/testing/memblock/TODO4
-rw-r--r--tools/testing/memblock/tests/alloc_exact_nid_api.c6
-rw-r--r--tools/testing/memblock/tests/alloc_nid_api.c6
4 files changed, 9 insertions, 12 deletions
diff --git a/tools/testing/memblock/README b/tools/testing/memblock/README
index 7ca437d818067..b435f48d8a700 100644
--- a/tools/testing/memblock/README
+++ b/tools/testing/memblock/README
@@ -104,10 +104,7 @@ called at the beginning of each test.
Known issues
============
-1. Requesting a specific NUMA node via memblock_alloc_node() does not work as
- intended. Once the fix is in place, tests for this function can be added.
-
-2. Tests for memblock_alloc_low() can't be easily implemented. The function uses
+1. Tests for memblock_alloc_low() can't be easily implemented. The function uses
ARCH_LOW_ADDRESS_LIMIT marco, which can't be changed to point at the low
memory of the memory_block.
diff --git a/tools/testing/memblock/TODO b/tools/testing/memblock/TODO
index e306c90c535fb..c13ad0dae7763 100644
--- a/tools/testing/memblock/TODO
+++ b/tools/testing/memblock/TODO
@@ -1,5 +1,5 @@
TODO
=====
-1. Add tests for memblock_alloc_node() to check if the correct NUMA node is set
- for the new region
+1. Add tests for memblock_alloc_low() once the simulator can model
+ ARCH_LOW_ADDRESS_LIMIT against the low memory in memory_block
diff --git a/tools/testing/memblock/tests/alloc_exact_nid_api.c b/tools/testing/memblock/tests/alloc_exact_nid_api.c
index 6e14447da6e1c..0c46c73b5e041 100644
--- a/tools/testing/memblock/tests/alloc_exact_nid_api.c
+++ b/tools/testing/memblock/tests/alloc_exact_nid_api.c
@@ -368,7 +368,7 @@ static int alloc_exact_nid_bottom_up_numa_part_reserved_check(void)
max_addr = memblock_end_of_DRAM();
total_size = size + r1.size;
- memblock_reserve(r1.base, r1.size);
+ __memblock_reserve(r1.base, r1.size, nid_req, MEMBLOCK_RSRV_KERN);
allocated_ptr = memblock_alloc_exact_nid_raw(size, SMP_CACHE_BYTES,
min_addr, max_addr,
nid_req);
@@ -861,8 +861,8 @@ static int alloc_exact_nid_numa_reserved_full_merge_generic_check(void)
min_addr = r2.base + r2.size;
max_addr = r1.base;
- memblock_reserve(r1.base, r1.size);
- memblock_reserve(r2.base, r2.size);
+ __memblock_reserve(r1.base, r1.size, nid_req, MEMBLOCK_RSRV_KERN);
+ __memblock_reserve(r2.base, r2.size, nid_req, MEMBLOCK_RSRV_KERN);
allocated_ptr = memblock_alloc_exact_nid_raw(size, SMP_CACHE_BYTES,
min_addr, max_addr,
diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c
index 562e4701b0e02..c049235321594 100644
--- a/tools/testing/memblock/tests/alloc_nid_api.c
+++ b/tools/testing/memblock/tests/alloc_nid_api.c
@@ -1965,7 +1965,7 @@ static int alloc_nid_bottom_up_numa_part_reserved_check(void)
max_addr = memblock_end_of_DRAM();
total_size = size + r1.size;
- memblock_reserve(r1.base, r1.size);
+ __memblock_reserve(r1.base, r1.size, nid_req, MEMBLOCK_RSRV_KERN);
allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES,
min_addr, max_addr, nid_req);
@@ -2412,8 +2412,8 @@ static int alloc_nid_numa_reserved_full_merge_generic_check(void)
min_addr = r2.base + r2.size;
max_addr = r1.base;
- memblock_reserve(r1.base, r1.size);
- memblock_reserve(r2.base, r2.size);
+ __memblock_reserve(r1.base, r1.size, nid_req, MEMBLOCK_RSRV_KERN);
+ __memblock_reserve(r2.base, r2.size, nid_req, MEMBLOCK_RSRV_KERN);
allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES,
min_addr, max_addr, nid_req);