Skip to contentSkip to conversation

Build error in torvalds kernel 3.11 for omap2plus

PATCH New Anil Kumar 6 participants 22 messages Sep 8, 2013 – Sep 27, 2013

Subsystems (4)
lore
Share & tools
lore

Anil Kumar

author
#0 lore raw

Hi All,

I am getting below build error in torvalds kernel 3.11 for omap2plus.

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.

  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  AS      arch/arm/mm/cache-v7.o

arch/arm/mm/cache-v7.S: Assembler messages:
arch/arm/mm/cache-v7.S:285: Error: garbage following instruction -- dsb ishst' arch/arm/mm/cache-v7.S:297: Error: garbage following instruction -- dsb ishst' make[1]: *** [arch/arm/mm/cache-v7.o] Error 1
make: *** [arch/arm/mm] Error 2

Thanks
Anil

#1 lore raw
Quoted 4 lines · Anil Kumar

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.

Quoted 8 lines
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  AS      arch/arm/mm/cache-v7.o

arch/arm/mm/cache-v7.S: Assembler messages:
arch/arm/mm/cache-v7.S:285: Error: garbage following instruction -- dsb ishst' arch/arm/mm/cache-v7.S:297: Error: garbage following instruction -- dsb ishst' make[1]: *** [arch/arm/mm/cache-v7.o] Error 1
make: *** [arch/arm/mm] Error 2

You need a later binutils for these instructions - 2.22 works just fine, even with gcc 4.5.x.

#2 lore raw
Quoted 14 lines · Russell King - ARM Linux
Quoted 4 lines · Anil Kumar

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.

Quoted 8 lines
   CALL    scripts/checksyscalls.sh
   CHK     include/generated/compile.h
   AS      arch/arm/mm/cache-v7.o

arch/arm/mm/cache-v7.S: Assembler messages:
arch/arm/mm/cache-v7.S:285: Error: garbage following instruction -- dsb ishst' arch/arm/mm/cache-v7.S:297: Error: garbage following instruction -- dsb ishst' make[1]: *** [arch/arm/mm/cache-v7.o] Error 1
make: *** [arch/arm/mm] Error 2

Quoted 2 lines

You need a later binutils for these instructions - 2.22 works just fine, even with gcc 4.5.x.

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Any solution for this one ? omap2plus passes for me.

gcc version used is "arm-poky-linux-gnueabi-gcc (GCC) 4.7.2" from poky 1.3.

Thanks,
Guenter

#3 lore raw
Quoted 24 lines · Guenter Roeck

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 3 lines

Any solution for this one ? omap2plus passes for me.

gcc version used is "arm-poky-linux-gnueabi-gcc (GCC) 4.7.2" from poky 1.3.

That's due to:

commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece

Author: Nicolas Pitre <[email protected]>
Date:   Tue Jul 16 20:59:53 2013 -0400

ARM: vexpress/dcscb: fix cache disabling sequences

Unlike real A15/A7's, the RTSM simulation doesn't appear to hit the cache when the CTRL.C bit is cleared. Let's ensure there is no memory access within the disable and flush cache sequence, including to the stack.

which introduces some 'isb' and 'dsb' instructions which are not available on ARMv6 CPUs - however, their 'mcr' equivalents are.

Either dcscb needs to be built with an -march=armv7 override, or they need to use the mcr equivalent instructions.

#4 lore raw
Quoted 42 lines · Russell King - ARM Linux
Quoted 24 lines · Guenter Roeck

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 3 lines

Any solution for this one ? omap2plus passes for me.

gcc version used is "arm-poky-linux-gnueabi-gcc (GCC) 4.7.2" from poky 1.3.

That's due to:

commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece

Author: Nicolas Pitre <[email protected]>
Date:   Tue Jul 16 20:59:53 2013 -0400

ARM: vexpress/dcscb: fix cache disabling sequences

Unlike real A15/A7's, the RTSM simulation doesn't appear to hit the cache when the CTRL.C bit is cleared. Let's ensure there is no memory access within the disable and flush cache sequence, including to the stack.

