On 10/16/21 18:49, Rolf Eike Beer wrote: > Sven Schnelle wrote: > >> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig >> index 27a8b49af11f..97a889eaffe1 100644 >> --- a/arch/parisc/Kconfig >> +++ b/arch/parisc/Kconfig >> @@ -288,6 +288,20 @@ config SMP >> >> If you don't know what to do here, say N. >> >> +config TOC >> + bool "Support TOC switch" >> + default y if 64BIT || !SMP >> + help >> + Most PA-RISC machines have either a switch at the back of the > machine >> + or a command in BMC to trigger a TOC interrupt. If you say Y here > a >> + handler will be installed which will either show a backtrace on > all >> + CPUs, or enter a possible configured debugger like kgdb/kdb. >> + >> + Note that with this option enabled, the kernel will use an > additional >> 16KB + per possible CPU as a special stack for the TOC handler. >> + >> + If you don't want to debug the Kernel, so N. > > so -> say? Yes, I fixed that before I applied to my tree. >> +void notrace __noreturn __cold toc_intr(struct pt_regs *regs) >> +{ >> + struct pdc_toc_pim_20 pim_data20; >> + struct pdc_toc_pim_11 pim_data11; >> + >> + nmi_enter(); >> + >> + if (boot_cpu_data.cpu_type >= pcxu) { >> + if (pdc_pim_toc20(&pim_data20)) >> + panic("Failed to get PIM data"); >> + toc20_to_pt_regs(regs, &pim_data20); >> + } else { >> + if (pdc_pim_toc11(&pim_data11)) >> + panic("Failed to get PIM data"); >> + toc11_to_pt_regs(regs, &pim_data11); >> + } > > As I said elsewhere because I had missed v3: move the variables in the if > branches. It won't change anything, the compiler is clever enough to optimize it. Another option would be to completely move the pdc_pim_toc* functions into the toc*_to_pt_regs functions, maybe then renaming them to get_tocXX_pt_regs(regs); Helge