Skip to content

Commit 3407267

Browse files
dev-aaront-orgrppt
authored andcommitted
memblock tests: Fix compilation error.
Commit cf4694b ("tools: Add atomic_test_and_set_bit()") changed tools/arch/x86/include/asm/atomic.h to include <asm/asm.h>, which causes 'make -C tools/testing/memblock' to fail with: In file included from ../../include/asm/atomic.h:6, from ../../include/linux/atomic.h:5, from ./linux/mmzone.h:5, from ../../include/linux/mm.h:5, from ../../include/linux/pfn.h:5, from ./linux/memory_hotplug.h:6, from ./linux/init.h:7, from ./linux/memblock.h:11, from tests/common.h:8, from tests/basic_api.h:5, from main.c:2: ../../include/asm/../../arch/x86/include/asm/atomic.h:11:10: fatal error: asm/asm.h: No such file or directory 11 | #include <asm/asm.h> | ^~~~~~~~~~~ Create a symlink to asm/asm.h in the same manner as the existing one to asm/cmpxchg.h. Signed-off-by: Aaron Thompson <dev@aaront.org> Link: https://lore.kernel.org/r/010101857c402765-96e2dbc6-b82b-47e2-a437-4834dbe0b96b-000000@us-west-2.amazonses.com Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
1 parent 88603b6 commit 3407267

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tools/testing/memblock/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
main
22
memblock.c
33
linux/memblock.h
4+
asm/asm.h
45
asm/cmpxchg.h

tools/testing/memblock/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ include: ../../../include/linux/memblock.h ../../include/linux/*.h \
2929

3030
@mkdir -p linux
3131
test -L linux/memblock.h || ln -s ../../../../include/linux/memblock.h linux/memblock.h
32+
test -L asm/asm.h || ln -s ../../../arch/x86/include/asm/asm.h asm/asm.h
3233
test -L asm/cmpxchg.h || ln -s ../../../arch/x86/include/asm/cmpxchg.h asm/cmpxchg.h
3334

3435
memblock.c: $(EXTR_SRC)
3536
test -L memblock.c || ln -s $(EXTR_SRC) memblock.c
3637

3738
clean:
38-
$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/cmpxchg.h
39+
$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/asm.h asm/cmpxchg.h
3940

4041
help:
4142
@echo 'Memblock simulator'

0 commit comments

Comments
 (0)