linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 37/66] tools lib bpf: Copy bpf.h and bpf_common.h from the kernel
Date: Tue, 12 Jul 2016 19:40:12 -0300	[thread overview]
Message-ID: <1468363241-14555-38-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1468363241-14555-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

To allow the build to complete on older systems, where those files are
either not uptodate, lacking some recent additions or not present at
all.

And check if the copy drifts from the kernel, as in this synthetic test:

    BUILD:   Doing 'make -j4' parallel build
  Warning: tools/include/linux/bpf.h differs from kernel
  Warning: tools/include/linux/bpf_common.h differs from kernel

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-5plvi2gq4x469dcyybiu226q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/linux/bpf.h        | 389 ++++++++++++++++++++++++++++++++++
 tools/include/uapi/linux/bpf_common.h |  55 +++++
 tools/lib/bpf/Makefile                |   8 +-
 tools/perf/MANIFEST                   |   5 +-
 tools/perf/config/Makefile            |   5 +-
 5 files changed, 456 insertions(+), 6 deletions(-)
 create mode 100644 tools/include/uapi/linux/bpf.h
 create mode 100644 tools/include/uapi/linux/bpf_common.h

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
new file mode 100644
index 000000000000..406459b935a2
--- /dev/null
+++ b/tools/include/uapi/linux/bpf.h
@@ -0,0 +1,389 @@
+/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ */
+#ifndef _UAPI__LINUX_BPF_H__
+#define _UAPI__LINUX_BPF_H__
+
+#include <linux/types.h>
+#include <linux/bpf_common.h>
+
+/* Extended instruction set based on top of classic BPF */
+
+/* instruction classes */
+#define BPF_ALU64	0x07	/* alu mode in double word width */
+
+/* ld/ldx fields */
+#define BPF_DW		0x18	/* double word */
+#define BPF_XADD	0xc0	/* exclusive add */
+
+/* alu/jmp fields */
+#define BPF_MOV		0xb0	/* mov reg to reg */
+#define BPF_ARSH	0xc0	/* sign extending arithmetic shift right */
+
+/* change endianness of a register */
+#define BPF_END		0xd0	/* flags for endianness conversion: */
+#define BPF_TO_LE	0x00	/* convert to little-endian */
+#define BPF_TO_BE	0x08	/* convert to big-endian */
+#define BPF_FROM_LE	BPF_TO_LE
+#define BPF_FROM_BE	BPF_TO_BE
+
+#define BPF_JNE		0x50	/* jump != */
+#define BPF_JSGT	0x60	/* SGT is signed '>', GT in x86 */
+#define BPF_JSGE	0x70	/* SGE is signed '>=', GE in x86 */
+#define BPF_CALL	0x80	/* function call */
+#define BPF_EXIT	0x90	/* function return */
+
+/* Register numbers */
+enum {
+	BPF_REG_0 = 0,
+	BPF_REG_1,
+	BPF_REG_2,
+	BPF_REG_3,
+	BPF_REG_4,
+	BPF_REG_5,
+	BPF_REG_6,
+	BPF_REG_7,
+	BPF_REG_8,
+	BPF_REG_9,
+	BPF_REG_10,
+	__MAX_BPF_REG,
+};
+
+/* BPF has 10 general purpose 64-bit registers and stack frame. */
+#define MAX_BPF_REG	__MAX_BPF_REG
+
+struct bpf_insn {
+	__u8	code;		/* opcode */
+	__u8	dst_reg:4;	/* dest register */
+	__u8	src_reg:4;	/* source register */
+	__s16	off;		/* signed offset */
+	__s32	imm;		/* signed immediate constant */
+};
+
+/* BPF syscall commands, see bpf(2) man-page for details. */
+enum bpf_cmd {
+	BPF_MAP_CREATE,
+	BPF_MAP_LOOKUP_ELEM,
+	BPF_MAP_UPDATE_ELEM,
+	BPF_MAP_DELETE_ELEM,
+	BPF_MAP_GET_NEXT_KEY,
+	BPF_PROG_LOAD,
+	BPF_OBJ_PIN,
+	BPF_OBJ_GET,
+};
+
+enum bpf_map_type {
+	BPF_MAP_TYPE_UNSPEC,
+	BPF_MAP_TYPE_HASH,
+	BPF_MAP_TYPE_ARRAY,
+	BPF_MAP_TYPE_PROG_ARRAY,
+	BPF_MAP_TYPE_PERF_EVENT_ARRAY,
+	BPF_MAP_TYPE_PERCPU_HASH,
+	BPF_MAP_TYPE_PERCPU_ARRAY,
+	BPF_MAP_TYPE_STACK_TRACE,
+};
+
+enum bpf_prog_type {
+	BPF_PROG_TYPE_UNSPEC,
+	BPF_PROG_TYPE_SOCKET_FILTER,
+	BPF_PROG_TYPE_KPROBE,
+	BPF_PROG_TYPE_SCHED_CLS,
+	BPF_PROG_TYPE_SCHED_ACT,
+	BPF_PROG_TYPE_TRACEPOINT,
+};
+
+#define BPF_PSEUDO_MAP_FD	1
+
+/* flags for BPF_MAP_UPDATE_ELEM command */
+#define BPF_ANY		0 /* create new element or update existing */
+#define BPF_NOEXIST	1 /* create new element if it didn't exist */
+#define BPF_EXIST	2 /* update existing element */
+
+#define BPF_F_NO_PREALLOC	(1U << 0)
+
+union bpf_attr {
+	struct { /* anonymous struct used by BPF_MAP_CREATE command */
+		__u32	map_type;	/* one of enum bpf_map_type */
+		__u32	key_size;	/* size of key in bytes */
+		__u32	value_size;	/* size of value in bytes */
+		__u32	max_entries;	/* max number of entries in a map */
+		__u32	map_flags;	/* prealloc or not */
+	};
+
+	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
+		__u32		map_fd;
+		__aligned_u64	key;
+		union {
+			__aligned_u64 value;
+			__aligned_u64 next_key;
+		};
+		__u64		flags;
+	};
+
+	struct { /* anonymous struct used by BPF_PROG_LOAD command */
+		__u32		prog_type;	/* one of enum bpf_prog_type */
+		__u32		insn_cnt;
+		__aligned_u64	insns;
+		__aligned_u64	license;
+		__u32		log_level;	/* verbosity level of verifier */
+		__u32		log_size;	/* size of user buffer */
+		__aligned_u64	log_buf;	/* user supplied buffer */
+		__u32		kern_version;	/* checked when prog_type=kprobe */
+	};
+
+	struct { /* anonymous struct used by BPF_OBJ_* commands */
+		__aligned_u64	pathname;
+		__u32		bpf_fd;
+	};
+} __attribute__((aligned(8)));
+
+/* integer value in 'imm' field of BPF_CALL instruction selects which helper
+ * function eBPF program intends to call
+ */
+enum bpf_func_id {
+	BPF_FUNC_unspec,
+	BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
+	BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
+	BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
+	BPF_FUNC_probe_read,      /* int bpf_probe_read(void *dst, int size, void *src) */
+	BPF_FUNC_ktime_get_ns,    /* u64 bpf_ktime_get_ns(void) */
+	BPF_FUNC_trace_printk,    /* int bpf_trace_printk(const char *fmt, int fmt_size, ...) */
+	BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
+	BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
+
+	/**
+	 * skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
+	 * @skb: pointer to skb
+	 * @offset: offset within packet from skb->mac_header
+	 * @from: pointer where to copy bytes from
+	 * @len: number of bytes to store into packet
+	 * @flags: bit 0 - if true, recompute skb->csum
+	 *         other bits - reserved
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_skb_store_bytes,
+
+	/**
+	 * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
+	 * @skb: pointer to skb
+	 * @offset: offset within packet where IP checksum is located
+	 * @from: old value of header field
+	 * @to: new value of header field
+	 * @flags: bits 0-3 - size of header field
+	 *         other bits - reserved
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_l3_csum_replace,
+
+	/**
+	 * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
+	 * @skb: pointer to skb
+	 * @offset: offset within packet where TCP/UDP checksum is located
+	 * @from: old value of header field
+	 * @to: new value of header field
+	 * @flags: bits 0-3 - size of header field
+	 *         bit 4 - is pseudo header
+	 *         other bits - reserved
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_l4_csum_replace,
+
+	/**
+	 * bpf_tail_call(ctx, prog_array_map, index) - jump into another BPF program
+	 * @ctx: context pointer passed to next program
+	 * @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY
+	 * @index: index inside array that selects specific program to run
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_tail_call,
+
+	/**
+	 * bpf_clone_redirect(skb, ifindex, flags) - redirect to another netdev
+	 * @skb: pointer to skb
+	 * @ifindex: ifindex of the net device
+	 * @flags: bit 0 - if set, redirect to ingress instead of egress
+	 *         other bits - reserved
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_clone_redirect,
+
+	/**
+	 * u64 bpf_get_current_pid_tgid(void)
+	 * Return: current->tgid << 32 | current->pid
+	 */
+	BPF_FUNC_get_current_pid_tgid,
+
+	/**
+	 * u64 bpf_get_current_uid_gid(void)
+	 * Return: current_gid << 32 | current_uid
+	 */
+	BPF_FUNC_get_current_uid_gid,
+
+	/**
+	 * bpf_get_current_comm(char *buf, int size_of_buf)
+	 * stores current->comm into buf
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_get_current_comm,
+
+	/**
+	 * bpf_get_cgroup_classid(skb) - retrieve a proc's classid
+	 * @skb: pointer to skb
+	 * Return: classid if != 0
+	 */
+	BPF_FUNC_get_cgroup_classid,
+	BPF_FUNC_skb_vlan_push, /* bpf_skb_vlan_push(skb, vlan_proto, vlan_tci) */
+	BPF_FUNC_skb_vlan_pop,  /* bpf_skb_vlan_pop(skb) */
+
+	/**
+	 * bpf_skb_[gs]et_tunnel_key(skb, key, size, flags)
+	 * retrieve or populate tunnel metadata
+	 * @skb: pointer to skb
+	 * @key: pointer to 'struct bpf_tunnel_key'
+	 * @size: size of 'struct bpf_tunnel_key'
+	 * @flags: room for future extensions
+	 * Retrun: 0 on success
+	 */
+	BPF_FUNC_skb_get_tunnel_key,
+	BPF_FUNC_skb_set_tunnel_key,
+	BPF_FUNC_perf_event_read,	/* u64 bpf_perf_event_read(&map, index) */
+	/**
+	 * bpf_redirect(ifindex, flags) - redirect to another netdev
+	 * @ifindex: ifindex of the net device
+	 * @flags: bit 0 - if set, redirect to ingress instead of egress
+	 *         other bits - reserved
+	 * Return: TC_ACT_REDIRECT
+	 */
+	BPF_FUNC_redirect,
+
+	/**
+	 * bpf_get_route_realm(skb) - retrieve a dst's tclassid
+	 * @skb: pointer to skb
+	 * Return: realm if != 0
+	 */
+	BPF_FUNC_get_route_realm,
+
+	/**
+	 * bpf_perf_event_output(ctx, map, index, data, size) - output perf raw sample
+	 * @ctx: struct pt_regs*
+	 * @map: pointer to perf_event_array map
+	 * @index: index of event in the map
+	 * @data: data on stack to be output as raw data
+	 * @size: size of data
+	 * Return: 0 on success
+	 */
+	BPF_FUNC_perf_event_output,
+	BPF_FUNC_skb_load_bytes,
+
+	/**
+	 * bpf_get_stackid(ctx, map, flags) - walk user or kernel stack and return id
+	 * @ctx: struct pt_regs*
+	 * @map: pointer to stack_trace map
+	 * @flags: bits 0-7 - numer of stack frames to skip
+	 *         bit 8 - collect user stack instead of kernel
+	 *         bit 9 - compare stacks by hash only
+	 *         bit 10 - if two different stacks hash into the same stackid
+	 *                  discard old
+	 *         other bits - reserved
+	 * Return: >= 0 stackid on success or negative error
+	 */
+	BPF_FUNC_get_stackid,
+
+	/**
+	 * bpf_csum_diff(from, from_size, to, to_size, seed) - calculate csum diff
+	 * @from: raw from buffer
+	 * @from_size: length of from buffer
+	 * @to: raw to buffer
+	 * @to_size: length of to buffer
+	 * @seed: optional seed
+	 * Return: csum result
+	 */
+	BPF_FUNC_csum_diff,
+
+	/**
+	 * bpf_skb_[gs]et_tunnel_opt(skb, opt, size)
+	 * retrieve or populate tunnel options metadata
+	 * @skb: pointer to skb
+	 * @opt: pointer to raw tunnel option data
+	 * @size: size of @opt
+	 * Return: 0 on success for set, option size for get
+	 */
+	BPF_FUNC_skb_get_tunnel_opt,
+	BPF_FUNC_skb_set_tunnel_opt,
+	__BPF_FUNC_MAX_ID,
+};
+
+/* All flags used by eBPF helper functions, placed here. */
+
+/* BPF_FUNC_skb_store_bytes flags. */
+#define BPF_F_RECOMPUTE_CSUM		(1ULL << 0)
+#define BPF_F_INVALIDATE_HASH		(1ULL << 1)
+
+/* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
+ * First 4 bits are for passing the header field size.
+ */
+#define BPF_F_HDR_FIELD_MASK		0xfULL
+
+/* BPF_FUNC_l4_csum_replace flags. */
+#define BPF_F_PSEUDO_HDR		(1ULL << 4)
+#define BPF_F_MARK_MANGLED_0		(1ULL << 5)
+
+/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
+#define BPF_F_INGRESS			(1ULL << 0)
+
+/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
+#define BPF_F_TUNINFO_IPV6		(1ULL << 0)
+
+/* BPF_FUNC_get_stackid flags. */
+#define BPF_F_SKIP_FIELD_MASK		0xffULL
+#define BPF_F_USER_STACK		(1ULL << 8)
+#define BPF_F_FAST_STACK_CMP		(1ULL << 9)
+#define BPF_F_REUSE_STACKID		(1ULL << 10)
+
+/* BPF_FUNC_skb_set_tunnel_key flags. */
+#define BPF_F_ZERO_CSUM_TX		(1ULL << 1)
+#define BPF_F_DONT_FRAGMENT		(1ULL << 2)
+
+/* BPF_FUNC_perf_event_output flags. */
+#define BPF_F_INDEX_MASK		0xffffffffULL
+#define BPF_F_CURRENT_CPU		BPF_F_INDEX_MASK
+
+/* user accessible mirror of in-kernel sk_buff.
+ * new fields can only be added to the end of this structure
+ */
+struct __sk_buff {
+	__u32 len;
+	__u32 pkt_type;
+	__u32 mark;
+	__u32 queue_mapping;
+	__u32 protocol;
+	__u32 vlan_present;
+	__u32 vlan_tci;
+	__u32 vlan_proto;
+	__u32 priority;
+	__u32 ingress_ifindex;
+	__u32 ifindex;
+	__u32 tc_index;
+	__u32 cb[5];
+	__u32 hash;
+	__u32 tc_classid;
+	__u32 data;
+	__u32 data_end;
+};
+
+struct bpf_tunnel_key {
+	__u32 tunnel_id;
+	union {
+		__u32 remote_ipv4;
+		__u32 remote_ipv6[4];
+	};
+	__u8 tunnel_tos;
+	__u8 tunnel_ttl;
+	__u16 tunnel_ext;
+	__u32 tunnel_label;
+};
+
+#endif /* _UAPI__LINUX_BPF_H__ */
diff --git a/tools/include/uapi/linux/bpf_common.h b/tools/include/uapi/linux/bpf_common.h
new file mode 100644
index 000000000000..a5c220e0828f
--- /dev/null
+++ b/tools/include/uapi/linux/bpf_common.h
@@ -0,0 +1,55 @@
+#ifndef _UAPI__LINUX_BPF_COMMON_H__
+#define _UAPI__LINUX_BPF_COMMON_H__
+
+/* Instruction classes */
+#define BPF_CLASS(code) ((code) & 0x07)
+#define		BPF_LD		0x00
+#define		BPF_LDX		0x01
+#define		BPF_ST		0x02
+#define		BPF_STX		0x03
+#define		BPF_ALU		0x04
+#define		BPF_JMP		0x05
+#define		BPF_RET		0x06
+#define		BPF_MISC        0x07
+
+/* ld/ldx fields */
+#define BPF_SIZE(code)  ((code) & 0x18)
+#define		BPF_W		0x00
+#define		BPF_H		0x08
+#define		BPF_B		0x10
+#define BPF_MODE(code)  ((code) & 0xe0)
+#define		BPF_IMM		0x00
+#define		BPF_ABS		0x20
+#define		BPF_IND		0x40
+#define		BPF_MEM		0x60
+#define		BPF_LEN		0x80
+#define		BPF_MSH		0xa0
+
+/* alu/jmp fields */
+#define BPF_OP(code)    ((code) & 0xf0)
+#define		BPF_ADD		0x00
+#define		BPF_SUB		0x10
+#define		BPF_MUL		0x20
+#define		BPF_DIV		0x30
+#define		BPF_OR		0x40
+#define		BPF_AND		0x50
+#define		BPF_LSH		0x60
+#define		BPF_RSH		0x70
+#define		BPF_NEG		0x80
+#define		BPF_MOD		0x90
+#define		BPF_XOR		0xa0
+
+#define		BPF_JA		0x00
+#define		BPF_JEQ		0x10
+#define		BPF_JGT		0x20
+#define		BPF_JGE		0x30
+#define		BPF_JSET        0x40
+#define BPF_SRC(code)   ((code) & 0x08)
+#define		BPF_K		0x00
+#define		BPF_X		0x08
+
+#ifndef BPF_MAXINSNS
+#define BPF_MAXINSNS 4096
+#endif
+
+#endif /* _UAPI__LINUX_BPF_COMMON_H__ */
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index fc1bc75ae56d..62d89d50fcbd 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -68,7 +68,7 @@ FEATURE_USER = .libbpf
 FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf
 FEATURE_DISPLAY = libelf bpf
 
-INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
+INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
 FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
 check_feat := 1
@@ -154,6 +154,12 @@ all: fixdep $(VERSION_FILES) all_cmd
 all_cmd: $(CMD_TARGETS)
 
 $(BPF_IN): force elfdep bpfdep
+	@(test -f ../../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
+	(diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
+	echo "Warning: tools/include/uapi/linux/bpf.h differs from kernel" >&2 )) || true
+	@(test -f ../../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
+	(diff -B ../../include/uapi/linux/bpf_common.h ../../../include/uapi/linux/bpf_common.h >/dev/null) || \
+	echo "Warning: tools/include/uapi/linux/bpf_common.h differs from kernel" >&2 )) || true
 	$(Q)$(MAKE) $(build)=libbpf
 
 $(OUTPUT)libbpf.so: $(BPF_IN)
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index cf85d1cd1c91..a300cbb13541 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -23,7 +23,6 @@ tools/build
 tools/arch/x86/include/asm/atomic.h
 tools/arch/x86/include/asm/rmwcc.h
 tools/lib/traceevent
-tools/lib/bpf
 tools/lib/api
 tools/lib/bpf
 tools/lib/subcmd
@@ -60,6 +59,8 @@ tools/include/linux/hash.h
 tools/include/linux/kernel.h
 tools/include/linux/list.h
 tools/include/linux/log2.h
