mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-25 08:56:59 +08:00
Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linus
This commit is contained in:
@@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2)
|
||||
__SYSCALL(__NR_seccomp, sys_seccomp)
|
||||
#define __NR_getrandom 278
|
||||
__SYSCALL(__NR_getrandom, sys_getrandom)
|
||||
#define __NR_memfd_create 279
|
||||
__SYSCALL(__NR_memfd_create, sys_memfd_create)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 279
|
||||
#define __NR_syscalls 280
|
||||
|
||||
/*
|
||||
* All syscalls below here should go away really,
|
||||
|
||||
@@ -780,7 +780,7 @@ struct drm_prime_handle {
|
||||
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
* The device specific ioctl range is from 0x40 to 0x99.
|
||||
* The device specific ioctl range is from 0x40 to 0x9f.
|
||||
* Generic IOCTLS restart at 0xA0.
|
||||
*
|
||||
* \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
|
||||
|
||||
@@ -88,6 +88,11 @@
|
||||
#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
|
||||
#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
|
||||
|
||||
/* Picture aspect ratio options */
|
||||
#define DRM_MODE_PICTURE_ASPECT_NONE 0
|
||||
#define DRM_MODE_PICTURE_ASPECT_4_3 1
|
||||
#define DRM_MODE_PICTURE_ASPECT_16_9 2
|
||||
|
||||
/* Dithering mode options */
|
||||
#define DRM_MODE_DITHERING_OFF 0
|
||||
#define DRM_MODE_DITHERING_ON 1
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
#ifndef __NOUVEAU_DRM_H__
|
||||
#define __NOUVEAU_DRM_H__
|
||||
|
||||
#define DRM_NOUVEAU_EVENT_NVIF 0x80000000
|
||||
|
||||
/* reserved object handles when using deprecated object APIs - these
|
||||
* are here so that libdrm can allow interoperability with the new
|
||||
* object APIs
|
||||
*/
|
||||
#define NOUVEAU_ABI16_CLIENT 0xffffffff
|
||||
#define NOUVEAU_ABI16_DEVICE 0xdddddddd
|
||||
#define NOUVEAU_ABI16_CHAN(n) (0xcccc0000 | (n))
|
||||
|
||||
#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
|
||||
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
|
||||
#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
|
||||
@@ -123,6 +133,7 @@ struct drm_nouveau_gem_cpu_fini {
|
||||
#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */
|
||||
#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */
|
||||
#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */
|
||||
#define DRM_NOUVEAU_NVIF 0x07
|
||||
#define DRM_NOUVEAU_GEM_NEW 0x40
|
||||
#define DRM_NOUVEAU_GEM_PUSHBUF 0x41
|
||||
#define DRM_NOUVEAU_GEM_CPU_PREP 0x42
|
||||
|
||||
@@ -796,7 +796,9 @@ struct drm_radeon_gem_info {
|
||||
uint64_t vram_visible;
|
||||
};
|
||||
|
||||
#define RADEON_GEM_NO_BACKING_STORE 1
|
||||
#define RADEON_GEM_NO_BACKING_STORE (1 << 0)
|
||||
#define RADEON_GEM_GTT_UC (1 << 1)
|
||||
#define RADEON_GEM_GTT_WC (1 << 2)
|
||||
|
||||
struct drm_radeon_gem_create {
|
||||
uint64_t size;
|
||||
@@ -942,6 +944,7 @@ struct drm_radeon_cs_chunk {
|
||||
};
|
||||
|
||||
/* drm_radeon_cs_reloc.flags */
|
||||
#define RADEON_RELOC_PRIO_MASK (0xf << 0)
|
||||
|
||||
struct drm_radeon_cs_reloc {
|
||||
uint32_t handle;
|
||||
|
||||
@@ -129,6 +129,44 @@ struct drm_tegra_submit {
|
||||
__u32 reserved[5]; /* future expansion */
|
||||
};
|
||||
|
||||
#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0
|
||||
#define DRM_TEGRA_GEM_TILING_MODE_TILED 1
|
||||
#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2
|
||||
|
||||
struct drm_tegra_gem_set_tiling {
|
||||
/* input */
|
||||
__u32 handle;
|
||||
__u32 mode;
|
||||
__u32 value;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_tegra_gem_get_tiling {
|
||||
/* input */
|
||||
__u32 handle;
|
||||
/* output */
|
||||
__u32 mode;
|
||||
__u32 value;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)
|
||||
#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)
|
||||
|
||||
struct drm_tegra_gem_set_flags {
|
||||
/* input */
|
||||
__u32 handle;
|
||||
/* output */
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
struct drm_tegra_gem_get_flags {
|
||||
/* input */
|
||||
__u32 handle;
|
||||
/* output */
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
#define DRM_TEGRA_GEM_CREATE 0x00
|
||||
#define DRM_TEGRA_GEM_MMAP 0x01
|
||||
#define DRM_TEGRA_SYNCPT_READ 0x02
|
||||
@@ -139,6 +177,10 @@ struct drm_tegra_submit {
|
||||
#define DRM_TEGRA_GET_SYNCPT 0x07
|
||||
#define DRM_TEGRA_SUBMIT 0x08
|
||||
#define DRM_TEGRA_GET_SYNCPT_BASE 0x09
|
||||
#define DRM_TEGRA_GEM_SET_TILING 0x0a
|
||||
#define DRM_TEGRA_GEM_GET_TILING 0x0b
|
||||
#define DRM_TEGRA_GEM_SET_FLAGS 0x0c
|
||||
#define DRM_TEGRA_GEM_GET_FLAGS 0x0d
|
||||
|
||||
#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
|
||||
#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
|
||||
@@ -150,5 +192,9 @@ struct drm_tegra_submit {
|
||||
#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
|
||||
#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
|
||||
#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
|
||||
#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
|
||||
#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
|
||||
#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
|
||||
#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
|
||||
|
||||
/*
|
||||
* For flags member below
|
||||
* sg.h sg_io_hdr also has bits defined for it's flags member. However
|
||||
* none of these bits are implemented/used by bsg. The bits below are
|
||||
* allocated to not conflict with sg.h ones anyway.
|
||||
* For flag constants below:
|
||||
* sg.h sg_io_hdr also has bits defined for it's flags member. These
|
||||
* two flag values (0x10 and 0x20) have the same meaning in sg.h . For
|
||||
* bsg the BSG_FLAG_Q_AT_HEAD flag is ignored since it is the deafult.
|
||||
*/
|
||||
#define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */
|
||||
#define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */
|
||||
#define BSG_FLAG_Q_AT_HEAD 0x20
|
||||
|
||||
struct sg_io_v4 {
|
||||
__s32 guard; /* [i] 'Q' to differentiate from v3 */
|
||||
|
||||
@@ -27,6 +27,21 @@
|
||||
#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
|
||||
#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
|
||||
|
||||
/*
|
||||
* Set/Get seals
|
||||
*/
|
||||
#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
|
||||
/*
|
||||
* Types of seals
|
||||
*/
|
||||
#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
|
||||
#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
|
||||
#define F_SEAL_GROW 0x0004 /* prevent file from growing */
|
||||
#define F_SEAL_WRITE 0x0008 /* prevent writes */
|
||||
/* (1U << 31) is reserved for signed error codes */
|
||||
|
||||
/*
|
||||
* Types of directory notifications that may be requested.
|
||||
*/
|
||||
|
||||
@@ -233,7 +233,6 @@ struct in6_flowlabel_req {
|
||||
#if 0 /* not yet */
|
||||
#define IPV6_USE_MIN_MTU 63
|
||||
#endif
|
||||
#define IPV6_AUTOFLOWLABEL 64
|
||||
|
||||
/*
|
||||
* Netfilter (1)
|
||||
@@ -262,6 +261,7 @@ struct in6_flowlabel_req {
|
||||
* IP6T_SO_ORIGINAL_DST 80
|
||||
*/
|
||||
|
||||
#define IPV6_AUTOFLOWLABEL 70
|
||||
/* RFC5014: Source address selection */
|
||||
#define IPV6_ADDR_PREFERENCES 72
|
||||
|
||||
|
||||
@@ -13,6 +13,17 @@
|
||||
#define KEXEC_PRESERVE_CONTEXT 0x00000002
|
||||
#define KEXEC_ARCH_MASK 0xffff0000
|
||||
|
||||
/*
|
||||
* Kexec file load interface flags.
|
||||
* KEXEC_FILE_UNLOAD : Unload already loaded kexec/kdump image.
|
||||
* KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.
|
||||
* KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd
|
||||
* fd field.
|
||||
*/
|
||||
#define KEXEC_FILE_UNLOAD 0x00000001
|
||||
#define KEXEC_FILE_ON_CRASH 0x00000002
|
||||
#define KEXEC_FILE_NO_INITRAMFS 0x00000004
|
||||
|
||||
/* These values match the ELF architecture values.
|
||||
* Unless there is a good reason that should continue to be the case.
|
||||
*/
|
||||
|
||||
@@ -162,7 +162,7 @@ struct kvm_pit_config {
|
||||
#define KVM_EXIT_TPR_ACCESS 12
|
||||
#define KVM_EXIT_S390_SIEIC 13
|
||||
#define KVM_EXIT_S390_RESET 14
|
||||
#define KVM_EXIT_DCR 15
|
||||
#define KVM_EXIT_DCR 15 /* deprecated */
|
||||
#define KVM_EXIT_NMI 16
|
||||
#define KVM_EXIT_INTERNAL_ERROR 17
|
||||
#define KVM_EXIT_OSI 18
|
||||
@@ -268,7 +268,7 @@ struct kvm_run {
|
||||
__u64 trans_exc_code;
|
||||
__u32 pgm_code;
|
||||
} s390_ucontrol;
|
||||
/* KVM_EXIT_DCR */
|
||||
/* KVM_EXIT_DCR (deprecated) */
|
||||
struct {
|
||||
__u32 dcrn;
|
||||
__u32 data;
|
||||
@@ -763,6 +763,8 @@ struct kvm_ppc_smmu_info {
|
||||
#define KVM_CAP_VM_ATTRIBUTES 101
|
||||
#define KVM_CAP_ARM_PSCI_0_2 102
|
||||
#define KVM_CAP_PPC_FIXUP_HCALL 103
|
||||
#define KVM_CAP_PPC_ENABLE_HCALL 104
|
||||
#define KVM_CAP_CHECK_EXTENSION_VM 105
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
||||
8
include/uapi/linux/memfd.h
Normal file
8
include/uapi/linux/memfd.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _UAPI_LINUX_MEMFD_H
|
||||
#define _UAPI_LINUX_MEMFD_H
|
||||
|
||||
/* flags for memfd_create(2) (unsigned int) */
|
||||
#define MFD_CLOEXEC 0x0001U
|
||||
#define MFD_ALLOW_SEALING 0x0002U
|
||||
|
||||
#endif /* _UAPI_LINUX_MEMFD_H */
|
||||
@@ -76,5 +76,6 @@
|
||||
#define SERIO_HAMPSHIRE 0x3b
|
||||
#define SERIO_PS2MULT 0x3c
|
||||
#define SERIO_TSC40 0x3d
|
||||
#define SERIO_WACOM_IV 0x3e
|
||||
|
||||
#endif /* _UAPI_SERIO_H */
|
||||
|
||||
@@ -24,35 +24,23 @@
|
||||
#include <linux/hid.h>
|
||||
|
||||
enum uhid_event_type {
|
||||
UHID_CREATE,
|
||||
__UHID_LEGACY_CREATE,
|
||||
UHID_DESTROY,
|
||||
UHID_START,
|
||||
UHID_STOP,
|
||||
UHID_OPEN,
|
||||
UHID_CLOSE,
|
||||
UHID_OUTPUT,
|
||||
UHID_OUTPUT_EV, /* obsolete! */
|
||||
UHID_INPUT,
|
||||
UHID_FEATURE,
|
||||
UHID_FEATURE_ANSWER,
|
||||
__UHID_LEGACY_OUTPUT_EV,
|
||||
__UHID_LEGACY_INPUT,
|
||||
UHID_GET_REPORT,
|
||||
UHID_GET_REPORT_REPLY,
|
||||
UHID_CREATE2,
|
||||
UHID_INPUT2,
|
||||
UHID_SET_REPORT,
|
||||
UHID_SET_REPORT_REPLY,
|
||||
};
|
||||
|
||||
struct uhid_create_req {
|
||||
__u8 name[128];
|
||||
__u8 phys[64];
|
||||
__u8 uniq[64];
|
||||
__u8 __user *rd_data;
|
||||
__u16 rd_size;
|
||||
|
||||
__u16 bus;
|
||||
__u32 vendor;
|
||||
__u32 product;
|
||||
__u32 version;
|
||||
__u32 country;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_create2_req {
|
||||
__u8 name[128];
|
||||
__u8 phys[64];
|
||||
@@ -66,6 +54,16 @@ struct uhid_create2_req {
|
||||
__u8 rd_data[HID_MAX_DESCRIPTOR_SIZE];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
enum uhid_dev_flag {
|
||||
UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0),
|
||||
UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1),
|
||||
UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2),
|
||||
};
|
||||
|
||||
struct uhid_start_req {
|
||||
__u64 dev_flags;
|
||||
};
|
||||
|
||||
#define UHID_DATA_MAX 4096
|
||||
|
||||
enum uhid_report_type {
|
||||
@@ -74,11 +72,6 @@ enum uhid_report_type {
|
||||
UHID_INPUT_REPORT,
|
||||
};
|
||||
|
||||
struct uhid_input_req {
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
__u16 size;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_input2_req {
|
||||
__u16 size;
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
@@ -90,20 +83,83 @@ struct uhid_output_req {
|
||||
__u8 rtype;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Obsolete! Newer kernels will no longer send these events but instead convert
|
||||
* it into raw output reports via UHID_OUTPUT. */
|
||||
struct uhid_get_report_req {
|
||||
__u32 id;
|
||||
__u8 rnum;
|
||||
__u8 rtype;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_get_report_reply_req {
|
||||
__u32 id;
|
||||
__u16 err;
|
||||
__u16 size;
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_set_report_req {
|
||||
__u32 id;
|
||||
__u8 rnum;
|
||||
__u8 rtype;
|
||||
__u16 size;
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_set_report_reply_req {
|
||||
__u32 id;
|
||||
__u16 err;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/*
|
||||
* Compat Layer
|
||||
* All these commands and requests are obsolete. You should avoid using them in
|
||||
* new code. We support them for backwards-compatibility, but you might not get
|
||||
* access to new feature in case you use them.
|
||||
*/
|
||||
|
||||
enum uhid_legacy_event_type {
|
||||
UHID_CREATE = __UHID_LEGACY_CREATE,
|
||||
UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV,
|
||||
UHID_INPUT = __UHID_LEGACY_INPUT,
|
||||
UHID_FEATURE = UHID_GET_REPORT,
|
||||
UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY,
|
||||
};
|
||||
|
||||
/* Obsolete! Use UHID_CREATE2. */
|
||||
struct uhid_create_req {
|
||||
__u8 name[128];
|
||||
__u8 phys[64];
|
||||
__u8 uniq[64];
|
||||
__u8 __user *rd_data;
|
||||
__u16 rd_size;
|
||||
|
||||
__u16 bus;
|
||||
__u32 vendor;
|
||||
__u32 product;
|
||||
__u32 version;
|
||||
__u32 country;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Obsolete! Use UHID_INPUT2. */
|
||||
struct uhid_input_req {
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
__u16 size;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */
|
||||
struct uhid_output_ev_req {
|
||||
__u16 type;
|
||||
__u16 code;
|
||||
__s32 value;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */
|
||||
struct uhid_feature_req {
|
||||
__u32 id;
|
||||
__u8 rnum;
|
||||
__u8 rtype;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */
|
||||
struct uhid_feature_answer_req {
|
||||
__u32 id;
|
||||
__u16 err;
|
||||
@@ -111,6 +167,15 @@ struct uhid_feature_answer_req {
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/*
|
||||
* UHID Events
|
||||
* All UHID events from and to the kernel are encoded as "struct uhid_event".
|
||||
* The "type" field contains a UHID_* type identifier. All payload depends on
|
||||
* that type and can be accessed via ev->u.XYZ accordingly.
|
||||
* If user-space writes short events, they're extended with 0s by the kernel. If
|
||||
* the kernel writes short events, user-space shall extend them with 0s.
|
||||
*/
|
||||
|
||||
struct uhid_event {
|
||||
__u32 type;
|
||||
|
||||
@@ -120,9 +185,14 @@ struct uhid_event {
|
||||
struct uhid_output_req output;
|
||||
struct uhid_output_ev_req output_ev;
|
||||
struct uhid_feature_req feature;
|
||||
struct uhid_get_report_req get_report;
|
||||
struct uhid_feature_answer_req feature_answer;
|
||||
struct uhid_get_report_reply_req get_report_reply;
|
||||
struct uhid_create2_req create2;
|
||||
struct uhid_input2_req input2;
|
||||
struct uhid_set_report_req set_report;
|
||||
struct uhid_set_report_reply_req set_report_reply;
|
||||
struct uhid_start_req start;
|
||||
} u;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
|
||||
@@ -84,6 +84,15 @@ struct uinput_ff_erase {
|
||||
*/
|
||||
#define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len)
|
||||
|
||||
/**
|
||||
* UI_GET_VERSION - Return version of uinput protocol
|
||||
*
|
||||
* This writes uinput protocol version implemented by the kernel into
|
||||
* the integer pointed to by the ioctl argument. The protocol version
|
||||
* is hard-coded in the kernel and is independent of the uinput device.
|
||||
*/
|
||||
#define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int)
|
||||
|
||||
/*
|
||||
* To write a force-feedback-capable driver, the upload_effect
|
||||
* and erase_effect callbacks in input_dev must be implemented.
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
*/
|
||||
#define VFIO_DMA_CC_IOMMU 4
|
||||
|
||||
/* Check if EEH is supported */
|
||||
#define VFIO_EEH 5
|
||||
|
||||
/*
|
||||
* The IOCTL interface is designed for extensibility by embedding the
|
||||
* structure length (argsz) and flags into structures passed between
|
||||
@@ -455,6 +458,37 @@ struct vfio_iommu_spapr_tce_info {
|
||||
|
||||
#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
|
||||
|
||||
/*
|
||||
* EEH PE operation struct provides ways to:
|
||||
* - enable/disable EEH functionality;
|
||||
* - unfreeze IO/DMA for frozen PE;
|
||||
* - read PE state;
|
||||
* - reset PE;
|
||||
* - configure PE.
|
||||
*/
|
||||
struct vfio_eeh_pe_op {
|
||||
__u32 argsz;
|
||||
__u32 flags;
|
||||
__u32 op;
|
||||
};
|
||||
|
||||
#define VFIO_EEH_PE_DISABLE 0 /* Disable EEH functionality */
|
||||
#define VFIO_EEH_PE_ENABLE 1 /* Enable EEH functionality */
|
||||
#define VFIO_EEH_PE_UNFREEZE_IO 2 /* Enable IO for frozen PE */
|
||||
#define VFIO_EEH_PE_UNFREEZE_DMA 3 /* Enable DMA for frozen PE */
|
||||
#define VFIO_EEH_PE_GET_STATE 4 /* PE state retrieval */
|
||||
#define VFIO_EEH_PE_STATE_NORMAL 0 /* PE in functional state */
|
||||
#define VFIO_EEH_PE_STATE_RESET 1 /* PE reset in progress */
|
||||
#define VFIO_EEH_PE_STATE_STOPPED 2 /* Stopped DMA and IO */
|
||||
#define VFIO_EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */
|
||||
#define VFIO_EEH_PE_STATE_UNAVAIL 5 /* State unavailable */
|
||||
#define VFIO_EEH_PE_RESET_DEACTIVATE 5 /* Deassert PE reset */
|
||||
#define VFIO_EEH_PE_RESET_HOT 6 /* Assert hot reset */
|
||||
#define VFIO_EEH_PE_RESET_FUNDAMENTAL 7 /* Assert fundamental reset */
|
||||
#define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration */
|
||||
|
||||
#define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21)
|
||||
|
||||
/* ***************************************************************** */
|
||||
|
||||
#endif /* _UAPIVFIO_H */
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
|
||||
#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
|
||||
#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
|
||||
#define VIRTIO_BLK_F_MQ 12 /* support more than one vq */
|
||||
|
||||
#ifndef __KERNEL__
|
||||
/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
|
||||
@@ -77,6 +78,10 @@ struct virtio_blk_config {
|
||||
|
||||
/* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
|
||||
__u8 wce;
|
||||
__u8 unused;
|
||||
|
||||
/* number of vqs, only available when VIRTIO_BLK_F_MQ is set */
|
||||
__u16 num_queues;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
|
||||
@@ -191,6 +191,45 @@ struct ib_user_mad_reg_req {
|
||||
__u8 rmpp_version;
|
||||
};
|
||||
|
||||
/**
|
||||
* ib_user_mad_reg_req2 - MAD registration request
|
||||
*
|
||||
* @id - Set by the _kernel_; used by userspace to identify the
|
||||
* registered agent in future requests.
|
||||
* @qpn - Queue pair number; must be 0 or 1.
|
||||
* @mgmt_class - Indicates which management class of MADs should be
|
||||
* receive by the caller. This field is only required if
|
||||
* the user wishes to receive unsolicited MADs, otherwise
|
||||
* it should be 0.
|
||||
* @mgmt_class_version - Indicates which version of MADs for the given
|
||||
* management class to receive.
|
||||
* @res - Ignored.
|
||||
* @flags - additional registration flags; Must be in the set of
|
||||
* flags defined in IB_USER_MAD_REG_FLAGS_CAP
|
||||
* @method_mask - The caller wishes to receive unsolicited MADs for the
|
||||
* methods whose bit(s) is(are) set.
|
||||
* @oui - Indicates IEEE OUI to use when mgmt_class is a vendor
|
||||
* class in the range from 0x30 to 0x4f. Otherwise not
|
||||
* used.
|
||||
* @rmpp_version - If set, indicates the RMPP version to use.
|
||||
*/
|
||||
enum {
|
||||
IB_USER_MAD_USER_RMPP = (1 << 0),
|
||||
};
|
||||
#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
|
||||
struct ib_user_mad_reg_req2 {
|
||||
__u32 id;
|
||||
__u32 qpn;
|
||||
__u8 mgmt_class;
|
||||
__u8 mgmt_class_version;
|
||||
__u16 res;
|
||||
__u32 flags;
|
||||
__u64 method_mask[2];
|
||||
__u32 oui;
|
||||
__u8 rmpp_version;
|
||||
__u8 reserved[3];
|
||||
};
|
||||
|
||||
#define IB_IOCTL_MAGIC 0x1b
|
||||
|
||||
#define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \
|
||||
@@ -200,4 +239,7 @@ struct ib_user_mad_reg_req {
|
||||
|
||||
#define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3)
|
||||
|
||||
#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, \
|
||||
struct ib_user_mad_reg_req2)
|
||||
|
||||
#endif /* IB_USER_MAD_H */
|
||||
|
||||
@@ -276,6 +276,22 @@ struct ib_uverbs_reg_mr_resp {
|
||||
__u32 rkey;
|
||||
};
|
||||
|
||||
struct ib_uverbs_rereg_mr {
|
||||
__u64 response;
|
||||
__u32 mr_handle;
|
||||
__u32 flags;
|
||||
__u64 start;
|
||||
__u64 length;
|
||||
__u64 hca_va;
|
||||
__u32 pd_handle;
|
||||
__u32 access_flags;
|
||||
};
|
||||
|
||||
struct ib_uverbs_rereg_mr_resp {
|
||||
__u32 lkey;
|
||||
__u32 rkey;
|
||||
};
|
||||
|
||||
struct ib_uverbs_dereg_mr {
|
||||
__u32 mr_handle;
|
||||
};
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define RDMA_USER_CM_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
#include <linux/in6.h>
|
||||
#include <rdma/ib_user_verbs.h>
|
||||
#include <rdma/ib_user_sa.h>
|
||||
|
||||
Reference in New Issue
Block a user