History

powerpc: Don't select HAVE_IRQ_EXIT_ON_IRQ_STACK

The HAVE_IRQ_EXIT_ON_IRQ_STACK option tells generic code that irq_exit() is called while still running on the hard irq stack (hardirq_ctx[] in the powerpc code). Selecting the option means the generic code will *not* switch to the softirq stack before running softirqs, because the code is already running on the (mostly empty) hard irq stack. But since commit 1b1b6a6f4cc0 ("powerpc: handle irq_enter/irq_exit in interrupt handler wrappers"), irq_exit() is now called on the regular task stack, not the hard irq stack. That's because previously irq_exit() was called in __do_irq() which is run on the hard irq stack, but now it is called in interrupt_async_exit_prepare() which is called from do_irq() constructed by the wrapper macro, which is after the switch back to the task stack. So drop HAVE_IRQ_EXIT_ON_IRQ_STACK from the Kconfig. This will mean an extra stack switch when processing some interrupts, but should significantly reduce the likelihood of stack overflow. It also means the softirq stack will be used for running softirqs from other interrupts that don't use the hard irq stack, eg. timer interrupts.

Michael Ellerman committed 4 years ago

Commit 1346d001 parent a1b29ba1 file · +0 −1Browse files

Unified · Split

arch/powerpc/Kconfig+0−1
@@ -223,7 +223,6 @@ config PPC · 222 unmodified lines
223 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH223 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
224 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)224 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
225 select HAVE_IOREMAP_PROT225 select HAVE_IOREMAP_PROT
226 select HAVE_IRQ_EXIT_ON_IRQ_STACK
227 select HAVE_IRQ_TIME_ACCOUNTING226 select HAVE_IRQ_TIME_ACCOUNTING
228 select HAVE_KERNEL_GZIP227 select HAVE_KERNEL_GZIP
229 select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE228 select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t