Merge tag 'v4.18-rc6' into HEAD
Pull bug fixes into the KVM development tree to avoid nasty conflicts.
This commit is contained in:
@@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res);
|
||||
int acpi_check_region(resource_size_t start, resource_size_t n,
|
||||
const char *name);
|
||||
|
||||
acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
|
||||
u32 level);
|
||||
|
||||
int acpi_resources_are_enforced(void);
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
|
@@ -1119,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q,
|
||||
if (!q->limits.chunk_sectors)
|
||||
return q->limits.max_sectors;
|
||||
|
||||
return q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1));
|
||||
return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1))));
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#ifndef _BPF_CGROUP_H
|
||||
#define _BPF_CGROUP_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/jump_label.h>
|
||||
#include <uapi/linux/bpf.h>
|
||||
|
||||
@@ -188,12 +189,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
|
||||
\
|
||||
__ret; \
|
||||
})
|
||||
int cgroup_bpf_prog_attach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype, struct bpf_prog *prog);
|
||||
int cgroup_bpf_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype);
|
||||
int cgroup_bpf_prog_query(const union bpf_attr *attr,
|
||||
union bpf_attr __user *uattr);
|
||||
#else
|
||||
|
||||
struct bpf_prog;
|
||||
struct cgroup_bpf {};
|
||||
static inline void cgroup_bpf_put(struct cgroup *cgrp) {}
|
||||
static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
|
||||
|
||||
static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,
|
||||
union bpf_attr __user *uattr)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#define cgroup_bpf_enabled (0)
|
||||
#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)
|
||||
#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
|
||||
|
@@ -696,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
|
||||
struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
|
||||
struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key);
|
||||
int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type);
|
||||
int sockmap_get_from_fd(const union bpf_attr *attr, int type,
|
||||
struct bpf_prog *prog);
|
||||
#else
|
||||
static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key)
|
||||
{
|
||||
@@ -714,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map,
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_XDP_SOCKETS)
|
||||
|
@@ -5,11 +5,12 @@
|
||||
#include <uapi/linux/bpf.h>
|
||||
|
||||
#ifdef CONFIG_BPF_LIRC_MODE2
|
||||
int lirc_prog_attach(const union bpf_attr *attr);
|
||||
int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
|
||||
int lirc_prog_detach(const union bpf_attr *attr);
|
||||
int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
|
||||
#else
|
||||
static inline int lirc_prog_attach(const union bpf_attr *attr)
|
||||
static inline int lirc_prog_attach(const union bpf_attr *attr,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@@ -72,6 +72,9 @@
|
||||
*/
|
||||
#ifndef COMPAT_SYSCALL_DEFINEx
|
||||
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
|
||||
__diag_push(); \
|
||||
__diag_ignore(GCC, 8, "-Wattribute-alias", \
|
||||
"Type aliasing is used to sanitize syscall arguments");\
|
||||
asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
|
||||
asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
|
||||
__attribute__((alias(__stringify(__se_compat_sys##name)))); \
|
||||
@@ -80,8 +83,11 @@
|
||||
asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
|
||||
asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
|
||||
{ \
|
||||
return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
|
||||
long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
|
||||
__MAP(x,__SC_TEST,__VA_ARGS__); \
|
||||
return ret; \
|
||||
} \
|
||||
__diag_pop(); \
|
||||
static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
#endif /* COMPAT_SYSCALL_DEFINEx */
|
||||
|
||||
|
@@ -65,6 +65,18 @@
|
||||
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Feature detection for gnu_inline (gnu89 extern inline semantics). Either
|
||||
* __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
|
||||
* and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
|
||||
* defined so the gnu89 semantics are the default.
|
||||
*/
|
||||
#ifdef __GNUC_STDC_INLINE__
|
||||
# define __gnu_inline __attribute__((gnu_inline))
|
||||
#else
|
||||
# define __gnu_inline
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Force always-inline if the user requests it so via the .config,
|
||||
* or if gcc is too old.
|
||||
@@ -72,19 +84,22 @@
|
||||
* -Wunused-function. This turns out to avoid the need for complex #ifdef
|
||||
* directives. Suppress the warning in clang as well by using "unused"
|
||||
* function attribute, which is redundant but not harmful for gcc.
|
||||
* Prefer gnu_inline, so that extern inline functions do not emit an
|
||||
* externally visible function. This makes extern inline behave as per gnu89
|
||||
* semantics rather than c99. This prevents multiple symbol definition errors
|
||||
* of extern inline functions at link time.
|
||||
* A lot of inline functions can cause havoc with function tracing.
|
||||
*/
|
||||
#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
|
||||
!defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
|
||||
#define inline inline __attribute__((always_inline,unused)) notrace
|
||||
#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace
|
||||
#define __inline __inline __attribute__((always_inline,unused)) notrace
|
||||
#define inline \
|
||||
inline __attribute__((always_inline, unused)) notrace __gnu_inline
|
||||
#else
|
||||
/* A lot of inline functions can cause havoc with function tracing */
|
||||
#define inline inline __attribute__((unused)) notrace
|
||||
#define __inline__ __inline__ __attribute__((unused)) notrace
|
||||
#define __inline __inline __attribute__((unused)) notrace
|
||||
#define inline inline __attribute__((unused)) notrace __gnu_inline
|
||||
#endif
|
||||
|
||||
#define __inline__ inline
|
||||
#define __inline inline
|
||||
#define __always_inline inline __attribute__((always_inline))
|
||||
#define noinline __attribute__((noinline))
|
||||
|
||||
@@ -347,3 +362,28 @@
|
||||
#if GCC_VERSION >= 50100
|
||||
#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Turn individual warnings and errors on and off locally, depending
|
||||
* on version.
|
||||
*/
|
||||
#define __diag_GCC(version, severity, s) \
|
||||
__diag_GCC_ ## version(__diag_GCC_ ## severity s)
|
||||
|
||||
/* Severity used in pragma directives */
|
||||
#define __diag_GCC_ignore ignored
|
||||
#define __diag_GCC_warn warning
|
||||
#define __diag_GCC_error error
|
||||
|
||||
/* Compilers before gcc-4.6 do not understand "#pragma GCC diagnostic push" */
|
||||
#if GCC_VERSION >= 40600
|
||||
#define __diag_str1(s) #s
|
||||
#define __diag_str(s) __diag_str1(s)
|
||||
#define __diag(s) _Pragma(__diag_str(GCC diagnostic s))
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 80000
|
||||
#define __diag_GCC_8(s) __diag(s)
|
||||
#else
|
||||
#define __diag_GCC_8(s)
|
||||
#endif
|
||||
|
@@ -271,4 +271,22 @@ struct ftrace_likely_data {
|
||||
# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
|
||||
#endif
|
||||
|
||||
#ifndef __diag
|
||||
#define __diag(string)
|
||||
#endif
|
||||
|
||||
#ifndef __diag_GCC
|
||||
#define __diag_GCC(version, severity, string)
|
||||
#endif
|
||||
|
||||
#define __diag_push() __diag(push)
|
||||
#define __diag_pop() __diag(pop)
|
||||
|
||||
#define __diag_ignore(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, ignore, option)
|
||||
#define __diag_warn(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, warn, option)
|
||||
#define __diag_error(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, error, option)
|
||||
|
||||
#endif /* __LINUX_COMPILER_TYPES_H */
|
||||
|
@@ -135,7 +135,7 @@ void dax_flush(struct dax_device *dax_dev, void *addr, size_t size);
|
||||
|
||||
ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
|
||||
const struct iomap_ops *ops);
|
||||
int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
|
||||
vm_fault_t dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
|
||||
pfn_t *pfnp, int *errp, const struct iomap_ops *ops);
|
||||
vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf,
|
||||
enum page_entry_size pe_size, pfn_t pfn);
|
||||
|
@@ -470,9 +470,7 @@ struct sock_fprog_kern {
|
||||
};
|
||||
|
||||
struct bpf_binary_header {
|
||||
u16 pages;
|
||||
u16 locked:1;
|
||||
|
||||
u32 pages;
|
||||
/* Some arches need word alignment for their instructions */
|
||||
u8 image[] __aligned(4);
|
||||
};
|
||||
@@ -481,7 +479,7 @@ struct bpf_prog {
|
||||
u16 pages; /* Number of allocated pages */
|
||||
u16 jited:1, /* Is our filter JIT'ed? */
|
||||
jit_requested:1,/* archs need to JIT the prog */
|
||||
locked:1, /* Program image locked? */
|
||||
undo_set_mem:1, /* Passed set_memory_ro() checkpoint */
|
||||
gpl_compatible:1, /* Is filter GPL compatible? */
|
||||
cb_access:1, /* Is control block accessed? */
|
||||
dst_needed:1, /* Do we need dst entry? */
|
||||
@@ -677,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default)
|
||||
|
||||
static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
fp->locked = 1;
|
||||
if (set_memory_ro((unsigned long)fp, fp->pages))
|
||||
fp->locked = 0;
|
||||
#endif
|
||||
fp->undo_set_mem = 1;
|
||||
set_memory_ro((unsigned long)fp, fp->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
if (fp->locked) {
|
||||
WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages));
|
||||
/* In case set_memory_rw() fails, we want to be the first
|
||||
* to crash here instead of some random place later on.
|
||||
*/
|
||||
fp->locked = 0;
|
||||
}
|
||||
#endif
|
||||
if (fp->undo_set_mem)
|
||||
set_memory_rw((unsigned long)fp, fp->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
hdr->locked = 1;
|
||||
if (set_memory_ro((unsigned long)hdr, hdr->pages))
|
||||
hdr->locked = 0;
|
||||
#endif
|
||||
set_memory_ro((unsigned long)hdr, hdr->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
if (hdr->locked) {
|
||||
WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages));
|
||||
/* In case set_memory_rw() fails, we want to be the first
|
||||
* to crash here instead of some random place later on.
|
||||
*/
|
||||
hdr->locked = 0;
|
||||
}
|
||||
#endif
|
||||
set_memory_rw((unsigned long)hdr, hdr->pages);
|
||||
}
|
||||
|
||||
static inline struct bpf_binary_header *
|
||||
@@ -728,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp)
|
||||
return (void *)addr;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp)
|
||||
{
|
||||
if (!fp->locked)
|
||||
return -ENOLCK;
|
||||
if (fp->jited) {
|
||||
const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp);
|
||||
|
||||
if (!hdr->locked)
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap);
|
||||
static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
@@ -805,8 +765,8 @@ static inline bool bpf_dump_raw_ok(void)
|
||||
struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
|
||||
const struct bpf_insn *patch, u32 len);
|
||||
|
||||
static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb,
|
||||
struct net_device *fwd)
|
||||
static inline int xdp_ok_fwd_dev(const struct net_device *fwd,
|
||||
unsigned int pktlen)
|
||||
{
|
||||
unsigned int len;
|
||||
|
||||
@@ -814,7 +774,7 @@ static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb,
|
||||
return -ENETDOWN;
|
||||
|
||||
len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN;
|
||||
if (skb->len > len)
|
||||
if (pktlen > len)
|
||||
return -EMSGSIZE;
|
||||
|
||||
return 0;
|
||||
|
@@ -1720,8 +1720,6 @@ struct file_operations {
|
||||
int (*iterate) (struct file *, struct dir_context *);
|
||||
int (*iterate_shared) (struct file *, struct dir_context *);
|
||||
__poll_t (*poll) (struct file *, struct poll_table_struct *);
|
||||
struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
|
||||
__poll_t (*poll_mask) (struct file *, __poll_t);
|
||||
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
int (*mmap) (struct file *, struct vm_area_struct *);
|
||||
@@ -2422,6 +2420,7 @@ extern struct file *filp_open(const char *, int, umode_t);
|
||||
extern struct file *file_open_root(struct dentry *, struct vfsmount *,
|
||||
const char *, int, umode_t);
|
||||
extern struct file * dentry_open(const struct path *, int, const struct cred *);
|
||||
extern struct file *filp_clone_open(struct file *);
|
||||
extern int filp_close(struct file *, fl_owner_t id);
|
||||
|
||||
extern struct filename *getname_flags(const char __user *, int, int *);
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#define __FSL_GUTS_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
/**
|
||||
* Global Utility Registers.
|
||||
|
@@ -223,7 +223,6 @@ extern enum ftrace_tracing_type_t ftrace_tracing_type;
|
||||
*/
|
||||
int register_ftrace_function(struct ftrace_ops *ops);
|
||||
int unregister_ftrace_function(struct ftrace_ops *ops);
|
||||
void clear_ftrace_function(void);
|
||||
|
||||
extern void ftrace_stub(unsigned long a0, unsigned long a1,
|
||||
struct ftrace_ops *op, struct pt_regs *regs);
|
||||
@@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void clear_ftrace_function(void) { }
|
||||
static inline void ftrace_kill(void) { }
|
||||
static inline void ftrace_free_init_mem(void) { }
|
||||
static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { }
|
||||
|
@@ -511,6 +511,7 @@ struct hid_output_fifo {
|
||||
#define HID_STAT_ADDED BIT(0)
|
||||
#define HID_STAT_PARSED BIT(1)
|
||||
#define HID_STAT_DUP_DETECTED BIT(2)
|
||||
#define HID_STAT_REPROBED BIT(3)
|
||||
|
||||
struct hid_input {
|
||||
struct list_head list;
|
||||
@@ -579,7 +580,7 @@ struct hid_device { /* device report descriptor */
|
||||
bool battery_avoid_query;
|
||||
#endif
|
||||
|
||||
unsigned int status; /* see STAT flags above */
|
||||
unsigned long status; /* see STAT flags above */
|
||||
unsigned claimed; /* Claimed by hidinput, hiddev? */
|
||||
unsigned quirks; /* Various quirks the device can pull on us */
|
||||
bool io_started; /* If IO has started */
|
||||
|
@@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev)
|
||||
|
||||
static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
|
||||
{
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
|
||||
struct bridge_vlan_info *p_vinfo)
|
||||
{
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -109,6 +109,8 @@ struct ip_mc_list {
|
||||
extern int ip_check_mc_rcu(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u8 proto);
|
||||
extern int igmp_rcv(struct sk_buff *);
|
||||
extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
|
||||
extern int ip_mc_join_group_ssm(struct sock *sk, struct ip_mreqn *imr,
|
||||
unsigned int mode);
|
||||
extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
|
||||
extern void ip_mc_drop_socket(struct sock *sk);
|
||||
extern int ip_mc_source(int add, int omode, struct sock *sk,
|
||||
|
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
|
||||
char __user *user_buffer);
|
||||
size_t iio_dma_buffer_data_available(struct iio_buffer *buffer);
|
||||
int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd);
|
||||
int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length);
|
||||
int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length);
|
||||
int iio_dma_buffer_request_update(struct iio_buffer *buffer);
|
||||
|
||||
int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
|
||||
|
@@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis)
|
||||
return axis == ABS_MT_SLOT || input_is_mt_value(axis);
|
||||
}
|
||||
|
||||
void input_mt_report_slot_state(struct input_dev *dev,
|
||||
bool input_mt_report_slot_state(struct input_dev *dev,
|
||||
unsigned int tool_type, bool active);
|
||||
|
||||
void input_mt_report_finger_count(struct input_dev *dev, int count);
|
||||
|
@@ -121,6 +121,7 @@
|
||||
#define ecap_srs(e) ((e >> 31) & 0x1)
|
||||
#define ecap_ers(e) ((e >> 30) & 0x1)
|
||||
#define ecap_prs(e) ((e >> 29) & 0x1)
|
||||
#define ecap_broken_pasid(e) ((e >> 28) & 0x1)
|
||||
#define ecap_dis(e) ((e >> 27) & 0x1)
|
||||
#define ecap_nest(e) ((e >> 26) & 0x1)
|
||||
#define ecap_mts(e) ((e >> 25) & 0x1)
|
||||
|
@@ -62,7 +62,6 @@ void *kthread_probe_data(struct task_struct *k);
|
||||
int kthread_park(struct task_struct *k);
|
||||
void kthread_unpark(struct task_struct *k);
|
||||
void kthread_parkme(void);
|
||||
void kthread_park_complete(struct task_struct *k);
|
||||
|
||||
int kthreadd(void *unused);
|
||||
extern struct task_struct *kthreadd_task;
|
||||
|
@@ -210,6 +210,7 @@ enum {
|
||||
ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
|
||||
/* (doesn't imply presence) */
|
||||
ATA_FLAG_SATA = (1 << 1),
|
||||
ATA_FLAG_NO_LPM = (1 << 2), /* host not happy with LPM */
|
||||
ATA_FLAG_NO_LOG_PAGE = (1 << 5), /* do not issue log page read */
|
||||
ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */
|
||||
ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
|
||||
@@ -1495,6 +1496,29 @@ static inline bool ata_tag_valid(unsigned int tag)
|
||||
return tag < ATA_MAX_QUEUE || ata_tag_internal(tag);
|
||||
}
|
||||
|
||||
#define __ata_qc_for_each(ap, qc, tag, max_tag, fn) \
|
||||
for ((tag) = 0; (tag) < (max_tag) && \
|
||||
({ qc = fn((ap), (tag)); 1; }); (tag)++) \
|
||||
|
||||
/*
|
||||
* Internal use only, iterate commands ignoring error handling and
|
||||
* status of 'qc'.
|
||||
*/
|
||||
#define ata_qc_for_each_raw(ap, qc, tag) \
|
||||
__ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, __ata_qc_from_tag)
|
||||
|
||||
/*
|
||||
* Iterate all potential commands that can be queued
|
||||
*/
|
||||
#define ata_qc_for_each(ap, qc, tag) \
|
||||
__ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, ata_qc_from_tag)
|
||||
|
||||
/*
|
||||
* Like ata_qc_for_each, but with the internal tag included
|
||||
*/
|
||||
#define ata_qc_for_each_with_internal(ap, qc, tag) \
|
||||
__ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE + 1, ata_qc_from_tag)
|
||||
|
||||
/*
|
||||
* device helpers
|
||||
*/
|
||||
|
@@ -27,6 +27,8 @@
|
||||
*/
|
||||
#define MARVELL_PHY_ID_88E6390 0x01410f90
|
||||
|
||||
#define MARVELL_PHY_FAMILY_ID(id) ((id) >> 4)
|
||||
|
||||
/* struct phy_device dev_flags definitions */
|
||||
#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001
|
||||
#define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002
|
||||
|
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <linux/mlx5/driver.h>
|
||||
|
||||
#define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager)
|
||||
|
||||
enum {
|
||||
SRIOV_NONE,
|
||||
SRIOV_LEGACY,
|
||||
|
@@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
|
||||
u8 vnic_env_queue_counters[0x1];
|
||||
u8 ets[0x1];
|
||||
u8 nic_flow_table[0x1];
|
||||
u8 eswitch_flow_table[0x1];
|
||||
u8 eswitch_manager[0x1];
|
||||
u8 device_memory[0x1];
|
||||
u8 mcam_reg[0x1];
|
||||
u8 pcam_reg[0x1];
|
||||
|
@@ -155,7 +155,9 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
|
||||
* mmap() functions).
|
||||
*/
|
||||
|
||||
extern struct kmem_cache *vm_area_cachep;
|
||||
struct vm_area_struct *vm_area_alloc(struct mm_struct *);
|
||||
struct vm_area_struct *vm_area_dup(struct vm_area_struct *);
|
||||
void vm_area_free(struct vm_area_struct *);
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
extern struct rb_root nommu_region_tree;
|
||||
@@ -2132,7 +2134,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn,
|
||||
struct mminit_pfnnid_cache *state);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_MEMBLOCK
|
||||
#if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP)
|
||||
void zero_resv_unavail(void);
|
||||
#else
|
||||
static inline void zero_resv_unavail(void) {}
|
||||
|
@@ -147,7 +147,6 @@ struct proto_ops {
|
||||
int (*getname) (struct socket *sock,
|
||||
struct sockaddr *addr,
|
||||
int peer);
|
||||
__poll_t (*poll_mask) (struct socket *sock, __poll_t events);
|
||||
__poll_t (*poll) (struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int (*ioctl) (struct socket *sock, unsigned int cmd,
|
||||
|
@@ -2789,11 +2789,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp,
|
||||
if (PTR_ERR(pp) != -EINPROGRESS)
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
}
|
||||
static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
|
||||
struct sk_buff **pp,
|
||||
int flush,
|
||||
struct gro_remcsum *grc)
|
||||
{
|
||||
if (PTR_ERR(pp) != -EINPROGRESS) {
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
skb_gro_remcsum_cleanup(skb, grc);
|
||||
skb->remcsum_offload = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush)
|
||||
{
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
}
|
||||
static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
|
||||
struct sk_buff **pp,
|
||||
int flush,
|
||||
struct gro_remcsum *grc)
|
||||
{
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
skb_gro_remcsum_cleanup(skb, grc);
|
||||
skb->remcsum_offload = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
|
||||
|
@@ -1240,6 +1240,8 @@ int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
|
||||
unsigned long pci_address_to_pio(phys_addr_t addr);
|
||||
phys_addr_t pci_pio_to_address(unsigned long pio);
|
||||
int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr);
|
||||
int devm_pci_remap_iospace(struct device *dev, const struct resource *res,
|
||||
phys_addr_t phys_addr);
|
||||
void pci_unmap_iospace(struct resource *res);
|
||||
void __iomem *devm_pci_remap_cfgspace(struct device *dev,
|
||||
resource_size_t offset,
|
||||
|
@@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
|
||||
int of_genpd_parse_idle_states(struct device_node *dn,
|
||||
struct genpd_power_state **states, int *n);
|
||||
unsigned int of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node);
|
||||
struct device_node *np);
|
||||
|
||||
int genpd_dev_pm_attach(struct device *dev);
|
||||
struct device *genpd_dev_pm_attach_by_id(struct device *dev,
|
||||
@@ -274,9 +274,9 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
|
||||
|
||||
static inline unsigned int
|
||||
of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node)
|
||||
struct device_node *np)
|
||||
{
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int genpd_dev_pm_attach(struct device *dev)
|
||||
|
@@ -74,17 +74,17 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
|
||||
pt->_key = ~(__poll_t)0; /* all events enabled */
|
||||
}
|
||||
|
||||
static inline bool file_has_poll_mask(struct file *file)
|
||||
{
|
||||
return file->f_op->get_poll_head && file->f_op->poll_mask;
|
||||
}
|
||||
|
||||
static inline bool file_can_poll(struct file *file)
|
||||
{
|
||||
return file->f_op->poll || file_has_poll_mask(file);
|
||||
return file->f_op->poll;
|
||||
}
|
||||
|
||||
__poll_t vfs_poll(struct file *file, struct poll_table_struct *pt);
|
||||
static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt)
|
||||
{
|
||||
if (unlikely(!file->f_op->poll))
|
||||
return DEFAULT_POLLMASK;
|
||||
return file->f_op->poll(file, pt);
|
||||
}
|
||||
|
||||
struct poll_table_entry {
|
||||
struct file *filp;
|
||||
|
@@ -354,6 +354,8 @@ struct rmi_driver_data {
|
||||
struct mutex irq_mutex;
|
||||
struct input_dev *input;
|
||||
|
||||
struct irq_domain *irqdomain;
|
||||
|
||||
u8 pdt_props;
|
||||
|
||||
u8 num_rx_electrodes;
|
||||
|
@@ -9,9 +9,6 @@
|
||||
#include <asm/io.h>
|
||||
|
||||
struct scatterlist {
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
unsigned long sg_magic;
|
||||
#endif
|
||||
unsigned long page_link;
|
||||
unsigned int offset;
|
||||
unsigned int length;
|
||||
@@ -64,7 +61,6 @@ struct sg_table {
|
||||
*
|
||||
*/
|
||||
|
||||
#define SG_MAGIC 0x87654321
|
||||
#define SG_CHAIN 0x01UL
|
||||
#define SG_END 0x02UL
|
||||
|
||||
@@ -98,7 +94,6 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page)
|
||||
*/
|
||||
BUG_ON((unsigned long) page & (SG_CHAIN | SG_END));
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
BUG_ON(sg_is_chain(sg));
|
||||
#endif
|
||||
sg->page_link = page_link | (unsigned long) page;
|
||||
@@ -129,7 +124,6 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page,
|
||||
static inline struct page *sg_page(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
BUG_ON(sg_is_chain(sg));
|
||||
#endif
|
||||
return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END));
|
||||
@@ -195,9 +189,6 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
|
||||
**/
|
||||
static inline void sg_mark_end(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
#endif
|
||||
/*
|
||||
* Set termination bit, clear potential chain bit
|
||||
*/
|
||||
@@ -215,9 +206,6 @@ static inline void sg_mark_end(struct scatterlist *sg)
|
||||
**/
|
||||
static inline void sg_unmark_end(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
#endif
|
||||
sg->page_link &= ~SG_END;
|
||||
}
|
||||
|
||||
@@ -260,12 +248,6 @@ static inline void *sg_virt(struct scatterlist *sg)
|
||||
static inline void sg_init_marker(struct scatterlist *sgl,
|
||||
unsigned int nents)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < nents; i++)
|
||||
sgl[i].sg_magic = SG_MAGIC;
|
||||
#endif
|
||||
sg_mark_end(&sgl[nents - 1]);
|
||||
}
|
||||
|
||||
|
@@ -118,7 +118,7 @@ struct task_group;
|
||||
* the comment with set_special_state().
|
||||
*/
|
||||
#define is_special_task_state(state) \
|
||||
((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_DEAD))
|
||||
((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD))
|
||||
|
||||
#define __set_current_state(state_value) \
|
||||
do { \
|
||||
|
@@ -75,7 +75,7 @@ extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *,
|
||||
extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *);
|
||||
struct task_struct *fork_idle(int);
|
||||
extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
|
||||
extern long kernel_wait4(pid_t, int *, int, struct rusage *);
|
||||
extern long kernel_wait4(pid_t, int __user *, int, struct rusage *);
|
||||
|
||||
extern void free_task(struct task_struct *tsk);
|
||||
|
||||
|
@@ -630,6 +630,7 @@ typedef unsigned char *sk_buff_data_t;
|
||||
* @hash: the packet hash
|
||||
* @queue_mapping: Queue mapping for multiqueue devices
|
||||
* @xmit_more: More SKBs are pending for this queue
|
||||
* @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves
|
||||
* @ndisc_nodetype: router type (from link layer)
|
||||
* @ooo_okay: allow the mapping of a socket to a queue to be changed
|
||||
* @l4_hash: indicate hash is a canonical 4-tuple hash over transport
|
||||
@@ -735,7 +736,7 @@ struct sk_buff {
|
||||
peeked:1,
|
||||
head_frag:1,
|
||||
xmit_more:1,
|
||||
__unused:1; /* one bit hole */
|
||||
pfmemalloc:1;
|
||||
|
||||
/* fields enclosed in headers_start/headers_end are copied
|
||||
* using a single memcpy() in __copy_skb_header()
|
||||
@@ -754,31 +755,30 @@ struct sk_buff {
|
||||
|
||||
__u8 __pkt_type_offset[0];
|
||||
__u8 pkt_type:3;
|
||||
__u8 pfmemalloc:1;
|
||||
__u8 ignore_df:1;
|
||||
|
||||
__u8 nf_trace:1;
|
||||
__u8 ip_summed:2;
|
||||
__u8 ooo_okay:1;
|
||||
|
||||
__u8 l4_hash:1;
|
||||
__u8 sw_hash:1;
|
||||
__u8 wifi_acked_valid:1;
|
||||
__u8 wifi_acked:1;
|
||||
|
||||
__u8 no_fcs:1;
|
||||
/* Indicates the inner headers are valid in the skbuff. */
|
||||
__u8 encapsulation:1;
|
||||
__u8 encap_hdr_csum:1;
|
||||
__u8 csum_valid:1;
|
||||
|
||||
__u8 csum_complete_sw:1;
|
||||
__u8 csum_level:2;
|
||||
__u8 csum_not_inet:1;
|
||||
|
||||
__u8 dst_pending_confirm:1;
|
||||
#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
||||
__u8 ndisc_nodetype:2;
|
||||
#endif
|
||||
__u8 ipvs_property:1;
|
||||
|
||||
__u8 inner_protocol_type:1;
|
||||
__u8 remcsum_offload:1;
|
||||
#ifdef CONFIG_NET_SWITCHDEV
|
||||
@@ -3252,7 +3252,8 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
|
||||
int *peeked, int *off, int *err);
|
||||
struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
|
||||
int *err);
|
||||
__poll_t datagram_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t datagram_poll(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
|
||||
struct iov_iter *to, int size);
|
||||
static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
|
||||
|
@@ -155,8 +155,12 @@ struct kmem_cache {
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
#define SLAB_SUPPORTS_SYSFS
|
||||
void sysfs_slab_unlink(struct kmem_cache *);
|
||||
void sysfs_slab_release(struct kmem_cache *);
|
||||
#else
|
||||
static inline void sysfs_slab_unlink(struct kmem_cache *s)
|
||||
{
|
||||
}
|
||||
static inline void sysfs_slab_release(struct kmem_cache *s)
|
||||
{
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#ifndef _LINUX_SYSCALLS_H
|
||||
#define _LINUX_SYSCALLS_H
|
||||
|
||||
struct __aio_sigset;
|
||||
struct epoll_event;
|
||||
struct iattr;
|
||||
struct inode;
|
||||
@@ -231,6 +232,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
||||
*/
|
||||
#ifndef __SYSCALL_DEFINEx
|
||||
#define __SYSCALL_DEFINEx(x, name, ...) \
|
||||
__diag_push(); \
|
||||
__diag_ignore(GCC, 8, "-Wattribute-alias", \
|
||||
"Type aliasing is used to sanitize syscall arguments");\
|
||||
asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
|
||||
__attribute__((alias(__stringify(__se_sys##name)))); \
|
||||
ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
|
||||
@@ -243,6 +247,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
||||
__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
|
||||
return ret; \
|
||||
} \
|
||||
__diag_pop(); \
|
||||
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
#endif /* __SYSCALL_DEFINEx */
|
||||
|
||||
|
@@ -75,7 +75,7 @@ struct uio_device {
|
||||
struct fasync_struct *async_queue;
|
||||
wait_queue_head_t wait;
|
||||
struct uio_info *info;
|
||||
spinlock_t info_lock;
|
||||
struct mutex info_lock;
|
||||
struct kobject *map_dir;
|
||||
struct kobject *portio_dir;
|
||||
};
|
||||
|
Reference in New Issue
Block a user