# git rev-parse -q --verify 01b0f0eae0812e80efeee4ee17687e5386335e08^{commit} 01b0f0eae0812e80efeee4ee17687e5386335e08 already have revision, skipping fetch # git checkout -q -f -B kisskb 01b0f0eae0812e80efeee4ee17687e5386335e08 # git clean -qxdf # < git log -1 # commit 01b0f0eae0812e80efeee4ee17687e5386335e08 # Author: Nicholas Piggin # Date: Thu Nov 26 20:25:30 2020 +1000 # # powerpc/64s: Trim offlined CPUs from mm_cpumasks # # When offlining a CPU, powerpc/64s does not flush TLBs, rather it just # leaves the CPU set in mm_cpumasks, so it continues to receive TLBIEs # to manage its TLBs. # # However the exit_flush_lazy_tlbs() function expects that after # returning, all CPUs (except self) have flushed TLBs for that mm, in # which case TLBIEL can be used for this flush. This breaks for offline # CPUs because they don't get the IPI to flush their TLB. This can lead # to stale translations. # # Fix this by clearing the CPU from mm_cpumasks, then flushing all TLBs # before going offline. # # These offlined CPU bits stuck in the cpumask also prevents the cpumask # from being trimmed back to local mode, which means continual broadcast # IPIs or TLBIEs are needed for TLB flushing. This patch prevents that # situation too. # # A cast of many were involved in working this out, but in particular # Milton, Aneesh, Paul made key discoveries. # # Fixes: 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") # Signed-off-by: Nicholas Piggin # Reviewed-by: Aneesh Kumar K.V # Debugged-by: Milton Miller # Debugged-by: Aneesh Kumar K.V # Debugged-by: Paul Mackerras # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20201126102530.691335-5-npiggin@gmail.com # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 01b0f0eae0812e80efeee4ee17687e5386335e08 # < make -s -j 120 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # make -s -j 120 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- FIT description: Linux 5.10.0-rc2-g01b0f0eae081 Created: Fri Nov 27 01:58:00 2020 Image 0 (kernel@0) Description: Linux 5.10.0-rc2-g01b0f0eae081 Created: Fri Nov 27 01:58:00 2020 Type: Kernel Image Compression: gzip compressed Data Size: 5173741 Bytes = 5052.48 KiB = 4.93 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x80982f78 Hash algo: sha1 Hash value: 4000dc858dc5f4aec25841d552df527e5ebbcc26 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Fri Nov 27 01:58:00 2020 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: Fri Nov 27 01:58:00 2020 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: Fri Nov 27 01:58:00 2020 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: Fri Nov 27 01:58:00 2020 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: Fri Nov 27 01:58:00 2020 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_mipsel # Build took: 0:01:10.050827