Build failure with v3.17-rc1
Hi Russell,
When running my randconfig build tests, I noticed that I had a build failure at arch/arm/kernel/patch.c
KCONFIG_SEED=0x26B77624arch/arm/kernel/patch.c: In function ?__patch_text?:arch/arm/kernel/patch.c:35:4: error: implicit declaration of function ?__opcode_to_mem_thumb32? [-Werror=implicit-function-declaration]
insn = __opcode_to_mem_thumb32(insn);
^cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/patch.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
Looking at the definition of __opcode_to_mem_thumb32 it's easy to see that it's not defined when ! CONFIG_CPU_ENDIAN_BE8 and that's exactly what I have in my generated defconfig (attached).
Would below patch be the correct fix for this ?
arch/arm/include/asm/opcodes.h +1 -0
@@ -111,6 +111,7 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr);#define __opcode_to_mem_arm (x) ___opcode_identity32(x)#define __opcode_to_mem_thumb16 (x) ___opcode_identity16(x) +#define __opcode_to_mem_thumb32 (x) ___opcode_identity32(x)#define ___asm_opcode_to_mem_arm (x) ___asm_opcode_identity32(x)#define ___asm_opcode_to_mem_thumb16 (x) ___asm_opcode_identity16(x)#ifndef CONFIG_CPU_ENDIAN_BE32
if it is, I can send it as a formal patch and/or add it to your patch tracking system. Otherwise, let me know what would be the best fix and I'll either fix or build-test a patch from you, whatever works best.
cheers
Signature · 9 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140821/4db0ee21/attachment.sig>
Quoted 16 lines · Felipe Balbi
Hi Russell,
When running my randconfig build tests, I noticed that I had a build failure at
arch/arm/kernel/patch.cKCONFIG_SEED=0x26B77624
arch/arm/kernel/patch.c: In function ?__patch_text?:arch/arm/kernel/patch.c:35:4: error: implicit declaration of function ?__opcode_to_mem_thumb32? [-Werror=implicit-function-declaration]insn = __opcode_to_mem_thumb32(insn); ^cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/patch.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [arch/arm/kernel] Error 2
make: *** Waiting for unfinished jobs....
Quoted 5 lines
Looking at the definition of
__opcode_to_mem_thumb32it's easy to see that it's not defined when !CONFIG_CPU_ENDIAN_BE8and that's exactly what I have in my generated defconfig (attached).Would below patch be the correct fix for this ?
I think you should read a bit more of the file first. In the ifdef which starts in the context of your patch:
#ifndef CONFIG_CPU_ENDIAN_BE32
/*
* On BE32 systems, using 32-bit accesses to store Thumb instructions will not
* work in all cases, due to alignment constraints. For now, a correct
* version is not provided for BE32.
*/
#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x)
#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) #endif
The contents of the ifdef cover the !BE32 case. It doesn't cover the BE32 case, and the BE32 case is what is being referred to in the comment.
It seems that it is intentionally not provided because it's currently broken, and has been broken for about the last two years.
Further information can be found by looking in the git history, which brings up commit ID 57b9da32addd. This commit text implies the need for __opcode_to_mem_thumb32() is an error.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net.