linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] bpf/arm64/mips: Avoid inline asm in BPF
@ 2017-06-15 22:35 David Daney
  2017-06-15 22:35 ` [PATCH RFC 1/3] arm64: Gate inclusion of asm/sysreg.h by __EMITTING_BPF__ David Daney
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Daney @ 2017-06-15 22:35 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, netdev, linux-kernel,
	linux-mips, ralf, Catalin Marinas, Will Deacon, linux-arm-kernel
  Cc: David Daney

To build samples/bpf on MIPS we need to avoid some inline asm that
causes llvm to fail.

Looking at the code, it seems that arm64 had the same problem and
avoided it by defining the header guard symbol.  This approach does
not scale, so I invented a preprocessor define to identify the case of
building with a BPF target that can be used instead.

It is an RFC at this point as I haven't yet tested the arm64 change,
and I wanted to see if others think this is the proper way to handle
avoidance of inline asm.

David Daney (3):
  arm64: Gate inclusion of asm/sysreg.h by __EMITTING_BPF__
  samples/bpf: Add define __EMITTING_BPF__ when building BPF
  MIPS: Include file changes to enable building BPF code with llvm

 arch/arm64/include/asm/sysreg.h   | 4 +++-
 arch/mips/Makefile                | 1 +
 arch/mips/cavium-octeon/Platform  | 3 +++
 arch/mips/include/asm/checksum.h  | 2 +-
 arch/mips/include/uapi/asm/swab.h | 2 +-
 samples/bpf/Makefile              | 8 ++++----
 6 files changed, 13 insertions(+), 7 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2017-06-19 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 22:35 [PATCH RFC 0/3] bpf/arm64/mips: Avoid inline asm in BPF David Daney
2017-06-15 22:35 ` [PATCH RFC 1/3] arm64: Gate inclusion of asm/sysreg.h by __EMITTING_BPF__ David Daney
2017-06-15 22:35 ` [PATCH RFC 2/3] samples/bpf: Add define __EMITTING_BPF__ when building BPF David Daney
2017-06-16 10:24   ` Daniel Borkmann
2017-06-16 16:14     ` David Miller
2017-06-19 14:37   ` Andy Gospodarek
2017-06-15 22:35 ` [PATCH RFC 3/3] MIPS: Include file changes to enable building BPF code with llvm David Daney

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).