linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memblock tests: Fix compilation error.
@ 2023-01-04 10:07 Aaron Thompson
  2023-01-04 10:32 ` Mike Rapoport
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Thompson @ 2023-01-04 10:07 UTC (permalink / raw)
  To: Mike Rapoport, linux-mm; +Cc: linux-kernel, Aaron Thompson

Commit cf4694be2b2cf ("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>
---
 tools/testing/memblock/.gitignore | 1 +
 tools/testing/memblock/Makefile   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/memblock/.gitignore b/tools/testing/memblock/.gitignore
index 654338e0be52..4cc7cd5aac2b 100644
--- a/tools/testing/memblock/.gitignore
+++ b/tools/testing/memblock/.gitignore
@@ -1,4 +1,5 @@
 main
 memblock.c
 linux/memblock.h
+asm/asm.h
 asm/cmpxchg.h
diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile
index 2310ac4d080e..7a1ca694a982 100644
--- a/tools/testing/memblock/Makefile
+++ b/tools/testing/memblock/Makefile
@@ -29,13 +29,14 @@ include: ../../../include/linux/memblock.h ../../include/linux/*.h \
 
 	@mkdir -p linux
 	test -L linux/memblock.h || ln -s ../../../../include/linux/memblock.h linux/memblock.h
+	test -L asm/asm.h || ln -s ../../../arch/x86/include/asm/asm.h asm/asm.h
 	test -L asm/cmpxchg.h || ln -s ../../../arch/x86/include/asm/cmpxchg.h asm/cmpxchg.h
 
 memblock.c: $(EXTR_SRC)
 	test -L memblock.c || ln -s $(EXTR_SRC) memblock.c
 
 clean:
-	$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/cmpxchg.h
+	$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/asm.h asm/cmpxchg.h
 
 help:
 	@echo  'Memblock simulator'
-- 
2.30.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] memblock tests: Fix compilation error.
  2023-01-04 10:07 [PATCH] memblock tests: Fix compilation error Aaron Thompson
@ 2023-01-04 10:32 ` Mike Rapoport
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2023-01-04 10:32 UTC (permalink / raw)
  To: Aaron Thompson; +Cc: linux-mm, linux-kernel

On Wed, Jan 04, 2023 at 10:07:37AM +0000, Aaron Thompson wrote:
> Commit cf4694be2b2cf ("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>

Applied, thanks!

> ---
>  tools/testing/memblock/.gitignore | 1 +
>  tools/testing/memblock/Makefile   | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/memblock/.gitignore b/tools/testing/memblock/.gitignore
> index 654338e0be52..4cc7cd5aac2b 100644
> --- a/tools/testing/memblock/.gitignore
> +++ b/tools/testing/memblock/.gitignore
> @@ -1,4 +1,5 @@
>  main
>  memblock.c
>  linux/memblock.h
> +asm/asm.h
>  asm/cmpxchg.h
> diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile
> index 2310ac4d080e..7a1ca694a982 100644
> --- a/tools/testing/memblock/Makefile
> +++ b/tools/testing/memblock/Makefile
> @@ -29,13 +29,14 @@ include: ../../../include/linux/memblock.h ../../include/linux/*.h \
>  
>  	@mkdir -p linux
>  	test -L linux/memblock.h || ln -s ../../../../include/linux/memblock.h linux/memblock.h
> +	test -L asm/asm.h || ln -s ../../../arch/x86/include/asm/asm.h asm/asm.h
>  	test -L asm/cmpxchg.h || ln -s ../../../arch/x86/include/asm/cmpxchg.h asm/cmpxchg.h
>  
>  memblock.c: $(EXTR_SRC)
>  	test -L memblock.c || ln -s $(EXTR_SRC) memblock.c
>  
>  clean:
> -	$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/cmpxchg.h
> +	$(RM) $(TARGETS) $(OFILES) linux/memblock.h memblock.c asm/asm.h asm/cmpxchg.h
>  
>  help:
>  	@echo  'Memblock simulator'
> -- 
> 2.30.2
> 

-- 
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-04 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 10:07 [PATCH] memblock tests: Fix compilation error Aaron Thompson
2023-01-04 10:32 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox