# git rev-parse -q --verify b12483618d73c954c00faa49c276b4d9995fb95a^{commit} b12483618d73c954c00faa49c276b4d9995fb95a already have revision, skipping fetch # git checkout -q -f -B kisskb b12483618d73c954c00faa49c276b4d9995fb95a # git clean -qxdf # < git log -1 # commit b12483618d73c954c00faa49c276b4d9995fb95a # Author: Michael Ellerman # Date: Thu Feb 18 23:30:58 2021 +1100 # # powerpc/4xx: Fix build errors from mfdcr() # # lkp reported a build error in fsp2.o: # # CC arch/powerpc/platforms/44x/fsp2.o # {standard input}:577: Error: unsupported relocation against base # # Which comes from: # # pr_err("GESR0: 0x%08x\n", mfdcr(base + PLB4OPB_GESR0)); # # Where our mfdcr() macro is stringifying "base + PLB4OPB_GESR0", and # passing that to the assembler, which obviously doesn't work. # # The mfdcr() macro already checks that the argument is constant using # __builtin_constant_p(), and if not calls the out-of-line version of # mfdcr(). But in this case GCC is smart enough to notice that "base + # PLB4OPB_GESR0" will be constant, even though it's not something we can # immediately stringify into a register number. # # Segher pointed out that passing the register number to the inline asm # as a constant would be better, and in fact it fixes the build error, # presumably because it gives GCC a chance to resolve the value. # # While we're at it, change mtdcr() similarly. # # Reported-by: kernel test robot # Suggested-by: Segher Boessenkool # Signed-off-by: Michael Ellerman # Acked-by: Feng Tang # Link: https://lore.kernel.org/r/20210218123058.748882-1-mpe@ellerman.id.au # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 b12483618d73c954c00faa49c276b4d9995fb95a # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig KCONFIG_SEED=0xB767FDDC # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # Added to kconfig CONFIG_TRIM_UNUSED_KSYMS=n # Added to kconfig CONFIG_UBSAN=n # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:5658:warning: override: reassigning to symbol PPC64 .config:5659:warning: override: reassigning to symbol PPC_DISABLE_WERROR .config:5660:warning: override: reassigning to symbol SECTION_MISMATCH_WARN_ONLY .config:5661:warning: override: reassigning to symbol PREVENT_FIRMWARE_BUILD .config:5663:warning: override: reassigning to symbol GCC_PLUGINS # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:27: /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c: In function 'dcn_bw_apply_registry_override': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:68:3: error: implicit declaration of function 'enable_kernel_vsx'; did you mean 'enable_kernel_fp'? [-Werror=implicit-function-declaration] 68 | enable_kernel_vsx(); \ | ^~~~~~~~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:638:2: note: in expansion of macro 'DC_FP_START' 638 | DC_FP_START(); | ^~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:79:3: error: implicit declaration of function 'disable_kernel_vsx'; did you mean 'disable_kernel_fp'? [-Werror=implicit-function-declaration] 79 | disable_kernel_vsx(); \ | ^~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:674:2: note: in expansion of macro 'DC_FP_END' 674 | DC_FP_END(); | ^~~~~~~~~ In file included from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dccg.h:29, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c:26: /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c: In function 'dcn3_init_clocks': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:68:3: error: implicit declaration of function 'enable_kernel_vsx'; did you mean 'enable_kernel_fp'? [-Werror=implicit-function-declaration] 68 | enable_kernel_vsx(); \ | ^~~~~~~~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c:214:2: note: in expansion of macro 'DC_FP_START' 214 | DC_FP_START(); | ^~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:79:3: error: implicit declaration of function 'disable_kernel_vsx'; did you mean 'disable_kernel_fp'? [-Werror=implicit-function-declaration] 79 | disable_kernel_vsx(); \ | ^~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c:216:2: note: in expansion of macro 'DC_FP_END' 216 | DC_FP_END(); | ^~~~~~~~~ cc1: some warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:279: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o] Error 1 make[5]: *** Waiting for unfinished jobs.... cc1: some warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:279: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:496: drivers/gpu/drm/amd/amdgpu] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:496: drivers/gpu/drm] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:496: drivers/gpu] Error 2 make[1]: *** [/kisskb/src/Makefile:1805: drivers] Error 2 make: *** [Makefile:185: __sub-make] Error 2 Command 'make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/powerpc-next-rand_powerpc-randconfig_powerpc-gcc9 # Build took: 0:05:07.530791