+tools/include/uapi/linux/bpf.h
+tools/include/uapi/linux/bpf_common.h
 tools/include/uapi/linux/perf_event.h
 tools/include/linux/poison.h
 tools/include/linux/rbtree.h
@@ -82,8 +83,6 @@ arch/*/include/uapi/asm/unistd*.h
 arch/*/include/uapi/asm/perf_regs.h
 include/linux/poison.h
 include/linux/hw_breakpoint.h
-include/uapi/linux/bpf.h
-include/uapi/linux/bpf_common.h
 include/uapi/linux/const.h
 include/uapi/linux/swab.h
 include/uapi/linux/hw_breakpoint.h
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index bbb22101be2e..d629e5f5abdc 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -115,7 +115,7 @@ endif
 FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS)
 FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf
 
-FEATURE_CHECK_CFLAGS-bpf = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
+FEATURE_CHECK_CFLAGS-bpf = -I. -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi -I$(srctree)/tools/include/uapi
 # include ARCH specific config
 -include $(src-perf)/arch/$(ARCH)/Makefile
 
@@ -210,7 +210,8 @@ CFLAGS += -I$(srctree)/tools/include/uapi
 CFLAGS += -I$(srctree)/tools/include/
 CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi
 CFLAGS += -I$(srctree)/arch/$(ARCH)/include
-CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include
+CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include/uapi
+CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/
 CFLAGS += -I$(srctree)/include/uapi
 CFLAGS += -I$(srctree)/include
 
-- 
2.7.4

  parent reply	other threads:[~2016-07-12 22:54 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 22:39 [GIT PULL 00/66] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 01/66] perf hists: Introduce hist_entry__init function Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 02/66] perf hists: Introduce hist_entry_ops Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 03/66] perf hists: Introduce hists__add_entry_ops function Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 04/66] perf ui stdio: Add way to setup the color output mode selection Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 05/66] perf annotate: Introduce --stdio-color " Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 06/66] perf report: " Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 07/66] perf trace beauty msg_flags: Remove MSG_TRYHARD Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 08/66] perf trace beauty flock: Add missing fcntl.h include Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 09/66] perf trace beauty open_flags: Add missing headers Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 10/66] perf trace beauty mmap: Add more conditional defines Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 11/66] perf trace beauty flock: " Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 12/66] perf trace beauty open_flags: " Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 13/66] tools: Introduce str_error_r() Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 14/66] perf bench: Add missing pthread.h include for CPU_*() macros Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 15/66] perf tests: " Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 16/66] perf trace: Add conditional define for AT_FDCWD Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 17/66] perf tests openat-syscall-tp-fields: Add some conditional defines Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 18/66] perf bench: Disentangle headers Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 19/66] perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 20/66] perf strbuf: Add missing headers Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 21/66] perf quote: Disentangle headers Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 22/66] perf tests cpumap: Add missing headers Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 23/66] perf test fdarray: Add missing poll.h header Arnaldo Carvalho de Melo
