From: Randy Dunlap <hidden> Date: 2021-04-18 20:17:37
On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled,
there is a build error:
drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration]
enable_kernel_fp();
so add a stub function for that when PPC_FPU is not set.
Signed-off-by: Randy Dunlap <redacted>
Reported-by: kernel test robot <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Christophe Leroy <redacted>
Cc: Segher Boessenkool <redacted>
Cc: lkp@intel.com
---
arch/powerpc/include/asm/switch_to.h | 1 +
1 file changed, 1 insertion(+)
From: Randy Dunlap <hidden> Date: 2021-04-18 20:17:40
When PPC_FPU is not set and ALTIVEC=y, arch/powerpc/lib/ldstfp.c is not
being built, but it is also needed when ALTIVEC=y for get_vr() and
put_vr().
../arch/powerpc/lib/sstep.c: In function 'do_vec_load':
../arch/powerpc/lib/sstep.c:637:3: error: implicit declaration of function 'put_vr' [-Werror=implicit-function-declaration]
637 | put_vr(rn, &u.v);
| ^~~~~~
../arch/powerpc/lib/sstep.c: In function 'do_vec_store':
../arch/powerpc/lib/sstep.c:660:3: error: implicit declaration of function 'get_vr'; did you mean 'get_oc'? [-Werror=implicit-function-declaration]
660 | get_vr(rn, &u.v);
| ^~~~~~
Add ldstfp.o to the Makefile for CONFIG_ALTIVEC and add
externs for get_vr() and put_vr() in lib/sstep.c to fix the
build errors.
This was seen in a kernel config from kernel test robot [off-list ref]
that reported a different build issue (for pmac32-cpufreq.c).
Signed-off-by: Randy Dunlap <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Christophe Leroy <redacted>
Cc: Segher Boessenkool <redacted>
Cc: lkp@intel.com
---
arch/powerpc/lib/Makefile | 1 +
arch/powerpc/lib/sstep.c | 5 +++++
2 files changed, 6 insertions(+)