# git rev-parse -q --verify afbbb09151dbf35eae9fb9f0de87d04ab4106de1^{commit} afbbb09151dbf35eae9fb9f0de87d04ab4106de1 already have revision, skipping fetch # git checkout -q -f -B kisskb afbbb09151dbf35eae9fb9f0de87d04ab4106de1 # git clean -qxdf # < git log -1 # commit afbbb09151dbf35eae9fb9f0de87d04ab4106de1 # Author: Qian Cai # Date: Wed Oct 28 14:23:34 2020 -0400 # # powerpc/smp: Call rcu_cpu_starting() earlier # # The call to rcu_cpu_starting() in start_secondary() is not early # enough in the CPU-hotplug onlining process, which results in lockdep # splats as follows (with CONFIG_PROVE_RCU_LIST=y): # # WARNING: suspicious RCU usage # ----------------------------- # kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!! # # other info that might help us debug this: # # RCU used illegally from offline CPU! # rcu_scheduler_active = 1, debug_locks = 1 # no locks held by swapper/1/0. # # Call Trace: # dump_stack+0xec/0x144 (unreliable) # lockdep_rcu_suspicious+0x128/0x14c # __lock_acquire+0x1060/0x1c60 # lock_acquire+0x140/0x5f0 # _raw_spin_lock_irqsave+0x64/0xb0 # clockevents_register_device+0x74/0x270 # register_decrementer_clockevent+0x94/0x110 # start_secondary+0x134/0x800 # start_secondary_prolog+0x10/0x14 # # This is avoided by adding a call to rcu_cpu_starting() near the # beginning of the start_secondary() function. Note that the # raw_smp_processor_id() is required in order to avoid calling into # lockdep before RCU has declared the CPU to be watched for readers. # # It's safe to call rcu_cpu_starting() in the arch code as well as later # in generic code, as explained by Paul: # # It uses a per-CPU variable so that RCU pays attention only to the # first call to rcu_cpu_starting() if there is more than one of them. # This is even intentional, due to there being a generic # arch-independent call to rcu_cpu_starting() in # notify_cpu_starting(). # # So multiple calls to rcu_cpu_starting() are fine by design. # # Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion") # Signed-off-by: Qian Cai # Acked-by: Paul E. McKenney # [mpe: Add Fixes tag, reword slightly & expand change log] # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20201028182334.13466-1-cai@redhat.com # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 afbbb09151dbf35eae9fb9f0de87d04ab4106de1 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory compilation terminated. make[2]: *** [scripts/Makefile.lib:326: arch/powerpc/boot/dts/fsl/mpc8540ads.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [arch/powerpc/Makefile:295: zImage] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:185: __sub-make] Error 2 Command 'make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 # Build took: 0:02:02.279568