Skip to content

Commit a2f5269

Browse files
Steven Rostedtmichalsimek
authored andcommitted
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>
1 parent 02f8c6a commit a2f5269

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎arch/microblaze/include/asm/irqflags.h‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
1616

17-
static inline unsigned long arch_local_irq_save(void)
17+
static inline notrace unsigned long arch_local_irq_save(void)
1818
{
1919
unsigned long flags;
2020
asm volatile(" msrclr %0, %1 \n"
@@ -25,7 +25,7 @@ static inline unsigned long arch_local_irq_save(void)
2525
return flags;
2626
}
2727

28-
static inline void arch_local_irq_disable(void)
28+
static inline notrace void arch_local_irq_disable(void)
2929
{
3030
/* this uses r0 without declaring it - is that correct? */
3131
asm volatile(" msrclr r0, %0 \n"
@@ -35,7 +35,7 @@ static inline void arch_local_irq_disable(void)
3535
: "memory");
3636
}
3737

38-
static inline void arch_local_irq_enable(void)
38+
static inline notrace void arch_local_irq_enable(void)
3939
{
4040
/* this uses r0 without declaring it - is that correct? */
4141
asm volatile(" msrset r0, %0 \n"
@@ -47,7 +47,7 @@ static inline void arch_local_irq_enable(void)
4747

4848
#else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
4949

50-
static inline unsigned long arch_local_irq_save(void)
50+
static inline notrace unsigned long arch_local_irq_save(void)
5151
{
5252
unsigned long flags, tmp;
5353
asm volatile (" mfs %0, rmsr \n"
@@ -61,7 +61,7 @@ static inline unsigned long arch_local_irq_save(void)
6161
return flags;
6262
}
6363

64-
static inline void arch_local_irq_disable(void)
64+
static inline notrace void arch_local_irq_disable(void)
6565
{
6666
unsigned long tmp;
6767
asm volatile(" mfs %0, rmsr \n"
@@ -74,7 +74,7 @@ static inline void arch_local_irq_disable(void)
7474
: "memory");
7575
}
7676

77-
static inline void arch_local_irq_enable(void)
77+
static inline notrace void arch_local_irq_enable(void)
7878
{
7979
unsigned long tmp;
8080
asm volatile(" mfs %0, rmsr \n"
@@ -89,7 +89,7 @@ static inline void arch_local_irq_enable(void)
8989

9090
#endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
9191

92-
static inline unsigned long arch_local_save_flags(void)
92+
static inline notrace unsigned long arch_local_save_flags(void)
9393
{
9494
unsigned long flags;
9595
asm volatile(" mfs %0, rmsr \n"
@@ -100,7 +100,7 @@ static inline unsigned long arch_local_save_flags(void)
100100
return flags;
101101
}
102102

103-
static inline void arch_local_irq_restore(unsigned long flags)
103+
static inline notrace void arch_local_irq_restore(unsigned long flags)
104104
{
105105
asm volatile(" mts rmsr, %0 \n"
106106
" nop \n"
@@ -109,12 +109,12 @@ static inline void arch_local_irq_restore(unsigned long flags)
109109
: "memory");
110110
}
111111

112-
static inline bool arch_irqs_disabled_flags(unsigned long flags)
112+
static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
113113
{
114114
return (flags & MSR_IE) == 0;
115115
}
116116

117-
static inline bool arch_irqs_disabled(void)
117+
static inline notrace bool arch_irqs_disabled(void)
118118
{
119119
return arch_irqs_disabled_flags(arch_local_save_flags());
120120
}

0 commit comments

Comments
 (0)