# git rev-parse -q --verify 94971b64cc4ea9040c3b4b846fd664f56adfed38^{commit} 94971b64cc4ea9040c3b4b846fd664f56adfed38 already have revision, skipping fetch # git checkout -q -f -B kisskb 94971b64cc4ea9040c3b4b846fd664f56adfed38 # git clean -qxdf # < git log -1 # commit 94971b64cc4ea9040c3b4b846fd664f56adfed38 # Author: Guilherme G. Piccoli # Date: Wed Apr 27 19:49:02 2022 -0300 # # powerpc/setup: Refactor/untangle panic notifiers # # The panic notifiers infrastructure is a bit limited in the scope of # the callbacks - basically every kind of functionality is dropped # in a list that runs in the same point during the kernel panic path. # This is not really on par with the complexities and particularities # of architecture / hypervisors' needs, and a refactor is ongoing. # # As part of this refactor, it was observed that powerpc has 2 notifiers, # with mixed goals: one is just a KASLR offset dumper, whereas the other # aims to hard-disable IRQs (necessary on panic path), warn firmware of # the panic event (fadump) and run low-level platform-specific machinery # that might stop kernel execution and never come back. # # Clearly, the 2nd notifier has opposed goals: disable IRQs / fadump # should run earlier while low-level platform actions should # run late since it might not even return. Hence, this patch decouples # the notifiers splitting them in three: # # - First one is responsible for hard-disable IRQs and fadump, # should run early; # # - The kernel KASLR offset dumper is really an informative notifier, # harmless and may run at any moment in the panic path; # # - The last notifier should run last, since it aims to perform # low-level actions for specific platforms, and might never return. # It is also only registered for 2 platforms, pseries and ps3. # # The patch better documents the notifiers and clears the code too, # also removing a useless header. # # Currently no functionality change should be observed, but after # the planned panic refactor we should expect more panic reliability # with this patch. # # Signed-off-by: Guilherme G. Piccoli # Reviewed-by: Hari Bathini # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20220427224924.592546-9-gpiccoli@igalia.com # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 94971b64cc4ea9040c3b4b846fd664f56adfed38 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- 44x/iss476-smp_defconfig WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- Completed OK # rm -rf /kisskb/build/powerpc-next_44x_iss476-smp_defconfig_powerpc-gcc5 # Build took: 0:00:24.783307