diff options
| -rw-r--r-- | arch/sparc/kernel/rtrap_64.S | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index fd3cee4d117c..c720f0ccea1b 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
| @@ -172,7 +172,17 @@ rtrap_xcall: | |||
| 172 | nop | 172 | nop |
| 173 | call trace_hardirqs_on | 173 | call trace_hardirqs_on |
| 174 | nop | 174 | nop |
| 175 | wrpr %l4, %pil | 175 | /* Do not actually set the %pil here. We will do that |
| 176 | * below after we clear PSTATE_IE in the %pstate register. | ||
| 177 | * If we re-enable interrupts here, we can recurse down | ||
| 178 | * the hardirq stack potentially endlessly, causing a | ||
| 179 | * stack overflow. | ||
| 180 | * | ||
| 181 | * It is tempting to put this test and trace_hardirqs_on | ||
| 182 | * call at the 'rt_continue' label, but that will not work | ||
| 183 | * as that path hits unconditionally and we do not want to | ||
| 184 | * execute this in NMI return paths, for example. | ||
| 185 | */ | ||
| 176 | #endif | 186 | #endif |
| 177 | rtrap_no_irq_enable: | 187 | rtrap_no_irq_enable: |
| 178 | andcc %l1, TSTATE_PRIV, %l3 | 188 | andcc %l1, TSTATE_PRIV, %l3 |
