diff mbox

Build error in torvalds kernel 3.11 for omap2plus

Message ID alpine.LFD.2.03.1309091023440.20709@syhkavp.arg (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Pitre Sept. 9, 2013, 2:24 p.m. UTC
On Mon, 9 Sep 2013, Guenter Roeck wrote:

> On 09/09/2013 03:51 AM, Russell King - ARM Linux wrote:
> > On Sun, Sep 08, 2013 at 10:16:14AM -0700, Guenter Roeck wrote:
> > > 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.
> > 
> > That's due to:
> > 
> > commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece
> > Author: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 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.
> > 
> >      Signed-off-by: Nicolas Pitre <nico@linaro.org>
> > 
> > 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.

Would you try this patch please:

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Guenter Roeck Sept. 9, 2013, 4:03 p.m. UTC | #1
On Mon, Sep 09, 2013 at 10:24:42AM -0400, Nicolas Pitre wrote:
> On Mon, 9 Sep 2013, Guenter Roeck wrote:
> 
> > On 09/09/2013 03:51 AM, Russell King - ARM Linux wrote:
> > > On Sun, Sep 08, 2013 at 10:16:14AM -0700, Guenter Roeck wrote:
> > > > 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.
> > > 
> > > That's due to:
> > > 
> > > commit e8f9bb1bd6bb93fff773345cc54c42585e0e3ece
> > > Author: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 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.
> > > 
> > >      Signed-off-by: Nicolas Pitre <nico@linaro.org>
> > > 
> > > 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.
> 
> Would you try this patch please:
> 
> diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
> index 36ea824712..505e64ab3e 100644
> --- a/arch/arm/mach-vexpress/Makefile
> +++ b/arch/arm/mach-vexpress/Makefile
> @@ -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
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Russell King - ARM Linux Sept. 9, 2013, 8:31 p.m. UTC | #2
On Mon, Sep 09, 2013 at 09:03:48AM -0700, Guenter Roeck wrote:
> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Sept. 9, 2013, 9:02 p.m. UTC | #3
On Mon, Sep 09, 2013 at 09:31:41PM +0100, Russell King - ARM Linux wrote:
> On Mon, Sep 09, 2013 at 09:03:48AM -0700, Guenter Roeck wrote:
> > 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?
> 
I am all for reverting unless this can be fixed quickly.
AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas Pitre Sept. 9, 2013, 9:16 p.m. UTC | #4
Adding Kevin Hilman to the CC as he might be interested as well.

On Mon, 9 Sep 2013, Guenter Roeck wrote:

> On Mon, Sep 09, 2013 at 09:31:41PM +0100, Russell King - ARM Linux wrote:
> > On Mon, Sep 09, 2013 at 09:03:48AM -0700, Guenter Roeck wrote:
> > > 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?
> > 
> I am all for reverting unless this can be fixed quickly.
> AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.
> 
> Guenter
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kevin Hilman Sept. 10, 2013, 3:07 p.m. UTC | #5
Nicolas Pitre <nicolas.pitre@linaro.org> writes:

> 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

> On Mon, 9 Sep 2013, Guenter Roeck wrote:
>
>> On Mon, Sep 09, 2013 at 09:31:41PM +0100, Russell King - ARM Linux wrote:
>> > On Mon, Sep 09, 2013 at 09:03:48AM -0700, Guenter Roeck wrote:
>> > > 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?
>> > 
>> I am all for reverting unless this can be fixed quickly.
>> AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.
>> 
>> Guenter
>> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Frederic Weisbecker Sept. 10, 2013, 3:09 p.m. UTC | #6
On Tue, Sep 10, 2013 at 08:07:45AM -0700, Kevin Hilman wrote:
> Nicolas Pitre <nicolas.pitre@linaro.org> writes:
> 
> > 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.

> 
> Kevin
> 
> > On Mon, 9 Sep 2013, Guenter Roeck wrote:
> >
> >> On Mon, Sep 09, 2013 at 09:31:41PM +0100, Russell King - ARM Linux wrote:
> >> > On Mon, Sep 09, 2013 at 09:03:48AM -0700, Guenter Roeck wrote:
> >> > > 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?
> >> > 
> >> I am all for reverting unless this can be fixed quickly.
> >> AFAICS this breaks all arm builds if CONFIG_CONTEXT_TRACKING is enabled.
> >> 
> >> Guenter
> >> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
index 36ea824712..505e64ab3e 100644
--- a/arch/arm/mach-vexpress/Makefile
+++ b/arch/arm/mach-vexpress/Makefile
@@ -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