public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
@ 2024-10-07  7:24 Andreas Schwab
  2024-10-09 17:18 ` Palmer Dabbelt
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Andreas Schwab @ 2024-10-07  7:24 UTC (permalink / raw)
  To: linux-riscv
  Cc: Charlie Jenkins, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Andrea Parri, linux-kernel

This is needed so that <asm/barrier.h> can find <asm/fence.h> on riscv.

Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
 tools/include/asm/fence.h | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 tools/include/asm/fence.h

diff --git a/tools/include/asm/fence.h b/tools/include/asm/fence.h
new file mode 100644
index 000000000000..917a173059a4
--- /dev/null
+++ b/tools/include/asm/fence.h
@@ -0,0 +1,3 @@
+#if defined(__riscv)
+#include "../../arch/riscv/include/asm/fence.h"
+#endif
-- 
2.46.2


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-07  7:24 [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h Andreas Schwab
@ 2024-10-09 17:18 ` Palmer Dabbelt
  2024-10-10  6:11   ` Andreas Schwab
  2024-10-29 12:29   ` Andreas Schwab
  2024-10-29 14:46 ` Anand Moon
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Palmer Dabbelt @ 2024-10-09 17:18 UTC (permalink / raw)
  To: schwab
  Cc: linux-riscv, Charlie Jenkins, Paul Walmsley, aou, parri.andrea,
	linux-kernel

On Mon, 07 Oct 2024 00:24:06 PDT (-0700), schwab@suse.de wrote:
> This is needed so that <asm/barrier.h> can find <asm/fence.h> on riscv.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>  tools/include/asm/fence.h | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 tools/include/asm/fence.h
>
> diff --git a/tools/include/asm/fence.h b/tools/include/asm/fence.h
> new file mode 100644
> index 000000000000..917a173059a4
> --- /dev/null
> +++ b/tools/include/asm/fence.h
> @@ -0,0 +1,3 @@
> +#if defined(__riscv)
> +#include "../../arch/riscv/include/asm/fence.h"
> +#endif

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

Happy to pick this up via the RISC-V tree if you want.  Thanks!

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-09 17:18 ` Palmer Dabbelt
@ 2024-10-10  6:11   ` Andreas Schwab
  2024-10-29 12:29   ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2024-10-10  6:11 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: linux-riscv, Charlie Jenkins, Paul Walmsley, aou, parri.andrea,
	linux-kernel

On Okt 09 2024, Palmer Dabbelt wrote:

> Happy to pick this up via the RISC-V tree if you want.  Thanks!

Please make sure to pass it on soon, since it blocks building a
full-featured kernel.

Thanks.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-09 17:18 ` Palmer Dabbelt
  2024-10-10  6:11   ` Andreas Schwab
@ 2024-10-29 12:29   ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2024-10-29 12:29 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: linux-riscv, Charlie Jenkins, Paul Walmsley, aou, parri.andrea,
	linux-kernel

Ping!  It's already rc5 and this is still not fixed.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-07  7:24 [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h Andreas Schwab
  2024-10-09 17:18 ` Palmer Dabbelt