Quoted 8 lines

which introduces some 'isb' and 'dsb' instructions which are not available on ARMv6 CPUs - however, their 'mcr' equivalents are.

Either dcscb needs to be built with an -march=armv7 override, or they need to use the mcr equivalent instructions.

Well, I hope it will get fixed one way or another. I don't know enough about arm to fix it myself.

Guenter

#5 lore raw
Quoted 58 lines · Guenter Roeck
Quoted 57 lines · Russell King - ARM Linux
Quoted 33 lines · Guenter Roeck

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 4 lines

Any solution for this one ? omap2plus passes for me.

gcc version used is "arm-poky-linux-gnueabi-gcc (GCC) 4.7.2" from poky 1.3.

That's due to:

commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece

Author: Nicolas Pitre <[email protected]>
Date:   Tue Jul 16 20:59:53 2013 -0400

ARM: vexpress/dcscb: fix cache disabling sequences

Unlike real A15/A7's, the RTSM simulation doesn't appear to hit the cache when the CTRL.C bit is cleared. Let's ensure there is no memory access within the disable and flush cache sequence, including to the stack.

which introduces some 'isb' and 'dsb' instructions which are not available on ARMv6 CPUs - however, their 'mcr' equivalents are.

Quoted 6 lines
Quoted 3 lines

Either dcscb needs to be built with an -march=armv7 override, or they need to use the mcr equivalent instructions.

Well, I hope it will get fixed one way or another. I don't know enough about arm to fix it myself.

Would you try this patch please:

arch/arm/mach-vexpress/Makefile +2 -0
index 36ea824712..505e64ab3e 100644
@@ -7,6 +7,8 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
 obj-y					:= v2m.o
 obj-$(CONFIG_ARCH_VEXPRESS_CA9X4)	+= ct-ca9x4.o
 obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
+CFLAGS_dcscb.o				+= -march=armv7-a
 obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o spc.o
+CFLAGS_tc2_pm.o				+= -march=armv7-a
 obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
#6 lore raw
Quoted 82 lines · Nicolas Pitre
Quoted 58 lines · Guenter Roeck
Quoted 57 lines · Russell King - ARM Linux
Quoted 33 lines · Guenter Roeck

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 4 lines

Any solution for this one ? omap2plus passes for me.

gcc version used is "arm-poky-linux-gnueabi-gcc (GCC) 4.7.2" from poky 1.3.

That's due to:

commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece

Author: Nicolas Pitre <[email protected]>
Date:   Tue Jul 16 20:59:53 2013 -0400

ARM: vexpress/dcscb: fix cache disabling sequences

Unlike real A15/A7's, the RTSM simulation doesn't appear to hit the cache when the CTRL.C bit is cleared. Let's ensure there is no memory access within the disable and flush cache sequence, including to the stack.

which introduces some 'isb' and 'dsb' instructions which are not available on ARMv6 CPUs - however, their 'mcr' equivalents are.

Quoted 6 lines
Quoted 3 lines

Either dcscb needs to be built with an -march=armv7 override, or they need to use the mcr equivalent instructions.

Well, I hope it will get fixed one way or another. I don't know enough about arm to fix it myself.

Would you try this patch please:

arch/arm/mach-vexpress/Makefile +2 -0
index 36ea824712..505e64ab3e 100644
@@ -7,6 +7,8 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
 obj-y					:= v2m.o
 obj-$(CONFIG_ARCH_VEXPRESS_CA9X4)	+= ct-ca9x4.o
 obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
 obj-$(CONFIG_ARCH_VEXPRESS_DCSCB)	+= dcscb.o	dcscb_setup.o
+CFLAGS_dcscb.o				+= -march=armv7-a
 obj-$(CONFIG_ARCH_VEXPRESS_TC2_PM)	+= tc2_pm.o spc.o
+CFLAGS_tc2_pm.o				+= -march=armv7-a
 obj-$(CONFIG_SMP)			+= platsmp.o
Quoted 2 lines

obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o

