summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-05-27 14:45:19 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2010-05-27 14:45:19 +1000
commit166f65074c064d72c7b204a28a36c4c4eb6c16fc (patch)
tree12a20af44af9ba0bd6719edc12844abea2944adb /include
parent86f069440050e95ff643228ef1406d6079001166 (diff)
parentfa9e355c6e40b3c2c91121780efb724722ec7ece (diff)
Merge remote branch 'tip/auto-latest'
Conflicts: Documentation/feature-removal-schedule.txt kernel/Makefile
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace_event.h8
-rw-r--r--include/linux/nmi.h13
-rw-r--r--include/linux/perf_event.h19
-rw-r--r--include/linux/sched.h12
-rw-r--r--include/trace/ftrace.h3
5 files changed, 33 insertions, 22 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index c082f223e2fe..8e1653c77fc8 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -136,6 +136,7 @@ struct ftrace_event_call {
void *data;
int perf_refcount;
+ void *perf_data;
int (*perf_event_enable)(struct ftrace_event_call *);
void (*perf_event_disable)(struct ftrace_event_call *);
};
@@ -194,7 +195,7 @@ struct perf_event;
DECLARE_PER_CPU(struct pt_regs, perf_trace_regs);
-extern int perf_trace_enable(int event_id);
+extern int perf_trace_enable(int event_id, void *data);
extern void perf_trace_disable(int event_id);
extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
char *filter_str);
@@ -205,11 +206,12 @@ perf_trace_buf_prepare(int size, unsigned short type, int *rctxp,
static inline void
perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
- u64 count, unsigned long irq_flags, struct pt_regs *regs)
+ u64 count, unsigned long irq_flags, struct pt_regs *regs,
+ void *event)
{
struct trace_entry *entry = raw_data;
- perf_tp_event(entry->type, addr, count, raw_data, size, regs);
+ perf_tp_event(entry->type, addr, count, raw_data, size, regs, event);
perf_swevent_put_recursion_context(rctx);
local_irq_restore(irq_flags);
}
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index b752e807adde..06aab5eee134 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -20,10 +20,14 @@ extern void touch_nmi_watchdog(void);
extern void acpi_nmi_disable(void);
extern void acpi_nmi_enable(void);
#else
+#ifndef CONFIG_HARDLOCKUP_DETECTOR
static inline void touch_nmi_watchdog(void)
{
touch_softlockup_watchdog();
}
+#else
+extern void touch_nmi_watchdog(void);
+#endif
static inline void acpi_nmi_disable(void) { }
static inline void acpi_nmi_enable(void) { }
#endif
@@ -47,4 +51,13 @@ static inline bool trigger_all_cpu_backtrace(void)
}
#endif
+#ifdef CONFIG_LOCKUP_DETECTOR
+int hw_nmi_is_cpu_stuck(struct pt_regs *);
+u64 hw_nmi_get_sample_period(void);
+extern int watchdog_enabled;
+struct ctl_table;
+extern int proc_dowatchdog_enabled(struct ctl_table *, int ,
+ void __user *, size_t *, loff_t *);
+#endif
+
#endif
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3fd5c82e0e18..fe50347dc645 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -485,6 +485,7 @@ struct perf_guest_info_callbacks {
#include <linux/ftrace.h>
#include <linux/cpu.h>
#include <asm/atomic.h>
+#include <asm/local.h>
#define PERF_MAX_STACK_DEPTH 255
@@ -588,20 +589,18 @@ struct perf_mmap_data {
#ifdef CONFIG_PERF_USE_VMALLOC
struct work_struct work;
#endif
- int data_order;
+ int data_order; /* allocation order */
int nr_pages; /* nr of data pages */
int writable; /* are we writable */
int nr_locked; /* nr pages mlocked */
atomic_t poll; /* POLL_ for wakeups */
- atomic_t events; /* event_id limit */
- atomic_long_t head; /* write position */
- atomic_long_t done_head; /* completed head */
-
- atomic_t lock; /* concurrent writes */
- atomic_t wakeup; /* needs a wakeup */
- atomic_t lost; /* nr records lost */
+ local_t head; /* write position */
+ local_t nest; /* nested writers */
+ local_t events; /* event limit */
+ local_t wakeup; /* needs a wakeup */
+ local_t lost; /* nr records lost */
long watermark; /* wakeup watermark */
@@ -805,9 +804,9 @@ struct perf_output_handle {
struct perf_mmap_data *data;
unsigned long head;
unsigned long offset;
+ unsigned long wakeup;
int nmi;
int sample;
- int locked;
};
#ifdef CONFIG_PERF_EVENTS
@@ -994,7 +993,7 @@ static inline bool perf_paranoid_kernel(void)
extern void perf_event_init(void);
extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
- int entry_size, struct pt_regs *regs);
+ int entry_size, struct pt_regs *regs, void *event);
extern void perf_bp_event(struct perf_event *event, void *data);
#ifndef perf_misc_flags
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c0151ffd3541..bcac6728c329 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -316,20 +316,16 @@ extern void scheduler_tick(void);
extern void sched_show_task(struct task_struct *p);
-#ifdef CONFIG_DETECT_SOFTLOCKUP
-extern void softlockup_tick(void);
+#ifdef CONFIG_LOCKUP_DETECTOR
extern void touch_softlockup_watchdog(void);
extern void touch_softlockup_watchdog_sync(void);
extern void touch_all_softlockup_watchdogs(void);
-extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
- void __user *buffer,
- size_t *lenp, loff_t *ppos);
+extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
+ void __user *buffer,
+ size_t *lenp, loff_t *ppos);
extern unsigned int softlockup_panic;
extern int softlockup_thresh;
#else
-static inline void softlockup_tick(void)
-{
-}
static inline void touch_softlockup_watchdog(void)
{
}
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 88c59c13ea7b..687f237f9b66 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -793,7 +793,8 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
{ assign; } \
\
perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
- __count, irq_flags, __regs); \
+ __count, irq_flags, __regs, \
+ event_call->perf_data); \
}
#undef DEFINE_EVENT