Re: [PATCH] MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel

From: Paul Burton
Date: Thu Jan 16 2020 - 15:11:19 EST


Hi Thomas,

On Thu, Jan 16, 2020 at 08:43:41PM +0100, Thomas Gleixner wrote:
> The confinement of the 32bit specific VDSO functions missed to define
> BUILD_VDSO32 when building a 32bit MIPS kernel:
>
> arch/mips/vdso/vgettimeofday.c: In function â__vdso_clock_gettimeâ:
> arch/mips/vdso/vgettimeofday.c:17:9: error: implicit declaration of function â__cvdso_clock_gettime32â
>
> arch/mips/vdso/vgettimeofday.c: In function â__vdso_clock_getresâ:
> arch/mips/vdso/vgettimeofday.c:39:9: error: implicit declaration of function â__cvdso_clock_getres_time32â
>
> Force the define for 32bit builds in the VDSO Makefile.
>
> Fixes: bf279849ad59 ("lib/vdso: Build 32 bit specific functions in the right context")
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

Presuming you want to take this through timers/core along with the patch
it fixes:

Acked-by: Paul Burton <paulburton@xxxxxxxxxx>

Thanks,
Paul

> ---
> arch/mips/vdso/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --- a/arch/mips/vdso/Makefile
> +++ b/arch/mips/vdso/Makefile
> @@ -18,6 +18,10 @@ ccflags-vdso := \
> $(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
> -D__VDSO__
>
> +ifndef CONFIG_64BIT
> +ccflags-vdso += -DBUILD_VDSO32
> +endif
> +
> ifdef CONFIG_CC_IS_CLANG
> ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
> endif