Skip to content

Commit be05f57

Browse files
committed
memblock test: include <linux/sizes.h> from tools mm.h stub
memblock test compilation fails: memblock.c: In function ‘memblock_validate_numa_coverage’: memblock.c:784:58: error: ‘SZ_1M’ undeclared (first use in this function) 784 | mem_size_mb = memblock_phys_mem_size() / SZ_1M; | ^~~~~ The SZ_1M is defined in sizes.h, but it is not included by stub version of mm.h in tools/include/linux. Add include of sizes.h to tools/include/linux/mm.h to fix the compilation of memblock tests. Link: https://patch.msgid.link/20251228183942.3628918-1-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
1 parent f8f9c1f commit be05f57

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • tools/include/linux

tools/include/linux/mm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/align.h>
66
#include <linux/mmzone.h>
7+
#include <linux/sizes.h>
78

89
#define PAGE_SHIFT 12
910
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)

0 commit comments

Comments
 (0)