2016-07-12 22:39 ` [PATCH 24/66] perf tests x86 rdpmc: Add missing headers Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 25/66] perf tools: Add missing header to color.c Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 26/66] perf tools: Remove needless includes from cache.h Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 27/66] perf evsel: Uninline the is_function_event method Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 28/66] perf tools: Uninline scnprintf() and vscnprint() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 29/66] tools lib traceevent: Use str_error_r() Arnaldo Carvalho de Melo
2016-07-12 23:11   ` Steven Rostedt
2016-07-12 23:14     ` Arnaldo Carvalho de Melo
2016-07-12 23:25       ` Steven Rostedt
2016-07-12 23:32         ` Arnaldo Carvalho de Melo
2016-07-13 12:30           ` Steven Rostedt
2016-07-13 13:51             ` Arnaldo Carvalho de Melo
2016-07-13 19:17               ` Steven Rostedt
2016-07-13 20:01                 ` Arnaldo Carvalho de Melo
2016-07-14  1:25                   ` Steven Rostedt
2016-07-14  1:39                     ` Arnaldo Carvalho de Melo
2016-07-17 18:49                       ` Jiri Olsa
2016-07-28 16:04                         ` Steven Rostedt
2016-07-12 22:40 ` [PATCH 30/66] tools lib api fs: " Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 31/66] tools lib: Guard the strlcpy() header with __GLIBC__ Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 32/66] tools lib subcmd: Use str_error_r() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 33/66] perf bench futex: Add missing compiler.h header Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 34/66] perf tools: event.h needs asm/perf_regs.h Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 35/66] tools: Add copy of perf_event.h to tools/include/linux/ Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 36/66] perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks Arnaldo Carvalho de Melo
2016-07-12 22:40 ` Arnaldo Carvalho de Melo [this message]
2016-07-12 22:40 ` [PATCH 38/66] tools: Copy uapi/asm/perf_regs.h from the kernel Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 39/66] perf test bpf: Use epoll_wait() instead of epoll_pwait() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 40/66] tools: Copy uapi/linux/hw_breakpoint.h from the kernel Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 41/66] perf tools: Introduce weak alternative to sched_getcpu() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 42/66] perf tools: Remove unneeded magic.h include from util.h Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 43/66] perf trace: Remove unused sys/ptrace.h include Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 44/66] kvm arm/arm64: Remove trailing whitespace from headers Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 45/66] tools: Copy the header files needed by perf tools Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 46/66] perf tools: Fallback to reading sysfs to get cacheline size Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 47/66] perf trace beauty futex_op: Add missing defines for older systems Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 48/66] perf trace beauty seccomp: Remove seccomp.h include Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 49/66] perf symbols: Provide a GElf_Nhdr typedef Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 50/66] perf script python: Silence -Werror=maybe-uninitialized on gcc 5.3.0 Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 51/66] tools: Copy the bitsperlong.h files from the kernel Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 52/66] perf tools: Add the tools/ stringify copy to the MANIFEST Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 53/66] perf tools: Don't add kernel directories to the header search path Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 54/66] perf intel-pt-decoder: Avoid checking code drift on busibox's diff Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 55/66] perf tools: Add feature detection for gelf_getnote() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 56/66] perf symbols: Add Rust demangling Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 57/66] perf evlist: Make event2evsel public Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 58/66] perf tools: Introduce trace_event__tp_format_id() Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 59/66] perf python: Init perf_event_attr::size in perf.evsel constructor Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 60/66] perf python: Fix pyrf_evlist__read_on_cpu event consuming Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 61/66] perf python: Put perf.event objects into dictionary Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 62/66] perf python: Add perf.tracepoint method Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 63/66] perf python: Add struct evsel into struct pyrf_event Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 64/66] perf python: Add support to resolve tracepoint fields Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 65/66] perf python: Add tracepoint example Arnaldo Carvalho de Melo
2016-07-12 22:40 ` [PATCH 66/66] tools lib traceevent: Add filter on task CPU id Arnaldo Carvalho de Melo
2016-07-13  6:59 ` [GIT PULL 00/66] perf/core improvements and fixes Ingo Molnar
2016-07-13  7:35   ` Ingo Molnar
2016-07-13 20:49     ` Josh Poimboeuf
2016-07-13 20:54       ` Peter Zijlstra
2016-07-13 23:29         ` Arnaldo Carvalho de Melo
2016-07-13  7:37   ` Ingo Molnar
2016-07-13  7:33 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468363241-14555-38-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).