mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-05 03:45:16 +00:00

page_frag test module is an out of tree module, but built using KDIR as the main kernel tree, the mm test suite is just getting skipped if newly added page_frag test module fails to compile due to kernel not yet compiled. Fix the above problem by ensuring both kernel is built first and a newer kernel which has page_frag_cache.h is used. CC: Andrew Morton <akpm@linux-foundation.org> CC: Alexander Duyck <alexanderduyck@fb.com> CC: Linux-MM <linux-mm@kvack.org> Fixes:7fef0dec41
("mm: page_frag: add a test module for page_frag") Fixes:65941f10ca
("mm: move the page fragment allocator from page_alloc into its own file") Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Tested-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20241119033012.257525-1-linyunsheng@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
19 lines
338 B
Makefile
19 lines
338 B
Makefile
PAGE_FRAG_TEST_DIR := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
|
KDIR ?= /lib/modules/$(shell uname -r)/build
|
|
|
|
ifeq ($(V),1)
|
|
Q =
|
|
else
|
|
Q = @
|
|
endif
|
|
|
|
MODULES = page_frag_test.ko
|
|
|
|
obj-m += page_frag_test.o
|
|
|
|
all:
|
|
+$(Q)make -C $(KDIR) M=$(PAGE_FRAG_TEST_DIR) modules
|
|
|
|
clean:
|
|
+$(Q)make -C $(KDIR) M=$(PAGE_FRAG_TEST_DIR) clean
|