linux-stable/arch
Christophe Leroy bd73758803 powerpc: Fix missing declaration of [en/dis]able_kernel_vsx()
Add stub instances of enable_kernel_vsx() and disable_kernel_vsx()
when CONFIG_VSX is not set, to avoid following build failure.

  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o
  In file included from ./drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
                   from ./drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:37,
                   from drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:27:
  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c: In function 'dcn_bw_apply_registry_override':
  ./drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:64:3: error: implicit declaration of function 'enable_kernel_vsx'; did you mean 'enable_kernel_fp'? [-Werror=implicit-function-declaration]
     64 |   enable_kernel_vsx(); \
        |   ^~~~~~~~~~~~~~~~~
  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:640:2: note: in expansion of macro 'DC_FP_START'
    640 |  DC_FP_START();
        |  ^~~~~~~~~~~
  ./drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:75:3: error: implicit declaration of function 'disable_kernel_vsx'; did you mean 'disable_kernel_fp'? [-Werror=implicit-function-declaration]
     75 |   disable_kernel_vsx(); \
        |   ^~~~~~~~~~~~~~~~~~
  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:676:2: note: in expansion of macro 'DC_FP_END'
    676 |  DC_FP_END();
        |  ^~~~~~~~~
  cc1: some warnings being treated as errors
  make[5]: *** [drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.o] Error 1

This works because the caller is checking if VSX is available using
cpu_has_feature():

  #define DC_FP_START() { \
  	if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
  		preempt_disable(); \
  		enable_kernel_vsx(); \
  	} else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
  		preempt_disable(); \
  		enable_kernel_altivec(); \
  	} else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
  		preempt_disable(); \
  		enable_kernel_fp(); \
  	} \

When CONFIG_VSX is not selected, cpu_has_feature(CPU_FTR_VSX_COMP)
constant folds to 'false' so the call to enable_kernel_vsx() is
discarded and the build succeeds.

Fixes: 16a9dea110 ("amdgpu: Enable initial DCN support on POWER")
Cc: stable@vger.kernel.org # v5.6+
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Incorporate some discussion comments into the change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8d7d285a027e9d21f5ff7f850fa71a2655b0c4af.1615279170.git.christophe.leroy@csgroup.eu
2021-03-10 11:15:00 +11:00
..
alpha io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
arc arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
arm xen: branch for v5.12-rc2 2021-03-04 11:24:47 -08:00
arm64 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
csky arch/csky patches for 5.12-rc1 2021-02-28 12:06:45 -08:00
h8300 arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
hexagon io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
ia64 ia64: don't call handle_signal() unless there's actually a signal queued 2021-03-02 17:22:11 -07:00
m68k m68k: Fix virt_addr_valid() W=1 compiler warnings 2021-03-06 14:15:07 +01:00
microblaze io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
mips io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
nds32 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
nios2 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
openrisc io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
parisc io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
powerpc powerpc: Fix missing declaration of [en/dis]able_kernel_vsx() 2021-03-10 11:15:00 +11:00
riscv RISC-V Patches for the 5.12 Merge Window, Part 2 2021-02-28 12:01:23 -08:00
s390 io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
sh io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
sparc io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
um io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
x86 * Doc fixes 2021-03-04 11:26:17 -08:00
xtensa io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
.gitignore
Kconfig Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00