Commit 5deb45e3 authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar

ftrace: add notrace annotations for NMI routines

This annotates NMI functions with notrace. Some tracers may be able
to live with this, but some cannot. The safest is to turn it off,
it's not particularly interesting anyway.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 4bd01600
...@@ -321,7 +321,8 @@ EXPORT_SYMBOL(touch_nmi_watchdog); ...@@ -321,7 +321,8 @@ EXPORT_SYMBOL(touch_nmi_watchdog);
extern void die_nmi(struct pt_regs *, const char *msg); extern void die_nmi(struct pt_regs *, const char *msg);
__kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) notrace __kprobes int
nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
{ {
/* /*
......
...@@ -313,7 +313,8 @@ void touch_nmi_watchdog(void) ...@@ -313,7 +313,8 @@ void touch_nmi_watchdog(void)
} }
EXPORT_SYMBOL(touch_nmi_watchdog); EXPORT_SYMBOL(touch_nmi_watchdog);
int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) notrace __kprobes int
nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
{ {
int sum; int sum;
int touched = 0; int touched = 0;
...@@ -384,7 +385,8 @@ int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) ...@@ -384,7 +385,8 @@ int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
static unsigned ignore_nmis; static unsigned ignore_nmis;
asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) asmlinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{ {
nmi_enter(); nmi_enter();
add_pda(__nmi_count,1); add_pda(__nmi_count,1);
......
...@@ -681,7 +681,7 @@ gp_in_kernel: ...@@ -681,7 +681,7 @@ gp_in_kernel:
} }
} }
static __kprobes void static notrace __kprobes void
mem_parity_error(unsigned char reason, struct pt_regs *regs) mem_parity_error(unsigned char reason, struct pt_regs *regs)
{ {
printk(KERN_EMERG printk(KERN_EMERG
...@@ -707,7 +707,7 @@ mem_parity_error(unsigned char reason, struct pt_regs *regs) ...@@ -707,7 +707,7 @@ mem_parity_error(unsigned char reason, struct pt_regs *regs)
clear_mem_error(reason); clear_mem_error(reason);
} }
static __kprobes void static notrace __kprobes void
io_check_error(unsigned char reason, struct pt_regs *regs) io_check_error(unsigned char reason, struct pt_regs *regs)
{ {
unsigned long i; unsigned long i;
...@@ -727,7 +727,7 @@ io_check_error(unsigned char reason, struct pt_regs *regs) ...@@ -727,7 +727,7 @@ io_check_error(unsigned char reason, struct pt_regs *regs)
outb(reason, 0x61); outb(reason, 0x61);
} }
static __kprobes void static notrace __kprobes void
unknown_nmi_error(unsigned char reason, struct pt_regs *regs) unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
{ {
if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
...@@ -755,7 +755,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs) ...@@ -755,7 +755,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
static DEFINE_SPINLOCK(nmi_print_lock); static DEFINE_SPINLOCK(nmi_print_lock);
void __kprobes die_nmi(struct pt_regs *regs, const char *msg) void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg)
{ {
if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP) if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP)
return; return;
...@@ -786,7 +786,7 @@ void __kprobes die_nmi(struct pt_regs *regs, const char *msg) ...@@ -786,7 +786,7 @@ void __kprobes die_nmi(struct pt_regs *regs, const char *msg)
do_exit(SIGSEGV); do_exit(SIGSEGV);
} }
static __kprobes void default_do_nmi(struct pt_regs *regs) static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
{ {
unsigned char reason = 0; unsigned char reason = 0;
...@@ -828,7 +828,7 @@ static __kprobes void default_do_nmi(struct pt_regs *regs) ...@@ -828,7 +828,7 @@ static __kprobes void default_do_nmi(struct pt_regs *regs)
static int ignore_nmis; static int ignore_nmis;
__kprobes void do_nmi(struct pt_regs *regs, long error_code) notrace __kprobes void do_nmi(struct pt_regs *regs, long error_code)
{ {
int cpu; int cpu;
......
...@@ -600,7 +600,8 @@ void die(const char * str, struct pt_regs * regs, long err) ...@@ -600,7 +600,8 @@ void die(const char * str, struct pt_regs * regs, long err)
oops_end(flags, regs, SIGSEGV); oops_end(flags, regs, SIGSEGV);
} }
void __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic) notrace __kprobes void
die_nmi(char *str, struct pt_regs *regs, int do_panic)
{ {
unsigned long flags; unsigned long flags;
...@@ -772,7 +773,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, ...@@ -772,7 +773,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
die("general protection fault", regs, error_code); die("general protection fault", regs, error_code);
} }
static __kprobes void static notrace __kprobes void
mem_parity_error(unsigned char reason, struct pt_regs * regs) mem_parity_error(unsigned char reason, struct pt_regs * regs)
{ {
printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x.\n", printk(KERN_EMERG "Uhhuh. NMI received for unknown reason %02x.\n",
...@@ -796,7 +797,7 @@ mem_parity_error(unsigned char reason, struct pt_regs * regs) ...@@ -796,7 +797,7 @@ mem_parity_error(unsigned char reason, struct pt_regs * regs)
outb(reason, 0x61); outb(reason, 0x61);
} }
static __kprobes void static notrace __kprobes void
io_check_error(unsigned char reason, struct pt_regs * regs) io_check_error(unsigned char reason, struct pt_regs * regs)
{ {
printk("NMI: IOCK error (debug interrupt?)\n"); printk("NMI: IOCK error (debug interrupt?)\n");
...@@ -810,7 +811,7 @@ io_check_error(unsigned char reason, struct pt_regs * regs) ...@@ -810,7 +811,7 @@ io_check_error(unsigned char reason, struct pt_regs * regs)
outb(reason, 0x61); outb(reason, 0x61);
} }
static __kprobes void static notrace __kprobes void
unknown_nmi_error(unsigned char reason, struct pt_regs * regs) unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
{ {
if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
...@@ -827,7 +828,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs * regs) ...@@ -827,7 +828,7 @@ unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
/* Runs on IST stack. This code must keep interrupts off all the time. /* Runs on IST stack. This code must keep interrupts off all the time.
Nested NMIs are prevented by the CPU. */ Nested NMIs are prevented by the CPU. */
asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs) asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
{ {
unsigned char reason = 0; unsigned char reason = 0;
int cpu; int cpu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment