mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - a bit more MM - procfs updates - dynamic-debug fixes - lib/ updates - checkpatch - epoll - nilfs2 - signals - rapidio - PID management cleanup and optimization - kcov updates - sysvipc updates - quite a few misc things all over the place * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (94 commits) EXPERT Kconfig menu: fix broken EXPERT menu include/asm-generic/topology.h: remove unused parent_node() macro arch/tile/include/asm/topology.h: remove unused parent_node() macro arch/sparc/include/asm/topology_64.h: remove unused parent_node() macro arch/sh/include/asm/topology.h: remove unused parent_node() macro arch/ia64/include/asm/topology.h: remove unused parent_node() macro drivers/pcmcia/sa1111_badge4.c: avoid unused function warning mm: add infrastructure for get_user_pages_fast() benchmarking sysvipc: make get_maxid O(1) again sysvipc: properly name ipc_addid() limit parameter sysvipc: duplicate lock comments wrt ipc_addid() sysvipc: unteach ids->next_id for !CHECKPOINT_RESTORE initramfs: use time64_t timestamps drivers/watchdog: make use of devm_register_reboot_notifier() kernel/reboot.c: add devm_register_reboot_notifier() kcov: update documentation Makefile: support flag -fsanitizer-coverage=trace-cmp kcov: support comparison operands collection kcov: remove pointless current != NULL check kernel/panic.c: add TAINT_AUX ...
This commit is contained in:
commit
fa7f578076
115 changed files with 1892 additions and 952 deletions
|
|
@ -15,7 +15,7 @@
|
|||
#ifndef _LINUX_BITFIELD_H
|
||||
#define _LINUX_BITFIELD_H
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/build_bug.h>
|
||||
|
||||
/*
|
||||
* Bitfield access macros
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs);
|
|||
/* These are defined by the architecture */
|
||||
int is_valid_bugaddr(unsigned long addr);
|
||||
|
||||
void generic_bug_clear_once(void);
|
||||
|
||||
#else /* !CONFIG_GENERIC_BUG */
|
||||
|
||||
static inline enum bug_trap_type report_bug(unsigned long bug_addr,
|
||||
|
|
@ -51,6 +53,9 @@ static inline enum bug_trap_type report_bug(unsigned long bug_addr,
|
|||
return BUG_TRAP_TYPE_BUG;
|
||||
}
|
||||
|
||||
|
||||
static inline void generic_bug_clear_once(void) {}
|
||||
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -16,3 +16,6 @@
|
|||
* with any version that can compile the kernel
|
||||
*/
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#define randomized_struct_fields_start struct {
|
||||
#define randomized_struct_fields_end };
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <linux/atomic.h>
|
||||
|
||||
struct device;
|
||||
struct device_node;
|
||||
|
|
@ -71,7 +72,7 @@ struct gen_pool {
|
|||
*/
|
||||
struct gen_pool_chunk {
|
||||
struct list_head next_chunk; /* next chunk in pool */
|
||||
atomic_t avail;
|
||||
atomic_long_t avail;
|
||||
phys_addr_t phys_addr; /* physical starting address of memory chunk */
|
||||
unsigned long start_addr; /* start address of memory chunk */
|
||||
unsigned long end_addr; /* end address of memory chunk (inclusive) */
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ extern struct group_info init_groups;
|
|||
.numbers = { { \
|
||||
.nr = 0, \
|
||||
.ns = &init_pid_ns, \
|
||||
.pid_chain = { .next = NULL, .pprev = NULL }, \
|
||||
}, } \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,18 +42,21 @@
|
|||
*/
|
||||
#define readx_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) \
|
||||
({ \
|
||||
ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \
|
||||
might_sleep_if(sleep_us); \
|
||||
u64 __timeout_us = (timeout_us); \
|
||||
unsigned long __sleep_us = (sleep_us); \
|
||||
ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
|
||||
might_sleep_if((__sleep_us) != 0); \
|
||||
for (;;) { \
|
||||
(val) = op(addr); \
|
||||
if (cond) \
|
||||
break; \
|
||||
if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \
|
||||
if (__timeout_us && \
|
||||
ktime_compare(ktime_get(), __timeout) > 0) { \
|
||||
(val) = op(addr); \
|
||||
break; \
|
||||
} \
|
||||
if (sleep_us) \
|
||||
usleep_range((sleep_us >> 2) + 1, sleep_us); \
|
||||
if (__sleep_us) \
|
||||
usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
|
||||
} \
|
||||
(cond) ? 0 : -ETIMEDOUT; \
|
||||
})
|
||||
|
|
@ -77,17 +80,20 @@
|
|||
*/
|
||||
#define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \
|
||||
({ \
|
||||
ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \
|
||||
u64 __timeout_us = (timeout_us); \
|
||||
unsigned long __delay_us = (delay_us); \
|
||||
ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
|
||||
for (;;) { \
|
||||
(val) = op(addr); \
|
||||
if (cond) \
|
||||
break; \
|
||||
if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \
|
||||
if (__timeout_us && \
|
||||
ktime_compare(ktime_get(), __timeout) > 0) { \
|
||||
(val) = op(addr); \
|
||||
break; \
|
||||
} \
|
||||
if (delay_us) \
|
||||
udelay(delay_us); \
|
||||
if (__delay_us) \
|
||||
udelay(__delay_us); \
|
||||
} \
|
||||
(cond) ? 0 : -ETIMEDOUT; \
|
||||
})
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@ struct ipc_ids {
|
|||
bool tables_initialized;
|
||||
struct rw_semaphore rwsem;
|
||||
struct idr ipcs_idr;
|
||||
int max_id;
|
||||
#ifdef CONFIG_CHECKPOINT_RESTORE
|
||||
int next_id;
|
||||
#endif
|
||||
struct rhashtable key_ht;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,19 +8,23 @@ struct task_struct;
|
|||
|
||||
#ifdef CONFIG_KCOV
|
||||
|
||||
void kcov_task_init(struct task_struct *t);
|
||||
void kcov_task_exit(struct task_struct *t);
|
||||
|
||||
enum kcov_mode {
|
||||
/* Coverage collection is not enabled yet. */
|
||||
KCOV_MODE_DISABLED = 0,
|
||||
/* KCOV was initialized, but tracing mode hasn't been chosen yet. */
|
||||
KCOV_MODE_INIT = 1,
|
||||
/*
|
||||
* Tracing coverage collection mode.
|
||||
* Covered PCs are collected in a per-task buffer.
|
||||
*/
|
||||
KCOV_MODE_TRACE = 1,
|
||||
KCOV_MODE_TRACE_PC = 2,
|
||||
/* Collecting comparison operands mode. */
|
||||
KCOV_MODE_TRACE_CMP = 3,
|
||||
};
|
||||
|
||||
void kcov_task_init(struct task_struct *t);
|
||||
void kcov_task_exit(struct task_struct *t);
|
||||
|
||||
#else
|
||||
|
||||
static inline void kcov_task_init(struct task_struct *t) {}
|
||||
|
|
|
|||
|
|
@ -549,7 +549,8 @@ extern enum system_states {
|
|||
#define TAINT_UNSIGNED_MODULE 13
|
||||
#define TAINT_SOFTLOCKUP 14
|
||||
#define TAINT_LIVEPATCH 15
|
||||
#define TAINT_FLAGS_COUNT 16
|
||||
#define TAINT_AUX 16
|
||||
#define TAINT_FLAGS_COUNT 17
|
||||
|
||||
struct taint_flag {
|
||||
char c_true; /* character printed when tainted */
|
||||
|
|
|
|||
|
|
@ -104,9 +104,16 @@ extern nodemask_t _unused_nodemask_arg_;
|
|||
*
|
||||
* Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
|
||||
*/
|
||||
#define nodemask_pr_args(maskp) \
|
||||
((maskp) != NULL) ? MAX_NUMNODES : 0, \
|
||||
((maskp) != NULL) ? (maskp)->bits : NULL
|
||||
#define nodemask_pr_args(maskp) __nodemask_pr_numnodes(maskp), \
|
||||
__nodemask_pr_bits(maskp)
|
||||
static inline unsigned int __nodemask_pr_numnodes(const nodemask_t *m)
|
||||
{
|
||||
return m ? MAX_NUMNODES : 0;
|
||||
}
|
||||
static inline const unsigned long *__nodemask_pr_bits(const nodemask_t *m)
|
||||
{
|
||||
return m ? m->bits : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* The inline keyword gives the compiler room to decide to inline, or
|
||||
|
|
|
|||
|
|
@ -96,6 +96,17 @@ void set_pfnblock_flags_mask(struct page *page,
|
|||
#define set_pageblock_skip(page) \
|
||||
set_pageblock_flags_group(page, 1, PB_migrate_skip, \
|
||||
PB_migrate_skip)
|
||||
#else
|
||||
static inline bool get_pageblock_skip(struct page *page)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline void clear_pageblock_skip(struct page *page)
|
||||
{
|
||||
}
|
||||
static inline void set_pageblock_skip(struct page *page)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_COMPACTION */
|
||||
|
||||
#endif /* PAGEBLOCK_FLAGS_H */
|
||||
|
|
|
|||
|
|
@ -51,10 +51,8 @@ enum pid_type
|
|||
*/
|
||||
|
||||
struct upid {
|
||||
/* Try to keep pid_chain in the same cacheline as nr for find_vpid */
|
||||
int nr;
|
||||
struct pid_namespace *ns;
|
||||
struct hlist_node pid_chain;
|
||||
};
|
||||
|
||||
struct pid
|
||||
|
|
|
|||
|
|
@ -10,15 +10,8 @@
|
|||
#include <linux/nsproxy.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/ns_common.h>
|
||||
#include <linux/idr.h>
|
||||
|
||||
struct pidmap {
|
||||
atomic_t nr_free;
|
||||
void *page;
|
||||
};
|
||||
|
||||
#define BITS_PER_PAGE (PAGE_SIZE * 8)
|
||||
#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1)
|
||||
#define PIDMAP_ENTRIES ((PID_MAX_LIMIT+BITS_PER_PAGE-1)/BITS_PER_PAGE)
|
||||
|
||||
struct fs_pin;
|
||||
|
||||
|
|
@ -30,10 +23,9 @@ enum { /* definitions for pid_namespace's hide_pid field */
|
|||
|
||||
struct pid_namespace {
|
||||
struct kref kref;
|
||||
struct pidmap pidmap[PIDMAP_ENTRIES];
|
||||
struct idr idr;
|
||||
struct rcu_head rcu;
|
||||
int last_pid;
|
||||
unsigned int nr_hashed;
|
||||
unsigned int pid_allocated;
|
||||
struct task_struct *child_reaper;
|
||||
struct kmem_cache *pid_cachep;
|
||||
unsigned int level;
|
||||
|
|
@ -57,7 +49,7 @@ struct pid_namespace {
|
|||
|
||||
extern struct pid_namespace init_pid_ns;
|
||||
|
||||
#define PIDNS_HASH_ADDING (1U << 31)
|
||||
#define PIDNS_ADDING (1U << 31)
|
||||
|
||||
#ifdef CONFIG_PID_NS
|
||||
static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
|
||||
|
|
@ -106,6 +98,6 @@ static inline int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd)
|
|||
|
||||
extern struct pid_namespace *task_active_pid_ns(struct task_struct *tsk);
|
||||
void pidhash_init(void);
|
||||
void pidmap_init(void);
|
||||
void pid_idr_init(void);
|
||||
|
||||
#endif /* _LINUX_PID_NS_H */
|
||||
|
|
|
|||
|
|
@ -191,5 +191,6 @@ long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
|
|||
struct pipe_inode_info *get_pipe_info(struct file *file);
|
||||
|
||||
int create_pipe_files(struct file **, int);
|
||||
unsigned int round_pipe_size(unsigned int size);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#define _LINUX_RADIX_TREE_H
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/preempt.h>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <linux/notifier.h>
|
||||
#include <uapi/linux/reboot.h>
|
||||
|
||||
struct device;
|
||||
|
||||
#define SYS_DOWN 0x0001 /* Notify of system down */
|
||||
#define SYS_RESTART SYS_DOWN
|
||||
#define SYS_HALT 0x0002 /* Notify of system halt */
|
||||
|
|
@ -39,6 +41,8 @@ extern int reboot_force;
|
|||
extern int register_reboot_notifier(struct notifier_block *);
|
||||
extern int unregister_reboot_notifier(struct notifier_block *);
|
||||
|
||||
extern int devm_register_reboot_notifier(struct device *, struct notifier_block *);
|
||||
|
||||
extern int register_restart_handler(struct notifier_block *);
|
||||
extern int unregister_restart_handler(struct notifier_block *);
|
||||
extern void do_kernel_restart(char *cmd);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ extern int proc_dointvec_minmax(struct ctl_table *, int,
|
|||
extern int proc_douintvec_minmax(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int proc_dopipe_max_size(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos);
|
||||
extern int proc_dointvec_jiffies(struct ctl_table *, int,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
|
||||
|
|
|
|||
Loading…
Reference in a new issue