summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2023-07-14 11:52:38 +1000
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 10:12:32 -0700
commitefb78fa86e95832b78ca0ba60f3706788a818938 (patch)
tree458e235f57b8fc9efacd7db1e3a1ce2645c73cf5 /drivers
parenteb0da7f6e0832a689d845ca2d62152dc6b43e780 (diff)
downloadlinux-stable-efb78fa86e95832b78ca0ba60f3706788a818938.tar.gz
linux-stable-efb78fa86e95832b78ca0ba60f3706788a818938.tar.bz2
linux-stable-efb78fa86e95832b78ca0ba60f3706788a818938.zip
lib/test_meminit: allocate pages up to order MAX_ORDER
test_pages() tests the page allocator by calling alloc_pages() with different orders up to order 10. However, different architectures and platforms support different maximum contiguous allocation sizes. The default maximum allocation order (MAX_ORDER) is 10, but architectures can use CONFIG_ARCH_FORCE_MAX_ORDER to override this. On platforms where this is less than 10, test_meminit() will blow up with a WARN(). This is expected, so let's not do that. Replace the hardcoded "10" with the MAX_ORDER macro so that we test allocations up to the expected platform limit. Link: https://lkml.kernel.org/r/20230714015238.47931-1-ajd@linux.ibm.com Fixes: 5015a300a522 ("lib: introduce test_meminit module") Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Reviewed-by: Alexander Potapenko <glider@google.com> Cc: Xiaoke Wang <xkernel.wang@foxmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions