History

Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 and cross-arch updates from Catalin Marinas: "Here's a slightly wider-spread set of updates for 5.9. Going outside the usual arch/arm64/ area is the removal of read_barrier_depends() series from Will and the MSI/IOMMU ID translation series from Lorenzo. The notable arm64 updates include ARMv8.4 TLBI range operations and translation level hint, time namespace support, and perf. Summary: - Removal of the tremendously unpopular read_barrier_depends() barrier, which is a NOP on all architectures apart from Alpha, in favour of allowing architectures to override READ_ONCE() and do whatever dance they need to do to ensure address dependencies provide LOAD -> LOAD/STORE ordering. This work also offers a potential solution if compilers are shown to convert LOAD -> LOAD address dependencies into control dependencies (e.g. under LTO), as weakly ordered architectures will effectively be able to upgrade READ_ONCE() to smp_load_acquire(). The latter case is not used yet, but will be discussed further at LPC. - Make the MSI/IOMMU input/output ID translation PCI agnostic, augment the MSI/IOMMU ACPI/OF ID mapping APIs to accept an input ID bus-specific parameter and apply the resulting changes to the device ID space provided by the Freescale FSL bus. - arm64 support for TLBI range operations and translation table level hints (part of the ARMv8.4 architecture version). - Time namespace support for arm64. - Export the virtual and physical address sizes in vmcoreinfo for makedumpfile and crash utilities. - CPU feature handling cleanups and checks for programmer errors (overlapping bit-fields). - ACPI updates for arm64: disallow AML accesses to EFI code regions and kernel memory. - perf updates for arm64. - Miscellaneous fixes and cleanups, most notably PLT counting optimisation for module loading, recordmcount fix to ignore relocations other than R_AARCH64_CALL26, CMA areas reserved for gigantic pages on 16K and 64K configurations. - Trivial typos, duplicate words" Link: http://lkml.kernel.org/r/20200710165203.31284-1-will@kernel.org Link: http://lkml.kernel.org/r/20200619082013.13661-1-lorenzo.pieralisi@arm.com * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (82 commits) arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack arm64/mm: save memory access in check_and_switch_context() fast switch path arm64: sigcontext.h: delete duplicated word arm64: ptrace.h: delete duplicated word arm64: pgtable-hwdef.h: delete duplicated words bus: fsl-mc: Add ACPI support for fsl-mc bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver of/irq: Make of_msi_map_rid() PCI bus agnostic of/irq: make of_msi_map_get_device_domain() bus agnostic dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus of/device: Add input id to of_dma_configure() of/iommu: Make of_map_rid() PCI agnostic ACPI/IORT: Add an input ID to acpi_dma_configure() ACPI/IORT: Remove useless PCI bus walk ACPI/IORT: Make iort_msi_map_rid() PCI agnostic ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC arm64: enable time namespace support arm64/vdso: Restrict splitting VVAR VMA arm64/vdso: Handle faults on timens page ...

Linus Torvalds committed 6 years ago

Commit 145ff1e2 parents 8c4e1c0 0e4cd9f98 files · +1892 −1091Browse files

Showing the changes to tools/include/uapi/linux (2 of 98 files). Show all

Unified · Split

2 files
  1. tools/include/uapi/linux/filter.h +90 −0
  2. tools/include/uapi/linux/perf_event.h +20 −3
tools/include/uapi/linux/filter.h+90−0
@@ -0,0 +1,90 @@
1+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+/*
3+ * Linux Socket Filter Data Structures
4+ */
5+
6+#ifndef __LINUX_FILTER_H__
7+#define __LINUX_FILTER_H__
8+
9+
10+#include <linux/types.h>
11+#include <linux/bpf_common.h>
12+
13+/*
14+ * Current version of the filter code architecture.
15+ */
16+#define BPF_MAJOR_VERSION 1
17+#define BPF_MINOR_VERSION 1
18+
19+/*
20+ * Try and keep these values and structures similar to BSD, especially
21+ * the BPF code definitions which need to match so you can share filters
22+ */
23+
24+struct sock_filter { /* Filter block */
25+ __u16 code; /* Actual filter code */
26+ __u8 jt; /* Jump true */
27+ __u8 jf; /* Jump false */
28+ __u32 k; /* Generic multiuse field */
29+};
30+
31+struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
32+ unsigned short len; /* Number of filter blocks */
33+ struct sock_filter *filter;
34+};
35+
36+/* ret - BPF_K and BPF_X also apply */
37+#define BPF_RVAL(code) ((code) & 0x18)
38+#define BPF_A 0x10
39+
40+/* misc */
41+#define BPF_MISCOP(code) ((code) & 0xf8)
42+#define BPF_TAX 0x00
43+#define BPF_TXA 0x80
44+
45+/*
46+ * Macros for filter block array initializers.
47+ */
48+#ifndef BPF_STMT
49+#define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k }
50+#endif
51+#ifndef BPF_JUMP
52+#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
53+#endif
54+
55+/*
56+ * Number of scratch memory words for: BPF_ST and BPF_STX
57+ */
58+#define BPF_MEMWORDS 16
59+
60+/* RATIONALE. Negative offsets are invalid in BPF.
61+ We use them to reference ancillary data.
62+ Unlike introduction new instructions, it does not break
63+ existing compilers/optimizers.
64+ */
65+#define SKF_AD_OFF (-0x1000)
66+#define SKF_AD_PROTOCOL 0
67+#define SKF_AD_PKTTYPE 4
68+#define SKF_AD_IFINDEX 8
69+#define SKF_AD_NLATTR 12
70+#define SKF_AD_NLATTR_NEST 16
71+#define SKF_AD_MARK 20
72+#define SKF_AD_QUEUE 24
73+#define SKF_AD_HATYPE 28
74+#define SKF_AD_RXHASH 32
75+#define SKF_AD_CPU 36
76+#define SKF_AD_ALU_XOR_X 40
77+#define SKF_AD_VLAN_TAG 44
78+#define SKF_AD_VLAN_TAG_PRESENT 48
79+#define SKF_AD_PAY_OFFSET 52
80+#define SKF_AD_RANDOM 56
81+#define SKF_AD_VLAN_TPID 60
82+#define SKF_AD_MAX 64
83+
84+#define SKF_NET_OFF (-0x100000)
85+#define SKF_LL_OFF (-0x200000)
86+
87+#define BPF_NET_OFF SKF_NET_OFF
88+#define BPF_LL_OFF SKF_LL_OFF
89+
90+#endif /* __LINUX_FILTER_H__ */
tools/include/uapi/linux/perf_event.h+20−3
@@ -532,9 +532,10 @@ struct perf_event_mmap_page { · 531 unmodified lines
532532 cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */
533533
534534 cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */
535− cap_user_time : 1, /* The time_* fields are used */
535+ cap_user_time : 1, /* The time_{shift,mult,offset} fields are used */
536536 cap_user_time_zero : 1, /* The time_zero field is used */
537− cap_____res : 59;
537+ cap_user_time_short : 1, /* the time_{cycle,mask} fields are used */
538+ cap_____res : 58;
538539 };
539540 };
540541
@@ -593,13 +594,29 @@ struct perf_event_mmap_page { · 52 unmodified lines
593594 * ((rem * time_mult) >> time_shift);
594595 */
595596 __u64 time_zero;
597+
596598 __u32 size; /* Header size up to __reserved[] fields. */
599+ __u32 __reserved_1;
600+
601+ /*
602+ * If cap_usr_time_short, the hardware clock is less than 64bit wide
603+ * and we must compute the 'cyc' value, as used by cap_usr_time, as:
604+ *
605+ * cyc = time_cycles + ((cyc - time_cycles) & time_mask)
606+ *
607+ * NOTE: this form is explicitly chosen such that cap_usr_time_short
608+ * is a correction on top of cap_usr_time, and code that doesn't
609+ * know about cap_usr_time_short still works under the assumption
610+ * the counter doesn't wrap.
611+ */
612+ __u64 time_cycles;
613+ __u64 time_mask;
597614
598615 /*
599616 * Hole for extension of the self monitor capabilities
600617 */
601618
602− __u8 __reserved[118*8+4]; /* align to 1k. */
619+ __u8 __reserved[116*8]; /* align to 1k. */
603620
604621 /*
605622 * Control data for the mmap() data buffer.