diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-09-13 03:38:23 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-09-25 09:39:44 -0400 |
| commit | 549a3976523c69a0245c0a310210c824a0b26e35 (patch) | |
| tree | 8a8fc9de51bc1889147bbcf6c342a605e9ee79ed /tools/include | |
| parent | 89975bd335f37b96ffd3cc24b9effb1fa25e7788 (diff) | |
tools include: Sync kernel ABI headers with tooling headers
Time for a sync with ABI/uapi headers with the upcoming v4.14 kernel.
None of the ABI changes require any source code level changes to our
existing in-kernel tooling code:
- tools/arch/s390/include/uapi/asm/kvm.h:
New KVM_S390_VM_TOD_EXT ABI, not used by in-kernel tooling.
- tools/arch/x86/include/asm/cpufeatures.h:
tools/arch/x86/include/asm/disabled-features.h:
New PCID, SME and VGIF x86 CPU feature bits defined.
- tools/include/asm-generic/hugetlb_encode.h:
tools/include/uapi/asm-generic/mman-common.h:
tools/include/uapi/linux/mman.h:
Two new madvise() flags, plus a hugetlb system call mmap flags
restructuring/extension changes.
- tools/include/uapi/drm/drm.h:
tools/include/uapi/drm/i915_drm.h:
New drm_syncobj_create flags definitions, new drm_syncobj_wait
and drm_syncobj_array ABIs. DRM_I915_PERF_* calls and a new
I915_PARAM_HAS_EXEC_FENCE_ARRAY ABI for the Intel driver.
- tools/include/uapi/linux/bpf.h:
New bpf_sock fields (::mark and ::priority), new XDP_REDIRECT
action, new kvm_ppc_smmu_info fields (::data_keys, instr_keys)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Yao Jin <yao.jin@linux.intel.com>
Link: http://lkml.kernel.org/r/20170913073823.lxmi4c7ejqlfabjx@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/asm-generic/hugetlb_encode.h | 34 | ||||
| -rw-r--r-- | tools/include/uapi/asm-generic/mman-common.h | 14 | ||||
| -rw-r--r-- | tools/include/uapi/drm/drm.h | 22 | ||||
| -rw-r--r-- | tools/include/uapi/drm/i915_drm.h | 51 | ||||
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 32 | ||||
| -rw-r--r-- | tools/include/uapi/linux/kvm.h | 3 | ||||
| -rw-r--r-- | tools/include/uapi/linux/mman.h | 24 |
7 files changed, 153 insertions, 27 deletions
diff --git a/tools/include/asm-generic/hugetlb_encode.h b/tools/include/asm-generic/hugetlb_encode.h new file mode 100644 index 000000000000..e4732d3c2998 --- /dev/null +++ b/tools/include/asm-generic/hugetlb_encode.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_ | ||
| 2 | #define _ASM_GENERIC_HUGETLB_ENCODE_H_ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Several system calls take a flag to request "hugetlb" huge pages. | ||
| 6 | * Without further specification, these system calls will use the | ||
| 7 | * system's default huge page size. If a system supports multiple | ||
| 8 | * huge page sizes, the desired huge page size can be specified in | ||
| 9 | * bits [26:31] of the flag arguments. The value in these 6 bits | ||
| 10 | * will encode the log2 of the huge page size. | ||
| 11 | * | ||
| 12 | * The following definitions are associated with this huge page size | ||
| 13 | * encoding in flag arguments. System call specific header files | ||
| 14 | * that use this encoding should include this file. They can then | ||
| 15 | * provide definitions based on these with their own specific prefix. | ||
| 16 | * for example: | ||
| 17 | * #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT | ||
| 18 | */ | ||
| 19 | |||
| 20 | #define HUGETLB_FLAG_ENCODE_SHIFT 26 | ||
| 21 | #define HUGETLB_FLAG_ENCODE_MASK 0x3f | ||
| 22 | |||
| 23 | #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 24 | #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 25 | #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 26 | #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 27 | #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 28 | #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 29 | #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 30 | #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 31 | #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 32 | #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 33 | |||
| 34 | #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */ | ||
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h index 8c27db0c5c08..203268f9231e 100644 --- a/tools/include/uapi/asm-generic/mman-common.h +++ b/tools/include/uapi/asm-generic/mman-common.h | |||
| @@ -58,20 +58,12 @@ | |||
| 58 | overrides the coredump filter bits */ | 58 | overrides the coredump filter bits */ |
| 59 | #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ | 59 | #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ |
| 60 | 60 | ||
| 61 | #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ | ||
| 62 | #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ | ||
| 63 | |||
| 61 | /* compatibility flags */ | 64 | /* compatibility flags */ |
| 62 | #define MAP_FILE 0 | 65 | #define MAP_FILE 0 |
| 63 | 66 | ||
| 64 | /* | ||
| 65 | * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. | ||
| 66 | * This gives us 6 bits, which is enough until someone invents 128 bit address | ||
| 67 | * spaces. | ||
| 68 | * | ||
| 69 | * Assume these are all power of twos. | ||
| 70 | * When 0 use the default page size. | ||
| 71 | */ | ||
| 72 | #define MAP_HUGE_SHIFT 26 | ||
| 73 | #define MAP_HUGE_MASK 0x3f | ||
| 74 | |||
| 75 | #define PKEY_DISABLE_ACCESS 0x1 | 67 | #define PKEY_DISABLE_ACCESS 0x1 |
| 76 | #define PKEY_DISABLE_WRITE 0x2 | 68 | #define PKEY_DISABLE_WRITE 0x2 |
| 77 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ | 69 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ |
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h index 101593ab10ac..97677cd6964d 100644 --- a/tools/include/uapi/drm/drm.h +++ b/tools/include/uapi/drm/drm.h | |||
| @@ -700,6 +700,7 @@ struct drm_prime_handle { | |||
| 700 | 700 | ||
| 701 | struct drm_syncobj_create { | 701 | struct drm_syncobj_create { |
| 702 | __u32 handle; | 702 | __u32 handle; |
| 703 | #define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) | ||
| 703 | __u32 flags; | 704 | __u32 flags; |
| 704 | }; | 705 | }; |
| 705 | 706 | ||
| @@ -718,6 +719,24 @@ struct drm_syncobj_handle { | |||
| 718 | __u32 pad; | 719 | __u32 pad; |
| 719 | }; | 720 | }; |
| 720 | 721 | ||
| 722 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) | ||
| 723 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) | ||
| 724 | struct drm_syncobj_wait { | ||
| 725 | __u64 handles; | ||
| 726 | /* absolute timeout */ | ||
| 727 | __s64 timeout_nsec; | ||
| 728 | __u32 count_handles; | ||
| 729 | __u32 flags; | ||
| 730 | __u32 first_signaled; /* only valid when not waiting all */ | ||
| 731 | __u32 pad; | ||
| 732 | }; | ||
| 733 | |||
| 734 | struct drm_syncobj_array { | ||
| 735 | __u64 handles; | ||
| 736 | __u32 count_handles; | ||
| 737 | __u32 pad; | ||
| 738 | }; | ||
| 739 | |||
| 721 | #if defined(__cplusplus) | 740 | #if defined(__cplusplus) |
| 722 | } | 741 | } |
| 723 | #endif | 742 | #endif |
| @@ -840,6 +859,9 @@ extern "C" { | |||
| 840 | #define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) | 859 | #define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) |
| 841 | #define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) | 860 | #define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) |
| 842 | #define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) | 861 | #define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) |
| 862 | #define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) | ||
| 863 | #define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) | ||
| 864 | #define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) | ||
| 843 | 865 | ||
| 844 | /** | 866 | /** |
| 845 | * Device specific ioctls should only be in their respective headers | 867 | * Device specific ioctls should only be in their respective headers |
diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h index 7ccbd6a2bbe0..6598fb76d2c2 100644 --- a/tools/include/uapi/drm/i915_drm.h +++ b/tools/include/uapi/drm/i915_drm.h | |||
| @@ -260,6 +260,8 @@ typedef struct _drm_i915_sarea { | |||
| 260 | #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 | 260 | #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 |
| 261 | #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 | 261 | #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 |
| 262 | #define DRM_I915_PERF_OPEN 0x36 | 262 | #define DRM_I915_PERF_OPEN 0x36 |
| 263 | #define DRM_I915_PERF_ADD_CONFIG 0x37 | ||
| 264 | #define DRM_I915_PERF_REMOVE_CONFIG 0x38 | ||
| 263 | 265 | ||
| 264 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 266 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
| 265 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 267 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
| @@ -315,6 +317,8 @@ typedef struct _drm_i915_sarea { | |||
| 315 | #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) | 317 | #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) |
| 316 | #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) | 318 | #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) |
| 317 | #define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) | 319 | #define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) |
| 320 | #define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config) | ||
| 321 | #define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64) | ||
| 318 | 322 | ||
| 319 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 323 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
| 320 | * on the security mechanisms provided by hardware. | 324 | * on the security mechanisms provided by hardware. |
| @@ -431,6 +435,11 @@ typedef struct drm_i915_irq_wait { | |||
| 431 | */ | 435 | */ |
| 432 | #define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 | 436 | #define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 |
| 433 | 437 | ||
| 438 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports supplying an array of | ||
| 439 | * drm_i915_gem_exec_fence structures. See I915_EXEC_FENCE_ARRAY. | ||
| 440 | */ | ||
| 441 | #define I915_PARAM_HAS_EXEC_FENCE_ARRAY 49 | ||
| 442 | |||
| 434 | typedef struct drm_i915_getparam { | 443 | typedef struct drm_i915_getparam { |
| 435 | __s32 param; | 444 | __s32 param; |
| 436 | /* | 445 | /* |
| @@ -812,6 +821,17 @@ struct drm_i915_gem_exec_object2 { | |||
| 812 | __u64 rsvd2; | 821 | __u64 rsvd2; |
| 813 | }; | 822 | }; |
| 814 | 823 | ||
| 824 | struct drm_i915_gem_exec_fence { | ||
| 825 | /** | ||
| 826 | * User's handle for a drm_syncobj to wait on or signal. | ||
| 827 | */ | ||
| 828 | __u32 handle; | ||
| 829 | |||
| 830 | #define I915_EXEC_FENCE_WAIT (1<<0) | ||
| 831 | #define I915_EXEC_FENCE_SIGNAL (1<<1) | ||
| 832 | __u32 flags; | ||
| 833 | }; | ||
| 834 | |||
| 815 | struct drm_i915_gem_execbuffer2 { | 835 | struct drm_i915_gem_execbuffer2 { |
| 816 | /** | 836 | /** |
| 817 | * List of gem_exec_object2 structs | 837 | * List of gem_exec_object2 structs |
| @@ -826,7 +846,11 @@ struct drm_i915_gem_execbuffer2 { | |||
| 826 | __u32 DR1; | 846 | __u32 DR1; |
| 827 | __u32 DR4; | 847 | |
