Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze/irqs: Do not trace arch_local_{*,irq_*} functions

Do not trace arch_local_save_flags(), arch_local_irq_*() and friends.
Although they are marked inline, gcc may still make a function out of
them and add it to the pool of functions that are traced by the function
tracer. This can cause undesirable results (kernel panic, triple faults,
etc).

Add the notrace notation to prevent them from ever being traced.

Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Steven Rostedt and committed by
Michal Simek
a2f52699 02f8c6ae

+10 -10
+10 -10
arch/microblaze/include/asm/irqflags.h
··· 14 14 15 15 #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 16 16 17 - static inline unsigned long arch_local_irq_save(void) 17 + static inline notrace unsigned long arch_local_irq_save(void) 18 18 { 19 19 unsigned long flags; 20 20 asm volatile(" msrclr %0, %1 \n" ··· 25 25 return flags; 26 26 } 27 27 28 - static inline void arch_local_irq_disable(void) 28 + static inline notrace void arch_local_irq_disable(void) 29 29 { 30 30 /* this uses r0 without declaring it - is that correct? */ 31 31 asm volatile(" msrclr r0, %0 \n" ··· 35 35 : "memory"); 36 36 } 37 37 38 - static inline void arch_local_irq_enable(void) 38 + static inline notrace void arch_local_irq_enable(void) 39 39 { 40 40 /* this uses r0 without declaring it - is that correct? */ 41 41 asm volatile(" msrset r0, %0 \n" ··· 47 47 48 48 #else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ 49 49 50 - static inline unsigned long arch_local_irq_save(void) 50 + static inline notrace unsigned long arch_local_irq_save(void) 51 51 { 52 52 unsigned long flags, tmp; 53 53 asm volatile (" mfs %0, rmsr \n" ··· 61 61 return flags; 62 62 } 63 63 64 - static inline void arch_local_irq_disable(void) 64 + static inline notrace void arch_local_irq_disable(void) 65 65 { 66 66 unsigned long tmp; 67 67 asm volatile(" mfs %0, rmsr \n" ··· 74 74 : "memory"); 75 75 } 76 76 77 - static inline void arch_local_irq_enable(void) 77 + static inline notrace void arch_local_irq_enable(void) 78 78 { 79 79 unsigned long tmp; 80 80 asm volatile(" mfs %0, rmsr \n" ··· 89 89 90 90 #endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ 91 91 92 - static inline unsigned long arch_local_save_flags(void) 92 + static inline notrace unsigned long arch_local_save_flags(void) 93 93 { 94 94 unsigned long flags; 95 95 asm volatile(" mfs %0, rmsr \n" ··· 100 100 return flags; 101 101 } 102 102 103 - static inline void arch_local_irq_restore(unsigned long flags) 103 + static inline notrace void arch_local_irq_restore(unsigned long flags) 104 104 { 105 105 asm volatile(" mts rmsr, %0 \n" 106 106 " nop \n" ··· 109 109 : "memory"); 110 110 } 111 111 112 - static inline bool arch_irqs_disabled_flags(unsigned long flags) 112 + static inline notrace bool arch_irqs_disabled_flags(unsigned long flags) 113 113 { 114 114 return (flags & MSR_IE) == 0; 115 115 } 116 116 117 - static inline bool arch_irqs_disabled(void) 117 + static inline notrace bool arch_irqs_disabled(void) 118 118 { 119 119 return arch_irqs_disabled_flags(arch_local_save_flags()); 120 120 }