Merge 3.19-rc7 into usb-next
We want the USB fixes in here to make merges easier. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -11,6 +11,10 @@ extern void genl_unlock(void);
|
||||
extern int lockdep_genl_is_held(void);
|
||||
#endif
|
||||
|
||||
/* for synchronisation between af_netlink and genetlink */
|
||||
extern atomic_t genl_sk_destructing_cnt;
|
||||
extern wait_queue_head_t genl_sk_destructing_waitq;
|
||||
|
||||
/**
|
||||
* rcu_dereference_genl - rcu_dereference with debug checking
|
||||
* @p: The pointer to read, prior to dereferencing
|
||||
|
@@ -228,7 +228,9 @@ struct i2c_client {
|
||||
struct device dev; /* the device structure */
|
||||
int irq; /* irq issued by device */
|
||||
struct list_head detected;
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
i2c_slave_cb_t slave_cb; /* callback for slave mode */
|
||||
#endif
|
||||
};
|
||||
#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
|
||||
|
||||
@@ -253,6 +255,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
|
||||
|
||||
/* I2C slave support */
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
enum i2c_slave_event {
|
||||
I2C_SLAVE_REQ_READ_START,
|
||||
I2C_SLAVE_REQ_READ_END,
|
||||
@@ -269,6 +272,7 @@ static inline int i2c_slave_event(struct i2c_client *client,
|
||||
{
|
||||
return client->slave_cb(client, event, val);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct i2c_board_info - template for device creation
|
||||
@@ -404,8 +408,10 @@ struct i2c_algorithm {
|
||||
/* To determine what the adapter supports */
|
||||
u32 (*functionality) (struct i2c_adapter *);
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
int (*reg_slave)(struct i2c_client *client);
|
||||
int (*unreg_slave)(struct i2c_client *client);
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -176,7 +176,7 @@ extern int _cond_resched(void);
|
||||
*/
|
||||
# define might_sleep() \
|
||||
do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
|
||||
# define sched_annotate_sleep() __set_current_state(TASK_RUNNING)
|
||||
# define sched_annotate_sleep() (current->task_state_change = 0)
|
||||
#else
|
||||
static inline void ___might_sleep(const char *file, int line,
|
||||
int preempt_offset) { }
|
||||
|
@@ -231,6 +231,7 @@ enum {
|
||||
ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
|
||||
* led */
|
||||
ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */
|
||||
ATA_FLAG_LOWTAG = (1 << 24), /* host wants lowest available tag */
|
||||
|
||||
/* bits 24:31 of ap->flags are reserved for LLD specific flags */
|
||||
|
||||
@@ -422,6 +423,7 @@ enum {
|
||||
ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */
|
||||
ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */
|
||||
ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */
|
||||
ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */
|
||||
|
||||
/* DMA mask for user DMA control: User visible values; DO NOT
|
||||
renumber */
|
||||
|
@@ -59,6 +59,7 @@ enum s2mps13_reg {
|
||||
S2MPS13_REG_B6CTRL,
|
||||
S2MPS13_REG_B6OUT,
|
||||
S2MPS13_REG_B7CTRL,
|
||||
S2MPS13_REG_B7SW,
|
||||
S2MPS13_REG_B7OUT,
|
||||
S2MPS13_REG_B8CTRL,
|
||||
S2MPS13_REG_B8OUT,
|
||||
@@ -102,6 +103,7 @@ enum s2mps13_reg {
|
||||
S2MPS13_REG_L26CTRL,
|
||||
S2MPS13_REG_L27CTRL,
|
||||
S2MPS13_REG_L28CTRL,
|
||||
S2MPS13_REG_L29CTRL,
|
||||
S2MPS13_REG_L30CTRL,
|
||||
S2MPS13_REG_L31CTRL,
|
||||
S2MPS13_REG_L32CTRL,
|
||||
|
@@ -1070,6 +1070,7 @@ static inline int page_mapped(struct page *page)
|
||||
#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
|
||||
#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
|
||||
#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
|
||||
#define VM_FAULT_SIGSEGV 0x0040
|
||||
|
||||
#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
|
||||
#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
|
||||
@@ -1078,8 +1079,9 @@ static inline int page_mapped(struct page *page)
|
||||
|
||||
#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
|
||||
|
||||
#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \
|
||||
VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE)
|
||||
#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
|
||||
VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
|
||||
VM_FAULT_FALLBACK)
|
||||
|
||||
/* Encode hstate index for a hwpoisoned large page */
|
||||
#define VM_FAULT_SET_HINDEX(x) ((x) << 12)
|
||||
|
@@ -444,7 +444,7 @@ extern void __module_put_and_exit(struct module *mod, long code)
|
||||
#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
|
||||
|
||||
#ifdef CONFIG_MODULE_UNLOAD
|
||||
unsigned long module_refcount(struct module *mod);
|
||||
int module_refcount(struct module *mod);
|
||||
void __symbol_put(const char *symbol);
|
||||
#define symbol_put(x) __symbol_put(VMLINUX_SYMBOL_STR(x))
|
||||
void symbol_put_addr(void *addr);
|
||||
|
@@ -26,7 +26,7 @@ unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section);
|
||||
void *module_alloc(unsigned long size);
|
||||
|
||||
/* Free memory returned from module_alloc. */
|
||||
void module_free(struct module *mod, void *module_region);
|
||||
void module_memfree(void *module_region);
|
||||
|
||||
/*
|
||||
* Apply the given relocation to the (simplified) ELF. Return -error
|
||||
@@ -82,4 +82,6 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
/* Any cleanup needed when module leaves. */
|
||||
void module_arch_cleanup(struct module *mod);
|
||||
|
||||
/* Any cleanup before freeing mod->module_init */
|
||||
void module_arch_freeing_init(struct module *mod);
|
||||
#endif
|
||||
|
@@ -85,11 +85,6 @@ static inline void oom_killer_enable(void)
|
||||
oom_killer_disabled = false;
|
||||
}
|
||||
|
||||
static inline bool oom_gfp_allowed(gfp_t gfp_mask)
|
||||
{
|
||||
return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY);
|
||||
}
|
||||
|
||||
extern struct task_struct *find_lock_task_mm(struct task_struct *p);
|
||||
|
||||
static inline bool task_will_free_mem(struct task_struct *task)
|
||||
|
@@ -175,6 +175,8 @@ enum pci_dev_flags {
|
||||
PCI_DEV_FLAGS_DMA_ALIAS_DEVFN = (__force pci_dev_flags_t) (1 << 4),
|
||||
/* Use a PCIe-to-PCI bridge alias even if !pci_is_pcie */
|
||||
PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5),
|
||||
/* Do not use bus resets for device */
|
||||
PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6),
|
||||
};
|
||||
|
||||
enum pci_irq_reroute_variant {
|
||||
@@ -1065,6 +1067,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx);
|
||||
void pci_bus_assign_resources(const struct pci_bus *bus);
|
||||
void pci_bus_size_bridges(struct pci_bus *bus);
|
||||
int pci_claim_resource(struct pci_dev *, int);
|
||||
int pci_claim_bridge_resource(struct pci_dev *bridge, int i);
|
||||
void pci_assign_unassigned_resources(void);
|
||||
void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
|
||||
void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
|
||||
|
@@ -450,11 +450,6 @@ struct perf_event {
|
||||
#endif /* CONFIG_PERF_EVENTS */
|
||||
};
|
||||
|
||||
enum perf_event_context_type {
|
||||
task_context,
|
||||
cpu_context,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct perf_event_context - event context structure
|
||||
*
|
||||
@@ -462,7 +457,6 @@ enum perf_event_context_type {
|
||||
*/
|
||||
struct perf_event_context {
|
||||
struct pmu *pmu;
|
||||
enum perf_event_context_type type;
|
||||
/*
|
||||
* Protect the states of the events in the list,
|
||||
* nr_active, and the list:
|
||||
|
@@ -10,9 +10,6 @@
|
||||
extern const char linux_banner[];
|
||||
extern const char linux_proc_banner[];
|
||||
|
||||
extern char *log_buf_addr_get(void);
|
||||
extern u32 log_buf_len_get(void);
|
||||
|
||||
static inline int printk_get_level(const char *buffer)
|
||||
{
|
||||
if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
|
||||
@@ -163,6 +160,8 @@ extern int kptr_restrict;
|
||||
|
||||
extern void wake_up_klogd(void);
|
||||
|
||||
char *log_buf_addr_get(void);
|
||||
u32 log_buf_len_get(void);
|
||||
void log_buf_kexec_setup(void);
|
||||
void __init setup_log_buf(int early);
|
||||
void dump_stack_set_arch_desc(const char *fmt, ...);
|
||||
@@ -198,6 +197,16 @@ static inline void wake_up_klogd(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline char *log_buf_addr_get(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline u32 log_buf_len_get(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void log_buf_kexec_setup(void)
|
||||
{
|
||||
}
|
||||
|
@@ -321,6 +321,49 @@ struct dquot_operations {
|
||||
|
||||
struct path;
|
||||
|
||||
/* Structure for communicating via ->get_dqblk() & ->set_dqblk() */
|
||||
struct qc_dqblk {
|
||||
int d_fieldmask; /* mask of fields to change in ->set_dqblk() */
|
||||
u64 d_spc_hardlimit; /* absolute limit on used space */
|
||||
u64 d_spc_softlimit; /* preferred limit on used space */
|
||||
u64 d_ino_hardlimit; /* maximum # allocated inodes */
|
||||
u64 d_ino_softlimit; /* preferred inode limit */
|
||||
u64 d_space; /* Space owned by the user */
|
||||
u64 d_ino_count; /* # inodes owned by the user */
|
||||
s64 d_ino_timer; /* zero if within inode limits */
|
||||
/* if not, we refuse service */
|
||||
s64 d_spc_timer; /* similar to above; for space */
|
||||
int d_ino_warns; /* # warnings issued wrt num inodes */
|
||||
int d_spc_warns; /* # warnings issued wrt used space */
|
||||
u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */
|
||||
u64 d_rt_spc_softlimit; /* preferred limit on RT space */
|
||||
u64 d_rt_space; /* realtime space owned */
|
||||
s64 d_rt_spc_timer; /* similar to above; for RT space */
|
||||
int d_rt_spc_warns; /* # warnings issued wrt RT space */
|
||||
};
|
||||
|
||||
/* Field specifiers for ->set_dqblk() in struct qc_dqblk */
|
||||
#define QC_INO_SOFT (1<<0)
|
||||
#define QC_INO_HARD (1<<1)
|
||||
#define QC_SPC_SOFT (1<<2)
|
||||
#define QC_SPC_HARD (1<<3)
|
||||
#define QC_RT_SPC_SOFT (1<<4)
|
||||
#define QC_RT_SPC_HARD (1<<5)
|
||||
#define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \
|
||||
QC_RT_SPC_SOFT | QC_RT_SPC_HARD)
|
||||
#define QC_SPC_TIMER (1<<6)
|
||||
#define QC_INO_TIMER (1<<7)
|
||||
#define QC_RT_SPC_TIMER (1<<8)
|
||||
#define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER)
|
||||
#define QC_SPC_WARNS (1<<9)
|
||||
#define QC_INO_WARNS (1<<10)
|
||||
#define QC_RT_SPC_WARNS (1<<11)
|
||||
#define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS)
|
||||
#define QC_SPACE (1<<12)
|
||||
#define QC_INO_COUNT (1<<13)
|
||||
#define QC_RT_SPACE (1<<14)
|
||||
#define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE)
|
||||
|
||||
/* Operations handling requests from userspace */
|
||||
struct quotactl_ops {
|
||||
int (*quota_on)(struct super_block *, int, int, struct path *);
|
||||
@@ -329,8 +372,8 @@ struct quotactl_ops {
|
||||
int (*quota_sync)(struct super_block *, int);
|
||||
int (*get_info)(struct super_block *, int, struct if_dqinfo *);
|
||||
int (*set_info)(struct super_block *, int, struct if_dqinfo *);
|
||||
int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *);
|
||||
int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *);
|
||||
int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
|
||||
int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
|
||||
int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
|
||||
int (*set_xstate)(struct super_block *, unsigned int, int);
|
||||
int (*get_xstatev)(struct super_block *, struct fs_quota_statv *);
|
||||
|
@@ -98,9 +98,9 @@ int dquot_quota_sync(struct super_block *sb, int type);
|
||||
int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
|
||||
int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
|
||||
int dquot_get_dqblk(struct super_block *sb, struct kqid id,
|
||||
struct fs_disk_quota *di);
|
||||
struct qc_dqblk *di);
|
||||
int dquot_set_dqblk(struct super_block *sb, struct kqid id,
|
||||
struct fs_disk_quota *di);
|
||||
struct qc_dqblk *di);
|
||||
|
||||
int __dquot_transfer(struct inode *inode, struct dquot **transfer_to);
|
||||
int dquot_transfer(struct inode *inode, struct iattr *iattr);
|
||||
|
@@ -110,6 +110,19 @@ static inline bool timespec_valid_strict(const struct timespec *ts)
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool timeval_valid(const struct timeval *tv)
|
||||
{
|
||||
/* Dates before 1970 are bogus */
|
||||
if (tv->tv_sec < 0)
|
||||
return false;
|
||||
|
||||
/* Can't have more microseconds then a second */
|
||||
if (tv->tv_usec < 0 || tv->tv_usec >= USEC_PER_SEC)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
|
||||
|
||||
#define CURRENT_TIME (current_kernel_time())
|
||||
|
Reference in New Issue
Block a user