aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-21 05:33:03 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-21 08:44:55 -0400
commit64131a87f2aae2ed9e05d8227c5b009ca6c50d98 (patch)
treefdea23fd59216120bf54a48c60ca24489a733f14 /include/uapi
parent676ee36be04985062522804c2de04f0764212be6 (diff)
parent2c33ce009ca2389dbf0535d0672214d09738e35e (diff)
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits) media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format hexdump: avoid warning in test function fs: take i_mutex during prepare_binprm for set[ug]id executables smp: Fix error case handling in smp_call_function_*() iommu-common: Fix PARISC compile-time warnings sparc: Make LDC use common iommu poll management functions sparc: Make sparc64 use scalable lib/iommu-common.c functions Break up monolithic iommu table/lock into finer graularity pools and lock sparc: Revert generic IOMMU allocator. tools/power turbostat: correct dumped pkg-cstate-limit value tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL tools/power turbostat: correct DRAM RAPL units on recent Xeon processors tools/power turbostat: Initial Skylake support tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile tools/power turbostat: modprobe msr, if needed tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2 tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names Bluetooth: hidp: Fix regression with older userspace and flags validation config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected perf/x86/intel/pt: Fix and clean up error handling in pt_event_add() ... That solves several merge conflicts: Documentation/DocBook/media/v4l/subdev-formats.xml Documentation/devicetree/bindings/vendor-prefixes.txt drivers/staging/media/mn88473/mn88473.c include/linux/kconfig.h include/uapi/linux/media-bus-format.h The ones at subdev-formats.xml and media-bus-format.h are not trivial. That's why we opted to merge from DRM.
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/asm-generic/errno.h11
-rw-r--r--include/uapi/drm/drm.h1
-rw-r--r--include/uapi/drm/drm_fourcc.h78
-rw-r--r--include/uapi/drm/drm_mode.h9
-rw-r--r--include/uapi/drm/i915_drm.h5
-rw-r--r--include/uapi/drm/nouveau_drm.h1
-rw-r--r--include/uapi/drm/radeon_drm.h4
-rw-r--r--include/uapi/drm/tegra_drm.h3
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/bpf.h63
-rw-r--r--include/uapi/linux/can/raw.h1
-rw-r--r--include/uapi/linux/dcbnl.h66
-rw-r--r--include/uapi/linux/dm-ioctl.h4
-rw-r--r--include/uapi/linux/filter.h10
-rw-r--r--include/uapi/linux/fou.h1
-rw-r--r--include/uapi/linux/hsi/Kbuild2
-rw-r--r--include/uapi/linux/hsi/cs-protocol.h113
-rw-r--r--include/uapi/linux/if_addr.h2
-rw-r--r--include/uapi/linux/if_link.h14
-rw-r--r--include/uapi/linux/if_packet.h1
-rw-r--r--include/uapi/linux/iio/Kbuild3
-rw-r--r--include/uapi/linux/iio/events.h42
-rw-r--r--include/uapi/linux/iio/types.h92
-rw-r--r--include/uapi/linux/input.h10
-rw-r--r--include/uapi/linux/ip_vs.h7
-rw-r--r--include/uapi/linux/ipv6.h1
-rw-r--r--include/uapi/linux/kvm.h65
-rw-r--r--include/uapi/linux/magic.h2
-rw-r--r--include/uapi/linux/media-bus-format.h13
-rw-r--r--include/uapi/linux/neighbour.h1
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h80
-rw-r--r--include/uapi/linux/netfilter_bridge/ebtables.h2
-rw-r--r--include/uapi/linux/nfsd/export.h2
-rw-r--r--include/uapi/linux/nl80211.h34
-rw-r--r--include/uapi/linux/perf_event.h115
-rw-r--r--include/uapi/linux/pkt_cls.h2
-rw-r--r--include/uapi/linux/quota.h6
-rw-r--r--include/uapi/linux/rtnetlink.h16
-rw-r--r--include/uapi/linux/serial.h4
-rw-r--r--include/uapi/linux/tc_act/Kbuild1
-rw-r--r--include/uapi/linux/tc_act/tc_bpf.h2
-rw-r--r--include/uapi/linux/tipc_netlink.h9
-rw-r--r--include/uapi/linux/vfio.h2
-rw-r--r--include/uapi/linux/virtio_blk.h8
-rw-r--r--include/uapi/linux/virtio_scsi.h12
-rw-r--r--include/uapi/linux/xfrm.h2
-rw-r--r--include/uapi/sound/asequencer.h1
-rw-r--r--include/uapi/sound/asound.h39
-rw-r--r--include/uapi/sound/compress_offload.h2
-rw-r--r--include/uapi/sound/emu10k1.h3
-rw-r--r--include/uapi/sound/hdspm.h6
51 files changed, 921 insertions, 53 deletions
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h
index 1e1ea6e6e7a5..88e0914cf2d9 100644
--- a/include/uapi/asm-generic/errno.h
+++ b/include/uapi/asm-generic/errno.h
@@ -6,7 +6,16 @@
6#define EDEADLK 35 /* Resource deadlock would occur */ 6#define EDEADLK 35 /* Resource deadlock would occur */
7#define ENAMETOOLONG 36 /* File name too long */ 7#define ENAMETOOLONG 36 /* File name too long */
8#define ENOLCK 37 /* No record locks available */ 8#define ENOLCK 37 /* No record locks available */
9#define ENOSYS 38 /* Function not implemented */ 9
10/*
11 * This error code is special: arch syscall entry code will return
12 * -ENOSYS if users try to call a syscall that doesn't exist. To keep
13 * failures of syscalls that really do exist distinguishable from
14 * failures due to attempts to use a nonexistent syscall, syscall
15 * implementations should refrain from returning -ENOSYS.
16 */
17#define ENOSYS 38 /* Invalid system call number */
18
10#define ENOTEMPTY 39 /* Directory not empty */ 19#define ENOTEMPTY 39 /* Directory not empty */
11#define ELOOP 40 /* Too many symbolic links encountered */ 20#define ELOOP 40 /* Too many symbolic links encountered */
12#define EWOULDBLOCK EAGAIN /* Operation would block */ 21#define EWOULDBLOCK EAGAIN /* Operation would block */
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 01b2d6d0e355..ff6ef62d084b 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -630,6 +630,7 @@ struct drm_gem_open {
630 */ 630 */
631#define DRM_CAP_CURSOR_WIDTH 0x8 631#define DRM_CAP_CURSOR_WIDTH 0x8
632#define DRM_CAP_CURSOR_HEIGHT 0x9 632#define DRM_CAP_CURSOR_HEIGHT 0x9
633#define DRM_CAP_ADDFB2_MODIFIERS 0x10
633 634
634/** DRM_IOCTL_GET_CAP ioctl argument type */ 635/** DRM_IOCTL_GET_CAP ioctl argument type */
635struct drm_get_cap { 636struct drm_get_cap {
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index a284f11a8ef5..07735822a28f 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -129,4 +129,82 @@
129#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ 129#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
130#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ 130#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
131 131
132
133/*
134 * Format Modifiers:
135 *
136 * Format modifiers describe, typically, a re-ordering or modification
137 * of the data in a plane of an FB. This can be used to express tiled/
138 * swizzled formats, or compression, or a combination of the two.
139 *
140 * The upper 8 bits of the format modifier are a vendor-id as assigned
141 * below. The lower 56 bits are assigned as vendor sees fit.
142 */
143
144/* Vendor Ids: */
145#define DRM_FORMAT_MOD_NONE 0
146#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
147#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
148#define DRM_FORMAT_MOD_VENDOR_NV 0x03
149#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04
150#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05
151/* add more to the end as needed */
152
153#define fourcc_mod_code(vendor, val) \
154 ((((u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | (val & 0x00ffffffffffffffULL))
155
156/*
157 * Format Modifier tokens:
158 *
159 * When adding a new token please document the layout with a code comment,
160 * similar to the fourcc codes above. drm_fourcc.h is considered the
161 * authoritative source for all of these.
162 */
163
164/* Intel framebuffer modifiers */
165
166/*
167 * Intel X-tiling layout
168 *
169 * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
170 * in row-major layout. Within the tile bytes are laid out row-major, with
171 * a platform-dependent stride. On top of that the memory can apply
172 * platform-depending swizzling of some higher address bits into bit6.
173 *
174 * This format is highly platforms specific and not useful for cross-driver
175 * sharing. It exists since on a given platform it does uniquely identify the
176 * layout in a simple way for i915-specific userspace.
177 */
178#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1)
179
180/*
181 * Intel Y-tiling layout
182 *
183 * This is a tiled layout using 4Kb tiles (except on gen2 where the tiles 2Kb)
184 * in row-major layout. Within the tile bytes are laid out in OWORD (16 bytes)
185 * chunks column-major, with a platform-dependent height. On top of that the
186 * memory can apply platform-depending swizzling of some higher address bits
187 * into bit6.
188 *
189 * This format is highly platforms specific and not useful for cross-driver
190 * sharing. It exists since on a given platform it does uniquely identify the
191 * layout in a simple way for i915-specific userspace.
192 */
193#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2)
194
195/*
196 * Intel Yf-tiling layout
197 *
198 * This is a tiled layout using 4Kb tiles in row-major layout.
199 * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which
200 * are arranged in four groups (two wide, two high) with column-major layout.
201 * Each group therefore consits out of four 256 byte units, which are also laid
202 * out as 2x2 column-major.
203 * 256 byte units are made out of four 64 byte blocks of pixels, producing
204 * either a square block or a 2:1 unit.
205 * 64 byte blocks of pixels contain four pixel rows of 16 bytes, where the width
206 * in pixel depends on the pixel depth.
207 */
208#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3)
209
132#endif /* DRM_FOURCC_H */ 210#endif /* DRM_FOURCC_H */
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index ca788e01dab2..dbeba949462a 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -336,6 +336,7 @@ struct drm_mode_fb_cmd {
336}; 336};
337 337
338#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ 338#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
339#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
339 340
340struct drm_mode_fb_cmd2 { 341struct drm_mode_fb_cmd2 {
341 __u32 fb_id; 342 __u32 fb_id;
@@ -356,10 +357,18 @@ struct drm_mode_fb_cmd2 {
356 * So it would consist of Y as offsets[0] and UV as 357 * So it would consist of Y as offsets[0] and UV as
357 * offsets[1]. Note that offsets[0] will generally 358 * offsets[1]. Note that offsets[0] will generally
358 * be 0 (but this is not required). 359 * be 0 (but this is not required).
360 *
361 * To accommodate tiled, compressed, etc formats, a per-plane
362 * modifier can be specified. The default value of zero
363 * indicates "native" format as specified by the fourcc.
364 * Vendor specific modifier token. This allows, for example,
365 * different tiling/swizzling pattern on different planes.
366 * See discussion above of DRM_FORMAT_MOD_xxx.
359 */ 367 */
360 __u32 handles[4]; 368 __u32 handles[4];
361 __u32 pitches[4]; /* pitch for each plane */ 369 __u32 pitches[4]; /* pitch for each plane */
362 __u32 offsets[4]; /* offset of each plane */ 370 __u32 offsets[4]; /* offset of each plane */
371 __u64 modifier[4]; /* ie, tiling, compressed (per plane) */
363}; 372};
364 373
365#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 374#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 6eed16b92a24..551b6737f5df 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -270,7 +270,7 @@ typedef struct _drm_i915_sarea {
270#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image) 270#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)
271#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs) 271#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
272#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) 272#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
273#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) 273#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
274#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) 274#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
275#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create) 275#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
276#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) 276#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
@@ -347,6 +347,9 @@ typedef struct drm_i915_irq_wait {
347#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29 347#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
348#define I915_PARAM_MMAP_VERSION 30 348#define I915_PARAM_MMAP_VERSION 30
349#define I915_PARAM_HAS_BSD2 31 349#define I915_PARAM_HAS_BSD2 31
350#define I915_PARAM_REVISION 32
351#define I915_PARAM_SUBSLICE_TOTAL 33
352#define I915_PARAM_EU_TOTAL 34
350 353
351typedef struct drm_i915_getparam { 354typedef struct drm_i915_getparam {
352 int param; 355 int param;
diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
index 0d7608dc1a34..5507eead5863 100644
--- a/include/uapi/drm/nouveau_drm.h
+++ b/include/uapi/drm/nouveau_drm.h
@@ -39,6 +39,7 @@
39#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) 39#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
40#define NOUVEAU_GEM_DOMAIN_GART (1 << 2) 40#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
41#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) 41#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
42#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4)
42 43
43#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ 44#define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */
44#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 45#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 50d0fb41a3bf..871e73f99a4d 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -1034,6 +1034,10 @@ struct drm_radeon_cs {
1034#define RADEON_INFO_VRAM_USAGE 0x1e 1034#define RADEON_INFO_VRAM_USAGE 0x1e
1035#define RADEON_INFO_GTT_USAGE 0x1f 1035#define RADEON_INFO_GTT_USAGE 0x1f
1036#define RADEON_INFO_ACTIVE_CU_COUNT 0x20 1036#define RADEON_INFO_ACTIVE_CU_COUNT 0x20
1037#define RADEON_INFO_CURRENT_GPU_TEMP 0x21
1038#define RADEON_INFO_CURRENT_GPU_SCLK 0x22
1039#define RADEON_INFO_CURRENT_GPU_MCLK 0x23
1040#define RADEON_INFO_READ_REG 0x24
1037 1041
1038struct drm_radeon_info { 1042struct drm_radeon_info {
1039 uint32_t request; 1043 uint32_t request;
diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h
index c15d781ecc0f..5391780c2b05 100644
--- a/include/uapi/drm/tegra_drm.h
+++ b/include/uapi/drm/tegra_drm.h
@@ -36,7 +36,8 @@ struct drm_tegra_gem_create {
36 36
37struct drm_tegra_gem_mmap { 37struct drm_tegra_gem_mmap {
38 __u32 handle; 38 __u32 handle;
39 __u32 offset; 39 __u32 pad;
40 __u64 offset;
40}; 41};
41 42
42struct drm_tegra_syncpt_read { 43struct drm_tegra_syncpt_read {
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index d4cfc17cc414..640954b9ecf9 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -6,6 +6,7 @@ header-y += caif/
6header-y += dvb/ 6header-y += dvb/
7header-y += hdlc/ 7header-y += hdlc/
8header-y += hsi/ 8header-y += hsi/
9header-y += iio/
9header-y += isdn/ 10header-y += isdn/
10header-y += mmc/ 11header-y += mmc/
11header-y += nfsd/ 12header-y += nfsd/
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 45da7ec7d274..a9ebdf5701e8 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -118,8 +118,13 @@ enum bpf_map_type {
118enum bpf_prog_type { 118enum bpf_prog_type {
119 BPF_PROG_TYPE_UNSPEC, 119 BPF_PROG_TYPE_UNSPEC,
120 BPF_PROG_TYPE_SOCKET_FILTER, 120 BPF_PROG_TYPE_SOCKET_FILTER,
121 BPF_PROG_TYPE_KPROBE,
122 BPF_PROG_TYPE_SCHED_CLS,
123 BPF_PROG_TYPE_SCHED_ACT,
121}; 124};
122 125
126#define BPF_PSEUDO_MAP_FD 1
127
123/* flags for BPF_MAP_UPDATE_ELEM command */ 128/* flags for BPF_MAP_UPDATE_ELEM command */
124#define BPF_ANY 0 /* create new element or update existing */ 129#define BPF_ANY 0 /* create new element or update existing */
125#define BPF_NOEXIST 1 /* create new element if it didn't exist */ 130#define BPF_NOEXIST 1 /* create new element if it didn't exist */
@@ -151,6 +156,7 @@ union bpf_attr {
151 __u32 log_level; /* verbosity level of verifier */ 156 __u32 log_level; /* verbosity level of verifier */
152 __u32 log_size; /* size of user buffer */ 157 __u32 log_size; /* size of user buffer */
153 __aligned_u64 log_buf; /* user supplied buffer */ 158 __aligned_u64 log_buf; /* user supplied buffer */
159 __u32 kern_version; /* checked when prog_type=kprobe */
154 }; 160 };
155} __attribute__((aligned(8))); 161} __attribute__((aligned(8)));
156 162
@@ -162,7 +168,64 @@ enum bpf_func_id {
162 BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */ 168 BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
163 BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */ 169 BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
164 BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */ 170 BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
171 BPF_FUNC_probe_read, /* int bpf_probe_read(void *dst, int size, void *src) */
172 BPF_FUNC_ktime_get_ns, /* u64 bpf_ktime_get_ns(void) */
173 BPF_FUNC_trace_printk, /* int bpf_trace_printk(const char *fmt, int fmt_size, ...) */
174 BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
175 BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
176
177 /**
178 * skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
179 * @skb: pointer to skb
180 * @offset: offset within packet from skb->mac_header
181 * @from: pointer where to copy bytes from
182 * @len: number of bytes to store into packet
183 * @flags: bit 0 - if true, recompute skb->csum
184 * other bits - reserved
185 * Return: 0 on success
186 */
187 BPF_FUNC_skb_store_bytes,
188
189 /**
190 * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
191 * @skb: pointer to skb
192 * @offset: offset within packet where IP checksum is located
193 * @from: old value of header field
194 * @to: new value of header field
195 * @flags: bits 0-3 - size of header field
196 * other bits - reserved
197 * Return: 0 on success
198 */
199 BPF_FUNC_l3_csum_replace,
200
201 /**
202 * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
203 * @skb: pointer to skb
204 * @offset: offset within packet where TCP/UDP checksum is located
205 * @from: old value of header field
206 * @to: new value of header field
207 * @flags: bits 0-3 - size of header field
208 * bit 4 - is pseudo header
209 * other bits - reserved
210 * Return: 0 on success
211 */
212 BPF_FUNC_l4_csum_replace,
165 __BPF_FUNC_MAX_ID, 213 __BPF_FUNC_MAX_ID,
166}; 214};
167 215
216/* user accessible mirror of in-kernel sk_buff.
217 * new fields can only be added to the end of this structure
218 */
219struct __sk_buff {
220 __u32 len;
221 __u32 pkt_type;
222 __u32 mark;
223 __u32 queue_mapping;
224 __u32 protocol;
225 __u32 vlan_present;
226 __u32 vlan_tci;
227 __u32 vlan_proto;
228 __u32 priority;
229};
230
168#endif /* _UAPI__LINUX_BPF_H__ */ 231#endif /* _UAPI__LINUX_BPF_H__ */
diff --git a/include/uapi/linux/can/raw.h b/include/uapi/linux/can/raw.h
index 78ec76fd89a6..8735f1080385 100644
--- a/include/uapi/linux/can/raw.h
+++ b/include/uapi/linux/can/raw.h
@@ -57,6 +57,7 @@ enum {
57 CAN_RAW_LOOPBACK, /* local loopback (default:on) */ 57 CAN_RAW_LOOPBACK, /* local loopback (default:on) */
58 CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */ 58 CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */
59 CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */ 59 CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */
60 CAN_RAW_JOIN_FILTERS, /* all filters must match to trigger */
60}; 61};
61 62
62#endif /* !_UAPI_CAN_RAW_H */ 63#endif /* !_UAPI_CAN_RAW_H */
diff --git a/include/uapi/linux/dcbnl.h b/include/uapi/linux/dcbnl.h
index e711f20dc522..6497d7933d5b 100644
--- a/include/uapi/linux/dcbnl.h
+++ b/include/uapi/linux/dcbnl.h
@@ -78,6 +78,70 @@ struct ieee_maxrate {
78 __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS]; 78 __u64 tc_maxrate[IEEE_8021QAZ_MAX_TCS];
79}; 79};
80 80
81enum dcbnl_cndd_states {
82 DCB_CNDD_RESET = 0,
83 DCB_CNDD_EDGE,
84 DCB_CNDD_INTERIOR,
85 DCB_CNDD_INTERIOR_READY,
86};
87
88/* This structure contains the IEEE 802.1Qau QCN managed object.
89 *
90 *@rpg_enable: enable QCN RP
91 *@rppp_max_rps: maximum number of RPs allowed for this CNPV on this port
92 *@rpg_time_reset: time between rate increases if no CNMs received.
93 * given in u-seconds
94 *@rpg_byte_reset: transmitted data between rate increases if no CNMs received.
95 * given in Bytes
96 *@rpg_threshold: The number of times rpByteStage or rpTimeStage can count
97 * before RP rate control state machine advances states
98 *@rpg_max_rate: the maxinun rate, in Mbits per second,
99 * at which an RP can transmit
100 *@rpg_ai_rate: The rate, in Mbits per second,
101 * used to increase rpTargetRate in the RPR_ACTIVE_INCREASE
102 *@rpg_hai_rate: The rate, in Mbits per second,
103 * used to increase rpTargetRate in the RPR_HYPER_INCREASE state
104 *@rpg_gd: Upon CNM receive, flow rate is limited to (Fb/Gd)*CurrentRate.
105 * rpgGd is given as log2(Gd), where Gd may only be powers of 2
106 *@rpg_min_dec_fac: The minimum factor by which the current transmit rate
107 * can be changed by reception of a CNM.
108 * value is given as percentage (1-100)
109 *@rpg_min_rate: The minimum value, in bits per second, for rate to limit
110 *@cndd_state_machine: The state of the congestion notification domain
111 * defense state machine, as defined by IEEE 802.3Qau
112 * section 32.1.1. In the interior ready state,
113 * the QCN capable hardware may add CN-TAG TLV to the
114 * outgoing traffic, to specifically identify outgoing
115 * flows.
116 */
117
118struct ieee_qcn {
119 __u8 rpg_enable[IEEE_8021QAZ_MAX_TCS];
120 __u32 rppp_max_rps[IEEE_8021QAZ_MAX_TCS];
121 __u32 rpg_time_reset[IEEE_8021QAZ_MAX_TCS];
122 __u32 rpg_byte_reset[IEEE_8021QAZ_MAX_TCS];
123 __u32 rpg_threshold[IEEE_8021QAZ_MAX_TCS];
124 __u32 rpg_max_rate[IEEE_8021QAZ_MAX_TCS];
125 __u32 rpg_ai_rate[IEEE_8021QAZ_MAX_TCS];
126 __u32 rpg_hai_rate[IEEE_8021QAZ_MAX_TCS];
127 __u32 rpg_gd[IEEE_8021QAZ_MAX_TCS];
128 __u32 rpg_min_dec_fac[IEEE_8021QAZ_MAX_TCS];
129 __u32 rpg_min_rate[IEEE_8021QAZ_MAX_TCS];
130 __u32 cndd_state_machine[IEEE_8021QAZ_MAX_TCS];
131};
132
133/* This structure contains the IEEE 802.1Qau QCN statistics.
134 *
135 *@rppp_rp_centiseconds: the number of RP-centiseconds accumulated
136 * by RPs at this priority level on this Port
137 *@rppp_created_rps: number of active RPs(flows) that react to CNMs
138 */
139
140struct ieee_qcn_stats {
141 __u64 rppp_rp_centiseconds[IEEE_8021QAZ_MAX_TCS];
142 __u32 rppp_created_rps[IEEE_8021QAZ_MAX_TCS];
143};
144
81/* This structure contains the IEEE 802.1Qaz PFC managed object 145/* This structure contains the IEEE 802.1Qaz PFC managed object
82 * 146 *
83 * @pfc_cap: Indicates the number of traffic classes on the local device 147 * @pfc_cap: Indicates the number of traffic classes on the local device
@@ -334,6 +398,8 @@ enum ieee_attrs {
334 DCB_ATTR_IEEE_PEER_PFC, 398 DCB_ATTR_IEEE_PEER_PFC,
335 DCB_ATTR_IEEE_PEER_APP, 399 DCB_ATTR_IEEE_PEER_APP,
336 DCB_ATTR_IEEE_MAXRATE, 400 DCB_ATTR_IEEE_MAXRATE,
401 DCB_ATTR_IEEE_QCN,
402 DCB_ATTR_IEEE_QCN_STATS,
337 __DCB_ATTR_IEEE_MAX 403 __DCB_ATTR_IEEE_MAX
338}; 404};
339#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1) 405#define DCB_ATTR_IEEE_MAX (__DCB_ATTR_IEEE_MAX - 1)
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h
index 889f3a5b7b18..eac8c3641f39 100644
--- a/include/uapi/linux/dm-ioctl.h
+++ b/include/uapi/linux/dm-ioctl.h
@@ -267,9 +267,9 @@ enum {
267#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) 267#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
268 268
269#define DM_VERSION_MAJOR 4 269#define DM_VERSION_MAJOR 4
270#define DM_VERSION_MINOR 30 270#define DM_VERSION_MINOR 31
271#define DM_VERSION_PATCHLEVEL 0 271#define DM_VERSION_PATCHLEVEL 0
272#define DM_VERSION_EXTRA "-ioctl (2014-12-22)" 272#define DM_VERSION_EXTRA "-ioctl (2015-3-12)"
273 273
274/* Status bits */ 274/* Status bits */
275#define DM_READONLY_FLAG (1 << 0) /* In/Out */ 275#define DM_READONLY_FLAG (1 << 0) /* In/Out */
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h
index 47785d5ecf17..c97340e43dd6 100644
--- a/include/uapi/linux/filter.h
+++ b/include/uapi/linux/filter.h
@@ -77,9 +77,13 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
77#define SKF_AD_VLAN_TAG_PRESENT 48 77#define SKF_AD_VLAN_TAG_PRESENT 48
78#define SKF_AD_PAY_OFFSET 52 78#define SKF_AD_PAY_OFFSET 52
79#define SKF_AD_RANDOM 56 79#define SKF_AD_RANDOM 56
80#define SKF_AD_MAX 60 80#define SKF_AD_VLAN_TPID 60
81#define SKF_NET_OFF (-0x100000) 81#define SKF_AD_MAX 64
82#define SKF_LL_OFF (-0x200000)
83 82
83#define SKF_NET_OFF (-0x100000)
84#define SKF_LL_OFF (-0x200000)
85
86#define BPF_NET_OFF SKF_NET_OFF
87#define BPF_LL_OFF SKF_LL_OFF
84 88
85#endif /* _UAPI__LINUX_FILTER_H__ */ 89#endif /* _UAPI__LINUX_FILTER_H__ */
diff --git a/include/uapi/linux/fou.h b/include/uapi/linux/fou.h
index c303588bb767..d2947c52dc67 100644
--- a/include/uapi/linux/fou.h
+++ b/include/uapi/linux/fou.h
@@ -25,6 +25,7 @@ enum {
25 FOU_CMD_UNSPEC, 25 FOU_CMD_UNSPEC,
26 FOU_CMD_ADD, 26 FOU_CMD_ADD,
27 FOU_CMD_DEL, 27 FOU_CMD_DEL,
28 FOU_CMD_GET,
28 29
29 __FOU_CMD_MAX, 30 __FOU_CMD_MAX,
30}; 31};
diff --git a/include/uapi/linux/hsi/Kbuild b/include/uapi/linux/hsi/Kbuild
index 30ab3cd3b8a5..a16a00544258 100644
--- a/include/uapi/linux/hsi/Kbuild
+++ b/include/uapi/linux/hsi/Kbuild
@@ -1,2 +1,2 @@
1# UAPI Header export list 1# UAPI Header export list
2header-y += hsi_char.h 2header-y += hsi_char.h cs-protocol.h
diff --git a/include/uapi/linux/hsi/cs-protocol.h b/include/uapi/linux/hsi/cs-protocol.h
new file mode 100644
index 000000000000..4957bba57cbe
--- /dev/null
+++ b/include/uapi/linux/hsi/cs-protocol.h
@@ -0,0 +1,113 @@
1/*
2 * cmt-speech interface definitions
3 *
4 * Copyright (C) 2008,2009,2010 Nokia Corporation. All rights reserved.
5 *
6 * Contact: Kai Vehmanen <kai.vehmanen@nokia.com>
7 * Original author: Peter Ujfalusi <peter.ujfalusi@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 */
23
24#ifndef _CS_PROTOCOL_H
25#define _CS_PROTOCOL_H
26
27#include <linux/types.h>
28#include <linux/ioctl.h>
29
30/* chardev parameters */
31#define CS_DEV_FILE_NAME "/dev/cmt_speech"
32
33/* user-space API versioning */
34#define CS_IF_VERSION 2
35
36/* APE kernel <-> user space messages */
37#define CS_CMD_SHIFT 28
38#define CS_DOMAIN_SHIFT 24
39
40#define CS_CMD_MASK 0xff000000
41#define CS_PARAM_MASK 0xffffff
42
43#define CS_CMD(id, dom) \
44 (((id) << CS_CMD_SHIFT) | ((dom) << CS_DOMAIN_SHIFT))
45
46#define CS_ERROR CS_CMD(1, 0)
47#define CS_RX_DATA_RECEIVED CS_CMD(2, 0)
48#define CS_TX_DATA_READY CS_CMD(3, 0)
49#define CS_TX_DATA_SENT CS_CMD(4, 0)
50
51/* params to CS_ERROR indication */
52#define CS_ERR_PEER_RESET 0
53
54/* ioctl interface */
55
56/* parameters to CS_CONFIG_BUFS ioctl */
57#define CS_FEAT_TSTAMP_RX_CTRL (1 << 0)
58#define CS_FEAT_ROLLING_RX_COUNTER (2 << 0)
59
60/* parameters to CS_GET_STATE ioctl */
61#define CS_STATE_CLOSED 0
62#define CS_STATE_OPENED 1 /* resource allocated */
63#define CS_STATE_CONFIGURED 2 /* data path active */
64
65/* maximum number of TX/RX buffers */
66#define CS_MAX_BUFFERS_SHIFT 4
67#define CS_MAX_BUFFERS (1 << CS_MAX_BUFFERS_SHIFT)
68
69/* Parameters for setting up the data buffers */
70struct cs_buffer_config {
71 __u32 rx_bufs; /* number of RX buffer slots */
72 __u32 tx_bufs; /* number of TX buffer slots */
73 __u32 buf_size; /* bytes */
74 __u32 flags; /* see CS_FEAT_* */
75 __u32 reserved[4];
76};
77
78/*
79 * Struct describing the layout and contents of the driver mmap area.
80 * This information is meant as read-only information for the application.
81 */
82struct cs_mmap_config_block {
83 __u32 reserved1;
84 __u32 buf_size; /* 0=disabled, otherwise the transfer size */
85 __u32 rx_bufs; /* # of RX buffers */
86 __u32 tx_bufs; /* # of TX buffers */
87 __u32 reserved2;
88 /* array of offsets within the mmap area for each RX and TX buffer */
89 __u32 rx_offsets[CS_MAX_BUFFERS];
90 __u32 tx_offsets[CS_MAX_BUFFERS];
91 __u32 rx_ptr;
92 __u32 rx_ptr_boundary;
93 __u32 reserved3[2];
94 /*
95 * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
96 * timestamp taken when the last control command was received
97 */
98 struct timespec tstamp_rx_ctrl;
99};
100
101#define CS_IO_MAGIC 'C'
102
103#define CS_IOW(num, dtype) _IOW(CS_IO_MAGIC, num, dtype)
104#define CS_IOR(num, dtype) _IOR(CS_IO_MAGIC, num, dtype)
105#define CS_IOWR(num, dtype) _IOWR(CS_IO_MAGIC, num, dtype)
106#define CS_IO(num) _IO(CS_IO_MAGIC, num)
107
108#define CS_GET_STATE CS_IOR(21, unsigned int)
109#define CS_SET_WAKELINE CS_IOW(23, unsigned int)
110#define CS_GET_IF_VERSION CS_IOR(30, unsigned int)
111#define CS_CONFIG_BUFS CS_IOW(31, struct cs_buffer_config)
112
113#endif /* _CS_PROTOCOL_H */
diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h
index dea10a87dfd1..4318ab1635ce 100644
--- a/include/uapi/linux/if_addr.h
+++ b/include/uapi/linux/if_addr.h
@@ -50,6 +50,8 @@ enum {
50#define IFA_F_PERMANENT 0x80 50#define IFA_F_PERMANENT 0x80
51#define IFA_F_MANAGETEMPADDR 0x100 51#define IFA_F_MANAGETEMPADDR 0x100
52#define IFA_F_NOPREFIXROUTE 0x200 52#define IFA_F_NOPREFIXROUTE 0x200
53#define IFA_F_MCAUTOJOIN 0x400
54#define IFA_F_STABLE_PRIVACY 0x800
53 55
54struct ifa_cacheinfo { 56struct ifa_cacheinfo {
55 __u32 ifa_prefered; 57 __u32 ifa_prefered;
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index dfd0bb22e554..d9cd19214b98 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -147,6 +147,7 @@ enum {
147 IFLA_CARRIER_CHANGES, 147 IFLA_CARRIER_CHANGES,
148 IFLA_PHYS_SWITCH_ID, 148 IFLA_PHYS_SWITCH_ID,
149 IFLA_LINK_NETNSID, 149 IFLA_LINK_NETNSID,
150 IFLA_PHYS_PORT_NAME,
150 __IFLA_MAX 151 __IFLA_MAX
151}; 152};
152 153
@@ -215,6 +216,7 @@ enum {
215enum in6_addr_gen_mode { 216enum in6_addr_gen_mode {
216 IN6_ADDR_GEN_MODE_EUI64, 217 IN6_ADDR_GEN_MODE_EUI64,
217 IN6_ADDR_GEN_MODE_NONE, 218 IN6_ADDR_GEN_MODE_NONE,
219 IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
218}; 220};
219 221
220/* Bridge section */ 222/* Bridge section */
@@ -224,6 +226,9 @@ enum {
224 IFLA_BR_FORWARD_DELAY, 226 IFLA_BR_FORWARD_DELAY,
225 IFLA_BR_HELLO_TIME, 227 IFLA_BR_HELLO_TIME,
226 IFLA_BR_MAX_AGE, 228 IFLA_BR_MAX_AGE,
229 IFLA_BR_AGEING_TIME,
230 IFLA_BR_STP_STATE,
231 IFLA_BR_PRIORITY,
227 __IFLA_BR_MAX, 232 __IFLA_BR_MAX,
228}; 233};
229 234
@@ -247,6 +252,7 @@ enum {
247 IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ 252 IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
248 IFLA_BRPORT_PROXYARP, /* proxy ARP */ 253 IFLA_BRPORT_PROXYARP, /* proxy ARP */
249 IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ 254 IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
255 IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */
250 __IFLA_BRPORT_MAX 256 __IFLA_BRPORT_MAX
251}; 257};
252#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) 258#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -459,6 +465,9 @@ enum {
459 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ 465 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */
460 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ 466 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */
461 IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */ 467 IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */
468 IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query
469 * on/off switch
470 */
462 __IFLA_VF_MAX, 471 __IFLA_VF_MAX,
463}; 472};
464 473
@@ -503,6 +512,11 @@ struct ifla_vf_link_state {
503 __u32 link_state; 512 __u32 link_state;
504}; 513};
505 514
515struct ifla_vf_rss_query_en {
516 __u32 vf;
517 __u32 setting;
518};
519
506/* VF ports management section 520/* VF ports management section
507 * 521 *
508 * Nested layout of set/get msg is: 522 * Nested layout of set/get msg is:
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index da2d668b8cf1..053bd102fbe0 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -99,6 +99,7 @@ struct tpacket_auxdata {
99#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */ 99#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */
100#define TP_STATUS_BLK_TMO (1 << 5) 100#define TP_STATUS_BLK_TMO (1 << 5)
101#define TP_STATUS_VLAN_TPID_VALID (1 << 6) /* auxdata has valid tp_vlan_tpid */ 101#define TP_STATUS_VLAN_TPID_VALID (1 << 6) /* auxdata has valid tp_vlan_tpid */
102#define TP_STATUS_CSUM_VALID (1 << 7)
102 103
103/* Tx ring - header status */ 104/* Tx ring - header status */
104#define TP_STATUS_AVAILABLE 0 105#define TP_STATUS_AVAILABLE 0
diff --git a/include/uapi/linux/iio/Kbuild b/include/uapi/linux/iio/Kbuild
new file mode 100644
index 000000000000..86f76d84c44f
--- /dev/null
+++ b/include/uapi/linux/iio/Kbuild
@@ -0,0 +1,3 @@
1# UAPI Header export list
2header-y += events.h
3header-y += types.h
diff --git a/include/uapi/linux/iio/events.h b/include/uapi/linux/iio/events.h
new file mode 100644
index 000000000000..00bbdaed2f97
--- /dev/null
+++ b/include/uapi/linux/iio/events.h
@@ -0,0 +1,42 @@
1/* The industrial I/O - event passing to userspace
2 *
3 * Copyright (c) 2008-2011 Jonathan Cameron
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#ifndef _UAPI_IIO_EVENTS_H_
10#define _UAPI_IIO_EVENTS_H_
11
12#include <linux/ioctl.h>
13#include <linux/types.h>
14
15/**
16 * struct iio_event_data - The actual event being pushed to userspace
17 * @id: event identifier
18 * @timestamp: best estimate of time of event occurrence (often from
19 * the interrupt handler)
20 */
21struct iio_event_data {
22 __u64 id;
23 __s64 timestamp;
24};
25
26#define IIO_GET_EVENT_FD_IOCTL _IOR('i', 0x90, int)
27
28#define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF)
29
30#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F)
31
32#define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF)
33
34/* Event code number extraction depends on which type of event we have.
35 * Perhaps review this function in the future*/
36#define IIO_EVENT_CODE_EXTRACT_CHAN(mask) ((__s16)(mask & 0xFFFF))
37#define IIO_EVENT_CODE_EXTRACT_CHAN2(mask) ((__s16)(((mask) >> 16) & 0xFFFF))
38
39#define IIO_EVENT_CODE_EXTRACT_MODIFIER(mask) ((mask >> 40) & 0xFF)
40#define IIO_EVENT_CODE_EXTRACT_DIFF(mask) (((mask) >> 55) & 0x1)
41
42#endif /* _UAPI_IIO_EVENTS_H_ */
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
new file mode 100644
index 000000000000..5c4601935005
--- /dev/null
+++ b/include/uapi/linux/iio/types.h
@@ -0,0 +1,92 @@
1/* industrial I/O data types needed both in and out of kernel
2 *
3 * Copyright (c) 2008 Jonathan Cameron
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
10#ifndef _UAPI_IIO_TYPES_H_
11#define _UAPI_IIO_TYPES_H_
12
13enum iio_chan_type {
14 IIO_VOLTAGE,
15 IIO_CURRENT,
16 IIO_POWER,
17 IIO_ACCEL,
18 IIO_ANGL_VEL,
19 IIO_MAGN,
20 IIO_LIGHT,
21 IIO_INTENSITY,
22 IIO_PROXIMITY,
23 IIO_TEMP,
24 IIO_INCLI,
25 IIO_ROT,
26 IIO_ANGL,
27 IIO_TIMESTAMP,
28 IIO_CAPACITANCE,
29 IIO_ALTVOLTAGE,
30 IIO_CCT,
31 IIO_PRESSURE,
32 IIO_HUMIDITYRELATIVE,
33 IIO_ACTIVITY,
34 IIO_STEPS,
35 IIO_ENERGY,
36 IIO_DISTANCE,
37 IIO_VELOCITY,
38};
39
40enum iio_modifier {
41 IIO_NO_MOD,
42 IIO_MOD_X,
43 IIO_MOD_Y,
44 IIO_MOD_Z,
45 IIO_MOD_X_AND_Y,
46 IIO_MOD_X_AND_Z,
47 IIO_MOD_Y_AND_Z,
48 IIO_MOD_X_AND_Y_AND_Z,
49 IIO_MOD_X_OR_Y,
50 IIO_MOD_X_OR_Z,
51 IIO_MOD_Y_OR_Z,
52 IIO_MOD_X_OR_Y_OR_Z,
53 IIO_MOD_LIGHT_BOTH,
54 IIO_MOD_LIGHT_IR,
55 IIO_MOD_ROOT_SUM_SQUARED_X_Y,
56 IIO_MOD_SUM_SQUARED_X_Y_Z,
57 IIO_MOD_LIGHT_CLEAR,
58 IIO_MOD_LIGHT_RED,
59 IIO_MOD_LIGHT_GREEN,
60 IIO_MOD_LIGHT_BLUE,
61 IIO_MOD_QUATERNION,
62 IIO_MOD_TEMP_AMBIENT,
63 IIO_MOD_TEMP_OBJECT,
64 IIO_MOD_NORTH_MAGN,
65 IIO_MOD_NORTH_TRUE,
66 IIO_MOD_NORTH_MAGN_TILT_COMP,
67 IIO_MOD_NORTH_TRUE_TILT_COMP,
68 IIO_MOD_RUNNING,
69 IIO_MOD_JOGGING,
70 IIO_MOD_WALKING,
71 IIO_MOD_STILL,
72 IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z,
73};
74
75enum iio_event_type {
76 IIO_EV_TYPE_THRESH,
77 IIO_EV_TYPE_MAG,
78 IIO_EV_TYPE_ROC,
79 IIO_EV_TYPE_THRESH_ADAPTIVE,
80 IIO_EV_TYPE_MAG_ADAPTIVE,
81 IIO_EV_TYPE_CHANGE,
82};
83
84enum iio_event_direction {
85 IIO_EV_DIR_EITHER,
86 IIO_EV_DIR_RISING,
87 IIO_EV_DIR_FALLING,
88 IIO_EV_DIR_NONE,
89};
90
91#endif /* _UAPI_IIO_TYPES_H_ */
92
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index b0a813079852..731417c025f6 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -369,7 +369,8 @@ struct input_keymap_entry {
369#define KEY_MSDOS 151 369#define KEY_MSDOS 151
370#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ 370#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */
371#define KEY_SCREENLOCK KEY_COFFEE 371#define KEY_SCREENLOCK KEY_COFFEE
372#define KEY_DIRECTION 153 372#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */
373#define KEY_DIRECTION KEY_ROTATE_DISPLAY
373#define KEY_CYCLEWINDOWS 154 374#define KEY_CYCLEWINDOWS 154
374#define KEY_MAIL 155 375#define KEY_MAIL 155
375#define KEY_BOOKMARKS 156 /* AC Bookmarks */ 376#define KEY_BOOKMARKS 156 /* AC Bookmarks */
@@ -702,6 +703,10 @@ struct input_keymap_entry {
702#define KEY_NUMERIC_9 0x209 703#define KEY_NUMERIC_9 0x209
703#define KEY_NUMERIC_STAR 0x20a 704#define KEY_NUMERIC_STAR 0x20a
704#define KEY_NUMERIC_POUND 0x20b 705#define KEY_NUMERIC_POUND 0x20b
706#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */
707#define KEY_NUMERIC_B 0x20d
708#define KEY_NUMERIC_C 0x20e
709#define KEY_NUMERIC_D 0x20f
705 710
706#define KEY_CAMERA_FOCUS 0x210 711#define KEY_CAMERA_FOCUS 0x210
707#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ 712#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
@@ -973,7 +978,8 @@ struct input_keymap_entry {
973 */ 978 */
974#define MT_TOOL_FINGER 0 979#define MT_TOOL_FINGER 0
975#define MT_TOOL_PEN 1 980#define MT_TOOL_PEN 1
976#define MT_TOOL_MAX 1 981#define MT_TOOL_PALM 2
982#define MT_TOOL_MAX 2
977 983
978/* 984/*
979 * Values describing the status of a force-feedback effect 985 * Values describing the status of a force-feedback effect
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index cabe95d5b461..3199243f2028 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -358,6 +358,8 @@ enum {
358 358
359 IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */ 359 IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */
360 360
361 IPVS_SVC_ATTR_STATS64, /* nested attribute for service stats */
362
361 __IPVS_SVC_ATTR_MAX, 363 __IPVS_SVC_ATTR_MAX,
362}; 364};
363 365
@@ -387,6 +389,8 @@ enum {
387 389
388 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */ 390 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */
389 391
392 IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */
393
390 __IPVS_DEST_ATTR_MAX, 394 __IPVS_DEST_ATTR_MAX,
391}; 395};
392 396
@@ -410,7 +414,8 @@ enum {
410/* 414/*
411 * Attributes used to describe service or destination entry statistics 415 * Attributes used to describe service or destination entry statistics
412 * 416 *
413 * Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS 417 * Used inside nested attributes IPVS_SVC_ATTR_STATS, IPVS_DEST_ATTR_STATS,
418 * IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64.
414 */ 419 */
415enum { 420enum {
416 IPVS_STATS_ATTR_UNSPEC = 0, 421 IPVS_STATS_ATTR_UNSPEC = 0,
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index 437a6a4b125a..5efa54ae567c 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -170,6 +170,7 @@ enum {
170 DEVCONF_ACCEPT_RA_FROM_LOCAL, 170 DEVCONF_ACCEPT_RA_FROM_LOCAL,
171 DEVCONF_USE_OPTIMISTIC, 171 DEVCONF_USE_OPTIMISTIC,
172 DEVCONF_ACCEPT_RA_MTU, 172 DEVCONF_ACCEPT_RA_MTU,
173 DEVCONF_STABLE_SECRET,
173 DEVCONF_MAX 174 DEVCONF_MAX
174}; 175};
175 176
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 805570650062..f574d7be7631 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -147,6 +147,16 @@ struct kvm_pit_config {
147 147
148#define KVM_PIT_SPEAKER_DUMMY 1 148#define KVM_PIT_SPEAKER_DUMMY 1
149 149
150struct kvm_s390_skeys {
151 __u64 start_gfn;
152 __u64 count;
153 __u64 skeydata_addr;
154 __u32 flags;
155 __u32 reserved[9];
156};
157#define KVM_S390_GET_SKEYS_NONE 1
158#define KVM_S390_SKEYS_MAX 1048576
159
150#define KVM_EXIT_UNKNOWN 0 160#define KVM_EXIT_UNKNOWN 0
151#define KVM_EXIT_EXCEPTION 1 161#define KVM_EXIT_EXCEPTION 1
152#define KVM_EXIT_IO 2 162#define KVM_EXIT_IO 2
@@ -172,6 +182,7 @@ struct kvm_pit_config {
172#define KVM_EXIT_S390_TSCH 22 182#define KVM_EXIT_S390_TSCH 22
173#define KVM_EXIT_EPR 23 183#define KVM_EXIT_EPR 23
174#define KVM_EXIT_SYSTEM_EVENT 24 184#define KVM_EXIT_SYSTEM_EVENT 24
185#define KVM_EXIT_S390_STSI 25
175 186
176/* For KVM_EXIT_INTERNAL_ERROR */ 187/* For KVM_EXIT_INTERNAL_ERROR */
177/* Emulate instruction failed. */ 188/* Emulate instruction failed. */
@@ -309,6 +320,15 @@ struct kvm_run {
309 __u32 type; 320 __u32 type;
310 __u64 flags; 321 __u64 flags;
311 } system_event; 322 } system_event;
323 /* KVM_EXIT_S390_STSI */
324 struct {
325 __u64 addr;
326 __u8 ar;
327 __u8 reserved;
328 __u8 fc;
329 __u8 sel1;
330 __u16 sel2;
331 } s390_stsi;
312 /* Fix the size of the union. */ 332 /* Fix the size of the union. */
313 char padding[256]; 333 char padding[256];
314 }; 334 };
@@ -324,7 +344,7 @@ struct kvm_run {
324 __u64 kvm_dirty_regs; 344 __u64 kvm_dirty_regs;
325 union { 345 union {
326 struct kvm_sync_regs regs; 346 struct kvm_sync_regs regs;
327 char padding[1024]; 347 char padding[2048];
328 } s; 348 } s;
329}; 349};
330 350
@@ -365,6 +385,24 @@ struct kvm_translation {
365 __u8 pad[5]; 385 __u8 pad[5];
366}; 386};
367 387
388/* for KVM_S390_MEM_OP */
389struct kvm_s390_mem_op {
390 /* in */
391 __u64 gaddr; /* the guest address */
392 __u64 flags; /* flags */
393 __u32 size; /* amount of bytes */
394 __u32 op; /* type of operation */
395 __u64 buf; /* buffer in userspace */
396 __u8 ar; /* the access register number */
397 __u8 reserved[31]; /* should be set to 0 */
398};
399/* types for kvm_s390_mem_op->op */
400#define KVM_S390_MEMOP_LOGICAL_READ 0
401#define KVM_S390_MEMOP_LOGICAL_WRITE 1
402/* flags for kvm_s390_mem_op->flags */
403#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
404#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
405
368/* for KVM_INTERRUPT */ 406/* for KVM_INTERRUPT */
369struct kvm_interrupt { 407struct kvm_interrupt {
370 /* in */ 408 /* in */
@@ -520,6 +558,13 @@ struct kvm_s390_irq {
520 } u; 558 } u;
521}; 559};
522 560
561struct kvm_s390_irq_state {
562 __u64 buf;
563 __u32 flags;
564 __u32 len;
565 __u32 reserved[4];
566};
567
523/* for KVM_SET_GUEST_DEBUG */ 568/* for KVM_SET_GUEST_DEBUG */
524 569
525#define KVM_GUESTDBG_ENABLE 0x00000001 570#define KVM_GUESTDBG_ENABLE 0x00000001
@@ -760,6 +805,14 @@ struct kvm_ppc_smmu_info {
760#define KVM_CAP_PPC_ENABLE_HCALL 104 805#define KVM_CAP_PPC_ENABLE_HCALL 104
761#define KVM_CAP_CHECK_EXTENSION_VM 105 806#define KVM_CAP_CHECK_EXTENSION_VM 105
762#define KVM_CAP_S390_USER_SIGP 106 807#define KVM_CAP_S390_USER_SIGP 106
808#define KVM_CAP_S390_VECTOR_REGISTERS 107
809#define KVM_CAP_S390_MEM_OP 108
810#define KVM_CAP_S390_USER_STSI 109
811#define KVM_CAP_S390_SKEYS 110
812#define KVM_CAP_MIPS_FPU 111
813#define KVM_CAP_MIPS_MSA 112
814#define KVM_CAP_S390_INJECT_IRQ 113
815#define KVM_CAP_S390_IRQ_STATE 114
763 816
764#ifdef KVM_CAP_IRQ_ROUTING 817#ifdef KVM_CAP_IRQ_ROUTING
765 818
@@ -1135,6 +1188,16 @@ struct kvm_s390_ucas_mapping {
1135#define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init) 1188#define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init)
1136#define KVM_ARM_PREFERRED_TARGET _IOR(KVMIO, 0xaf, struct kvm_vcpu_init) 1189#define KVM_ARM_PREFERRED_TARGET _IOR(KVMIO, 0xaf, struct kvm_vcpu_init)
1137#define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list) 1190#define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list)
1191/* Available with KVM_CAP_S390_MEM_OP */
1192#define KVM_S390_MEM_OP _IOW(KVMIO, 0xb1, struct kvm_s390_mem_op)
1193/* Available with KVM_CAP_S390_SKEYS */
1194#define KVM_S390_GET_SKEYS _IOW(KVMIO, 0xb2, struct kvm_s390_skeys)
1195#define KVM_S390_SET_SKEYS _IOW(KVMIO, 0xb3, struct kvm_s390_skeys)
1196/* Available with KVM_CAP_S390_INJECT_IRQ */
1197#define KVM_S390_IRQ _IOW(KVMIO, 0xb4, struct kvm_s390_irq)
1198/* Available with KVM_CAP_S390_IRQ_STATE */
1199#define KVM_S390_SET_IRQ_STATE _IOW(KVMIO, 0xb5, struct kvm_s390_irq_state)
1200#define KVM_S390_GET_IRQ_STATE _IOW(KVMIO, 0xb6, struct kvm_s390_irq_state)
1138 1201
1139#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) 1202#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1140#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) 1203#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 7d664ea85ebd..7b1425a6b370 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -58,6 +58,8 @@
58 58
59#define STACK_END_MAGIC 0x57AC6E9D 59#define STACK_END_MAGIC 0x57AC6E9D
60 60
61#define TRACEFS_MAGIC 0x74726163
62
61#define V9FS_MAGIC 0x01021997 63#define V9FS_MAGIC 0x01021997
62 64
63#define BDEVFS_MAGIC 0x62646576 65#define BDEVFS_MAGIC 0x62646576
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index d391893064a0..190d491d5b13 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -33,24 +33,32 @@
33 33
34#define MEDIA_BUS_FMT_FIXED 0x0001 34#define MEDIA_BUS_FMT_FIXED 0x0001
35 35
36/* RGB - next is 0x1010 */ 36/* RGB - next is 0x1018 */
37#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
37#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 38#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
38#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 39#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
39#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003 40#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
40#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004 41#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
42#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
41#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005 43#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
42#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006 44#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
43#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007 45#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
44#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008 46#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
45#define MEDIA_BUS_FMT_RGB666_1X18 0x1009 47#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
46#define MEDIA_BUS_FMT_RBG888_1X24 0x100e 48#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
49#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
50#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
51#define MEDIA_BUS_FMT_BGR888_1X24 0x1013
52#define MEDIA_BUS_FMT_GBR888_1X24 0x1014
47#define MEDIA_BUS_FMT_RGB888_1X24 0x100a 53#define MEDIA_BUS_FMT_RGB888_1X24 0x100a
48#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b 54#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b
49#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c 55#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c
56#define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG 0x1011
57#define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012
50#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d 58#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d
51#define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f 59#define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f
52 60
53/* YUV (including grey) - next is 0x2025 */ 61/* YUV (including grey) - next is 0x2026 */
54#define MEDIA_BUS_FMT_Y8_1X8 0x2001 62#define MEDIA_BUS_FMT_Y8_1X8 0x2001
55#define MEDIA_BUS_FMT_UV8_1X8 0x2015 63#define MEDIA_BUS_FMT_UV8_1X8 0x2015
56#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 64#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002
@@ -81,6 +89,7 @@
81#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d 89#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d
82#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e 90#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e
83#define MEDIA_BUS_FMT_VUY8_1X24 0x2024 91#define MEDIA_BUS_FMT_VUY8_1X24 0x2024
92#define MEDIA_BUS_FMT_YUV8_1X24 0x2025
84#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020 93#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020
85#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021 94#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021
86#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022 95#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index 3873a35509aa..2e35c61bbdd1 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -126,6 +126,7 @@ enum {
126 NDTPA_PROXY_QLEN, /* u32 */ 126 NDTPA_PROXY_QLEN, /* u32 */
127 NDTPA_LOCKTIME, /* u64, msecs */ 127 NDTPA_LOCKTIME, /* u64, msecs */
128 NDTPA_QUEUE_LENBYTES, /* u32 */ 128 NDTPA_QUEUE_LENBYTES, /* u32 */
129 NDTPA_MCAST_REPROBES, /* u32 */
129 __NDTPA_MAX 130 __NDTPA_MAX
130}; 131};
131#define NDTPA_MAX (__NDTPA_MAX - 1) 132#define NDTPA_MAX (__NDTPA_MAX - 1)
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 832bc46db78b..5fa1cd04762e 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -1,19 +1,49 @@
1#ifndef _LINUX_NF_TABLES_H 1#ifndef _LINUX_NF_TABLES_H
2#define _LINUX_NF_TABLES_H 2#define _LINUX_NF_TABLES_H
3 3
4#define NFT_TABLE_MAXNAMELEN 32
4#define NFT_CHAIN_MAXNAMELEN 32 5#define NFT_CHAIN_MAXNAMELEN 32
5#define NFT_USERDATA_MAXLEN 256 6#define NFT_USERDATA_MAXLEN 256
6 7
8/**
9 * enum nft_registers - nf_tables registers
10 *
11 * nf_tables used to have five registers: a verdict register and four data
12 * registers of size 16. The data registers have been changed to 16 registers
13 * of size 4. For compatibility reasons, the NFT_REG_[1-4] registers still
14 * map to areas of size 16, the 4 byte registers are addressed using
15 * NFT_REG32_00 - NFT_REG32_15.
16 */
7enum nft_registers { 17enum nft_registers {
8 NFT_REG_VERDICT, 18 NFT_REG_VERDICT,
9 NFT_REG_1, 19 NFT_REG_1,
10 NFT_REG_2, 20 NFT_REG_2,
11 NFT_REG_3, 21 NFT_REG_3,
12 NFT_REG_4, 22 NFT_REG_4,
13 __NFT_REG_MAX 23 __NFT_REG_MAX,
24
25 NFT_REG32_00 = 8,
26 MFT_REG32_01,
27 NFT_REG32_02,
28 NFT_REG32_03,
29 NFT_REG32_04,
30 NFT_REG32_05,
31 NFT_REG32_06,
32 NFT_REG32_07,
33 NFT_REG32_08,
34 NFT_REG32_09,
35 NFT_REG32_10,
36 NFT_REG32_11,
37 NFT_REG32_12,
38 NFT_REG32_13,
39 NFT_REG32_14,
40 NFT_REG32_15,
14}; 41};
15#define NFT_REG_MAX (__NFT_REG_MAX - 1) 42#define NFT_REG_MAX (__NFT_REG_MAX - 1)
16 43
44#define NFT_REG_SIZE 16
45#define NFT_REG32_SIZE 4
46
17/** 47/**
18 * enum nft_verdicts - nf_tables internal verdicts 48 * enum nft_verdicts - nf_tables internal verdicts
19 * 49 *
@@ -207,12 +237,16 @@ enum nft_rule_compat_attributes {
207 * @NFT_SET_CONSTANT: set contents may not change while bound 237 * @NFT_SET_CONSTANT: set contents may not change while bound
208 * @NFT_SET_INTERVAL: set contains intervals 238 * @NFT_SET_INTERVAL: set contains intervals
209 * @NFT_SET_MAP: set is used as a dictionary 239 * @NFT_SET_MAP: set is used as a dictionary
240 * @NFT_SET_TIMEOUT: set uses timeouts
241 * @NFT_SET_EVAL: set contains expressions for evaluation
210 */ 242 */
211enum nft_set_flags { 243enum nft_set_flags {
212 NFT_SET_ANONYMOUS = 0x1, 244 NFT_SET_ANONYMOUS = 0x1,
213 NFT_SET_CONSTANT = 0x2, 245 NFT_SET_CONSTANT = 0x2,
214 NFT_SET_INTERVAL = 0x4, 246 NFT_SET_INTERVAL = 0x4,
215 NFT_SET_MAP = 0x8, 247 NFT_SET_MAP = 0x8,
248 NFT_SET_TIMEOUT = 0x10,
249 NFT_SET_EVAL = 0x20,
216}; 250};
217 251
218/** 252/**
@@ -251,6 +285,8 @@ enum nft_set_desc_attributes {
251 * @NFTA_SET_POLICY: selection policy (NLA_U32) 285 * @NFTA_SET_POLICY: selection policy (NLA_U32)
252 * @NFTA_SET_DESC: set description (NLA_NESTED) 286 * @NFTA_SET_DESC: set description (NLA_NESTED)
253 * @NFTA_SET_ID: uniquely identifies a set in a transaction (NLA_U32) 287 * @NFTA_SET_ID: uniquely identifies a set in a transaction (NLA_U32)
288 * @NFTA_SET_TIMEOUT: default timeout value (NLA_U64)
289 * @NFTA_SET_GC_INTERVAL: garbage collection interval (NLA_U32)
254 */ 290 */
255enum nft_set_attributes { 291enum nft_set_attributes {
256 NFTA_SET_UNSPEC, 292 NFTA_SET_UNSPEC,
@@ -264,6 +300,8 @@ enum nft_set_attributes {
264 NFTA_SET_POLICY, 300 NFTA_SET_POLICY,
265 NFTA_SET_DESC, 301 NFTA_SET_DESC,
266 NFTA_SET_ID, 302 NFTA_SET_ID,
303 NFTA_SET_TIMEOUT,
304 NFTA_SET_GC_INTERVAL,
267 __NFTA_SET_MAX 305 __NFTA_SET_MAX
268}; 306};
269#define NFTA_SET_MAX (__NFTA_SET_MAX - 1) 307#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
@@ -283,12 +321,20 @@ enum nft_set_elem_flags {
283 * @NFTA_SET_ELEM_KEY: key value (NLA_NESTED: nft_data) 321 * @NFTA_SET_ELEM_KEY: key value (NLA_NESTED: nft_data)
284 * @NFTA_SET_ELEM_DATA: data value of mapping (NLA_NESTED: nft_data_attributes) 322 * @NFTA_SET_ELEM_DATA: data value of mapping (NLA_NESTED: nft_data_attributes)
285 * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32) 323 * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32)
324 * @NFTA_SET_ELEM_TIMEOUT: timeout value (NLA_U64)
325 * @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64)
326 * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)
327 * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)
286 */ 328 */
287enum nft_set_elem_attributes { 329enum nft_set_elem_attributes {
288 NFTA_SET_ELEM_UNSPEC, 330 NFTA_SET_ELEM_UNSPEC,
289 NFTA_SET_ELEM_KEY, 331 NFTA_SET_ELEM_KEY,
290 NFTA_SET_ELEM_DATA, 332 NFTA_SET_ELEM_DATA,
291 NFTA_SET_ELEM_FLAGS, 333 NFTA_SET_ELEM_FLAGS,
334 NFTA_SET_ELEM_TIMEOUT,
335 NFTA_SET_ELEM_EXPIRATION,
336 NFTA_SET_ELEM_USERDATA,
337 NFTA_SET_ELEM_EXPR,
292 __NFTA_SET_ELEM_MAX 338 __NFTA_SET_ELEM_MAX
293}; 339};
294#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) 340#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
@@ -346,6 +392,9 @@ enum nft_data_attributes {
346}; 392};
347#define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1) 393#define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1)
348 394
395/* Maximum length of a value */
396#define NFT_DATA_VALUE_MAXLEN 64
397
349/** 398/**
350 * enum nft_verdict_attributes - nf_tables verdict netlink attributes 399 * enum nft_verdict_attributes - nf_tables verdict netlink attributes
351 * 400 *
@@ -504,6 +553,35 @@ enum nft_lookup_attributes {
504}; 553};
505#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1) 554#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1)
506 555
556enum nft_dynset_ops {
557 NFT_DYNSET_OP_ADD,
558 NFT_DYNSET_OP_UPDATE,
559};
560
561/**
562 * enum nft_dynset_attributes - dynset expression attributes
563 *
564 * @NFTA_DYNSET_SET_NAME: name of set the to add data to (NLA_STRING)
565 * @NFTA_DYNSET_SET_ID: uniquely identifier of the set in the transaction (NLA_U32)
566 * @NFTA_DYNSET_OP: operation (NLA_U32)
567 * @NFTA_DYNSET_SREG_KEY: source register of the key (NLA_U32)
568 * @NFTA_DYNSET_SREG_DATA: source register of the data (NLA_U32)
569 * @NFTA_DYNSET_TIMEOUT: timeout value for the new element (NLA_U64)
570 * @NFTA_DYNSET_EXPR: expression (NLA_NESTED: nft_expr_attributes)
571 */
572enum nft_dynset_attributes {
573 NFTA_DYNSET_UNSPEC,
574 NFTA_DYNSET_SET_NAME,
575 NFTA_DYNSET_SET_ID,
576 NFTA_DYNSET_OP,
577 NFTA_DYNSET_SREG_KEY,
578 NFTA_DYNSET_SREG_DATA,
579 NFTA_DYNSET_TIMEOUT,
580 NFTA_DYNSET_EXPR,
581 __NFTA_DYNSET_MAX,
582};
583#define NFTA_DYNSET_MAX (__NFTA_DYNSET_MAX - 1)
584
507/** 585/**
508 * enum nft_payload_bases - nf_tables payload expression offset bases 586 * enum nft_payload_bases - nf_tables payload expression offset bases
509 * 587 *
diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h
index ba993360dbe9..773dfe8924c7 100644
--- a/include/uapi/linux/netfilter_bridge/ebtables.h
+++ b/include/uapi/linux/netfilter_bridge/ebtables.h
@@ -12,9 +12,7 @@
12 12
13#ifndef _UAPI__LINUX_BRIDGE_EFF_H 13#ifndef _UAPI__LINUX_BRIDGE_EFF_H
14#define _UAPI__LINUX_BRIDGE_EFF_H 14#define _UAPI__LINUX_BRIDGE_EFF_H
15#include <linux/if.h>
16#include <linux/netfilter_bridge.h> 15#include <linux/netfilter_bridge.h>
17#include <linux/if_ether.h>
18 16
19#define EBT_TABLE_MAXNAMELEN 32 17#define EBT_TABLE_MAXNAMELEN 32
20#define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN 18#define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN
diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h
index 4742f2cb42f2..d3bd6ffec041 100644
--- a/include/uapi/linux/nfsd/export.h
+++ b/include/uapi/linux/nfsd/export.h
@@ -47,7 +47,7 @@
47 * exported filesystem. 47 * exported filesystem.
48 */ 48 */
49#define NFSEXP_V4ROOT 0x10000 49#define NFSEXP_V4ROOT 0x10000
50#define NFSEXP_NOPNFS 0x20000 50#define NFSEXP_PNFS 0x20000
51 51
52/* All flags that we claim to support. (Note we don't support NOACL.) */ 52/* All flags that we claim to support. (Note we don't support NOACL.) */
53#define NFSEXP_ALLFLAGS 0x3FE7F 53#define NFSEXP_ALLFLAGS 0x3FE7F
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 68b294e83944..241220c43e86 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -25,6 +25,19 @@
25 * 25 *
26 */ 26 */
27 27
28/*
29 * This header file defines the userspace API to the wireless stack. Please
30 * be careful not to break things - i.e. don't move anything around or so
31 * unless you can demonstrate that it breaks neither API nor ABI.
32 *
33 * Additions to the API should be accompanied by actual implementations in
34 * an upstream driver, so that example implementations exist in case there
35 * are ever concerns about the precise semantics of the API or changes are
36 * needed, and to ensure that code for dead (no longer implemented) API
37 * can actually be identified and removed.
38 * Nonetheless, semantics should also be documented carefully in this file.
39 */
40
28#include <linux/types.h> 41#include <linux/types.h>
29 42
30#define NL80211_GENL_NAME "nl80211" 43#define NL80211_GENL_NAME "nl80211"
@@ -1684,6 +1697,10 @@ enum nl80211_commands {
1684 * If set during scheduled scan start then the new scan req will be 1697 * If set during scheduled scan start then the new scan req will be
1685 * owned by the netlink socket that created it and the scheduled scan will 1698 * owned by the netlink socket that created it and the scheduled scan will
1686 * be stopped when the socket is closed. 1699 * be stopped when the socket is closed.
1700 * If set during configuration of regulatory indoor operation then the
1701 * regulatory indoor configuration would be owned by the netlink socket
1702 * that configured the indoor setting, and the indoor operation would be
1703 * cleared when the socket is closed.
1687 * 1704 *
1688 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is 1705 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
1689 * the TDLS link initiator. 1706 * the TDLS link initiator.
@@ -1737,8 +1754,12 @@ enum nl80211_commands {
1737 * should be contained in the result as the sum of the respective counters 1754 * should be contained in the result as the sum of the respective counters
1738 * over all channels. 1755 * over all channels.
1739 * 1756 *
1740 * @NL80211_ATTR_SCHED_SCAN_DELAY: delay before a scheduled scan (or a 1757 * @NL80211_ATTR_SCHED_SCAN_DELAY: delay before the first cycle of a
1741 * WoWLAN net-detect scan) is started, u32 in seconds. 1758 * scheduled scan (or a WoWLAN net-detect scan) is started, u32
1759 * in seconds.
1760
1761 * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device
1762 * is operating in an indoor environment.
1742 * 1763 *
1743 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 1764 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1744 * @NL80211_ATTR_MAX: highest attribute number currently defined 1765 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2107,6 +2128,8 @@ enum nl80211_attrs {
2107 2128
2108 NL80211_ATTR_SCHED_SCAN_DELAY, 2129 NL80211_ATTR_SCHED_SCAN_DELAY,
2109 2130
2131 NL80211_ATTR_REG_INDOOR,
2132
2110 /* add attributes here, update the policy in nl80211.c */ 2133 /* add attributes here, update the policy in nl80211.c */
2111 2134
2112 __NL80211_ATTR_AFTER_LAST, 2135 __NL80211_ATTR_AFTER_LAST,
@@ -3092,7 +3115,8 @@ enum nl80211_mesh_power_mode {
3092 * 3115 *
3093 * @NL80211_MESHCONF_PLINK_TIMEOUT: If no tx activity is seen from a STA we've 3116 * @NL80211_MESHCONF_PLINK_TIMEOUT: If no tx activity is seen from a STA we've
3094 * established peering with for longer than this time (in seconds), then 3117 * established peering with for longer than this time (in seconds), then
3095 * remove it from the STA's list of peers. Default is 30 minutes. 3118 * remove it from the STA's list of peers. You may set this to 0 to disable
3119 * the removal of the STA. Default is 30 minutes.
3096 * 3120 *
3097 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 3121 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
3098 */ 3122 */
@@ -3694,6 +3718,8 @@ struct nl80211_pattern_support {
3694 * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put 3718 * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put
3695 * the chip into a special state -- works best with chips that have 3719 * the chip into a special state -- works best with chips that have
3696 * support for low-power operation already (flag) 3720 * support for low-power operation already (flag)
3721 * Note that this mode is incompatible with all of the others, if
3722 * any others are even supported by the device.
3697 * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect 3723 * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect
3698 * is detected is implementation-specific (flag) 3724 * is detected is implementation-specific (flag)
3699 * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed 3725 * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed
@@ -4327,11 +4353,13 @@ enum nl80211_feature_flags {
4327 4353
4328/** 4354/**
4329 * enum nl80211_ext_feature_index - bit index of extended features. 4355 * enum nl80211_ext_feature_index - bit index of extended features.
4356 * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
4330 * 4357 *
4331 * @NUM_NL80211_EXT_FEATURES: number of extended features. 4358 * @NUM_NL80211_EXT_FEATURES: number of extended features.
4332 * @MAX_NL80211_EXT_FEATURES: highest extended feature index. 4359 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
4333 */ 4360 */
4334enum nl80211_ext_feature_index { 4361enum nl80211_ext_feature_index {
4362 NL80211_EXT_FEATURE_VHT_IBSS,
4335 4363
4336 /* add new features before the definition below */ 4364 /* add new features before the definition below */
4337 NUM_NL80211_EXT_FEATURES, 4365 NUM_NL80211_EXT_FEATURES,
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index 9b79abbd1ab8..309211b3eb67 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -152,21 +152,42 @@ enum perf_event_sample_format {
152 * The branch types can be combined, however BRANCH_ANY covers all types 152 * The branch types can be combined, however BRANCH_ANY covers all types
153 * of branches and therefore it supersedes all the other types. 153 * of branches and therefore it supersedes all the other types.
154 */ 154 */
155enum perf_branch_sample_type_shift {
156 PERF_SAMPLE_BRANCH_USER_SHIFT = 0, /* user branches */
157 PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 1, /* kernel branches */
158 PERF_SAMPLE_BRANCH_HV_SHIFT = 2, /* hypervisor branches */
159
160 PERF_SAMPLE_BRANCH_ANY_SHIFT = 3, /* any branch types */
161 PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 4, /* any call branch */
162 PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 5, /* any return branch */
163 PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 6, /* indirect calls */
164 PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 7, /* transaction aborts */
165 PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 8, /* in transaction */
166 PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 9, /* not in transaction */
167 PERF_SAMPLE_BRANCH_COND_SHIFT = 10, /* conditional branches */
168
169 PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, /* call/ret stack */
170
171 PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
172};
173
155enum perf_branch_sample_type { 174enum perf_branch_sample_type {
156 PERF_SAMPLE_BRANCH_USER = 1U << 0, /* user branches */ 175 PERF_SAMPLE_BRANCH_USER = 1U << PERF_SAMPLE_BRANCH_USER_SHIFT,
157 PERF_SAMPLE_BRANCH_KERNEL = 1U << 1, /* kernel branches */ 176 PERF_SAMPLE_BRANCH_KERNEL = 1U << PERF_SAMPLE_BRANCH_KERNEL_SHIFT,
158 PERF_SAMPLE_BRANCH_HV = 1U << 2, /* hypervisor branches */ 177 PERF_SAMPLE_BRANCH_HV = 1U << PERF_SAMPLE_BRANCH_HV_SHIFT,
159 178
160 PERF_SAMPLE_BRANCH_ANY = 1U << 3, /* any branch types */ 179 PERF_SAMPLE_BRANCH_ANY = 1U << PERF_SAMPLE_BRANCH_ANY_SHIFT,
161 PERF_SAMPLE_BRANCH_ANY_CALL = 1U << 4, /* any call branch */ 180 PERF_SAMPLE_BRANCH_ANY_CALL = 1U << PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT,
162 PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << 5, /* any return branch */ 181 PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT,
163 PERF_SAMPLE_BRANCH_IND_CALL = 1U << 6, /* indirect calls */ 182 PERF_SAMPLE_BRANCH_IND_CALL = 1U << PERF_SAMPLE_BRANCH_IND_CALL_SHIFT,
164 PERF_SAMPLE_BRANCH_ABORT_TX = 1U << 7, /* transaction aborts */ 183 PERF_SAMPLE_BRANCH_ABORT_TX = 1U << PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT,
165 PERF_SAMPLE_BRANCH_IN_TX = 1U << 8, /* in transaction */ 184 PERF_SAMPLE_BRANCH_IN_TX = 1U << PERF_SAMPLE_BRANCH_IN_TX_SHIFT,
166 PERF_SAMPLE_BRANCH_NO_TX = 1U << 9, /* not in transaction */ 185 PERF_SAMPLE_BRANCH_NO_TX = 1U << PERF_SAMPLE_BRANCH_NO_TX_SHIFT,
167 PERF_SAMPLE_BRANCH_COND = 1U << 10, /* conditional branches */ 186 PERF_SAMPLE_BRANCH_COND = 1U << PERF_SAMPLE_BRANCH_COND_SHIFT,
168 187
169 PERF_SAMPLE_BRANCH_MAX = 1U << 11, /* non-ABI */ 188 PERF_SAMPLE_BRANCH_CALL_STACK = 1U << PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT,
189
190 PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT,
170}; 191};
171 192
172#define PERF_SAMPLE_BRANCH_PLM_ALL \ 193#define PERF_SAMPLE_BRANCH_PLM_ALL \
@@ -240,6 +261,7 @@ enum perf_event_read_format {
240#define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ 261#define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */
241 /* add: sample_stack_user */ 262 /* add: sample_stack_user */
242#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ 263#define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */
264#define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */
243 265
244/* 266/*
245 * Hardware event_id to monitor via a performance monitoring event: 267 * Hardware event_id to monitor via a performance monitoring event:
@@ -305,7 +327,8 @@ struct perf_event_attr {
305 exclude_callchain_user : 1, /* exclude user callchains */ 327 exclude_callchain_user : 1, /* exclude user callchains */
306 mmap2 : 1, /* include mmap with inode data */ 328 mmap2 : 1, /* include mmap with inode data */
307 comm_exec : 1, /* flag comm events that are due to an exec */ 329 comm_exec : 1, /* flag comm events that are due to an exec */
308 __reserved_1 : 39; 330 use_clockid : 1, /* use @clockid for time fields */
331 __reserved_1 : 38;
309 332
310 union { 333 union {
311 __u32 wakeup_events; /* wakeup every n events */ 334 __u32 wakeup_events; /* wakeup every n events */
@@ -334,8 +357,7 @@ struct perf_event_attr {
334 */ 357 */
335 __u32 sample_stack_user; 358 __u32 sample_stack_user;
336 359
337 /* Align to u64. */ 360 __s32 clockid;
338 __u32 __reserved_2;
339 /* 361 /*
340 * Defines set of regs to dump for each sample 362 * Defines set of regs to dump for each sample
341 * state captured on: 363 * state captured on:
@@ -345,6 +367,12 @@ struct perf_event_attr {
345 * See asm/perf_regs.h for details. 367 * See asm/perf_regs.h for details.
346 */ 368 */
347 __u64 sample_regs_intr; 369 __u64 sample_regs_intr;
370
371 /*
372 * Wakeup watermark for AUX area
373 */
374 __u32 aux_watermark;
375 __u32 __reserved_2; /* align to __u64 */
348}; 376};
349 377
350#define perf_flags(attr) (*(&(attr)->read_format + 1)) 378#define perf_flags(attr) (*(&(attr)->read_format + 1))
@@ -360,6 +388,7 @@ struct perf_event_attr {
360#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) 388#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5)
361#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) 389#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
362#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) 390#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
391#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32)
363 392
364enum perf_event_ioc_flags { 393enum perf_event_ioc_flags {
365 PERF_IOC_FLAG_GROUP = 1U << 0, 394 PERF_IOC_FLAG_GROUP = 1U << 0,
@@ -500,9 +529,30 @@ struct perf_event_mmap_page {
500 * In this case the kernel will not over-write unread data. 529 * In this case the kernel will not over-write unread data.
501 * 530 *
502 * See perf_output_put_handle() for the data ordering. 531 * See perf_output_put_handle() for the data ordering.
532 *
533 * data_{offset,size} indicate the location and size of the perf record
534 * buffer within the mmapped area.
503 */ 535 */
504 __u64 data_head; /* head in the data section */ 536 __u64 data_head; /* head in the data section */
505 __u64 data_tail; /* user-space written tail */ 537 __u64 data_tail; /* user-space written tail */
538 __u64 data_offset; /* where the buffer starts */
539 __u64 data_size; /* data buffer size */
540
541 /*
542 * AUX area is defined by aux_{offset,size} fields that should be set
543 * by the userspace, so that
544 *
545 * aux_offset >= data_offset + data_size
546 *
547 * prior to mmap()ing it. Size of the mmap()ed area should be aux_size.
548 *
549 * Ring buffer pointers aux_{head,tail} have the same semantics as
550 * data_{head,tail} and same ordering rules apply.
551 */
552 __u64 aux_head;
553 __u64 aux_tail;
554 __u64 aux_offset;
555 __u64 aux_size;
506}; 556};
507 557
508#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) 558#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)
@@ -725,6 +775,31 @@ enum perf_event_type {
725 */ 775 */
726 PERF_RECORD_MMAP2 = 10, 776 PERF_RECORD_MMAP2 = 10,
727 777
778 /*
779 * Records that new data landed in the AUX buffer part.
780 *
781 * struct {
782 * struct perf_event_header header;
783 *
784 * u64 aux_offset;
785 * u64 aux_size;
786 * u64 flags;
787 * struct sample_id sample_id;
788 * };
789 */
790 PERF_RECORD_AUX = 11,
791
792 /*
793 * Indicates that instruction trace has started
794 *
795 * struct {
796 * struct perf_event_header header;
797 * u32 pid;
798 * u32 tid;
799 * };
800 */
801 PERF_RECORD_ITRACE_START = 12,
802
728 PERF_RECORD_MAX, /* non-ABI */ 803 PERF_RECORD_MAX, /* non-ABI */
729}; 804};
730 805
@@ -742,6 +817,12 @@ enum perf_callchain_context {
742 PERF_CONTEXT_MAX = (__u64)-4095, 817 PERF_CONTEXT_MAX = (__u64)-4095,
743}; 818};
744 819
820/**
821 * PERF_RECORD_AUX::flags bits
822 */
823#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */
824#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */
825
745#define PERF_FLAG_FD_NO_GROUP (1UL << 0) 826#define PERF_FLAG_FD_NO_GROUP (1UL << 0)
746#define PERF_FLAG_FD_OUTPUT (1UL << 1) 827#define PERF_FLAG_FD_OUTPUT (1UL << 1)
747#define PERF_FLAG_PID_CGROUP (1UL << 2) /* pid=cgroup id, per-cpu mode only */ 828#define PERF_FLAG_PID_CGROUP (1UL << 2) /* pid=cgroup id, per-cpu mode only */
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index 25731dfb3fcc..bf08e76bf505 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -397,6 +397,8 @@ enum {
397 TCA_BPF_CLASSID, 397 TCA_BPF_CLASSID,
398 TCA_BPF_OPS_LEN, 398 TCA_BPF_OPS_LEN,
399 TCA_BPF_OPS, 399 TCA_BPF_OPS,
400 TCA_BPF_FD,
401 TCA_BPF_NAME,
400 __TCA_BPF_MAX, 402 __TCA_BPF_MAX,
401}; 403};
402 404
diff --git a/include/uapi/linux/quota.h b/include/uapi/linux/quota.h
index 1f49b8341c99..9c95b2c1c88a 100644
--- a/include/uapi/linux/quota.h
+++ b/include/uapi/linux/quota.h
@@ -36,11 +36,12 @@
36#include <linux/errno.h> 36#include <linux/errno.h>
37#include <linux/types.h> 37#include <linux/types.h>
38 38
39#define __DQUOT_VERSION__ "dquot_6.5.2" 39#define __DQUOT_VERSION__ "dquot_6.6.0"
40 40
41#define MAXQUOTAS 2 41#define MAXQUOTAS 3
42#define USRQUOTA 0 /* element used for user quotas */ 42#define USRQUOTA 0 /* element used for user quotas */
43#define GRPQUOTA 1 /* element used for group quotas */ 43#define GRPQUOTA 1 /* element used for group quotas */
44#define PRJQUOTA 2 /* element used for project quotas */
44 45
45/* 46/*
46 * Definitions for the default names of the quotas files. 47 * Definitions for the default names of the quotas files.
@@ -48,6 +49,7 @@
48#define INITQFNAMES { \ 49#define INITQFNAMES { \
49 "user", /* USRQUOTA */ \ 50 "user", /* USRQUOTA */ \
50 "group", /* GRPQUOTA */ \ 51 "group", /* GRPQUOTA */ \
52 "project", /* PRJQUOTA */ \
51 "undefined", \ 53 "undefined", \
52}; 54};
53 55
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 5cc5d66bf519..974db03f7b1a 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -134,6 +134,8 @@ enum {
134 134
135 RTM_NEWNSID = 88, 135 RTM_NEWNSID = 88,
136#define RTM_NEWNSID RTM_NEWNSID 136#define RTM_NEWNSID RTM_NEWNSID
137 RTM_DELNSID = 89,
138#define RTM_DELNSID RTM_DELNSID
137 RTM_GETNSID = 90, 139 RTM_GETNSID = 90,
138#define RTM_GETNSID RTM_GETNSID 140#define RTM_GETNSID RTM_GETNSID
139 141
@@ -303,6 +305,9 @@ enum rtattr_type_t {
303 RTA_TABLE, 305 RTA_TABLE,
304 RTA_MARK, 306 RTA_MARK,
305 RTA_MFC_STATS, 307 RTA_MFC_STATS,
308 RTA_VIA,
309 RTA_NEWDST,
310 RTA_PREF,
306 __RTA_MAX 311 __RTA_MAX
307}; 312};
308 313
@@ -332,6 +337,7 @@ struct rtnexthop {
332#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ 337#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
333#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ 338#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
334#define RTNH_F_ONLINK 4 /* Gateway is forced on link */ 339#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
340#define RTNH_F_EXTERNAL 8 /* Route installed externally */
335 341
336/* Macros to handle hexthops */ 342/* Macros to handle hexthops */
337 343
@@ -344,6 +350,12 @@ struct rtnexthop {
344#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) 350#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
345#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) 351#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
346 352
353/* RTA_VIA */
354struct rtvia {
355 __kernel_sa_family_t rtvia_family;
356 __u8 rtvia_addr[0];
357};
358
347/* RTM_CACHEINFO */ 359/* RTM_CACHEINFO */
348 360
349struct rta_cacheinfo { 361struct rta_cacheinfo {
@@ -623,6 +635,10 @@ enum rtnetlink_groups {
623#define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF 635#define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF
624 RTNLGRP_MDB, 636 RTNLGRP_MDB,
625#define RTNLGRP_MDB RTNLGRP_MDB 637#define RTNLGRP_MDB RTNLGRP_MDB
638 RTNLGRP_MPLS_ROUTE,
639#define RTNLGRP_MPLS_ROUTE RTNLGRP_MPLS_ROUTE
640 RTNLGRP_NSID,
641#define RTNLGRP_NSID RTNLGRP_NSID
626 __RTNLGRP_MAX 642 __RTNLGRP_MAX
627}; 643};
628#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) 644#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
index 5e0d0ed61cf3..25331f9faa76 100644
--- a/include/uapi/linux/serial.h
+++ b/include/uapi/linux/serial.h
@@ -65,6 +65,10 @@ struct serial_struct {
65#define SERIAL_IO_PORT 0 65#define SERIAL_IO_PORT 0
66#define SERIAL_IO_HUB6 1 66#define SERIAL_IO_HUB6 1
67#define SERIAL_IO_MEM 2 67#define SERIAL_IO_MEM 2
68#define SERIAL_IO_MEM32 3
69#define SERIAL_IO_AU 4
70#define SERIAL_IO_TSI 5
71#define SERIAL_IO_MEM32BE 6
68 72
69#define UART_CLEAR_FIFO 0x01 73#define UART_CLEAR_FIFO 0x01
70#define UART_USE_FIFO 0x02 74#define UART_USE_FIFO 0x02
diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild
index 19d5219b0b99..242cf0c6e33d 100644
--- a/include/uapi/linux/tc_act/Kbuild
+++ b/include/uapi/linux/tc_act/Kbuild
@@ -9,3 +9,4 @@ header-y += tc_pedit.h
9header-y += tc_skbedit.h 9header-y += tc_skbedit.h
10header-y += tc_vlan.h 10header-y += tc_vlan.h
11header-y += tc_bpf.h 11header-y += tc_bpf.h
12header-y += tc_connmark.h
diff --git a/include/uapi/linux/tc_act/tc_bpf.h b/include/uapi/linux/tc_act/tc_bpf.h
index 5288bd77e63b..07f17cc70bb3 100644
--- a/include/uapi/linux/tc_act/tc_bpf.h
+++ b/include/uapi/linux/tc_act/tc_bpf.h
@@ -24,6 +24,8 @@ enum {
24 TCA_ACT_BPF_PARMS, 24 TCA_ACT_BPF_PARMS,
25 TCA_ACT_BPF_OPS_LEN, 25 TCA_ACT_BPF_OPS_LEN,
26 TCA_ACT_BPF_OPS, 26 TCA_ACT_BPF_OPS,
27 TCA_ACT_BPF_FD,
28 TCA_ACT_BPF_NAME,
27 __TCA_ACT_BPF_MAX, 29 __TCA_ACT_BPF_MAX,
28}; 30};
29#define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1) 31#define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1)
diff --git a/include/uapi/linux/tipc_netlink.h b/include/uapi/linux/tipc_netlink.h
index 8d723824ad69..d4c8f142ba63 100644
--- a/include/uapi/linux/tipc_netlink.h
+++ b/include/uapi/linux/tipc_netlink.h
@@ -83,11 +83,20 @@ enum {
83 TIPC_NLA_BEARER_NAME, /* string */ 83 TIPC_NLA_BEARER_NAME, /* string */
84 TIPC_NLA_BEARER_PROP, /* nest */ 84 TIPC_NLA_BEARER_PROP, /* nest */
85 TIPC_NLA_BEARER_DOMAIN, /* u32 */ 85 TIPC_NLA_BEARER_DOMAIN, /* u32 */
86 TIPC_NLA_BEARER_UDP_OPTS, /* nest */
86 87
87 __TIPC_NLA_BEARER_MAX, 88 __TIPC_NLA_BEARER_MAX,
88 TIPC_NLA_BEARER_MAX = __TIPC_NLA_BEARER_MAX - 1 89 TIPC_NLA_BEARER_MAX = __TIPC_NLA_BEARER_MAX - 1
89}; 90};
90 91
92enum {
93 TIPC_NLA_UDP_UNSPEC,
94 TIPC_NLA_UDP_LOCAL, /* sockaddr_storage */
95 TIPC_NLA_UDP_REMOTE, /* sockaddr_storage */
96
97 __TIPC_NLA_UDP_MAX,
98 TIPC_NLA_UDP_MAX = __TIPC_NLA_UDP_MAX - 1
99};
91/* Socket info */ 100/* Socket info */
92enum { 101enum {
93 TIPC_NLA_SOCK_UNSPEC, 102 TIPC_NLA_SOCK_UNSPEC,
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 82889c30f4f5..b57b750c222f 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -160,6 +160,8 @@ struct vfio_device_info {
160 __u32 flags; 160 __u32 flags;
161#define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports reset */ 161#define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports reset */
162#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */ 162#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */
163#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */
164#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */
163 __u32 num_regions; /* Max region index + 1 */ 165 __u32 num_regions; /* Max region index + 1 */
164 __u32 num_irqs; /* Max IRQ index + 1 */ 166 __u32 num_irqs; /* Max IRQ index + 1 */
165}; 167};
diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h
index 3c53eec4ae22..19c66fcbab8a 100644
--- a/include/uapi/linux/virtio_blk.h
+++ b/include/uapi/linux/virtio_blk.h
@@ -60,7 +60,7 @@ struct virtio_blk_config {
60 __u32 size_max; 60 __u32 size_max;
61 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ 61 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
62 __u32 seg_max; 62 __u32 seg_max;
63 /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ 63 /* geometry of the device (if VIRTIO_BLK_F_GEOMETRY) */
64 struct virtio_blk_geometry { 64 struct virtio_blk_geometry {
65 __u16 cylinders; 65 __u16 cylinders;
66 __u8 heads; 66 __u8 heads;
@@ -119,7 +119,11 @@ struct virtio_blk_config {
119#define VIRTIO_BLK_T_BARRIER 0x80000000 119#define VIRTIO_BLK_T_BARRIER 0x80000000
120#endif /* !VIRTIO_BLK_NO_LEGACY */ 120#endif /* !VIRTIO_BLK_NO_LEGACY */
121 121
122/* This is the first element of the read scatter-gather list. */ 122/*
123 * This comes first in the read scatter-gather list.
124 * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated,
125 * this is the first element of the read scatter-gather list.
126 */
123struct virtio_blk_outhdr { 127struct virtio_blk_outhdr {
124 /* VIRTIO_BLK_T* */ 128 /* VIRTIO_BLK_T* */
125 __virtio32 type; 129 __virtio32 type;
diff --git a/include/uapi/linux/virtio_scsi.h b/include/uapi/linux/virtio_scsi.h
index 42b9370771b0..cc18ef8825c0 100644
--- a/include/uapi/linux/virtio_scsi.h
+++ b/include/uapi/linux/virtio_scsi.h
@@ -29,8 +29,16 @@
29 29
30#include <linux/virtio_types.h> 30#include <linux/virtio_types.h>
31 31
32#define VIRTIO_SCSI_CDB_SIZE 32 32/* Default values of the CDB and sense data size configuration fields */
33#define VIRTIO_SCSI_SENSE_SIZE 96 33#define VIRTIO_SCSI_CDB_DEFAULT_SIZE 32
34#define VIRTIO_SCSI_SENSE_DEFAULT_SIZE 96
35
36#ifndef VIRTIO_SCSI_CDB_SIZE
37#define VIRTIO_SCSI_CDB_SIZE VIRTIO_SCSI_CDB_DEFAULT_SIZE
38#endif
39#ifndef VIRTIO_SCSI_SENSE_SIZE
40#define VIRTIO_SCSI_SENSE_SIZE VIRTIO_SCSI_SENSE_DEFAULT_SIZE
41#endif
34 42
35/* SCSI command request, followed by data-out */ 43/* SCSI command request, followed by data-out */
36struct virtio_scsi_cmd_req { 44struct virtio_scsi_cmd_req {
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 02d5125a5ee8..2cd9e608d0d1 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_XFRM_H 1#ifndef _LINUX_XFRM_H
2#define _LINUX_XFRM_H 2#define _LINUX_XFRM_H
3 3
4#include <linux/in6.h>
4#include <linux/types.h> 5#include <linux/types.h>
5 6
6/* All of the structures in this file may not change size as they are 7/* All of the structures in this file may not change size as they are
@@ -13,6 +14,7 @@
13typedef union { 14typedef union {
14 __be32 a4; 15 __be32 a4;
15 __be32 a6[4]; 16 __be32 a6[4];
17 struct in6_addr in6;
16} xfrm_address_t; 18} xfrm_address_t;
17 19
18/* Ident of a specific xfrm_state. It is used on input to lookup 20/* Ident of a specific xfrm_state. It is used on input to lookup
diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h
index 09c8a00ea503..5a5fa4956ebd 100644
--- a/include/uapi/sound/asequencer.h
+++ b/include/uapi/sound/asequencer.h
@@ -22,6 +22,7 @@
22#ifndef _UAPI__SOUND_ASEQUENCER_H 22#ifndef _UAPI__SOUND_ASEQUENCER_H
23#define _UAPI__SOUND_ASEQUENCER_H 23#define _UAPI__SOUND_ASEQUENCER_H
24 24
25#include <sound/asound.h>
25 26
26/** version of the sequencer */ 27/** version of the sequencer */
27#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1) 28#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 0e88e7a0f0eb..46145a5277fe 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -25,6 +25,9 @@
25 25
26#include <linux/types.h> 26#include <linux/types.h>
27 27
28#ifndef __KERNEL__
29#include <stdlib.h>
30#endif
28 31
29/* 32/*
30 * protocol version 33 * protocol version
@@ -140,7 +143,7 @@ struct snd_hwdep_dsp_image {
140 * * 143 * *
141 *****************************************************************************/ 144 *****************************************************************************/
142 145
143#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 12) 146#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 13)
144 147
145typedef unsigned long snd_pcm_uframes_t; 148typedef unsigned long snd_pcm_uframes_t;
146typedef signed long snd_pcm_sframes_t; 149typedef signed long snd_pcm_sframes_t;
@@ -267,10 +270,17 @@ typedef int __bitwise snd_pcm_subformat_t;
267#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ 270#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
268#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ 271#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
269#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */ 272#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */
270#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* has audio wall clock for audio/system time sync */ 273#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */
274#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */
275#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */
276#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */
277#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */
278
271#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ 279#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */
272#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ 280#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
273 281
282
283
274typedef int __bitwise snd_pcm_state_t; 284typedef int __bitwise snd_pcm_state_t;
275#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */ 285#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */
276#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */ 286#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */
@@ -408,6 +418,22 @@ struct snd_pcm_channel_info {
408 unsigned int step; /* samples distance in bits */ 418 unsigned int step; /* samples distance in bits */
409}; 419};
410 420
421enum {
422 /*
423 * first definition for backwards compatibility only,
424 * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
425 */
426 SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
427
428 /* timestamp definitions */
429 SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */
430 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */
431 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */
432 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */
433 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */
434 SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
435};
436
411struct snd_pcm_status { 437struct snd_pcm_status {
412 snd_pcm_state_t state; /* stream state */ 438 snd_pcm_state_t state; /* stream state */
413 struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ 439 struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
@@ -419,9 +445,11 @@ struct snd_pcm_status {
419 snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */ 445 snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */
420 snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ 446 snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */
421 snd_pcm_state_t suspended_state; /* suspended stream state */ 447 snd_pcm_state_t suspended_state; /* suspended stream state */
422 __u32 reserved_alignment; /* must be filled with zero */ 448 __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */
423 struct timespec audio_tstamp; /* from sample counter or wall clock */ 449 struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */
424 unsigned char reserved[56-sizeof(struct timespec)]; /* must be filled with zero */ 450 struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */
451 __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */
452 unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */
425}; 453};
426 454
427struct snd_pcm_mmap_status { 455struct snd_pcm_mmap_status {
@@ -534,6 +562,7 @@ enum {
534#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) 562#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
535#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) 563#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
536#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) 564#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
565#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status)
537#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) 566#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
538#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) 567#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
539#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) 568#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h
index 22ed8cb7800b..e00d8cbfc628 100644
--- a/include/uapi/sound/compress_offload.h
+++ b/include/uapi/sound/compress_offload.h
@@ -75,7 +75,7 @@ struct snd_compr_tstamp {
75/** 75/**
76 * struct snd_compr_avail - avail descriptor 76 * struct snd_compr_avail - avail descriptor
77 * @avail: Number of bytes available in ring buffer for writing/reading 77 * @avail: Number of bytes available in ring buffer for writing/reading
78 * @tstamp: timestamp infomation 78 * @tstamp: timestamp information
79 */ 79 */
80struct snd_compr_avail { 80struct snd_compr_avail {
81 __u64 avail; 81 __u64 avail;
diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
index d1bbaf78457a..ec1535bb6aed 100644
--- a/include/uapi/sound/emu10k1.h
+++ b/include/uapi/sound/emu10k1.h
@@ -23,8 +23,7 @@
23#define _UAPI__SOUND_EMU10K1_H 23#define _UAPI__SOUND_EMU10K1_H
24 24
25#include <linux/types.h> 25#include <linux/types.h>
26 26#include <sound/asound.h>
27
28 27
29/* 28/*
30 * ---- FX8010 ---- 29 * ---- FX8010 ----
diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
index b357f1a5e29c..5737332d38f2 100644
--- a/include/uapi/sound/hdspm.h
+++ b/include/uapi/sound/hdspm.h
@@ -20,6 +20,12 @@
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 21 */
22 22
23#ifdef __KERNEL__
24#include <linux/types.h>
25#else
26#include <stdint.h>
27#endif
28
23/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ 29/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
24#define HDSPM_MAX_CHANNELS 64 30#define HDSPM_MAX_CHANNELS 64
25 31