@ 2024-10-29 14:46 ` Anand Moon
  2024-10-30  8:33 ` Alexandre Ghiti
  2024-11-04 10:02 ` Alexandre Ghiti
  3 siblings, 0 replies; 11+ messages in thread
From: Anand Moon @ 2024-10-29 14:46 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: linux-riscv, Charlie Jenkins, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Andrea Parri, linux-kernel

Hi Andreas,

On Tue, 8 Oct 2024 at 05:29, Andreas Schwab <schwab@suse.de> wrote:
>
> This is needed so that <asm/barrier.h> can find <asm/fence.h> on riscv.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>  tools/include/asm/fence.h | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 tools/include/asm/fence.h
>
> diff --git a/tools/include/asm/fence.h b/tools/include/asm/fence.h
> new file mode 100644
> index 000000000000..917a173059a4
> --- /dev/null
> +++ b/tools/include/asm/fence.h
> @@ -0,0 +1,3 @@
> +#if defined(__riscv)
> +#include "../../arch/riscv/include/asm/fence.h"
> +#endif
> --
Thanks for this Fix.

Reviewed-by: Anand Moon <linux.amoon@gmail.com>

Thanks
-Anand

> 2.46.2
>
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-07  7:24 [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h Andreas Schwab
  2024-10-09 17:18 ` Palmer Dabbelt
  2024-10-29 14:46 ` Anand Moon
@ 2024-10-30  8:33 ` Alexandre Ghiti
  2024-11-04 10:02 ` Alexandre Ghiti
  3 siblings, 0 replies; 11+ messages in thread
From: Alexandre Ghiti @ 2024-10-30  8:33 UTC (permalink / raw)
  To: Andreas Schwab, linux-riscv
  Cc: Charlie Jenkins, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Andrea Parri, linux-kernel

Hi Andreas,

On 07/10/2024 09:24, Andreas Schwab wrote:
> This is needed so that <asm/barrier.h> can find <asm/fence.h> on riscv.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>   tools/include/asm/fence.h | 3 +++
>   1 file changed, 3 insertions(+)
>   create mode 100644 tools/include/asm/fence.h
>
> diff --git a/tools/include/asm/fence.h b/tools/include/asm/fence.h
> new file mode 100644
> index 000000000000..917a173059a4
> --- /dev/null
> +++ b/tools/include/asm/fence.h
> @@ -0,0 +1,3 @@
> +#if defined(__riscv)
> +#include "../../arch/riscv/include/asm/fence.h"
> +#endif


Thanks for the patch!

Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Alex


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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-10-07  7:24 [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h Andreas Schwab
                   ` (2 preceding siblings ...)
  2024-10-30  8:33 ` Alexandre Ghiti
@ 2024-11-04 10:02 ` Alexandre Ghiti
  2024-11-11  9:41   ` Andreas Schwab
  3 siblings, 1 reply; 11+ messages in thread
From: Alexandre Ghiti @ 2024-11-04 10:02 UTC (permalink / raw)
  To: Andreas Schwab, linux-riscv, Björn Töpel
  Cc: Charlie Jenkins, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Andrea Parri, linux-kernel

Hi Andreas,

On 07/10/2024 09:24, Andreas Schwab wrote:
> This is needed so that <asm/barrier.h> can find <asm/fence.h> on riscv.
>
> Fixes: 6d74d178fe6e ("tools: Add riscv barrier implementation")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
>   tools/include/asm/fence.h | 3 +++
>   1 file changed, 3 insertions(+)
>   create mode 100644 tools/include/asm/fence.h
>
> diff --git a/tools/include/asm/fence.h b/tools/include/asm/fence.h
> new file mode 100644
> index 000000000000..917a173059a4
> --- /dev/null
> +++ b/tools/include/asm/fence.h
> @@ -0,0 +1,3 @@
> +#if defined(__riscv)
> +#include "../../arch/riscv/include/asm/fence.h"
> +#endif


After a discussion with Bjorn, it appears that he had already solved 
this issue with the following patch: 
https://lore.kernel.org/linux-riscv/20240927131355.350918-1-bjorn@kernel.org/ 
which we find cleaner. I have just tested his, and it indeed fixes the 
build error.

Unless you have any objection, we'll try to make Bjorn's patch into 
6.12-rc7 instead of yours.

Thanks,

Alex


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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-11-04 10:02 ` Alexandre Ghiti
@ 2024-11-11  9:41   ` Andreas Schwab
  2024-11-11 10:28     ` Alexandre Ghiti
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2024-11-11  9:41 UTC (permalink / raw)
  To: Alexandre Ghiti
  Cc: linux-riscv, Björn Töpel, Charlie Jenkins,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrea Parri,
	linux-kernel

On Nov 04 2024, Alexandre Ghiti wrote:

> Unless you have any objection, we'll try to make Bjorn's patch into
> 6.12-rc7 instead of yours.

It still fails the same:

In file included from /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/asm/barrier.h:12,
                 from /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/linux/ring_buffer.h:4,
                 from libbpf.c:37:
/home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/asm/../../arch/riscv/include/asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory
   13 | #include <asm/fence.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[5]: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/build/Makefile.build:106: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile:164: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
make[3]: *** [Makefile:63: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
make[2]: *** [Makefile:76: bpf/resolve_btfids] Error 2
make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/Makefile:1393: tools/bpf/resolve_btfids] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [../Makefile:224: __sub-make] Error 2

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-11-11  9:41   ` Andreas Schwab
@ 2024-11-11 10:28     ` Alexandre Ghiti
  2024-11-11 10:31       ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Ghiti @ 2024-11-11 10:28 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: linux-riscv, Björn Töpel, Charlie Jenkins,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrea Parri,
	linux-kernel

