samples/bpf: Enable powerpc support
authorNaveen N. Rao <[email protected]>
Mon, 4 Apr 2016 17:01:34 +0000 (22:31 +0530)
committerDavid S. Miller <[email protected]>
Wed, 6 Apr 2016 20:01:29 +0000 (16:01 -0400)
commit138d6153a139c318739f20e61309e5778427a73c
tree0faa155a8266a068779ecc3c02e8c8098ead3275
parent128d1514be3583c3cfd56d66d7cdfba413b867ae
samples/bpf: Enable powerpc support

Add the necessary definitions for building bpf samples on ppc.

Since ppc doesn't store function return address on the stack, modify how
PT_REGS_RET() and PT_REGS_FP() work.

Also, introduce PT_REGS_IP() to access the instruction pointer.

Cc: Alexei Starovoitov <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Michael Ellerman <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
samples/bpf/bpf_helpers.h
samples/bpf/spintest_kern.c
samples/bpf/tracex2_kern.c
samples/bpf/tracex4_kern.c