bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: Remove duplicate definition of ia64_mf() on ia64
@ 2021-03-23 18:25 John Paul Adrian Glaubitz
  2021-03-28  7:24 ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 2+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-03-23 18:25 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, John Paul Adrian Glaubitz, linux-kernel, netdev, bpf

The ia64_mf() macro defined in tools/arch/ia64/include/asm/barrier.h
is already defined in <asm/gcc_intrin.h> on ia64 which causes libbpf
failing to build:

  CC       /usr/src/linux/tools/bpf/bpftool//libbpf/staticobjs/libbpf.o
In file included from /usr/src/linux/tools/include/asm/barrier.h:24,
                 from /usr/src/linux/tools/include/linux/ring_buffer.h:4,
                 from libbpf.c:37:
/usr/src/linux/tools/include/asm/../../arch/ia64/include/asm/barrier.h:43: error: "ia64_mf" redefined [-Werror]
   43 | #define ia64_mf()       asm volatile ("mf" ::: "memory")
      |
In file included from /usr/include/ia64-linux-gnu/asm/intrinsics.h:20,
                 from /usr/include/ia64-linux-gnu/asm/swab.h:11,
                 from /usr/include/linux/swab.h:8,
                 from /usr/include/linux/byteorder/little_endian.h:13,
                 from /usr/include/ia64-linux-gnu/asm/byteorder.h:5,
                 from /usr/src/linux/tools/include/uapi/linux/perf_event.h:20,
                 from libbpf.c:36:
/usr/include/ia64-linux-gnu/asm/gcc_intrin.h:382: note: this is the location of the previous definition
  382 | #define ia64_mf() __asm__ volatile ("mf" ::: "memory")
      |
cc1: all warnings being treated as errors

Thus, remove the definition from tools/arch/ia64/include/asm/barrier.h.

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
 tools/arch/ia64/include/asm/barrier.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/arch/ia64/include/asm/barrier.h b/tools/arch/ia64/include/asm/barrier.h
index 4d471d9511a5..6fffe5682713 100644
--- a/tools/arch/ia64/include/asm/barrier.h
+++ b/tools/arch/ia64/include/asm/barrier.h
@@ -39,9 +39,6 @@
  * sequential memory pages only.
  */
 
-/* XXX From arch/ia64/include/uapi/asm/gcc_intrin.h */
-#define ia64_mf()       asm volatile ("mf" ::: "memory")
-
 #define mb()		ia64_mf()
 #define rmb()		mb()
 #define wmb()		mb()
-- 
2.31.0


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

end of thread, other threads:[~2021-03-28  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 18:25 [PATCH] tools: Remove duplicate definition of ia64_mf() on ia64 John Paul Adrian Glaubitz
2021-03-28  7:24 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).