Re: [tip:x86:fpu 2/2] arch/x86/kernel/signal.c:626:4: error: implicitdeclaration of function '__setup_frame'

From: H. Peter Anvin
Date: Wed Aug 08 2012 - 18:34:08 EST


On 07/26/2012 10:48 AM, Suresh Siddha wrote:

Appended the patch for this. Thanks!
---
From: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
Subject: x86, fpu: fix x86_64 build without CONFIG_IA32_EMULATION

Fengguang's automated build reported some compilation failures:
arch/x86/kernel/signal.c: In function 'setup_rt_frame':
arch/x86/kernel/signal.c:626:4: error: implicit declaration of function '__setup_frame'
arch/x86/kernel/xsave.c: In function 'save_fsave_header':
arch/x86/kernel/xsave.c:144:7: error: dereferencing pointer to incomplete type
...

Fix x86_64 kernel build without CONFIG_IA32_EMULATION.

Code saving fsave prefix is applicable only for CONFIG_X86_32 or
CONFIG_IA32_EMULATION. Use config_enabled() checks to remove the unnecessary
code compile-time for x86_64 kernels build without CONFIG_IA32_EMULATION.

Also while we are at this, fix a spurious warning:
arch/x86/kernel/xsave.c:209:15: warning: ignoring return value of â__clear_userâ, declared with attribute warn_unused_result

Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>

With this patch applied I get an error at:

/home/hpa/kernel/tip.x86-fpu/arch/x86/kernel/signal.c:792:12: error: static declaration of âx32_setup_rt_frameâ follows non-static declaration
In file included from /home/hpa/kernel/tip.x86-fpu/arch/x86/kernel/signal.c:29:0:
/home/hpa/kernel/tip.x86-fpu/arch/x86/include/asm/fpu-internal.h:62:5: note: previous declaration of âx32_setup_rt_frameâ was here
/home/hpa/kernel/tip.x86-fpu/arch/x86/kernel/signal.c:792:12: warning: âx32_setup_rt_frameâ defined but not used [-Wunused-function]
make[4]: *** [arch/x86/kernel/signal.o] Error 1
make[3]: *** [arch/x86/kernel] Error 2
make[2]: *** [arch/x86] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/hpa/kernel/tip.x86-fpu'

... for an x86-64 allyesconfig.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/