Merge branch 'linus' into perf/core
Merge reason: Pick up perf fixes that are now upstream Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
commit
c7f9a6f377
206 changed files with 2147 additions and 1130 deletions
|
|
@ -1,5 +1,6 @@
|
|||
header-y += byteorder/
|
||||
header-y += can/
|
||||
header-y += caif/
|
||||
header-y += dvb/
|
||||
header-y += hdlc/
|
||||
header-y += isdn/
|
||||
|
|
|
|||
2
include/linux/caif/Kbuild
Normal file
2
include/linux/caif/Kbuild
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
header-y += caif_socket.h
|
||||
header-y += if_caif.h
|
||||
|
|
@ -2555,9 +2555,12 @@ int proc_nr_inodes(struct ctl_table *table, int write,
|
|||
void __user *buffer, size_t *lenp, loff_t *ppos);
|
||||
int __init get_filesystem_list(char *buf);
|
||||
|
||||
#define __FMODE_EXEC ((__force int) FMODE_EXEC)
|
||||
#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY)
|
||||
|
||||
#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
|
||||
#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
|
||||
(flag & FMODE_NONOTIFY)))
|
||||
(flag & __FMODE_NONOTIFY)))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_FS_H */
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
|
|||
|
||||
#define IRQF_MODIFY_MASK \
|
||||
(IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
|
||||
IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL)
|
||||
IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \
|
||||
IRQ_PER_CPU)
|
||||
|
||||
#ifdef CONFIG_IRQ_PER_CPU
|
||||
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ struct module
|
|||
keeping pointers to this stuff */
|
||||
char *args;
|
||||
#ifdef CONFIG_TRACEPOINTS
|
||||
struct tracepoint *tracepoints;
|
||||
struct tracepoint * const *tracepoints_ptrs;
|
||||
unsigned int num_tracepoints;
|
||||
#endif
|
||||
#ifdef HAVE_JUMP_LABEL
|
||||
|
|
@ -389,7 +389,7 @@ struct module
|
|||
unsigned int num_trace_bprintk_fmt;
|
||||
#endif
|
||||
#ifdef CONFIG_EVENT_TRACING
|
||||
struct ftrace_event_call *trace_events;
|
||||
struct ftrace_event_call **trace_events;
|
||||
unsigned int num_trace_events;
|
||||
#endif
|
||||
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ static inline int ip_mroute_opt(int opt)
|
|||
extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
|
||||
extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
|
||||
extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
|
||||
extern int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
|
||||
extern int ip_mr_init(void);
|
||||
#else
|
||||
static inline
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int
|
|||
extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
|
||||
extern int ip6_mr_input(struct sk_buff *skb);
|
||||
extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg);
|
||||
extern int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
|
||||
extern int ip6_mr_init(void);
|
||||
extern void ip6_mr_cleanup(void);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -182,6 +182,26 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* res_counter_check_margin - check if the counter allows charging
|
||||
* @cnt: the resource counter to check
|
||||
* @bytes: the number of bytes to check the remaining space against
|
||||
*
|
||||
* Returns a boolean value on whether the counter can be charged
|
||||
* @bytes or whether this would exceed the limit.
|
||||
*/
|
||||
static inline bool res_counter_check_margin(struct res_counter *cnt,
|
||||
unsigned long bytes)
|
||||
{
|
||||
bool ret;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cnt->lock, flags);
|
||||
ret = cnt->limit - cnt->usage >= bytes;
|
||||
spin_unlock_irqrestore(&cnt->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt)
|
||||
{
|
||||
bool ret;
|
||||
|
|
|
|||
|
|
@ -125,39 +125,37 @@ extern struct trace_event_functions enter_syscall_print_funcs;
|
|||
extern struct trace_event_functions exit_syscall_print_funcs;
|
||||
|
||||
#define SYSCALL_TRACE_ENTER_EVENT(sname) \
|
||||
static struct syscall_metadata \
|
||||
__attribute__((__aligned__(4))) __syscall_meta_##sname; \
|
||||
static struct syscall_metadata __syscall_meta_##sname; \
|
||||
static struct ftrace_event_call __used \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
event_enter_##sname = { \
|
||||
.name = "sys_enter"#sname, \
|
||||
.class = &event_class_syscall_enter, \
|
||||
.event.funcs = &enter_syscall_print_funcs, \
|
||||
.data = (void *)&__syscall_meta_##sname,\
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
*__event_enter_##sname = &event_enter_##sname; \
|
||||
__TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
|
||||
|
||||
#define SYSCALL_TRACE_EXIT_EVENT(sname) \
|
||||
static struct syscall_metadata \
|
||||
__attribute__((__aligned__(4))) __syscall_meta_##sname; \
|
||||
static struct syscall_metadata __syscall_meta_##sname; \
|
||||
static struct ftrace_event_call __used \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
event_exit_##sname = { \
|
||||
.name = "sys_exit"#sname, \
|
||||
.class = &event_class_syscall_exit, \
|
||||
.event.funcs = &exit_syscall_print_funcs, \
|
||||
.data = (void *)&__syscall_meta_##sname,\
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
*__event_exit_##sname = &event_exit_##sname; \
|
||||
__TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
|
||||
|
||||
#define SYSCALL_METADATA(sname, nb) \
|
||||
SYSCALL_TRACE_ENTER_EVENT(sname); \
|
||||
SYSCALL_TRACE_EXIT_EVENT(sname); \
|
||||
static struct syscall_metadata __used \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("__syscalls_metadata"))) \
|
||||
__syscall_meta_##sname = { \
|
||||
.name = "sys"#sname, \
|
||||
.nb_args = nb, \
|
||||
|
|
@ -166,14 +164,15 @@ extern struct trace_event_functions exit_syscall_print_funcs;
|
|||
.enter_event = &event_enter_##sname, \
|
||||
.exit_event = &event_exit_##sname, \
|
||||
.enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \
|
||||
};
|
||||
}; \
|
||||
static struct syscall_metadata __used \
|
||||
__attribute__((section("__syscalls_metadata"))) \
|
||||
*__p_syscall_meta_##sname = &__syscall_meta_##sname;
|
||||
|
||||
#define SYSCALL_DEFINE0(sname) \
|
||||
SYSCALL_TRACE_ENTER_EVENT(_##sname); \
|
||||
SYSCALL_TRACE_EXIT_EVENT(_##sname); \
|
||||
static struct syscall_metadata __used \
|
||||
__attribute__((__aligned__(4))) \
|
||||
__attribute__((section("__syscalls_metadata"))) \
|
||||
__syscall_meta__##sname = { \
|
||||
.name = "sys_"#sname, \
|
||||
.nb_args = 0, \
|
||||
|
|
@ -181,6 +180,9 @@ extern struct trace_event_functions exit_syscall_print_funcs;
|
|||
.exit_event = &event_exit__##sname, \
|
||||
.enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \
|
||||
}; \
|
||||
static struct syscall_metadata __used \
|
||||
__attribute__((section("__syscalls_metadata"))) \
|
||||
*__p_syscall_meta_##sname = &__syscall_meta__##sname; \
|
||||
asmlinkage long sys_##sname(void)
|
||||
#else
|
||||
#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)
|
||||
|
|
|
|||
|
|
@ -33,12 +33,7 @@ struct tracepoint {
|
|||
void (*regfunc)(void);
|
||||
void (*unregfunc)(void);
|
||||
struct tracepoint_func __rcu *funcs;
|
||||
} __attribute__((aligned(32))); /*
|
||||
* Aligned on 32 bytes because it is
|
||||
* globally visible and gcc happily
|
||||
* align these on the structure size.
|
||||
* Keep in sync with vmlinux.lds.h.
|
||||
*/
|
||||
};
|
||||
|
||||
/*
|
||||
* Connect a probe to a tracepoint.
|
||||
|
|
@ -61,15 +56,15 @@ extern void tracepoint_probe_update_all(void);
|
|||
|
||||
struct tracepoint_iter {
|
||||
struct module *module;
|
||||
struct tracepoint *tracepoint;
|
||||
struct tracepoint * const *tracepoint;
|
||||
};
|
||||
|
||||
extern void tracepoint_iter_start(struct tracepoint_iter *iter);
|
||||
extern void tracepoint_iter_next(struct tracepoint_iter *iter);
|
||||
extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
|
||||
extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
|
||||
extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
|
||||
struct tracepoint *begin, struct tracepoint *end);
|
||||
extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint,
|
||||
struct tracepoint * const *begin, struct tracepoint * const *end);
|
||||
|
||||
/*
|
||||
* tracepoint_synchronize_unregister must be called between the last tracepoint
|
||||
|
|
@ -84,11 +79,13 @@ static inline void tracepoint_synchronize_unregister(void)
|
|||
#define PARAMS(args...) args
|
||||
|
||||
#ifdef CONFIG_TRACEPOINTS
|
||||
extern void tracepoint_update_probe_range(struct tracepoint *begin,
|
||||
struct tracepoint *end);
|
||||
extern
|
||||
void tracepoint_update_probe_range(struct tracepoint * const *begin,
|
||||
struct tracepoint * const *end);
|
||||
#else
|
||||
static inline void tracepoint_update_probe_range(struct tracepoint *begin,
|
||||
struct tracepoint *end)
|
||||
static inline
|
||||
void tracepoint_update_probe_range(struct tracepoint * const *begin,
|
||||
struct tracepoint * const *end)
|
||||
{ }
|
||||
#endif /* CONFIG_TRACEPOINTS */
|
||||
|
||||
|
|
@ -174,12 +171,20 @@ do_trace: \
|
|||
{ \
|
||||
}
|
||||
|
||||
/*
|
||||
* We have no guarantee that gcc and the linker won't up-align the tracepoint
|
||||
* structures, so we create an array of pointers that will be used for iteration
|
||||
* on the tracepoints.
|
||||
*/
|
||||
#define DEFINE_TRACE_FN(name, reg, unreg) \
|
||||
static const char __tpstrtab_##name[] \
|
||||
__attribute__((section("__tracepoints_strings"))) = #name; \
|
||||
struct tracepoint __tracepoint_##name \
|
||||
__attribute__((section("__tracepoints"), aligned(32))) = \
|
||||
{ __tpstrtab_##name, 0, reg, unreg, NULL }
|
||||
__attribute__((section("__tracepoints"))) = \
|
||||
{ __tpstrtab_##name, 0, reg, unreg, NULL }; \
|
||||
static struct tracepoint * const __tracepoint_ptr_##name __used \
|
||||
__attribute__((section("__tracepoints_ptrs"))) = \
|
||||
&__tracepoint_##name;
|
||||
|
||||
#define DEFINE_TRACE(name) \
|
||||
DEFINE_TRACE_FN(name, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue