mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-31 08:16:39 +09:00
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -399,17 +399,12 @@ extern const struct fwnode_operations acpi_device_fwnode_ops;
|
||||
extern const struct fwnode_operations acpi_data_fwnode_ops;
|
||||
extern const struct fwnode_operations acpi_static_fwnode_ops;
|
||||
|
||||
bool is_acpi_device_node(const struct fwnode_handle *fwnode);
|
||||
bool is_acpi_data_node(const struct fwnode_handle *fwnode);
|
||||
|
||||
static inline bool is_acpi_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return !IS_ERR_OR_NULL(fwnode) &&
|
||||
(fwnode->ops == &acpi_device_fwnode_ops
|
||||
|| fwnode->ops == &acpi_data_fwnode_ops);
|
||||
}
|
||||
|
||||
static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return !IS_ERR_OR_NULL(fwnode) &&
|
||||
fwnode->ops == &acpi_device_fwnode_ops;
|
||||
return (is_acpi_device_node(fwnode) || is_acpi_data_node(fwnode));
|
||||
}
|
||||
|
||||
#define to_acpi_device_node(__fwnode) \
|
||||
@@ -422,11 +417,6 @@ static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
|
||||
NULL; \
|
||||
})
|
||||
|
||||
static inline bool is_acpi_data_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &acpi_data_fwnode_ops;
|
||||
}
|
||||
|
||||
#define to_acpi_data_node(__fwnode) \
|
||||
({ \
|
||||
typeof(__fwnode) __to_acpi_data_node_fwnode = __fwnode; \
|
||||
|
||||
@@ -115,15 +115,35 @@ do { \
|
||||
(__ret); \
|
||||
})
|
||||
|
||||
#define this_cpu_generic_read(pcp) \
|
||||
#define __this_cpu_generic_read_nopreempt(pcp) \
|
||||
({ \
|
||||
typeof(pcp) __ret; \
|
||||
preempt_disable_notrace(); \
|
||||
__ret = raw_cpu_generic_read(pcp); \
|
||||
__ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \
|
||||
preempt_enable_notrace(); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define __this_cpu_generic_read_noirq(pcp) \
|
||||
({ \
|
||||
typeof(pcp) __ret; \
|
||||
unsigned long __flags; \
|
||||
raw_local_irq_save(__flags); \
|
||||
__ret = raw_cpu_generic_read(pcp); \
|
||||
raw_local_irq_restore(__flags); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define this_cpu_generic_read(pcp) \
|
||||
({ \
|
||||
typeof(pcp) __ret; \
|
||||
if (__native_word(pcp)) \
|
||||
__ret = __this_cpu_generic_read_nopreempt(pcp); \
|
||||
else \
|
||||
__ret = __this_cpu_generic_read_noirq(pcp); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define this_cpu_generic_to_op(pcp, val, op) \
|
||||
do { \
|
||||
unsigned long __flags; \
|
||||
|
||||
17
include/dt-bindings/reset/snps,hsdk-reset.h
Normal file
17
include/dt-bindings/reset/snps,hsdk-reset.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* This header provides index for the HSDK reset controller.
|
||||
*/
|
||||
#ifndef _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
|
||||
#define _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
|
||||
|
||||
#define HSDK_APB_RESET 0
|
||||
#define HSDK_AXI_RESET 1
|
||||
#define HSDK_ETH_RESET 2
|
||||
#define HSDK_USB_RESET 3
|
||||
#define HSDK_SDIO_RESET 4
|
||||
#define HSDK_HDMI_RESET 5
|
||||
#define HSDK_GFX_RESET 6
|
||||
#define HSDK_DMAC_RESET 7
|
||||
#define HSDK_EBI_RESET 8
|
||||
|
||||
#endif /*_DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK*/
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* This header provides index for the HSDK v1 reset controller.
|
||||
*/
|
||||
#ifndef _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
|
||||
#define _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
|
||||
|
||||
#define HSDK_V1_APB_RESET 0
|
||||
#define HSDK_V1_AXI_RESET 1
|
||||
#define HSDK_V1_ETH_RESET 2
|
||||
#define HSDK_V1_USB_RESET 3
|
||||
#define HSDK_V1_SDIO_RESET 4
|
||||
#define HSDK_V1_HDMI_RESET 5
|
||||
#define HSDK_V1_GFX_RESET 6
|
||||
#define HSDK_V1_DMAC_RESET 7
|
||||
#define HSDK_V1_EBI_RESET 8
|
||||
|
||||
#endif /*_DT_BINDINGS_RESET_CONTROLLER_HSDK_V1*/
|
||||
@@ -314,11 +314,7 @@ void audit_core_dumps(long signr);
|
||||
|
||||
static inline void audit_seccomp(unsigned long syscall, long signr, int code)
|
||||
{
|
||||
if (!audit_enabled)
|
||||
return;
|
||||
|
||||
/* Force a record to be reported if a signal was delivered. */
|
||||
if (signr || unlikely(!audit_dummy_context()))
|
||||
if (audit_enabled && unlikely(!audit_dummy_context()))
|
||||
__audit_seccomp(syscall, signr, code);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
|
||||
int executable_stack);
|
||||
extern int transfer_args_to_stack(struct linux_binprm *bprm,
|
||||
unsigned long *sp_location);
|
||||
extern int bprm_change_interp(char *interp, struct linux_binprm *bprm);
|
||||
extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
|
||||
extern int copy_strings_kernel(int argc, const char *const *argv,
|
||||
struct linux_binprm *bprm);
|
||||
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
/**
|
||||
* FIELD_GET() - extract a bitfield element
|
||||
* @_mask: shifted mask defining the field's length and position
|
||||
* @_reg: 32bit value of entire bitfield
|
||||
* @_reg: value of entire bitfield
|
||||
*
|
||||
* FIELD_GET() extracts the field specified by @_mask from the
|
||||
* bitfield passed in as @_reg by masking and shifting it down.
|
||||
|
||||
@@ -551,6 +551,7 @@ struct request_queue {
|
||||
int node;
|
||||
#ifdef CONFIG_BLK_DEV_IO_TRACE
|
||||
struct blk_trace *blk_trace;
|
||||
struct mutex blk_trace_mutex;
|
||||
#endif
|
||||
/*
|
||||
* for flush operations
|
||||
|
||||
@@ -3,8 +3,27 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* CPU-up CPU-down
|
||||
*
|
||||
* BP AP BP AP
|
||||
*
|
||||
* OFFLINE OFFLINE
|
||||
* | ^
|
||||
* v |
|
||||
* BRINGUP_CPU->AP_OFFLINE BRINGUP_CPU <- AP_IDLE_DEAD (idle thread/play_dead)
|
||||
* | AP_OFFLINE
|
||||
* v (IRQ-off) ,---------------^
|
||||
* AP_ONLNE | (stop_machine)
|
||||
* | TEARDOWN_CPU <- AP_ONLINE_IDLE
|
||||
* | ^
|
||||
* v |
|
||||
* AP_ACTIVE AP_ACTIVE
|
||||
*/
|
||||
|
||||
enum cpuhp_state {
|
||||
CPUHP_OFFLINE,
|
||||
CPUHP_INVALID = -1,
|
||||
CPUHP_OFFLINE = 0,
|
||||
CPUHP_CREATE_THREADS,
|
||||
CPUHP_PERF_PREPARE,
|
||||
CPUHP_PERF_X86_PREPARE,
|
||||
|
||||
@@ -307,8 +307,6 @@ struct driver_attribute {
|
||||
size_t count);
|
||||
};
|
||||
|
||||
#define DRIVER_ATTR(_name, _mode, _show, _store) \
|
||||
struct driver_attribute driver_attr_##_name = __ATTR(_name, _mode, _show, _store)
|
||||
#define DRIVER_ATTR_RW(_name) \
|
||||
struct driver_attribute driver_attr_##_name = __ATTR_RW(_name)
|
||||
#define DRIVER_ATTR_RO(_name) \
|
||||
@@ -838,7 +836,7 @@ struct dev_links_info {
|
||||
* @driver_data: Private pointer for driver specific info.
|
||||
* @links: Links to suppliers and consumers of this device.
|
||||
* @power: For device power management.
|
||||
* See Documentation/power/admin-guide/devices.rst for details.
|
||||
* See Documentation/driver-api/pm/devices.rst for details.
|
||||
* @pm_domain: Provide callbacks that are executed during system suspend,
|
||||
* hibernation, system resume and during runtime PM transitions
|
||||
* along with subsystem-level and driver-level callbacks.
|
||||
|
||||
@@ -403,7 +403,7 @@ struct address_space {
|
||||
unsigned long flags; /* error bits */
|
||||
spinlock_t private_lock; /* for use by the address_space */
|
||||
gfp_t gfp_mask; /* implicit gfp mask for allocations */
|
||||
struct list_head private_list; /* ditto */
|
||||
struct list_head private_list; /* for use by the address_space */
|
||||
void *private_data; /* ditto */
|
||||
errseq_t wb_err;
|
||||
} __attribute__((aligned(sizeof(long)))) __randomize_layout;
|
||||
|
||||
@@ -111,6 +111,9 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
|
||||
int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
|
||||
unsigned int size, unsigned int *val);
|
||||
|
||||
int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
|
||||
unsigned int reset_length);
|
||||
|
||||
int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
|
||||
const struct iio_chan_spec *chan, int *val);
|
||||
int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,
|
||||
|
||||
@@ -529,6 +529,7 @@ int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code,
|
||||
|
||||
int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
|
||||
int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
|
||||
int input_ff_flush(struct input_dev *dev, struct file *file);
|
||||
|
||||
int input_ff_create_memless(struct input_dev *dev, void *data,
|
||||
int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
|
||||
|
||||
@@ -167,11 +167,11 @@ struct iommu_resv_region {
|
||||
* @map: map a physically contiguous memory region to an iommu domain
|
||||
* @unmap: unmap a physically contiguous memory region from an iommu domain
|
||||
* @map_sg: map a scatter-gather list of physically contiguous memory chunks
|
||||
* to an iommu domain
|
||||
* @flush_tlb_all: Synchronously flush all hardware TLBs for this domain
|
||||
* @tlb_range_add: Add a given iova range to the flush queue for this domain
|
||||
* @tlb_sync: Flush all queued ranges from the hardware TLBs and empty flush
|
||||
* queue
|
||||
* to an iommu domain
|
||||
* @iova_to_phys: translate iova to physical address
|
||||
* @add_device: add device to iommu grouping
|
||||
* @remove_device: remove device from iommu grouping
|
||||
|
||||
@@ -783,10 +783,7 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
|
||||
static inline
|
||||
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
|
||||
{
|
||||
if (!cpumask_empty(d->common->effective_affinity))
|
||||
return d->common->effective_affinity;
|
||||
|
||||
return d->common->affinity;
|
||||
return d->common->effective_affinity;
|
||||
}
|
||||
static inline void irq_data_update_effective_affinity(struct irq_data *d,
|
||||
const struct cpumask *m)
|
||||
|
||||
@@ -187,6 +187,7 @@ struct key {
|
||||
#define KEY_FLAG_BUILTIN 8 /* set if key is built in to the kernel */
|
||||
#define KEY_FLAG_ROOT_CAN_INVAL 9 /* set if key can be invalidated by root without permission */
|
||||
#define KEY_FLAG_KEEP 10 /* set if key should not be removed */
|
||||
#define KEY_FLAG_UID_KEYRING 11 /* set if key is a user or user session keyring */
|
||||
|
||||
/* the key type and key description string
|
||||
* - the desc is used to match a key against search criteria
|
||||
@@ -243,6 +244,7 @@ extern struct key *key_alloc(struct key_type *type,
|
||||
#define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */
|
||||
#define KEY_ALLOC_BUILT_IN 0x0004 /* Key is built into kernel */
|
||||
#define KEY_ALLOC_BYPASS_RESTRICTION 0x0008 /* Override the check on restricted keyrings */
|
||||
#define KEY_ALLOC_UID_KEYRING 0x0010 /* allocating a user or user session keyring */
|
||||
|
||||
extern void key_revoke(struct key *key);
|
||||
extern void key_invalidate(struct key *key);
|
||||
|
||||
@@ -980,7 +980,6 @@ enum mlx5_cap_type {
|
||||
MLX5_CAP_RESERVED,
|
||||
MLX5_CAP_VECTOR_CALC,
|
||||
MLX5_CAP_QOS,
|
||||
MLX5_CAP_FPGA,
|
||||
/* NUM OF CAP Types */
|
||||
MLX5_CAP_NUM
|
||||
};
|
||||
@@ -1110,10 +1109,10 @@ enum mlx5_mcam_feature_groups {
|
||||
MLX5_GET(mcam_reg, (mdev)->caps.mcam, mng_feature_cap_mask.enhanced_features.fld)
|
||||
|
||||
#define MLX5_CAP_FPGA(mdev, cap) \
|
||||
MLX5_GET(fpga_cap, (mdev)->caps.hca_cur[MLX5_CAP_FPGA], cap)
|
||||
MLX5_GET(fpga_cap, (mdev)->caps.fpga, cap)
|
||||
|
||||
#define MLX5_CAP64_FPGA(mdev, cap) \
|
||||
MLX5_GET64(fpga_cap, (mdev)->caps.hca_cur[MLX5_CAP_FPGA], cap)
|
||||
MLX5_GET64(fpga_cap, (mdev)->caps.fpga, cap)
|
||||
|
||||
enum {
|
||||
MLX5_CMD_STAT_OK = 0x0,
|
||||
|
||||
@@ -774,6 +774,7 @@ struct mlx5_core_dev {
|
||||
u32 hca_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
|
||||
u32 pcam[MLX5_ST_SZ_DW(pcam_reg)];
|
||||
u32 mcam[MLX5_ST_SZ_DW(mcam_reg)];
|
||||
u32 fpga[MLX5_ST_SZ_DW(fpga_cap)];
|
||||
} caps;
|
||||
phys_addr_t iseg_base;
|
||||
struct mlx5_init_seg __iomem *iseg;
|
||||
|
||||
@@ -327,7 +327,8 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
|
||||
u8 reserved_at_80[0x18];
|
||||
u8 log_max_destination[0x8];
|
||||
|
||||
u8 reserved_at_a0[0x18];
|
||||
u8 log_max_flow_counter[0x8];
|
||||
u8 reserved_at_a8[0x10];
|
||||
u8 log_max_flow[0x8];
|
||||
|
||||
u8 reserved_at_c0[0x40];
|
||||
|
||||
@@ -240,7 +240,7 @@ extern unsigned int kobjsize(const void *objp);
|
||||
|
||||
#if defined(CONFIG_X86_INTEL_MPX)
|
||||
/* MPX specific bounds table or bounds directory */
|
||||
# define VM_MPX VM_HIGH_ARCH_BIT_4
|
||||
# define VM_MPX VM_HIGH_ARCH_4
|
||||
#else
|
||||
# define VM_MPX VM_NONE
|
||||
#endif
|
||||
|
||||
@@ -316,7 +316,7 @@ struct mmc_host {
|
||||
#define MMC_CAP_UHS_SDR50 (1 << 18) /* Host supports UHS SDR50 mode */
|
||||
#define MMC_CAP_UHS_SDR104 (1 << 19) /* Host supports UHS SDR104 mode */
|
||||
#define MMC_CAP_UHS_DDR50 (1 << 20) /* Host supports UHS DDR50 mode */
|
||||
#define MMC_CAP_NO_BOUNCE_BUFF (1 << 21) /* Disable bounce buffers on host */
|
||||
/* (1 << 21) is free for reuse */
|
||||
#define MMC_CAP_DRIVER_TYPE_A (1 << 23) /* Host supports Driver Type A */
|
||||
#define MMC_CAP_DRIVER_TYPE_C (1 << 24) /* Host supports Driver Type C */
|
||||
#define MMC_CAP_DRIVER_TYPE_D (1 << 25) /* Host supports Driver Type D */
|
||||
|
||||
@@ -400,6 +400,11 @@ extern void mmu_notifier_synchronize(void);
|
||||
|
||||
#else /* CONFIG_MMU_NOTIFIER */
|
||||
|
||||
static inline int mm_has_notifiers(struct mm_struct *mm)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void mmu_notifier_release(struct mm_struct *mm)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1094,8 +1094,14 @@ static inline unsigned long early_pfn_to_nid(unsigned long pfn)
|
||||
#error Allocator MAX_ORDER exceeds SECTION_SIZE
|
||||
#endif
|
||||
|
||||
#define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT)
|
||||
#define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT)
|
||||
static inline unsigned long pfn_to_section_nr(unsigned long pfn)
|
||||
{
|
||||
return pfn >> PFN_SECTION_SHIFT;
|
||||
}
|
||||
static inline unsigned long section_nr_to_pfn(unsigned long sec)
|
||||
{
|
||||
return sec << PFN_SECTION_SHIFT;
|
||||
}
|
||||
|
||||
#define SECTION_ALIGN_UP(pfn) (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK)
|
||||
#define SECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SECTION_MASK)
|
||||
|
||||
@@ -12,11 +12,31 @@
|
||||
|
||||
#ifdef CONFIG_LOCKUP_DETECTOR
|
||||
void lockup_detector_init(void);
|
||||
void lockup_detector_soft_poweroff(void);
|
||||
void lockup_detector_cleanup(void);
|
||||
bool is_hardlockup(void);
|
||||
|
||||
extern int watchdog_user_enabled;
|
||||
extern int nmi_watchdog_user_enabled;
|
||||
extern int soft_watchdog_user_enabled;
|
||||
extern int watchdog_thresh;
|
||||
extern unsigned long watchdog_enabled;
|
||||
|
||||
extern struct cpumask watchdog_cpumask;
|
||||
extern unsigned long *watchdog_cpumask_bits;
|
||||
#ifdef CONFIG_SMP
|
||||
extern int sysctl_softlockup_all_cpu_backtrace;
|
||||
extern int sysctl_hardlockup_all_cpu_backtrace;
|
||||
#else
|
||||
static inline void lockup_detector_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#define sysctl_softlockup_all_cpu_backtrace 0
|
||||
#define sysctl_hardlockup_all_cpu_backtrace 0
|
||||
#endif /* !CONFIG_SMP */
|
||||
|
||||
#else /* CONFIG_LOCKUP_DETECTOR */
|
||||
static inline void lockup_detector_init(void) { }
|
||||
static inline void lockup_detector_soft_poweroff(void) { }
|
||||
static inline void lockup_detector_cleanup(void) { }
|
||||
#endif /* !CONFIG_LOCKUP_DETECTOR */
|
||||
|
||||
#ifdef CONFIG_SOFTLOCKUP_DETECTOR
|
||||
extern void touch_softlockup_watchdog_sched(void);
|
||||
@@ -24,29 +44,17 @@ extern void touch_softlockup_watchdog(void);
|
||||
extern void touch_softlockup_watchdog_sync(void);
|
||||
extern void touch_all_softlockup_watchdogs(void);
|
||||
extern unsigned int softlockup_panic;
|
||||
extern int soft_watchdog_enabled;
|
||||
extern atomic_t watchdog_park_in_progress;
|
||||
#else
|
||||
static inline void touch_softlockup_watchdog_sched(void)
|
||||
{
|
||||
}
|
||||
static inline void touch_softlockup_watchdog(void)
|
||||
{
|
||||
}
|
||||
static inline void touch_softlockup_watchdog_sync(void)
|
||||
{
|
||||
}
|
||||
static inline void touch_all_softlockup_watchdogs(void)
|
||||
{
|
||||
}
|
||||
static inline void touch_softlockup_watchdog_sched(void) { }
|
||||
static inline void touch_softlockup_watchdog(void) { }
|
||||
static inline void touch_softlockup_watchdog_sync(void) { }
|
||||
static inline void touch_all_softlockup_watchdogs(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DETECT_HUNG_TASK
|
||||
void reset_hung_task_detector(void);
|
||||
#else
|
||||
static inline void reset_hung_task_detector(void)
|
||||
{
|
||||
}
|
||||
static inline void reset_hung_task_detector(void) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -54,12 +62,12 @@ static inline void reset_hung_task_detector(void)
|
||||
* 'watchdog_enabled' variable. Each lockup detector has its dedicated bit -
|
||||
* bit 0 for the hard lockup detector and bit 1 for the soft lockup detector.
|
||||
*
|
||||
* 'watchdog_user_enabled', 'nmi_watchdog_enabled' and 'soft_watchdog_enabled'
|
||||
* are variables that are only used as an 'interface' between the parameters
|
||||
* in /proc/sys/kernel and the internal state bits in 'watchdog_enabled'. The
|
||||
* 'watchdog_thresh' variable is handled differently because its value is not
|
||||
* boolean, and the lockup detectors are 'suspended' while 'watchdog_thresh'
|
||||
* is equal zero.
|
||||
* 'watchdog_user_enabled', 'nmi_watchdog_user_enabled' and
|
||||
* 'soft_watchdog_user_enabled' are variables that are only used as an
|
||||
* 'interface' between the parameters in /proc/sys/kernel and the internal
|
||||
* state bits in 'watchdog_enabled'. The 'watchdog_thresh' variable is
|
||||
* handled differently because its value is not boolean, and the lockup
|
||||
* detectors are 'suspended' while 'watchdog_thresh' is equal zero.
|
||||
*/
|
||||
#define NMI_WATCHDOG_ENABLED_BIT 0
|
||||
#define SOFT_WATCHDOG_ENABLED_BIT 1
|
||||
@@ -73,17 +81,41 @@ extern unsigned int hardlockup_panic;
|
||||
static inline void hardlockup_detector_disable(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
|
||||
# define NMI_WATCHDOG_SYSCTL_PERM 0644
|
||||
#else
|
||||
# define NMI_WATCHDOG_SYSCTL_PERM 0444
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HARDLOCKUP_DETECTOR_PERF)
|
||||
extern void arch_touch_nmi_watchdog(void);
|
||||
extern void hardlockup_detector_perf_stop(void);
|
||||
extern void hardlockup_detector_perf_restart(void);
|
||||
extern void hardlockup_detector_perf_disable(void);
|
||||
extern void hardlockup_detector_perf_enable(void);
|
||||
extern void hardlockup_detector_perf_cleanup(void);
|
||||
extern int hardlockup_detector_perf_init(void);
|
||||
#else
|
||||
#if !defined(CONFIG_HAVE_NMI_WATCHDOG)
|
||||
static inline void hardlockup_detector_perf_stop(void) { }
|
||||
static inline void hardlockup_detector_perf_restart(void) { }
|
||||
static inline void hardlockup_detector_perf_disable(void) { }
|
||||
static inline void hardlockup_detector_perf_enable(void) { }
|
||||
static inline void hardlockup_detector_perf_cleanup(void) { }
|
||||
# if !defined(CONFIG_HAVE_NMI_WATCHDOG)
|
||||
static inline int hardlockup_detector_perf_init(void) { return -ENODEV; }
|
||||
static inline void arch_touch_nmi_watchdog(void) {}
|
||||
# else
|
||||
static inline int hardlockup_detector_perf_init(void) { return 0; }
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void watchdog_nmi_stop(void);
|
||||
void watchdog_nmi_start(void);
|
||||
int watchdog_nmi_probe(void);
|
||||
|
||||
/**
|
||||
* touch_nmi_watchdog - restart NMI watchdog timeout.
|
||||
*
|
||||
*
|
||||
* If the architecture supports the NMI watchdog, touch_nmi_watchdog()
|
||||
* may be used to reset the timeout - for code which intentionally
|
||||
* disables interrupts for a long time. This call is stateless.
|
||||
@@ -153,22 +185,6 @@ static inline bool trigger_single_cpu_backtrace(int cpu)
|
||||
u64 hw_nmi_get_sample_period(int watchdog_thresh);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOCKUP_DETECTOR
|
||||
extern int nmi_watchdog_enabled;
|
||||
extern int watchdog_user_enabled;
|
||||
extern int watchdog_thresh;
|
||||
extern unsigned long watchdog_enabled;
|
||||
extern struct cpumask watchdog_cpumask;
|
||||
extern unsigned long *watchdog_cpumask_bits;
|
||||
extern int __read_mostly watchdog_suspended;
|
||||
#ifdef CONFIG_SMP
|
||||
extern int sysctl_softlockup_all_cpu_backtrace;
|
||||
extern int sysctl_hardlockup_all_cpu_backtrace;
|
||||
#else
|
||||
#define sysctl_softlockup_all_cpu_backtrace 0
|
||||
#define sysctl_hardlockup_all_cpu_backtrace 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \
|
||||
defined(CONFIG_HARDLOCKUP_DETECTOR)
|
||||
void watchdog_update_hrtimer_threshold(u64 period);
|
||||
@@ -176,7 +192,6 @@ void watchdog_update_hrtimer_threshold(u64 period);
|
||||
static inline void watchdog_update_hrtimer_threshold(u64 period) { }
|
||||
#endif
|
||||
|
||||
extern bool is_hardlockup(void);
|
||||
struct ctl_table;
|
||||
extern int proc_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
@@ -188,18 +203,6 @@ extern int proc_watchdog_thresh(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_watchdog_cpumask(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int lockup_detector_suspend(void);
|
||||
extern void lockup_detector_resume(void);
|
||||
#else
|
||||
static inline int lockup_detector_suspend(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void lockup_detector_resume(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
||||
#include <asm/nmi.h>
|
||||
|
||||
@@ -346,11 +346,6 @@ struct nvme_fc_remote_port {
|
||||
* indicating an FC transport Aborted status.
|
||||
* Entrypoint is Mandatory.
|
||||
*
|
||||
* @defer_rcv: Called by the transport to signal the LLLD that it has
|
||||
* begun processing of a previously received NVME CMD IU. The LLDD
|
||||
* is now free to re-use the rcv buffer associated with the
|
||||
* nvmefc_tgt_fcp_req.
|
||||
*
|
||||
* @max_hw_queues: indicates the maximum number of hw queues the LLDD
|
||||
* supports for cpu affinitization.
|
||||
* Value is Mandatory. Must be at least 1.
|
||||
@@ -806,11 +801,19 @@ struct nvmet_fc_target_port {
|
||||
* outstanding operation (if there was one) to complete, then will
|
||||
* call the fcp_req_release() callback to return the command's
|
||||
* exchange context back to the LLDD.
|
||||
* Entrypoint is Mandatory.
|
||||
*
|
||||
* @fcp_req_release: Called by the transport to return a nvmefc_tgt_fcp_req
|
||||
* to the LLDD after all operations on the fcp operation are complete.
|
||||
* This may be due to the command completing or upon completion of
|
||||
* abort cleanup.
|
||||
* Entrypoint is Mandatory.
|
||||
*
|
||||
* @defer_rcv: Called by the transport to signal the LLLD that it has
|
||||
* begun processing of a previously received NVME CMD IU. The LLDD
|
||||
* is now free to re-use the rcv buffer associated with the
|
||||
* nvmefc_tgt_fcp_req.
|
||||
* Entrypoint is Optional.
|
||||
*
|
||||
* @max_hw_queues: indicates the maximum number of hw queues the LLDD
|
||||
* supports for cpu affinitization.
|
||||
|
||||
@@ -471,12 +471,14 @@ enum nvme_opcode {
|
||||
*
|
||||
* @NVME_SGL_FMT_ADDRESS: absolute address of the data block
|
||||
* @NVME_SGL_FMT_OFFSET: relative offset of the in-capsule data block
|
||||
* @NVME_SGL_FMT_TRANSPORT_A: transport defined format, value 0xA
|
||||
* @NVME_SGL_FMT_INVALIDATE: RDMA transport specific remote invalidation
|
||||
* request subtype
|
||||
*/
|
||||
enum {
|
||||
NVME_SGL_FMT_ADDRESS = 0x00,
|
||||
NVME_SGL_FMT_OFFSET = 0x01,
|
||||
NVME_SGL_FMT_TRANSPORT_A = 0x0A,
|
||||
NVME_SGL_FMT_INVALIDATE = 0x0f,
|
||||
};
|
||||
|
||||
@@ -490,12 +492,16 @@ enum {
|
||||
*
|
||||
* For struct nvme_keyed_sgl_desc:
|
||||
* @NVME_KEY_SGL_FMT_DATA_DESC: keyed data block descriptor
|
||||
*
|
||||
* Transport-specific SGL types:
|
||||
* @NVME_TRANSPORT_SGL_DATA_DESC: Transport SGL data dlock descriptor
|
||||
*/
|
||||
enum {
|
||||
NVME_SGL_FMT_DATA_DESC = 0x00,
|
||||
NVME_SGL_FMT_SEG_DESC = 0x02,
|
||||
NVME_SGL_FMT_LAST_SEG_DESC = 0x03,
|
||||
NVME_KEY_SGL_FMT_DATA_DESC = 0x04,
|
||||
NVME_TRANSPORT_SGL_DATA_DESC = 0x05,
|
||||
};
|
||||
|
||||
struct nvme_sgl_desc {
|
||||
@@ -1127,19 +1133,6 @@ enum {
|
||||
NVME_SC_UNWRITTEN_BLOCK = 0x287,
|
||||
|
||||
NVME_SC_DNR = 0x4000,
|
||||
|
||||
|
||||
/*
|
||||
* FC Transport-specific error status values for NVME commands
|
||||
*
|
||||
* Transport-specific status code values must be in the range 0xB0..0xBF
|
||||
*/
|
||||
|
||||
/* Generic FC failure - catchall */
|
||||
NVME_SC_FC_TRANSPORT_ERROR = 0x00B0,
|
||||
|
||||
/* I/O failure due to FC ABTS'd */
|
||||
NVME_SC_FC_TRANSPORT_ABORTED = 0x00B1,
|
||||
};
|
||||
|
||||
struct nvme_completion {
|
||||
|
||||
@@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
|
||||
extern struct platform_device *of_device_alloc(struct device_node *np,
|
||||
const char *bus_id,
|
||||
struct device *parent);
|
||||
#ifdef CONFIG_OF
|
||||
extern struct platform_device *of_find_device_by_node(struct device_node *np);
|
||||
#else
|
||||
static inline struct platform_device *of_find_device_by_node(struct device_node *np)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Platform devices and busses creation */
|
||||
extern struct platform_device *of_platform_device_create(struct device_node *np,
|
||||
|
||||
@@ -1685,6 +1685,8 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
|
||||
|
||||
#define dev_is_pci(d) (false)
|
||||
#define dev_is_pf(d) (false)
|
||||
static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags)
|
||||
{ return false; }
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
/* Include architecture-dependent settings and functions */
|
||||
|
||||
@@ -65,25 +65,23 @@ struct task_group;
|
||||
*/
|
||||
|
||||
/* Used in tsk->state: */
|
||||
#define TASK_RUNNING 0
|
||||
#define TASK_INTERRUPTIBLE 1
|
||||
#define TASK_UNINTERRUPTIBLE 2
|
||||
#define __TASK_STOPPED 4
|
||||
#define __TASK_TRACED 8
|
||||
#define TASK_RUNNING 0x0000
|
||||
#define TASK_INTERRUPTIBLE 0x0001
|
||||
#define TASK_UNINTERRUPTIBLE 0x0002
|
||||
#define __TASK_STOPPED 0x0004
|
||||
#define __TASK_TRACED 0x0008
|
||||
/* Used in tsk->exit_state: */
|
||||
#define EXIT_DEAD 16
|
||||
#define EXIT_ZOMBIE 32
|
||||
#define EXIT_DEAD 0x0010
|
||||
#define EXIT_ZOMBIE 0x0020
|
||||
#define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
|
||||
/* Used in tsk->state again: */
|
||||
#define TASK_DEAD 64
|
||||
#define TASK_WAKEKILL 128
|
||||
#define TASK_WAKING 256
|
||||
#define TASK_PARKED 512
|
||||
#define TASK_NOLOAD 1024
|
||||
#define TASK_NEW 2048
|
||||
#define TASK_STATE_MAX 4096
|
||||
|
||||
#define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWPNn"
|
||||
#define TASK_PARKED 0x0040
|
||||
#define TASK_DEAD 0x0080
|
||||
#define TASK_WAKEKILL 0x0100
|
||||
#define TASK_WAKING 0x0200
|
||||
#define TASK_NOLOAD 0x0400
|
||||
#define TASK_NEW 0x0800
|
||||
#define TASK_STATE_MAX 0x1000
|
||||
|
||||
/* Convenience macros for the sake of set_current_state: */
|
||||
#define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE)
|
||||
@@ -99,7 +97,8 @@ struct task_group;
|
||||
/* get_task_state(): */
|
||||
#define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \
|
||||
TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \
|
||||
__TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD)
|
||||
__TASK_TRACED | EXIT_DEAD | EXIT_ZOMBIE | \
|
||||
TASK_PARKED)
|
||||
|
||||
#define task_is_traced(task) ((task->state & __TASK_TRACED) != 0)
|
||||
|
||||
@@ -1243,17 +1242,34 @@ static inline pid_t task_pgrp_nr(struct task_struct *tsk)
|
||||
return task_pgrp_nr_ns(tsk, &init_pid_ns);
|
||||
}
|
||||
|
||||
static inline char task_state_to_char(struct task_struct *task)
|
||||
#define TASK_REPORT_IDLE (TASK_REPORT + 1)
|
||||
#define TASK_REPORT_MAX (TASK_REPORT_IDLE << 1)
|
||||
|
||||
static inline unsigned int __get_task_state(struct task_struct *tsk)
|
||||
{
|
||||
const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
|
||||
unsigned long state = task->state;
|
||||
unsigned int tsk_state = READ_ONCE(tsk->state);
|
||||
unsigned int state = (tsk_state | tsk->exit_state) & TASK_REPORT;
|
||||
|
||||
state = state ? __ffs(state) + 1 : 0;
|
||||
BUILD_BUG_ON_NOT_POWER_OF_2(TASK_REPORT_MAX);
|
||||
|
||||
/* Make sure the string lines up properly with the number of task states: */
|
||||
BUILD_BUG_ON(sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1);
|
||||
if (tsk_state == TASK_IDLE)
|
||||
state = TASK_REPORT_IDLE;
|
||||
|
||||
return state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?';
|
||||
return fls(state);
|
||||
}
|
||||
|
||||
static inline char __task_state_to_char(unsigned int state)
|
||||
{
|
||||
static const char state_char[] = "RSDTtXZPI";
|
||||
|
||||
BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1);
|
||||
|
||||
return state_char[state];
|
||||
}
|
||||
|
||||
static inline char task_state_to_char(struct task_struct *tsk)
|
||||
{
|
||||
return __task_state_to_char(__get_task_state(tsk));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,6 +84,12 @@ static inline bool mmget_not_zero(struct mm_struct *mm)
|
||||
|
||||
/* mmput gets rid of the mappings and all user-space */
|
||||
extern void mmput(struct mm_struct *);
|
||||
#ifdef CONFIG_MMU
|
||||
/* same as above but performs the slow path from the async context. Can
|
||||
* be called from the atomic context as well
|
||||
*/
|
||||
void mmput_async(struct mm_struct *);
|
||||
#endif
|
||||
|
||||
/* Grab a reference to a task's mm, if it is not already going away */
|
||||
extern struct mm_struct *get_task_mm(struct task_struct *task);
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
#include <uapi/linux/seccomp.h>
|
||||
|
||||
#define SECCOMP_FILTER_FLAG_MASK (SECCOMP_FILTER_FLAG_TSYNC)
|
||||
#define SECCOMP_FILTER_FLAG_MASK (SECCOMP_FILTER_FLAG_TSYNC | \
|
||||
SECCOMP_FILTER_FLAG_LOG)
|
||||
|
||||
#ifdef CONFIG_SECCOMP
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
|
||||
}
|
||||
|
||||
void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread);
|
||||
int smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
|
||||
const struct cpumask *);
|
||||
void smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
|
||||
const struct cpumask *);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -221,22 +221,26 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
||||
} \
|
||||
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
|
||||
#ifdef TIF_FSCHECK
|
||||
/*
|
||||
* Called before coming back to user-mode. Returning to user-mode with an
|
||||
* address limit different than USER_DS can allow to overwrite kernel memory.
|
||||
*/
|
||||
static inline void addr_limit_user_check(void)
|
||||
{
|
||||
|
||||
#ifdef TIF_FSCHECK
|
||||
if (!test_thread_flag(TIF_FSCHECK))
|
||||
return;
|
||||
|
||||
BUG_ON(!segment_eq(get_fs(), USER_DS));
|
||||
clear_thread_flag(TIF_FSCHECK);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (CHECK_DATA_CORRUPTION(!segment_eq(get_fs(), USER_DS),
|
||||
"Invalid address limit on user-mode return"))
|
||||
force_sig(SIGKILL, current);
|
||||
|
||||
#ifdef TIF_FSCHECK
|
||||
clear_thread_flag(TIF_FSCHECK);
|
||||
#endif
|
||||
}
|
||||
|
||||
asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special,
|
||||
qid_t id, void __user *addr);
|
||||
asmlinkage long sys_time(time_t __user *tloc);
|
||||
|
||||
@@ -168,6 +168,20 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
|
||||
#define setup_pinned_deferrable_timer_on_stack(timer, fn, data) \
|
||||
__setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED)
|
||||
|
||||
#define TIMER_DATA_TYPE unsigned long
|
||||
#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE)
|
||||
|
||||
static inline void timer_setup(struct timer_list *timer,
|
||||
void (*callback)(struct timer_list *),
|
||||
unsigned int flags)
|
||||
{
|
||||
__setup_timer(timer, (TIMER_FUNC_TYPE)callback,
|
||||
(TIMER_DATA_TYPE)timer, flags);
|
||||
}
|
||||
|
||||
#define from_timer(var, callback_timer, timer_fieldname) \
|
||||
container_of(callback_timer, typeof(*var), timer_fieldname)
|
||||
|
||||
/**
|
||||
* timer_pending - is a timer pending?
|
||||
* @timer: the timer in question
|
||||
|
||||
@@ -272,6 +272,7 @@ struct trace_event_call {
|
||||
int perf_refcount;
|
||||
struct hlist_head __percpu *perf_events;
|
||||
struct bpf_prog *prog;
|
||||
struct perf_event *bpf_prog_owner;
|
||||
|
||||
int (*perf_perm)(struct trace_event_call *,
|
||||
struct perf_event *);
|
||||
|
||||
@@ -271,7 +271,7 @@ static inline void dst_use_noref(struct dst_entry *dst, unsigned long time)
|
||||
static inline struct dst_entry *dst_clone(struct dst_entry *dst)
|
||||
{
|
||||
if (dst)
|
||||
atomic_inc(&dst->__refcnt);
|
||||
dst_hold(dst);
|
||||
return dst;
|
||||
}
|
||||
|
||||
@@ -311,21 +311,6 @@ static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb
|
||||
__skb_dst_copy(nskb, oskb->_skb_refdst);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_dst_force - makes sure skb dst is refcounted
|
||||
* @skb: buffer
|
||||
*
|
||||
* If dst is not yet refcounted, let's do it
|
||||
*/
|
||||
static inline void skb_dst_force(struct sk_buff *skb)
|
||||
{
|
||||
if (skb_dst_is_noref(skb)) {
|
||||
WARN_ON(!rcu_read_lock_held());
|
||||
skb->_skb_refdst &= ~SKB_DST_NOREF;
|
||||
dst_clone(skb_dst(skb));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dst_hold_safe - Take a reference on a dst if possible
|
||||
* @dst: pointer to dst entry
|
||||
@@ -339,16 +324,17 @@ static inline bool dst_hold_safe(struct dst_entry *dst)
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_dst_force_safe - makes sure skb dst is refcounted
|
||||
* skb_dst_force - makes sure skb dst is refcounted
|
||||
* @skb: buffer
|
||||
*
|
||||
* If dst is not yet refcounted and not destroyed, grab a ref on it.
|
||||
*/
|
||||
static inline void skb_dst_force_safe(struct sk_buff *skb)
|
||||
static inline void skb_dst_force(struct sk_buff *skb)
|
||||
{
|
||||
if (skb_dst_is_noref(skb)) {
|
||||
struct dst_entry *dst = skb_dst(skb);
|
||||
|
||||
WARN_ON(!rcu_read_lock_held());
|
||||
if (!dst_hold_safe(dst))
|
||||
dst = NULL;
|
||||
|
||||
|
||||
@@ -773,7 +773,10 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
|
||||
*/
|
||||
static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(u8), &value);
|
||||
/* temporary variables to work around GCC PR81715 with asan-stack=1 */
|
||||
u8 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(u8), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -784,7 +787,9 @@ static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
|
||||
*/
|
||||
static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(u16), &value);
|
||||
u16 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(u16), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -795,7 +800,9 @@ static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
|
||||
*/
|
||||
static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__be16), &value);
|
||||
__be16 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(__be16), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -806,7 +813,9 @@ static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
|
||||
*/
|
||||
static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
|
||||
{
|
||||
return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, value);
|
||||
__be16 tmp = value;
|
||||
|
||||
return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -817,7 +826,9 @@ static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
|
||||
*/
|
||||
static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__le16), &value);
|
||||
__le16 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(__le16), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -828,7 +839,9 @@ static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
|
||||
*/
|
||||
static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(u32), &value);
|
||||
u32 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(u32), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -839,7 +852,9 @@ static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
|
||||
*/
|
||||
static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__be32), &value);
|
||||
__be32 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(__be32), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -850,7 +865,9 @@ static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
|
||||
*/
|
||||
static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
|
||||
{
|
||||
return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, value);
|
||||
__be32 tmp = value;
|
||||
|
||||
return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -861,7 +878,9 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
|
||||
*/
|
||||
static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(__le32), &value);
|
||||
__le32 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(__le32), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -874,7 +893,9 @@ static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
|
||||
static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
|
||||
u64 value, int padattr)
|
||||
{
|
||||
return nla_put_64bit(skb, attrtype, sizeof(u64), &value, padattr);
|
||||
u64 tmp = value;
|
||||
|
||||
return nla_put_64bit(skb, attrtype, sizeof(u64), &tmp, padattr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -887,7 +908,9 @@ static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
|
||||
static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
|
||||
int padattr)
|
||||
{
|
||||
return nla_put_64bit(skb, attrtype, sizeof(__be64), &value, padattr);
|
||||
__be64 tmp = value;
|
||||
|
||||
return nla_put_64bit(skb, attrtype, sizeof(__be64), &tmp, padattr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -900,7 +923,9 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
|
||||
static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
|
||||
int padattr)
|
||||
{
|
||||
return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, value,
|
||||
__be64 tmp = value;
|
||||
|
||||
return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, tmp,
|
||||
padattr);
|
||||
}
|
||||
|
||||
@@ -914,7 +939,9 @@ static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
|
||||
static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
|
||||
int padattr)
|
||||
{
|
||||
return nla_put_64bit(skb, attrtype, sizeof(__le64), &value, padattr);
|
||||
__le64 tmp = value;
|
||||
|
||||
return nla_put_64bit(skb, attrtype, sizeof(__le64), &tmp, padattr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -925,7 +952,9 @@ static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
|
||||
*/
|
||||
static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(s8), &value);
|
||||
s8 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(s8), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -936,7 +965,9 @@ static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
|
||||
*/
|
||||
static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(s16), &value);
|
||||
s16 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(s16), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -947,7 +978,9 @@ static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
|
||||
*/
|
||||
static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
|
||||
{
|
||||
return nla_put(skb, attrtype, sizeof(s32), &value);
|
||||
s32 tmp = value;
|
||||
|
||||
return nla_put(skb, attrtype, sizeof(s32), &tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -960,7 +993,9 @@ static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
|
||||
static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
|
||||
int padattr)
|
||||
{
|
||||
return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr);
|
||||
s64 tmp = value;
|
||||
|
||||
return nla_put_64bit(skb, attrtype, sizeof(s64), &tmp, padattr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1010,7 +1045,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
|
||||
static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype,
|
||||
__be32 addr)
|
||||
{
|
||||
return nla_put_be32(skb, attrtype, addr);
|
||||
__be32 tmp = addr;
|
||||
|
||||
return nla_put_be32(skb, attrtype, tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
/* This is used to register protocols. */
|
||||
struct net_protocol {
|
||||
void (*early_demux)(struct sk_buff *skb);
|
||||
void (*early_demux_handler)(struct sk_buff *skb);
|
||||
int (*early_demux)(struct sk_buff *skb);
|
||||
int (*early_demux_handler)(struct sk_buff *skb);
|
||||
int (*handler)(struct sk_buff *skb);
|
||||
void (*err_handler)(struct sk_buff *skb, u32 info);
|
||||
unsigned int no_policy:1,
|
||||
|
||||
@@ -175,7 +175,9 @@ static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4
|
||||
fl4->fl4_gre_key = gre_key;
|
||||
return ip_route_output_key(net, fl4);
|
||||
}
|
||||
|
||||
int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
u8 tos, struct net_device *dev,
|
||||
struct in_device *in_dev, u32 *itag);
|
||||
int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
u8 tos, struct net_device *devin);
|
||||
int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
@@ -190,7 +192,7 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
rcu_read_lock();
|
||||
err = ip_route_input_noref(skb, dst, src, tos, devin);
|
||||
if (!err) {
|
||||
skb_dst_force_safe(skb);
|
||||
skb_dst_force(skb);
|
||||
if (!skb_dst(skb))
|
||||
err = -EINVAL;
|
||||
}
|
||||
|
||||
@@ -856,7 +856,7 @@ void sk_stream_write_space(struct sock *sk);
|
||||
static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
/* dont let skb dst not refcounted, we are going to leave rcu lock */
|
||||
skb_dst_force_safe(skb);
|
||||
skb_dst_force(skb);
|
||||
|
||||
if (!sk->sk_backlog.tail)
|
||||
sk->sk_backlog.head = skb;
|
||||
|
||||
@@ -345,7 +345,7 @@ void tcp_v4_err(struct sk_buff *skb, u32);
|
||||
|
||||
void tcp_shutdown(struct sock *sk, int how);
|
||||
|
||||
void tcp_v4_early_demux(struct sk_buff *skb);
|
||||
int tcp_v4_early_demux(struct sk_buff *skb);
|
||||
int tcp_v4_rcv(struct sk_buff *skb);
|
||||
|
||||
int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
|
||||
@@ -544,7 +544,6 @@ u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now,
|
||||
int min_tso_segs);
|
||||
void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
|
||||
int nonagle);
|
||||
bool tcp_may_send_now(struct sock *sk);
|
||||
int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
|
||||
int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
|
||||
void tcp_retransmit_timer(struct sock *sk);
|
||||
|
||||
@@ -259,7 +259,7 @@ static inline struct sk_buff *skb_recv_udp(struct sock *sk, unsigned int flags,
|
||||
return __skb_recv_udp(sk, flags, noblock, &peeked, &off, err);
|
||||
}
|
||||
|
||||
void udp_v4_early_demux(struct sk_buff *skb);
|
||||
int udp_v4_early_demux(struct sk_buff *skb);
|
||||
bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst);
|
||||
int udp_get_port(struct sock *sk, unsigned short snum,
|
||||
int (*saddr_cmp)(const struct sock *,
|
||||
|
||||
@@ -285,7 +285,7 @@ enum ib_tm_cap_flags {
|
||||
IB_TM_CAP_RC = 1 << 0,
|
||||
};
|
||||
|
||||
struct ib_xrq_caps {
|
||||
struct ib_tm_caps {
|
||||
/* Max size of RNDV header */
|
||||
u32 max_rndv_hdr_size;
|
||||
/* Max number of entries in tag matching list */
|
||||
@@ -358,7 +358,7 @@ struct ib_device_attr {
|
||||
struct ib_rss_caps rss_caps;
|
||||
u32 max_wq_type_rq;
|
||||
u32 raw_packet_caps; /* Use ib_raw_packet_caps enum */
|
||||
struct ib_xrq_caps xrq_caps;
|
||||
struct ib_tm_caps tm_caps;
|
||||
};
|
||||
|
||||
enum ib_mtu {
|
||||
@@ -1739,7 +1739,7 @@ struct ib_mr {
|
||||
u32 lkey;
|
||||
u32 rkey;
|
||||
u64 iova;
|
||||
u32 length;
|
||||
u64 length;
|
||||
unsigned int page_size;
|
||||
bool need_inval;
|
||||
union {
|
||||
|
||||
@@ -192,6 +192,7 @@ struct scsi_device {
|
||||
unsigned no_dif:1; /* T10 PI (DIF) should be disabled */
|
||||
unsigned broken_fua:1; /* Don't set FUA bit */
|
||||
unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */
|
||||
unsigned unmap_limit_for_ws:1; /* Use the UNMAP limit for WRITE SAME */
|
||||
|
||||
atomic_t disk_events_disable_depth; /* disable depth for disk events */
|
||||
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
#define BLIST_TRY_VPD_PAGES 0x10000000 /* Attempt to read VPD pages */
|
||||
#define BLIST_NO_RSOC 0x20000000 /* don't try to issue RSOC */
|
||||
#define BLIST_MAX_1024 0x40000000 /* maximum 1024 sector cdb length */
|
||||
#define BLIST_UNMAP_LIMIT_WS 0x80000000 /* Use UNMAP limit for WRITE SAME */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -434,7 +434,6 @@ extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
|
||||
unsigned int target_id);
|
||||
extern void iscsi_remove_session(struct iscsi_cls_session *session);
|
||||
extern void iscsi_free_session(struct iscsi_cls_session *session);
|
||||
extern int iscsi_destroy_session(struct iscsi_cls_session *session);
|
||||
extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
|
||||
int dd_size, uint32_t cid);
|
||||
extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
|
||||
|
||||
@@ -95,6 +95,7 @@ enum {
|
||||
#define AC_VERB_SET_EAPD_BTLENABLE 0x70c
|
||||
#define AC_VERB_SET_DIGI_CONVERT_1 0x70d
|
||||
#define AC_VERB_SET_DIGI_CONVERT_2 0x70e
|
||||
#define AC_VERB_SET_DIGI_CONVERT_3 0x73e
|
||||
#define AC_VERB_SET_VOLUME_KNOB_CONTROL 0x70f
|
||||
#define AC_VERB_SET_GPIO_DATA 0x715
|
||||
#define AC_VERB_SET_GPIO_MASK 0x716
|
||||
|
||||
@@ -114,7 +114,10 @@ static inline long __trace_sched_switch_state(bool preempt, struct task_struct *
|
||||
* Preemption ignores task state, therefore preempted tasks are always
|
||||
* RUNNING (we will not have dequeued if state != RUNNING).
|
||||
*/
|
||||
return preempt ? TASK_RUNNING | TASK_STATE_MAX : p->state;
|
||||
if (preempt)
|
||||
return TASK_STATE_MAX;
|
||||
|
||||
return __get_task_state(p);
|
||||
}
|
||||
#endif /* CREATE_TRACE_POINTS */
|
||||
|
||||
@@ -152,12 +155,14 @@ TRACE_EVENT(sched_switch,
|
||||
|
||||
TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
|
||||
__entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
|
||||
__entry->prev_state & (TASK_STATE_MAX-1) ?
|
||||
__print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
|
||||
{ 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
|
||||
{ 16, "Z" }, { 32, "X" }, { 64, "x" },
|
||||
{ 128, "K" }, { 256, "W" }, { 512, "P" },
|
||||
{ 1024, "N" }) : "R",
|
||||
|
||||
(__entry->prev_state & (TASK_REPORT_MAX - 1)) ?
|
||||
__print_flags(__entry->prev_state & (TASK_REPORT_MAX - 1), "|",
|
||||
{ 0x01, "S" }, { 0x02, "D" }, { 0x04, "T" },
|
||||
{ 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" },
|
||||
{ 0x40, "P" }, { 0x80, "I" }) :
|
||||
"R",
|
||||
|
||||
__entry->prev_state & TASK_STATE_MAX ? "+" : "",
|
||||
__entry->next_comm, __entry->next_pid, __entry->next_prio)
|
||||
);
|
||||
|
||||
@@ -312,7 +312,7 @@ union bpf_attr {
|
||||
* jump into another BPF program
|
||||
* @ctx: context pointer passed to next program
|
||||
* @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY
|
||||
* @index: index inside array that selects specific program to run
|
||||
* @index: 32-bit index inside array that selects specific program to run
|
||||
* Return: 0 on success or negative error
|
||||
*
|
||||
* int bpf_clone_redirect(skb, ifindex, flags)
|
||||
|
||||
@@ -269,9 +269,9 @@ enum {
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 36
|
||||
#define DM_VERSION_MINOR 37
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2017-06-09)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2017-09-20)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
||||
@@ -1753,6 +1753,8 @@ enum ethtool_reset_flags {
|
||||
* %ethtool_link_mode_bit_indices for the link modes, and other
|
||||
* link features that the link partner advertised through
|
||||
* autonegotiation; 0 if unknown or not applicable. Read-only.
|
||||
* @transceiver: Used to distinguish different possible PHY types,
|
||||
* reported consistently by PHYLIB. Read-only.
|
||||
*
|
||||
* If autonegotiation is disabled, the speed and @duplex represent the
|
||||
* fixed link mode and are writable if the driver supports multiple
|
||||
@@ -1804,7 +1806,9 @@ struct ethtool_link_settings {
|
||||
__u8 eth_tp_mdix;
|
||||
__u8 eth_tp_mdix_ctrl;
|
||||
__s8 link_mode_masks_nwords;
|
||||
__u32 reserved[8];
|
||||
__u8 transceiver;
|
||||
__u8 reserved1[3];
|
||||
__u32 reserved[7];
|
||||
__u32 link_mode_masks[0];
|
||||
/* layout of link_mode_masks fields:
|
||||
* __u32 map_supported[link_mode_masks_nwords];
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
#ifndef KFD_IOCTL_H_INCLUDED
|
||||
#define KFD_IOCTL_H_INCLUDED
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <drm/drm.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define KFD_IOCTL_MAJOR_VERSION 1
|
||||
#define KFD_IOCTL_MINOR_VERSION 1
|
||||
|
||||
struct kfd_ioctl_get_version_args {
|
||||
uint32_t major_version; /* from KFD */
|
||||
uint32_t minor_version; /* from KFD */
|
||||
__u32 major_version; /* from KFD */
|
||||
__u32 minor_version; /* from KFD */
|
||||
};
|
||||
|
||||
/* For kfd_ioctl_create_queue_args.queue_type. */
|
||||
@@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args {
|
||||
#define KFD_MAX_QUEUE_PRIORITY 15
|
||||
|
||||
struct kfd_ioctl_create_queue_args {
|
||||
uint64_t ring_base_address; /* to KFD */
|
||||
uint64_t write_pointer_address; /* from KFD */
|
||||
uint64_t read_pointer_address; /* from KFD */
|
||||
uint64_t doorbell_offset; /* from KFD */
|
||||
__u64 ring_base_address; /* to KFD */
|
||||
__u64 write_pointer_address; /* from KFD */
|
||||
__u64 read_pointer_address; /* from KFD */
|
||||
__u64 doorbell_offset; /* from KFD */
|
||||
|
||||
uint32_t ring_size; /* to KFD */
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t queue_type; /* to KFD */
|
||||
uint32_t queue_percentage; /* to KFD */
|
||||
uint32_t queue_priority; /* to KFD */
|
||||
uint32_t queue_id; /* from KFD */
|
||||
__u32 ring_size; /* to KFD */
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 queue_type; /* to KFD */
|
||||
__u32 queue_percentage; /* to KFD */
|
||||
__u32 queue_priority; /* to KFD */
|
||||
__u32 queue_id; /* from KFD */
|
||||
|
||||
uint64_t eop_buffer_address; /* to KFD */
|
||||
uint64_t eop_buffer_size; /* to KFD */
|
||||
uint64_t ctx_save_restore_address; /* to KFD */
|
||||
uint64_t ctx_save_restore_size; /* to KFD */
|
||||
__u64 eop_buffer_address; /* to KFD */
|
||||
__u64 eop_buffer_size; /* to KFD */
|
||||
__u64 ctx_save_restore_address; /* to KFD */
|
||||
__u64 ctx_save_restore_size; /* to KFD */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_destroy_queue_args {
|
||||
uint32_t queue_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 queue_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_update_queue_args {
|
||||
uint64_t ring_base_address; /* to KFD */
|
||||
__u64 ring_base_address; /* to KFD */
|
||||
|
||||
uint32_t queue_id; /* to KFD */
|
||||
uint32_t ring_size; /* to KFD */
|
||||
uint32_t queue_percentage; /* to KFD */
|
||||
uint32_t queue_priority; /* to KFD */
|
||||
__u32 queue_id; /* to KFD */
|
||||
__u32 ring_size; /* to KFD */
|
||||
__u32 queue_percentage; /* to KFD */
|
||||
__u32 queue_priority; /* to KFD */
|
||||
};
|
||||
|
||||
/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
|
||||
@@ -80,13 +80,13 @@ struct kfd_ioctl_update_queue_args {
|
||||
#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
|
||||
|
||||
struct kfd_ioctl_set_memory_policy_args {
|
||||
uint64_t alternate_aperture_base; /* to KFD */
|
||||
uint64_t alternate_aperture_size; /* to KFD */
|
||||
__u64 alternate_aperture_base; /* to KFD */
|
||||
__u64 alternate_aperture_size; /* to KFD */
|
||||
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t default_policy; /* to KFD */
|
||||
uint32_t alternate_policy; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 default_policy; /* to KFD */
|
||||
__u32 alternate_policy; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args {
|
||||
*/
|
||||
|
||||
struct kfd_ioctl_get_clock_counters_args {
|
||||
uint64_t gpu_clock_counter; /* from KFD */
|
||||
uint64_t cpu_clock_counter; /* from KFD */
|
||||
uint64_t system_clock_counter; /* from KFD */
|
||||
uint64_t system_clock_freq; /* from KFD */
|
||||
__u64 gpu_clock_counter; /* from KFD */
|
||||
__u64 cpu_clock_counter; /* from KFD */
|
||||
__u64 system_clock_counter; /* from KFD */
|
||||
__u64 system_clock_freq; /* from KFD */
|
||||
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define NUM_OF_SUPPORTED_GPUS 7
|
||||
|
||||
struct kfd_process_device_apertures {
|
||||
uint64_t lds_base; /* from KFD */
|
||||
uint64_t lds_limit; /* from KFD */
|
||||
uint64_t scratch_base; /* from KFD */
|
||||
uint64_t scratch_limit; /* from KFD */
|
||||
uint64_t gpuvm_base; /* from KFD */
|
||||
uint64_t gpuvm_limit; /* from KFD */
|
||||
uint32_t gpu_id; /* from KFD */
|
||||
uint32_t pad;
|
||||
__u64 lds_base; /* from KFD */
|
||||
__u64 lds_limit; /* from KFD */
|
||||
__u64 scratch_base; /* from KFD */
|
||||
__u64 scratch_limit; /* from KFD */
|
||||
__u64 gpuvm_base; /* from KFD */
|
||||
__u64 gpuvm_limit; /* from KFD */
|
||||
__u32 gpu_id; /* from KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_get_process_apertures_args {
|
||||
@@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args {
|
||||
process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */
|
||||
|
||||
/* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */
|
||||
uint32_t num_of_nodes;
|
||||
uint32_t pad;
|
||||
__u32 num_of_nodes;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define MAX_ALLOWED_NUM_POINTS 100
|
||||
@@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args {
|
||||
#define MAX_ALLOWED_WAC_BUFF_SIZE 128
|
||||
|
||||
struct kfd_ioctl_dbg_register_args {
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_dbg_unregister_args {
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_dbg_address_watch_args {
|
||||
uint64_t content_ptr; /* a pointer to the actual content */
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
|
||||
__u64 content_ptr; /* a pointer to the actual content */
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 buf_size_in_bytes; /*including gpu_id and buf_size */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_dbg_wave_control_args {
|
||||
uint64_t content_ptr; /* a pointer to the actual content */
|
||||
uint32_t gpu_id; /* to KFD */
|
||||
uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */
|
||||
__u64 content_ptr; /* a pointer to the actual content */
|
||||
__u32 gpu_id; /* to KFD */
|
||||
__u32 buf_size_in_bytes; /*including gpu_id and buf_size */
|
||||
};
|
||||
|
||||
/* Matching HSA_EVENTTYPE */
|
||||
@@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args {
|
||||
#define KFD_SIGNAL_EVENT_LIMIT 256
|
||||
|
||||
struct kfd_ioctl_create_event_args {
|
||||
uint64_t event_page_offset; /* from KFD */
|
||||
uint32_t event_trigger_data; /* from KFD - signal events only */
|
||||
uint32_t event_type; /* to KFD */
|
||||
uint32_t auto_reset; /* to KFD */
|
||||
uint32_t node_id; /* to KFD - only valid for certain
|
||||
__u64 event_page_offset; /* from KFD */
|
||||
__u32 event_trigger_data; /* from KFD - signal events only */
|
||||
__u32 event_type; /* to KFD */
|
||||
__u32 auto_reset; /* to KFD */
|
||||
__u32 node_id; /* to KFD - only valid for certain
|
||||
event types */
|
||||
uint32_t event_id; /* from KFD */
|
||||
uint32_t event_slot_index; /* from KFD */
|
||||
__u32 event_id; /* from KFD */
|
||||
__u32 event_slot_index; /* from KFD */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_destroy_event_args {
|
||||
uint32_t event_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 event_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_set_event_args {
|
||||
uint32_t event_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 event_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_reset_event_args {
|
||||
uint32_t event_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 event_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_memory_exception_failure {
|
||||
uint32_t NotPresent; /* Page not present or supervisor privilege */
|
||||
uint32_t ReadOnly; /* Write access to a read-only page */
|
||||
uint32_t NoExecute; /* Execute access to a page marked NX */
|
||||
uint32_t pad;
|
||||
__u32 NotPresent; /* Page not present or supervisor privilege */
|
||||
__u32 ReadOnly; /* Write access to a read-only page */
|
||||
__u32 NoExecute; /* Execute access to a page marked NX */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/* memory exception data*/
|
||||
struct kfd_hsa_memory_exception_data {
|
||||
struct kfd_memory_exception_failure failure;
|
||||
uint64_t va;
|
||||
uint32_t gpu_id;
|
||||
uint32_t pad;
|
||||
__u64 va;
|
||||
__u32 gpu_id;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/* Event data*/
|
||||
@@ -217,19 +217,19 @@ struct kfd_event_data {
|
||||
union {
|
||||
struct kfd_hsa_memory_exception_data memory_exception_data;
|
||||
}; /* From KFD */
|
||||
uint64_t kfd_event_data_ext; /* pointer to an extension structure
|
||||
__u64 kfd_event_data_ext; /* pointer to an extension structure
|
||||
for future exception types */
|
||||
uint32_t event_id; /* to KFD */
|
||||
uint32_t pad;
|
||||
__u32 event_id; /* to KFD */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_ioctl_wait_events_args {
|
||||
uint64_t events_ptr; /* pointed to struct
|
||||
__u64 events_ptr; /* pointed to struct
|
||||
kfd_event_data array, to KFD */
|
||||
uint32_t num_events; /* to KFD */
|
||||
uint32_t wait_for_all; /* to KFD */
|
||||
uint32_t timeout; /* to KFD */
|
||||
uint32_t wait_result; /* from KFD */
|
||||
__u32 num_events; /* to KFD */
|
||||
__u32 wait_for_all; /* to KFD */
|
||||
__u32 timeout; /* to KFD */
|
||||
__u32 wait_result; /* from KFD */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_set_scratch_backing_va_args {
|
||||
|
||||
@@ -11,27 +11,34 @@
|
||||
#define SECCOMP_MODE_FILTER 2 /* uses user-supplied filter. */
|
||||
|
||||
/* Valid operations for seccomp syscall. */
|
||||
#define SECCOMP_SET_MODE_STRICT 0
|
||||
#define SECCOMP_SET_MODE_FILTER 1
|
||||
#define SECCOMP_SET_MODE_STRICT 0
|
||||
#define SECCOMP_SET_MODE_FILTER 1
|
||||
#define SECCOMP_GET_ACTION_AVAIL 2
|
||||
|
||||
/* Valid flags for SECCOMP_SET_MODE_FILTER */
|
||||
#define SECCOMP_FILTER_FLAG_TSYNC 1
|
||||
#define SECCOMP_FILTER_FLAG_LOG 2
|
||||
|
||||
/*
|
||||
* All BPF programs must return a 32-bit value.
|
||||
* The bottom 16-bits are for optional return data.
|
||||
* The upper 16-bits are ordered from least permissive values to most.
|
||||
* The upper 16-bits are ordered from least permissive values to most,
|
||||
* as a signed value (so 0x8000000 is negative).
|
||||
*
|
||||
* The ordering ensures that a min_t() over composed return values always
|
||||
* selects the least permissive choice.
|
||||
*/
|
||||
#define SECCOMP_RET_KILL 0x00000000U /* kill the task immediately */
|
||||
#define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */
|
||||
#define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */
|
||||
#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */
|
||||
#define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */
|
||||
#define SECCOMP_RET_KILL_PROCESS 0x80000000U /* kill the process */
|
||||
#define SECCOMP_RET_KILL_THREAD 0x00000000U /* kill the thread */
|
||||
#define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD
|
||||
#define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */
|
||||
#define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */
|
||||
#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */
|
||||
#define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */
|
||||
#define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */
|
||||
|
||||
/* Masks for the return value sections. */
|
||||
#define SECCOMP_RET_ACTION_FULL 0xffff0000U
|
||||
#define SECCOMP_RET_ACTION 0x7fff0000U
|
||||
#define SECCOMP_RET_DATA 0x0000ffffU
|
||||
|
||||
|
||||
@@ -780,6 +780,7 @@ struct usb_interface_assoc_descriptor {
|
||||
__u8 iFunction;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define USB_DT_INTERFACE_ASSOCIATION_SIZE 8
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ struct ib_uverbs_ex_query_device_resp {
|
||||
struct ib_uverbs_rss_caps rss_caps;
|
||||
__u32 max_wq_type_rq;
|
||||
__u32 raw_packet_caps;
|
||||
struct ib_uverbs_tm_caps xrq_caps;
|
||||
struct ib_uverbs_tm_caps tm_caps;
|
||||
};
|
||||
|
||||
struct ib_uverbs_query_port {
|
||||
|
||||
@@ -84,16 +84,6 @@ static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr)
|
||||
BUG();
|
||||
}
|
||||
|
||||
/* TODO: this shouldn't be here but it is because the frontend drivers
|
||||
* are using it (its rolled in headers) even though we won't hit the code path.
|
||||
* So for right now just punt with this.
|
||||
*/
|
||||
static inline pte_t *lookup_address(unsigned long address, unsigned int *level)
|
||||
{
|
||||
BUG();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||
struct gnttab_map_grant_ref *kmap_ops,
|
||||
struct page **pages, unsigned int count);
|
||||
|
||||
Reference in New Issue
Block a user