aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-04-24 23:59:11 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-24 23:59:11 -0400
commitc749fa181bd5848be78691d23168ec61ce691b95 (patch)
treed037dc016bd880d9d5b393a30f3907ef5e98124d /tools/include
parent16f4faa4f06ff3b4e214922d55ac33ab6e2bdbdc (diff)
parent3be4aaf4e2d3eb95cce7835e8df797ae65ae5ac1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/linux/compiler.h20
-rw-r--r--tools/include/linux/coresight-pmu.h13
-rw-r--r--tools/include/uapi/asm-generic/mman-common.h3
-rw-r--r--tools/include/uapi/linux/bpf.h1
-rw-r--r--tools/include/uapi/linux/if_link.h39
-rw-r--r--tools/include/uapi/linux/kvm.h21
-rw-r--r--tools/include/uapi/linux/perf_event.h18
-rw-r--r--tools/include/uapi/sound/asound.h1
8 files changed, 95 insertions, 21 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index 04e32f965ad7..1827c2f973f9 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -151,11 +151,21 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
151 * required ordering. 151 * required ordering.
152 */ 152 */
153 153
154#define READ_ONCE(x) \ 154#define READ_ONCE(x) \
155 ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) 155({ \
156 156 union { typeof(x) __val; char __c[1]; } __u = \
157#define WRITE_ONCE(x, val) \ 157 { .__c = { 0 } }; \
158 ({ union { typeof(x) __val; char __c[1]; } __u = { .__val = (val) }; __write_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) 158 __read_once_size(&(x), __u.__c, sizeof(x)); \
159 __u.__val; \
160})
161
162#define WRITE_ONCE(x, val) \
163({ \
164 union { typeof(x) __val; char __c[1]; } __u = \
165 { .__val = (val) }; \
166 __write_once_size(&(x), __u.__c, sizeof(x)); \
167 __u.__val; \
168})
159 169
160 170
161#ifndef __fallthrough 171#ifndef __fallthrough
diff --git a/tools/include/linux/coresight-pmu.h b/tools/include/linux/coresight-pmu.h
index edfeaba95429..a1a959ba24ff 100644
--- a/tools/include/linux/coresight-pmu.h
+++ b/tools/include/linux/coresight-pmu.h
@@ -1,18 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Copyright(C) 2015 Linaro Limited. All rights reserved. 3 * Copyright(C) 2015 Linaro Limited. All rights reserved.
3 * Author: Mathieu Poirier <mathieu.poirier@linaro.org> 4 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 5 */
17 6
18#ifndef _LINUX_CORESIGHT_PMU_H 7#ifndef _LINUX_CORESIGHT_PMU_H
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h
index f8b134f5608f..e7ee32861d51 100644
--- a/tools/include/uapi/asm-generic/mman-common.h
+++ b/tools/include/uapi/asm-generic/mman-common.h
@@ -27,6 +27,9 @@
27# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ 27# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
28#endif 28#endif
29 29
30/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */
31#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
32
30/* 33/*
31 * Flags for mlock 34 * Flags for mlock
32 */ 35 */
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 7f7fbb9d0253..c8383a289f7b 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -884,6 +884,7 @@ enum bpf_func_id {
884/* BPF_FUNC_skb_set_tunnel_key flags. */ 884/* BPF_FUNC_skb_set_tunnel_key flags. */
885#define BPF_F_ZERO_CSUM_TX (1ULL << 1) 885#define BPF_F_ZERO_CSUM_TX (1ULL << 1)
886#define BPF_F_DONT_FRAGMENT (1ULL << 2) 886#define BPF_F_DONT_FRAGMENT (1ULL << 2)
887#define BPF_F_SEQ_NUMBER (1ULL << 3)
887 888
888/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and 889/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
889 * BPF_FUNC_perf_event_read_value flags. 890 * BPF_FUNC_perf_event_read_value flags.
diff --git a/tools/include/uapi/linux/if_link.h b/tools/include/uapi/linux/if_link.h
index 6d9447700e18..68699f654118 100644
--- a/tools/include/uapi/linux/if_link.h
+++ b/tools/include/uapi/linux/if_link.h
@@ -941,4 +941,43 @@ enum {
941 IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ 941 IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */
942}; 942};
943 943
944/* tun section */
945
946enum {
947 IFLA_TUN_UNSPEC,
948 IFLA_TUN_OWNER,
949 IFLA_TUN_GROUP,
950 IFLA_TUN_TYPE,
951 IFLA_TUN_PI,
952 IFLA_TUN_VNET_HDR,
953 IFLA_TUN_PERSIST,
954 IFLA_TUN_MULTI_QUEUE,
955 IFLA_TUN_NUM_QUEUES,
956 IFLA_TUN_NUM_DISABLED_QUEUES,
957 __IFLA_TUN_MAX,
958};
959
960#define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
961
962/* rmnet section */
963
964#define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0)
965#define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1)
966#define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2)
967#define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3)
968
969enum {
970 IFLA_RMNET_UNSPEC,
971 IFLA_RMNET_MUX_ID,
972 IFLA_RMNET_FLAGS,
973 __IFLA_RMNET_MAX,
974};
975
976#define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1)
977
978struct ifla_rmnet_flags {
979 __u32 flags;
980 __u32 mask;
981};
982
944#endif /* _UAPI_LINUX_IF_LINK_H */ 983#endif /* _UAPI_LINUX_IF_LINK_H */
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 6b89f87db200..1065006c9bf5 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -396,6 +396,10 @@ struct kvm_run {
396 char padding[256]; 396 char padding[256];
397 }; 397 };
398 398
399 /* 2048 is the size of the char array used to bound/pad the size
400 * of the union that holds sync regs.
401 */
402 #define SYNC_REGS_SIZE_BYTES 2048
399 /* 403 /*
400 * shared registers between kvm and userspace. 404 * shared registers between kvm and userspace.
401 * kvm_valid_regs specifies the register classes set by the host 405 * kvm_valid_regs specifies the register classes set by the host
@@ -407,7 +411,7 @@ struct kvm_run {
407 __u64 kvm_dirty_regs; 411 __u64 kvm_dirty_regs;
408 union { 412 union {
409 struct kvm_sync_regs regs; 413 struct kvm_sync_regs regs;
410 char padding[2048]; 414 char padding[SYNC_REGS_SIZE_BYTES];
411 } s; 415 } s;
412}; 416};
413 417
@@ -936,6 +940,7 @@ struct kvm_ppc_resize_hpt {
936#define KVM_CAP_PPC_GET_CPU_CHAR 151 940#define KVM_CAP_PPC_GET_CPU_CHAR 151
937#define KVM_CAP_S390_BPB 152 941#define KVM_CAP_S390_BPB 152
938#define KVM_CAP_GET_MSR_FEATURES 153 942#define KVM_CAP_GET_MSR_FEATURES 153
943#define KVM_CAP_HYPERV_EVENTFD 154
939 944
940#ifdef KVM_CAP_IRQ_ROUTING 945#ifdef KVM_CAP_IRQ_ROUTING
941 946
@@ -1375,6 +1380,10 @@ struct kvm_enc_region {
1375#define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region) 1380#define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region)
1376#define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region) 1381#define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region)
1377 1382
1383/* Available with KVM_CAP_HYPERV_EVENTFD */
1384#define KVM_HYPERV_EVENTFD _IOW(KVMIO, 0xbd, struct kvm_hyperv_eventfd)
1385
1386
1378/* Secure Encrypted Virtualization command */ 1387/* Secure Encrypted Virtualization command */
1379enum sev_cmd_id { 1388enum sev_cmd_id {
1380 /* Guest initialization commands */ 1389 /* Guest initialization commands */
@@ -1515,4 +1524,14 @@ struct kvm_assigned_msix_entry {
1515#define KVM_ARM_DEV_EL1_PTIMER (1 << 1) 1524#define KVM_ARM_DEV_EL1_PTIMER (1 << 1)
1516#define KVM_ARM_DEV_PMU (1 << 2) 1525#define KVM_ARM_DEV_PMU (1 << 2)
1517 1526
1527struct kvm_hyperv_eventfd {
1528 __u32 conn_id;
1529 __s32 fd;
1530 __u32 flags;
1531 __u32 padding[3];
1532};
1533
1534#define KVM_HYPERV_CONN_ID_MASK 0x00ffffff
1535#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)
1536
1518#endif /* __LINUX_KVM_H */ 1537#endif /* __LINUX_KVM_H */
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index 912b85b52344..b8e288a1f740 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -650,11 +650,23 @@ struct perf_event_mmap_page {
650#define PERF_RECORD_MISC_COMM_EXEC (1 << 13) 650#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
651#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) 651#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
652/* 652/*
653 * Indicates that the content of PERF_SAMPLE_IP points to 653 * These PERF_RECORD_MISC_* flags below are safely reused
654 * the actual instruction that triggered the event. See also 654 * for the following events:
655 * perf_event_attr::precise_ip. 655 *
656 * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events
657 * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events
658 *
659 *
660 * PERF_RECORD_MISC_EXACT_IP:
661 * Indicates that the content of PERF_SAMPLE_IP points to
662 * the actual instruction that triggered the event. See also
663 * perf_event_attr::precise_ip.
664 *
665 * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT:
666 * Indicates that thread was preempted in TASK_RUNNING state.
656 */ 667 */
657#define PERF_RECORD_MISC_EXACT_IP (1 << 14) 668#define PERF_RECORD_MISC_EXACT_IP (1 << 14)
669#define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14)
658/* 670/*
659 * Reserve the last bit to indicate some extended misc field 671 * Reserve the last bit to indicate some extended misc field
660 */ 672 */
diff --git a/tools/include/uapi/sound/asound.h b/tools/include/uapi/sound/asound.h
index 07d61583fd02..ed0a120d4f08 100644
--- a/tools/include/uapi/sound/asound.h
+++ b/tools/include/uapi/sound/asound.h
@@ -242,6 +242,7 @@ typedef int __bitwise snd_pcm_format_t;
242#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ 242#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */
243#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ 243#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */
244#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE 244#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
245#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8
245 246
246#ifdef SNDRV_LITTLE_ENDIAN 247#ifdef SNDRV_LITTLE_ENDIAN
247#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE 248#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE