mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge branch 'linus' into tracing/core
Conflicts:
include/linux/module.h
kernel/module.c
Semantic conflict:
include/trace/events/module.h
Merge reason: Resolve the conflict with upstream commit 5fbfb18 ("Fix up
possibly racy module refcounting")
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
commit
c1ab9cab75
4460 changed files with 23837 additions and 4318 deletions
|
|
@ -14,6 +14,9 @@
|
|||
#ifndef ASMARM_AMBA_H
|
||||
#define ASMARM_AMBA_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/resource.h>
|
||||
|
||||
#define AMBA_NR_IRQS 2
|
||||
|
||||
struct amba_device {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
/* platform data for the PL061 GPIO driver */
|
||||
|
||||
struct pl061_platform_data {
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@
|
|||
(bit) < (size); \
|
||||
(bit) = find_next_bit((addr), (size), (bit) + 1))
|
||||
|
||||
/* Temporary */
|
||||
#define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size)
|
||||
|
||||
static __inline__ int get_bitmask_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#define _LINUX_DELAYACCT_H
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
/*
|
||||
* Per-task flags relevant to delay accounting
|
||||
|
|
|
|||
|
|
@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only);
|
|||
extern void cancel_freezing(struct task_struct *p);
|
||||
|
||||
#ifdef CONFIG_CGROUP_FREEZER
|
||||
extern int cgroup_frozen(struct task_struct *task);
|
||||
extern int cgroup_freezing_or_frozen(struct task_struct *task);
|
||||
#else /* !CONFIG_CGROUP_FREEZER */
|
||||
static inline int cgroup_frozen(struct task_struct *task) { return 0; }
|
||||
static inline int cgroup_freezing_or_frozen(struct task_struct *task)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* !CONFIG_CGROUP_FREEZER */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov,
|
|||
/* fs/block_dev.c */
|
||||
extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t pos);
|
||||
extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync);
|
||||
|
||||
/* fs/splice.c */
|
||||
extern ssize_t generic_file_splice_read(struct file *, loff_t *,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/inotify.h>
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
/*
|
||||
* fsnotify_d_instantiate - instantiate a dentry for inode
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
struct gameport {
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#define _LINUX_IO_MAPPING_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/iomap.h>
|
||||
|
|
|
|||
|
|
@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr;
|
|||
* mapped address is set in the ibft_addr variable.
|
||||
*/
|
||||
#ifdef CONFIG_ISCSI_IBFT_FIND
|
||||
extern void __init reserve_ibft_region(void);
|
||||
unsigned long find_ibft_region(unsigned long *sizep);
|
||||
#else
|
||||
static inline void reserve_ibft_region(void) { }
|
||||
static inline unsigned long find_ibft_region(unsigned long *sizep)
|
||||
{
|
||||
*sizep = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ISCSI_IBFT_H */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define journal_oom_retry 1
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/bit_spinlock.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/slab.h>
|
||||
#endif
|
||||
|
||||
#define journal_oom_retry 1
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
.burst = DEFAULT_RATELIMIT_BURST, \
|
||||
}; \
|
||||
\
|
||||
if (!__ratelimit(&_rs)) \
|
||||
if (__ratelimit(&_rs)) \
|
||||
printk(fmt, ##__VA_ARGS__); \
|
||||
})
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ union { \
|
|||
*/
|
||||
#define INIT_KFIFO(name) \
|
||||
name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \
|
||||
sizeof(struct kfifo), name##kfifo_buffer)
|
||||
sizeof(struct kfifo), \
|
||||
name##kfifo_buffer + sizeof(struct kfifo))
|
||||
|
||||
/**
|
||||
* DEFINE_KFIFO - macro to define and initialize a kfifo
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ enum {
|
|||
ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */
|
||||
ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */
|
||||
ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */
|
||||
ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */
|
||||
ATA_DFLAG_INIT_MASK = (1 << 24) - 1,
|
||||
|
||||
ATA_DFLAG_DETACH = (1 << 24),
|
||||
|
|
|
|||
|
|
@ -783,8 +783,8 @@ struct mm_walk {
|
|||
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
|
||||
int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long,
|
||||
struct mm_walk *);
|
||||
int (*hugetlb_entry)(pte_t *, unsigned long,
|
||||
unsigned long, unsigned long, struct mm_walk *);
|
||||
struct mm_struct *mm;
|
||||
void *private;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -330,8 +330,11 @@ struct module
|
|||
struct module_notes_attrs *notes_attrs;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Per-cpu data. */
|
||||
void *percpu;
|
||||
void __percpu *percpu;
|
||||
unsigned int percpu_size;
|
||||
#endif
|
||||
|
||||
/* The command line arguments (may be mangled). People like
|
||||
keeping pointers to this stuff */
|
||||
|
|
@ -365,7 +368,8 @@ struct module
|
|||
void (*exit)(void);
|
||||
|
||||
struct module_ref {
|
||||
int count;
|
||||
unsigned int incs;
|
||||
unsigned int decs;
|
||||
} __percpu *refptr;
|
||||
#endif
|
||||
|
||||
|
|
@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod)
|
|||
struct module *__module_text_address(unsigned long addr);
|
||||
struct module *__module_address(unsigned long addr);
|
||||
bool is_module_address(unsigned long addr);
|
||||
bool is_module_percpu_address(unsigned long addr);
|
||||
bool is_module_text_address(unsigned long addr);
|
||||
|
||||
static inline int within_module_core(unsigned long addr, struct module *mod)
|
||||
|
|
@ -459,7 +464,7 @@ static inline void __module_get(struct module *module)
|
|||
{
|
||||
if (module) {
|
||||
preempt_disable();
|
||||
__this_cpu_inc(module->refptr->count);
|
||||
__this_cpu_inc(module->refptr->incs);
|
||||
trace_module_get(module, _THIS_IP_);
|
||||
preempt_enable();
|
||||
}
|
||||
|
|
@ -473,10 +478,9 @@ static inline int try_module_get(struct module *module)
|
|||
preempt_disable();
|
||||
|
||||
if (likely(module_is_live(module))) {
|
||||
__this_cpu_inc(module->refptr->count);
|
||||
__this_cpu_inc(module->refptr->incs);
|
||||
trace_module_get(module, _THIS_IP_);
|
||||
}
|
||||
else
|
||||
} else
|
||||
ret = 0;
|
||||
|
||||
preempt_enable();
|
||||
|
|
@ -561,6 +565,11 @@ static inline bool is_module_address(unsigned long addr)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_module_percpu_address(unsigned long addr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_module_text_address(unsigned long addr)
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ enum {
|
|||
PCG_CACHE, /* charged as cache */
|
||||
PCG_USED, /* this object is in use. */
|
||||
PCG_ACCT_LRU, /* page has been accounted for */
|
||||
PCG_FILE_MAPPED, /* page is accounted as "mapped" */
|
||||
};
|
||||
|
||||
#define TESTPCGFLAG(uname, lname) \
|
||||
|
|
@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU)
|
|||
TESTPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU)
|
||||
|
||||
|
||||
SETPCGFLAG(FileMapped, FILE_MAPPED)
|
||||
CLEARPCGFLAG(FileMapped, FILE_MAPPED)
|
||||
TESTPCGFLAG(FileMapped, FILE_MAPPED)
|
||||
|
||||
static inline int page_cgroup_nid(struct page_cgroup *pc)
|
||||
{
|
||||
return page_to_nid(pc->page);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
#define __LINUX_PERCPU_H
|
||||
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/slab.h> /* For kmalloc() */
|
||||
#include <linux/smp.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/percpu.h>
|
||||
|
||||
|
|
@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size,
|
|||
#define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)))
|
||||
|
||||
extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align);
|
||||
extern void __percpu *__alloc_percpu(size_t size, size_t align);
|
||||
extern void free_percpu(void __percpu *__pdata);
|
||||
extern phys_addr_t per_cpu_ptr_to_phys(void *addr);
|
||||
extern bool is_kernel_percpu_address(unsigned long addr);
|
||||
|
||||
#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
|
||||
extern void __init setup_per_cpu_areas(void);
|
||||
|
|
@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void);
|
|||
|
||||
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
|
||||
|
||||
static inline void __percpu *__alloc_percpu(size_t size, size_t align)
|
||||
/* can't distinguish from other static vars, always false */
|
||||
static inline bool is_kernel_percpu_address(unsigned long addr)
|
||||
{
|
||||
/*
|
||||
* Can't easily make larger alignment work with kmalloc. WARN
|
||||
* on it. Larger alignment should only be used for module
|
||||
* percpu sections on SMP for which this path isn't used.
|
||||
*/
|
||||
WARN_ON_ONCE(align > SMP_CACHE_BYTES);
|
||||
return kzalloc(size, GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void free_percpu(void __percpu *p)
|
||||
{
|
||||
kfree(p);
|
||||
}
|
||||
|
||||
static inline phys_addr_t per_cpu_ptr_to_phys(void *addr)
|
||||
{
|
||||
return __pa(addr);
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void __init setup_per_cpu_areas(void) { }
|
||||
|
|
@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr)
|
|||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
extern void __percpu *__alloc_percpu(size_t size, size_t align);
|
||||
extern void free_percpu(void __percpu *__pdata);
|
||||
extern phys_addr_t per_cpu_ptr_to_phys(void *addr);
|
||||
|
||||
#define alloc_percpu(type) \
|
||||
(typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type))
|
||||
|
||||
|
|
|
|||
|
|
@ -842,13 +842,6 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
|
|||
|
||||
extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64);
|
||||
|
||||
static inline void
|
||||
perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
|
||||
{
|
||||
if (atomic_read(&perf_swevent_enabled[event_id]))
|
||||
__perf_sw_event(event_id, nr, nmi, regs, addr);
|
||||
}
|
||||
|
||||
extern void
|
||||
perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip);
|
||||
|
||||
|
|
@ -887,6 +880,20 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip)
|
|||
return perf_arch_fetch_caller_regs(regs, ip, skip);
|
||||
}
|
||||
|
||||
static inline void
|
||||
perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
|
||||
{
|
||||
if (atomic_read(&perf_swevent_enabled[event_id])) {
|
||||
struct pt_regs hot_regs;
|
||||
|
||||
if (!regs) {
|
||||
perf_fetch_caller_regs(&hot_regs, 1);
|
||||
regs = &hot_regs;
|
||||
}
|
||||
__perf_sw_event(event_id, nr, nmi, regs, addr);
|
||||
}
|
||||
}
|
||||
|
||||
extern void __perf_event_mmap(struct vm_area_struct *vma);
|
||||
|
||||
static inline void perf_event_mmap(struct vm_area_struct *vma)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/key.h>
|
||||
#include <linux/xfrm.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/slab.h>
|
||||
#include <net/flow.h>
|
||||
|
||||
/* Maximum number of letters for an LSM name string */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
/*
|
||||
* INTERFACES between SPI master-side drivers and SPI infrastructure.
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <linux/taskstats.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#ifdef CONFIG_TASKSTATS
|
||||
extern struct kmem_cache *taskstats_cache;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
#ifndef __LINUX_USB_GADGET_H
|
||||
#define __LINUX_USB_GADGET_H
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
struct usb_ep;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,37 +12,14 @@
|
|||
|
||||
/* Feature bits */
|
||||
#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */
|
||||
#define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */
|
||||
|
||||
struct virtio_console_config {
|
||||
/* colums of the screens */
|
||||
__u16 cols;
|
||||
/* rows of the screens */
|
||||
__u16 rows;
|
||||
/* max. number of ports this device can hold */
|
||||
__u32 max_nr_ports;
|
||||
/* number of ports added so far */
|
||||
__u32 nr_ports;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* A message that's passed between the Host and the Guest for a
|
||||
* particular port.
|
||||
*/
|
||||
struct virtio_console_control {
|
||||
__u32 id; /* Port number */
|
||||
__u16 event; /* The kind of control event (see below) */
|
||||
__u16 value; /* Extra information for the key */
|
||||
};
|
||||
|
||||
/* Some events for control messages */
|
||||
#define VIRTIO_CONSOLE_PORT_READY 0
|
||||
#define VIRTIO_CONSOLE_CONSOLE_PORT 1
|
||||
#define VIRTIO_CONSOLE_RESIZE 2
|
||||
#define VIRTIO_CONSOLE_PORT_OPEN 3
|
||||
#define VIRTIO_CONSOLE_PORT_NAME 4
|
||||
#define VIRTIO_CONSOLE_PORT_REMOVE 5
|
||||
|
||||
#ifdef __KERNEL__
|
||||
int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int));
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
|
||||
/* Backend stuff */
|
||||
|
|
|
|||
Loading…
Reference in a new issue