Hi Andreas,

On 11/11/2024 10:41, Andreas Schwab wrote:
> On Nov 04 2024, Alexandre Ghiti wrote:
>
>> Unless you have any objection, we'll try to make Bjorn's patch into
>> 6.12-rc7 instead of yours.
> It still fails the same:
>
> In file included from /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/asm/barrier.h:12,
>                   from /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/linux/ring_buffer.h:4,
>                   from libbpf.c:37:
> /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/include/asm/../../arch/riscv/include/asm/barrier.h:13:10: fatal error: asm/fence.h: No such file or directory
>     13 | #include <asm/fence.h>
>        |          ^~~~~~~~~~~~~
> compilation terminated.
> make[5]: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/tools/build/Makefile.build:106: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> make[4]: *** [Makefile:164: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
> make[3]: *** [Makefile:63: /home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/linux-obj/tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
> make[2]: *** [Makefile:76: bpf/resolve_btfids] Error 2
> make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.12~rc7/linux-6.12-rc7/Makefile:1393: tools/bpf/resolve_btfids] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [../Makefile:224: __sub-make] Error 2
>

Indeed, Bjorn's patches did not make it into rc7...


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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-11-11 10:28     ` Alexandre Ghiti
@ 2024-11-11 10:31       ` Andreas Schwab
  2024-11-12 11:36         ` Björn Töpel
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2024-11-11 10:31 UTC (permalink / raw)
  To: Alexandre Ghiti
  Cc: linux-riscv, Björn Töpel, Charlie Jenkins,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrea Parri,
	linux-kernel

On Nov 11 2024, Alexandre Ghiti wrote:

> Indeed, Bjorn's patches did not make it into rc7...

That needs to be fixed ASAP!

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h
  2024-11-11 10:31       ` Andreas Schwab
@ 2024-11-12 11:36         ` Björn Töpel
  0 siblings, 0 replies; 11+ messages in thread
From: Björn Töpel @ 2024-11-12 11:36 UTC (permalink / raw)
  To: Andreas Schwab, Alexandre Ghiti, Palmer Dabbelt, Andrii Nakryiko
  Cc: linux-riscv, Björn Töpel, Charlie Jenkins,
	Paul Walmsley, Albert Ou, Andrea Parri, linux-kernel

Andreas Schwab <schwab@suse.de> writes:

> On Nov 11 2024, Alexandre Ghiti wrote:
>
>> Indeed, Bjorn's patches did not make it into rc7...
>
> That needs to be fixed ASAP!

Ok, if we want to unbreak the tools builds, two series are required for
6.12.

[1] which addresses the asm/fence.h path issue
[2] which addresses the same issue, but for non-cross builds

[2] can be pulled to RISC-V fixes, but [1] reside in the bpf-next tree
(target 6.13). Details here: [3].

To reiterate what I asked Andrii, but for RISC-V fixes: Would it be
possible to pull these patches [2] into the RISC-V tree, having a
duplicate set in bpf-next? Or are we stuck with stable backporting, as
Andrii suggests?


Björn

[1] https://lore.kernel.org/linux-riscv/20240927131355.350918-1-bjorn@kernel.org/
[2] https://lore.kernel.org/linux-riscv/20241106193208.290067-1-bjorn@kernel.org/
[3] https://lore.kernel.org/linux-riscv/CAEf4BzZbq9OwSGi4pdb5_q8YkErfFiQFKYXg3g1rjpdejafx+Q@mail.gmail.com/

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

end of thread, other threads:[~2024-11-12 11:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07  7:24 [PATCH] tools: add forwarding header for arch/riscv/include/asm/fence.h Andreas Schwab
2024-10-09 17:18 ` Palmer Dabbelt
2024-10-10  6:11   ` Andreas Schwab
2024-10-29 12:29   ` Andreas Schwab
2024-10-29 14:46 ` Anand Moon
2024-10-30  8:33 ` Alexandre Ghiti
2024-11-04 10:02 ` Alexandre Ghiti
2024-11-11  9:41   ` Andreas Schwab
2024-11-11 10:28     ` Alexandre Ghiti
2024-11-11 10:31       ` Andreas Schwab
2024-11-12 11:36         ` Björn Töpel

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