That fixes this problem. I'll leave it up to you and Russell to decide if it is the proper fix.

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to user_exit' arch/arm/mach-omap2/built-in.o: In function omap3_evm_init':
/home/groeck/src/linux-stable/arch/arm/mach-omap2/board-omap3evm.c:703:
undefined reference to `usb_nop_xceiv_register'

The undefined reference to usb_nop_xceiv_register is because CONFIG_NOP_USB_XCEIV is built as module but obviously called from code built into the kernel. Not sure what the correct fix is - build CONFIG_NOP_USB_XCEIV into the kernel, make usb_nop_xceiv_register a dummy function if CONFIG_NOP_USB_XCEIV is built as module but called from built-in code, or don't call usb_nop_xceiv_register from code built into the kernel.

No idea where the undefined user_enter and user_exit comes from.

Guenter

#7 lore raw
Quoted 16 lines · Guenter Roeck

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to `user_exit'

These are due to ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converting these functions to be inline.

No idea what the fix for this is other than reverting the change. Any ideas Frederic?

#8 lore raw
Quoted 18 lines · Russell King - ARM Linux
Quoted 16 lines · Guenter Roeck

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to `user_exit'

Quoted 6 lines

These are due to ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converting these functions to be inline.

No idea what the fix for this is other than reverting the change. Any ideas Frederic?

I am all for reverting unless this can be fixed quickly. AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.

Guenter

#9 lore raw

Adding Kevin Hilman to the CC as he might be interested as well.

Quoted 30 lines · Guenter Roeck
Quoted 18 lines · Russell King - ARM Linux
Quoted 16 lines · Guenter Roeck

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77: undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to `user_exit'

Quoted 6 lines

These are due to ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converting these functions to be inline.

No idea what the fix for this is other than reverting the change. Any ideas Frederic?

I am all for reverting unless this can be fixed quickly. AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.

Guenter

#10 lore raw
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

Kevin

