# git rev-parse -q --verify 4025c784c573cab7e3f84746cc82b8033923ec62^{commit} 4025c784c573cab7e3f84746cc82b8033923ec62 already have revision, skipping fetch # git checkout -q -f -B kisskb 4025c784c573cab7e3f84746cc82b8033923ec62 # git clean -qxdf # < git log -1 # commit 4025c784c573cab7e3f84746cc82b8033923ec62 # Author: Nicholas Piggin # Date: Sat Jan 23 16:12:44 2021 +1000 # # powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt # # When an asynchronous interrupt calls irq_exit, it checks for softirqs # that may have been created, and runs them. Running softirqs enables # local irqs, which can replay pending interrupts causing recursion in # replay_soft_interrupts. This abridged trace shows how this can occur: # # ! NIP replay_soft_interrupts # LR interrupt_exit_kernel_prepare # Call Trace: # interrupt_exit_kernel_prepare (unreliable) # interrupt_return # --- interrupt: ea0 at __rb_reserve_next # NIP __rb_reserve_next # LR __rb_reserve_next # Call Trace: # ring_buffer_lock_reserve # trace_function # function_trace_call # ftrace_call # __do_softirq # irq_exit # timer_interrupt # ! replay_soft_interrupts # interrupt_exit_kernel_prepare # interrupt_return # --- interrupt: ea0 at arch_local_irq_restore # # This can not be prevented easily, because softirqs must not block hard # irqs, so it has to be dealt with. # # The recursion is bounded by design in the softirq code because softirq # replay disables softirqs and loops around again to check for new # softirqs created while it ran, so that's not a problem. # # However it does mess up interrupt replay state, causing superfluous # interrupts when the second replay_soft_interrupts clears a pending # interrupt, leaving it still set in the first call in the 'happened' # local variable. # # Fix this by not caching a copy of irqs_happened across interrupt # handler calls. # # Fixes: 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C") # Signed-off-by: Nicholas Piggin # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20210123061244.2076145-1-npiggin@gmail.com # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 4025c784c573cab7e3f84746cc82b8033923ec62 # < make -s -j 24 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- defconfig # < make -s -j 24 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- help # make -s -j 24 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 24 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- /kisskb/src/drivers/net/ethernet/mscc/ocelot_vcap.c: In function 'is1_entry_set': /kisskb/src/drivers/net/ethernet/mscc/ocelot_vcap.c:755:11: warning: missing braces around initializer [-Wmissing-braces] struct ocelot_vcap_u16 etype = {0}; ^ /kisskb/src/drivers/net/ethernet/mscc/ocelot_vcap.c:755:11: warning: (near initialization for 'etype.value') [-Wmissing-braces] FIT description: Linux 5.11.0-rc2-g4025c784c573 Created: Sun Jan 24 23:40:34 2021 Image 0 (kernel@0) Description: Linux 5.11.0-rc2-g4025c784c573 Created: Sun Jan 24 23:40:34 2021 Type: Kernel Image Compression: gzip compressed Data Size: 5218618 Bytes = 5096.31 KiB = 4.98 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x8098d938 Hash algo: sha1 Hash value: d0ec1bfc77d2291d594a9bcea39e976edfd54c7d Image 1 (fdt@boston) Description: img,boston Device Tree Created: Sun Jan 24 23:40:34 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Sun Jan 24 23:40:34 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Sun Jan 24 23:40:34 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 4659 Bytes = 4.55 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 5bcb6e4f21e8e5372544aa130b3bd097355a9050 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Sun Jan 24 23:40:34 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 5418 Bytes = 5.29 KiB = 0.01 MiB Architecture: MIPS Hash algo: sha1 Hash value: 93d882f2009a217e0fa9dab94788535ed2be8476 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Sun Jan 24 23:40:34 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 # Build took: 0:02:06.177363