Quoted 35 lines · Guenter Roeck
Quoted 34 lines · Russell King - ARM Linux
Quoted 21 lines · Guenter Roeck
Quoted 11 lines

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42:
undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77:
undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376:
undefined reference to `user_exit'

Quoted 8 lines

arch/arm/kernel/built-in.o: In function `__dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to `user_exit'

Quoted 6 lines

These are due to ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converting these functions to be inline.

No idea what the fix for this is other than reverting the change. Any ideas Frederic?

I am all for reverting unless this can be fixed quickly. AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.

Guenter

#11 lore raw
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

I have the fix pending. It passed the cross build so I'll send it soon.

Thanks.

Quoted 38 lines

Kevin

Quoted 35 lines · Guenter Roeck
Quoted 34 lines · Russell King - ARM Linux
Quoted 21 lines · Guenter Roeck
Quoted 11 lines

Unfortunately, there are more problems.

arch/arm/kernel/built-in.o: In function `ret_fast_syscall':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:42:
undefined reference to user_enter' arch/arm/kernel/built-in.o: In function no_work_pending':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:77:
undefined reference to user_enter' arch/arm/kernel/built-in.o: In function vector_swi':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-common.S:376:
undefined reference to `user_exit'

Quoted 8 lines

arch/arm/kernel/built-in.o: In function `__dabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:365: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __irq_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:375: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __und_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:388: undefined reference to user_exit' arch/arm/kernel/built-in.o: In function __pabt_usr':
/home/groeck/src/linux-stable/arch/arm/kernel/entry-armv.S:662: undefined reference to `user_exit'

Quoted 6 lines

These are due to ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converting these functions to be inline.

No idea what the fix for this is other than reverting the change. Any ideas Frederic?

I am all for reverting unless this can be fixed quickly. AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.

Guenter

#12 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

In reply to Kevin Hilman
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

Kevin, can you please try this patch? It built tested fine on ARM and live tested correctly on x86. There should be no problem but just in case.

Thanks!

---

Quoted 1 line

From 9bb601401baea0a2b2eead3909a9f186d894d617 Mon Sep 17 00:00:00 2001

From: Frederic Weisbecker <[email protected]>
Date: Tue, 10 Sep 2013 00:54:17 +0200
Subject: [PATCH] arm: Fix build error with context tracking calls

ad65782fba50 (context_tracking: Optimize main APIs off case with static key) converted context tracking main APIs to inline functions and left ARM asm callers behind.

This can be easily fixed by making ARM calling the post static keys context tracking functions. We just need to replicate the static key checks there. We'll remove these later when ARM will support the context tracking static keys.

Cc Kevin Hilman <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Anil Kumar <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Benoit Cousson <[email protected]>
---
 arch/arm/kernel/entry-header.S |    8 ++++----
 kernel/context_tracking.c      |   12 ++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/kernel/entry-header.S +4 -4
index de23a9b..39f89fb 100644
@@ -329,10 +329,10 @@
 #ifdef CONFIG_CONTEXT_TRACKING
 	.if	\save
 	stmdb   sp!, {r0-r3, ip, lr}
-	bl	user_exit
+	bl	context_tracking_user_exit
 	ldmia	sp!, {r0-r3, ip, lr}
 	.else
-	bl	user_exit
+	bl	context_tracking_user_exit
 	.endif
 #endif
 	.endm
@@ -341,10 +341,10 @@
 #ifdef CONFIG_CONTEXT_TRACKING
 	.if	\save
 	stmdb   sp!, {r0-r3, ip, lr}
-	bl	user_enter
+	bl	context_tracking_user_enter
 	ldmia	sp!, {r0-r3, ip, lr}
 	.else
-	bl	user_enter
+	bl	context_tracking_user_enter
 	.endif
 #endif
 	.endm
kernel/context_tracking.c +12 -0
index 247091b..859c8df 100644
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
 	unsigned long flags;
 
 	/*
+	 * Repeat the user_enter() check here because some archs may be calling
+	 * this from asm and if no CPU needs context tracking, they shouldn't
+	 * go further. We can remove that check here once these archs support the static key
+	 * check.
+	 */
+	if (!static_key_false(&context_tracking_enabled))
+		return;
+
+	/*
 	 * Some contexts may involve an exception occuring in an irq,
 	 * leading to that nesting:
 	 * rcu_irq_enter() rcu_user_exit() rcu_user_exit() rcu_irq_exit()
@@ -151,6 +160,9 @@ void context_tracking_user_exit(void)
 {
 	unsigned long flags;
 
+	if (!static_key_false(&context_tracking_enabled))
+		return;
+
 	if (in_interrupt())
 		return;
 
Signature · 1 line
1.7.5.4
#13 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

Quoted 11 lines · Frederic Weisbecker
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

Kevin, can you please try this patch? It built tested fine on ARM and live tested correctly on x86. There should be no problem but just in case.

Things are back to working again on ARM. Thanks for the fix, and for build testing on ARM.

As you noticed to test on ARM, we still have to carry that patch to drop that 'depends on 64BIT' in order to build/test this... any more thoughts on what the remaining obstacles there are?

Kevin

#14 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

Quoted 14 lines · Kevin Hilman
Quoted 11 lines · Frederic Weisbecker
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

Kevin, can you please try this patch? It built tested fine on ARM and live tested correctly on x86. There should be no problem but just in case.

Quoted 8 lines

Things are back to working again on ARM. Thanks for the fix, and for build testing on ARM.

As you noticed to test on ARM, we still have to carry that patch to drop that 'depends on 64BIT' in order to build/test this... any more thoughts on what the remaining obstacles there are?

I was mostly fine with your last patchset that enabled that + a few stuff to make it working on ARM. There were just a few details to polish. But I remember I sent detailed reviews, may be you missed them somewhow?

Thanks.

#15 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

Quoted 20 lines · Frederic Weisbecker
Quoted 19 lines · Kevin Hilman
Quoted 11 lines · Frederic Weisbecker
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Nicolas Pitre

Adding Kevin Hilman to the CC as he might be interested as well.

Thanks, I'd already noticed this but was distracted getting arm-soc changes ready for the merge window. Looking into it now.

Kevin, can you please try this patch? It built tested fine on ARM and live tested correctly on x86. There should be no problem but just in case.

Things are back to working again on ARM. Thanks for the fix, and for build testing on ARM.

Quoted 8 lines
Quoted 3 lines

As you noticed to test on ARM, we still have to carry that patch to drop that 'depends on 64BIT' in order to build/test this... any more thoughts on what the remaining obstacles there are?

I was mostly fine with your last patchset that enabled that + a few stuff to make it working on ARM. There were just a few details to polish. But I remember I sent detailed reviews, may be you missed them somewhow?

Hmm, looks like I missed those, but see them now. I'll go back through those and respin/resend.

Thanks,

Kevin

#16 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

In reply to Frederic Weisbecker

kernel/context_tracking.c void context_tracking_user_enter(void) · line 57

Quoted 12 lines · Frederic Weisbecker
kernel/context_tracking.c +4 -0
index 247091b..859c8df 100644
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
 	unsigned long flags;
 
 	/*
+	 * Repeat the user_enter() check here because some archs may be calling
+	 * this from asm and if no CPU needs context tracking, they shouldn't
+	 * go further. We can remove that check here once these archs support the static key
+	 * check.

The only (minor) comment on this is that the above would fail checkpatch, but that's not a good enough reason to respin it if you've already applied it IMHO.

#17 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

2013/9/14, Russell King - ARM Linux <[email protected]>:

Quoted 8 lines · Frederic Weisbecker
Quoted 7 lines
kernel/context_tracking.c +0 -0
index 247091b..859c8df 100644
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
 	unsigned long flags;
 
Quoted 11 lines

kernel/context_tracking.c void context_tracking_user_enter(void) · line 57

Quoted 6 lines
kernel/context_tracking.c +3 -0
 	/*
+	 * Repeat the user_enter() check here because some archs may be calling
+	 * this from asm and if no CPU needs context tracking, they shouldn't
+	 * go further. We can remove that check here once these archs support

the static key

kernel/context_tracking.c +1 -0
+	 * check.

The only (minor) comment on this is that the above would fail checkpatch, but that's not a good enough reason to respin it if you've already applied it IMHO.

Ah I haven't yet pushed that patch anywhere so I can definetly fix that. Thanks for the review. BTW, I initially first thought this fix could go through your tree but if you prefer I can push it through Ingo to the context tracking bits.

Just tell me either way.

Thanks!

#18 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

Quoted 21 lines · Frederic Weisbecker

2013/9/14, Russell King - ARM Linux <[email protected]>:

Quoted 8 lines · Frederic Weisbecker
Quoted 7 lines
kernel/context_tracking.c +0 -0
index 247091b..859c8df 100644
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
 	unsigned long flags;
 
Quoted 11 lines

kernel/context_tracking.c void context_tracking_user_enter(void) · line 57

Quoted 6 lines
kernel/context_tracking.c +3 -0
 	/*
+	 * Repeat the user_enter() check here because some archs may be calling
+	 * this from asm and if no CPU needs context tracking, they shouldn't
+	 * go further. We can remove that check here once these archs support

the static key

kernel/context_tracking.c +1 -0
+	 * check.

The only (minor) comment on this is that the above would fail checkpatch, but that's not a good enough reason to respin it if you've already applied it IMHO.

Quoted 6 lines

Ah I haven't yet pushed that patch anywhere so I can definetly fix that. Thanks for the review. BTW, I initially first thought this fix could go through your tree but if you prefer I can push it through Ingo to the context tracking bits.

Just tell me either way.

Frederic, I suggest you queue it directly for v3.12-rc. Thanks,

Kevin

#19 lore raw

PATCH 1/1 arm: Fix build error with context tracking calls

Quoted 23 lines · Kevin Hilman
Quoted 21 lines · Frederic Weisbecker

2013/9/14, Russell King - ARM Linux <[email protected]>:

Quoted 19 lines · Frederic Weisbecker

kernel/context_tracking.c void context_tracking_user_enter(void) · line 57

Quoted 13 lines
kernel/context_tracking.c +3 -0
index 247091b..859c8df 100644
@@ -51,6 +51,15 @@ void context_tracking_user_enter(void)
 	unsigned long flags;
 
 	/*
+	 * Repeat the user_enter() check here because some archs may be calling
+	 * this from asm and if no CPU needs context tracking, they shouldn't
+	 * go further. We can remove that check here once these archs support

the static key

kernel/context_tracking.c +1 -0
+	 * check.

The only (minor) comment on this is that the above would fail checkpatch, but that's not a good enough reason to respin it if you've already applied it IMHO.

Quoted 8 lines
Quoted 6 lines

Ah I haven't yet pushed that patch anywhere so I can definetly fix that. Thanks for the review. BTW, I initially first thought this fix could go through your tree but if you prefer I can push it through Ingo to the context tracking bits.

Just tell me either way.

Frederic, I suggest you queue it directly for v3.12-rc. Thanks,

Ok, I'm doing that then, thanks you!

author
#20 lore raw
In reply to Guenter Roeck

Hi Guenter,

Quoted 57 lines · Guenter Roeck
Quoted 19 lines · Russell King - ARM Linux
Quoted 8 lines · Anil Kumar

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.

   CALL    scripts/checksyscalls.sh
   CHK     include/generated/compile.h
   AS      arch/arm/mm/cache-v7.o
Quoted 7 lines

arch/arm/mm/cache-v7.S: Assembler messages:
arch/arm/mm/cache-v7.S:285: Error: garbage following instruction -- `dsb ishst'
arch/arm/mm/cache-v7.S:297: Error: garbage following instruction -- `dsb ishst'
make[1]: *** [arch/arm/mm/cache-v7.o] Error 1
make: *** [arch/arm/mm] Error 2

Quoted 2 lines

You need a later binutils for these instructions - 2.22 works just fine, even with gcc 4.5.x.

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 1 line

Any solution for this one ? omap2plus passes for me.

I have updated my toolchain Assembler (used binutils 2.22 ) with latest one and issue has fixed.

Thanks,
Anil

#21 lore raw
Quoted 60 lines · Anil Kumar

Hi Guenter,

Quoted 57 lines · Guenter Roeck
Quoted 19 lines · Russell King - ARM Linux
Quoted 8 lines · Anil Kumar

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.

    CALL    scripts/checksyscalls.sh
    CHK     include/generated/compile.h
    AS      arch/arm/mm/cache-v7.o
Quoted 7 lines

arch/arm/mm/cache-v7.S: Assembler messages:
arch/arm/mm/cache-v7.S:285: Error: garbage following instruction -- `dsb ishst'
arch/arm/mm/cache-v7.S:297: Error: garbage following instruction -- `dsb ishst'
make[1]: *** [arch/arm/mm/cache-v7.o] Error 1
make: *** [arch/arm/mm] Error 2

Quoted 2 lines

You need a later binutils for these instructions - 2.22 works just fine, even with gcc 4.5.x.

Since we are at it:

Build reference: v3.11-7887-gb409624

Building arm:defconfig ... passed
Building arm:allmodconfig ... failed
--------------
Error log:
arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:350:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] arch/arm/kernel/return_address.c:63:2: warning: #warning "TODO:
return_address should use unwind tables" [-Wcpp] /tmp/cce439dZ.s: Assembler messages:
/tmp/cce439dZ.s:506: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:512: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:513: Error: selected processor does not support ARM mode `dsb '
/tmp/cce439dZ.s:583: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:589: Error: selected processor does not support ARM mode `isb '
/tmp/cce439dZ.s:590: Error: selected processor does not support ARM mode `dsb '
make[1]: *** [arch/arm/mach-vexpress/dcscb.o] Error 1
make: *** [arch/arm/mach-vexpress] Error 2
make: *** Waiting for unfinished jobs....
--------------

Quoted 5 lines
Quoted 1 line

Any solution for this one ? omap2plus passes for me.

I have updated my toolchain Assembler (used binutils 2.22 ) with latest one and issue has fixed.

Not for this build. As I said, the omap2plus build passes for me. My binutils version is "2.23.1.20121113".

Did you try to build the file after "make allmodconfig" ?

Guenter