* [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build
@ 2012-07-24 10:34 Vladimir Zapolskiy
2012-07-30 19:56 ` Vladimir Zapolskiy
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Zapolskiy @ 2012-07-24 10:34 UTC (permalink / raw)
To: meta-ti
This change adds an additional patch to the Linux kernel to avoid a
compilation time problem with recent toolchains:
Error: selected processor does not support ARM mode `smc #0'
With recent toolchains the `smc #0' instruction may be used either in
assembler sources without .arch directive, or `.arch_extension sec' shall
precede it.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
Changes from v1 to v2:
* instead of exclusion of problematic pathes this version fixes them,
one more patch is added
...7-add-explicit-.arch_extension-into-assem.patch | 59 ++++++++++++++++++++
recipes-kernel/linux/linux-omap-psp_2.6.32.bb | 1 +
2 files changed, 60 insertions(+)
create mode 100644 recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
diff --git a/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
new file mode 100644
index 0000000..438605f
--- /dev/null
+++ b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
@@ -0,0 +1,59 @@
+From 9ef8994ca43905bfee6af59e0fb0cedde9872f6c Mon Sep 17 00:00:00 2001
+From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
+Date: Mon, 23 Jul 2012 22:18:29 +0300
+Subject: [PATCH] ARM: sysfs_v7: add explicit .arch_extension into assembler
+ code
+
+The change fixes a compilation problem with binutils-2.21 or higher:
+
+ Error: selected processor does not support ARM mode `smc #0'
+
+With recent toolchains the `smc #0' instruction may be used either in
+assembler sources without .arch directive, or `.arch_extension sec' shall
+precede it.
+
+Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
+---
+ arch/arm/kernel/Makefile | 1 +
+ arch/arm/kernel/sysfs_v7.c | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
+index ee20134..bb3bc7e 100644
+--- a/arch/arm/kernel/Makefile
++++ b/arch/arm/kernel/Makefile
+@@ -39,6 +39,7 @@ obj-$(CONFIG_KGDB) += kgdb.o
+ obj-$(CONFIG_ARM_UNWIND) += unwind.o
+ obj-$(CONFIG_HAVE_TCM) += tcm.o
+ obj-$(CONFIG_CPU_V7_SYSFS) += sysfs_v7.o
++CFLAGS_sysfs_v7.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
+
+ obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
+ AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
+diff --git a/arch/arm/kernel/sysfs_v7.c b/arch/arm/kernel/sysfs_v7.c
+index 5ed32fb..d357b52 100644
+--- a/arch/arm/kernel/sysfs_v7.c
++++ b/arch/arm/kernel/sysfs_v7.c
+@@ -78,6 +78,9 @@ static ssize_t aux_ctl_store(struct sys_device *dev,
+ val &= ~2;
+ asm ("mov r0, %0 \n\t"
+ "mov r12, #3 \n\t"
++#ifdef REQUIRES_SEC
++ ".arch_extension sec\n\t"
++#endif
+ "smc #0 \n\t"
+ :: "r"(val) : "r0", "r12");
+
+@@ -109,6 +112,9 @@ static ssize_t l2_aux_ctl_store(struct sys_device *dev,
+ SETBITS(val, 0xbc00000, new);
+ asm ("mov r0, %0 \n\t"
+ "mov r12, #2 \n\t"
++#ifdef REQUIRES_SEC
++ ".arch_extension sec\n\t"
++#endif
+ "smc #0 \n\t"
+ :: "r"(val) : "r0", "r12");
+
+--
+1.7.10
+
diff --git a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
index 61fc24f..2cfad0c 100644
--- a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
+++ b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
@@ -139,6 +139,7 @@ SRC_URI += "git://arago-project.org/git/projects/linux-omap3.git;protocol=git;br
file://0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch \
file://porches.patch \
file://0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch \
+ file://0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch \
file://defconfig"
SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build
2012-07-24 10:34 [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build Vladimir Zapolskiy
@ 2012-07-30 19:56 ` Vladimir Zapolskiy
2012-07-30 22:10 ` Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Zapolskiy @ 2012-07-30 19:56 UTC (permalink / raw)
To: meta-ti
Hi,
any comments about the issue? Should I firstly create a bug in
http://bugzilla.yoctoproject.org, if I want to fix the problem?
With best wishes,
Vladimir
On 24.07.2012 13:34, Vladimir Zapolskiy wrote:
> This change adds an additional patch to the Linux kernel to avoid a
> compilation time problem with recent toolchains:
>
> Error: selected processor does not support ARM mode `smc #0'
>
> With recent toolchains the `smc #0' instruction may be used either in
> assembler sources without .arch directive, or `.arch_extension sec' shall
> precede it.
>
> Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> ---
> Changes from v1 to v2:
> * instead of exclusion of problematic pathes this version fixes them,
> one more patch is added
>
> ...7-add-explicit-.arch_extension-into-assem.patch | 59 ++++++++++++++++++++
> recipes-kernel/linux/linux-omap-psp_2.6.32.bb | 1 +
> 2 files changed, 60 insertions(+)
> create mode 100644 recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
>
> diff --git a/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
> new file mode 100644
> index 0000000..438605f
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
> @@ -0,0 +1,59 @@
> +From 9ef8994ca43905bfee6af59e0fb0cedde9872f6c Mon Sep 17 00:00:00 2001
> +From: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> +Date: Mon, 23 Jul 2012 22:18:29 +0300
> +Subject: [PATCH] ARM: sysfs_v7: add explicit .arch_extension into assembler
> + code
> +
> +The change fixes a compilation problem with binutils-2.21 or higher:
> +
> + Error: selected processor does not support ARM mode `smc #0'
> +
> +With recent toolchains the `smc #0' instruction may be used either in
> +assembler sources without .arch directive, or `.arch_extension sec' shall
> +precede it.
> +
> +Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> +---
> + arch/arm/kernel/Makefile | 1 +
> + arch/arm/kernel/sysfs_v7.c | 6 ++++++
> + 2 files changed, 7 insertions(+)
> +
> +diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
> +index ee20134..bb3bc7e 100644
> +--- a/arch/arm/kernel/Makefile
> ++++ b/arch/arm/kernel/Makefile
> +@@ -39,6 +39,7 @@ obj-$(CONFIG_KGDB) += kgdb.o
> + obj-$(CONFIG_ARM_UNWIND) += unwind.o
> + obj-$(CONFIG_HAVE_TCM) += tcm.o
> + obj-$(CONFIG_CPU_V7_SYSFS) += sysfs_v7.o
> ++CFLAGS_sysfs_v7.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
> +
> + obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
> + AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
> +diff --git a/arch/arm/kernel/sysfs_v7.c b/arch/arm/kernel/sysfs_v7.c
> +index 5ed32fb..d357b52 100644
> +--- a/arch/arm/kernel/sysfs_v7.c
> ++++ b/arch/arm/kernel/sysfs_v7.c
> +@@ -78,6 +78,9 @@ static ssize_t aux_ctl_store(struct sys_device *dev,
> + val&= ~2;
> + asm ("mov r0, %0 \n\t"
> + "mov r12, #3 \n\t"
> ++#ifdef REQUIRES_SEC
> ++ ".arch_extension sec\n\t"
> ++#endif
> + "smc #0 \n\t"
> + :: "r"(val) : "r0", "r12");
> +
> +@@ -109,6 +112,9 @@ static ssize_t l2_aux_ctl_store(struct sys_device *dev,
> + SETBITS(val, 0xbc00000, new);
> + asm ("mov r0, %0 \n\t"
> + "mov r12, #2 \n\t"
> ++#ifdef REQUIRES_SEC
> ++ ".arch_extension sec\n\t"
> ++#endif
> + "smc #0 \n\t"
> + :: "r"(val) : "r0", "r12");
> +
> +--
> +1.7.10
> +
> diff --git a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> index 61fc24f..2cfad0c 100644
> --- a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> +++ b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> @@ -139,6 +139,7 @@ SRC_URI += "git://arago-project.org/git/projects/linux-omap3.git;protocol=git;br
> file://0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch \
> file://porches.patch \
> file://0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch \
> + file://0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch \
> file://defconfig"
>
> SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build
2012-07-30 19:56 ` Vladimir Zapolskiy
@ 2012-07-30 22:10 ` Denys Dmytriyenko
2012-07-31 7:34 ` Vladimir Zapolskiy
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2012-07-30 22:10 UTC (permalink / raw)
To: Vladimir Zapolskiy; +Cc: meta-ti
On Mon, Jul 30, 2012 at 10:56:53PM +0300, Vladimir Zapolskiy wrote:
> Hi,
>
> any comments about the issue? Should I firstly create a bug in
> http://bugzilla.yoctoproject.org, if I want to fix the problem?
I would rather try updating it to 2.6.37 - hopefully that one doesn't have
this issue with recent binutils... Do you have any specific requirements to
stay with 2.6.32 instead? If not, 2.6.37 is what is being released as part of
SDK for AM37x EVM - I'll look into porting it into meta-ti...
--
Denys
> On 24.07.2012 13:34, Vladimir Zapolskiy wrote:
> >This change adds an additional patch to the Linux kernel to avoid a
> >compilation time problem with recent toolchains:
> >
> > Error: selected processor does not support ARM mode `smc #0'
> >
> >With recent toolchains the `smc #0' instruction may be used either in
> >assembler sources without .arch directive, or `.arch_extension sec' shall
> >precede it.
> >
> >Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> >---
> >Changes from v1 to v2:
> > * instead of exclusion of problematic pathes this version fixes them,
> > one more patch is added
> >
> > ...7-add-explicit-.arch_extension-into-assem.patch | 59 ++++++++++++++++++++
> > recipes-kernel/linux/linux-omap-psp_2.6.32.bb | 1 +
> > 2 files changed, 60 insertions(+)
> > create mode 100644 recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
> >
> >diff --git a/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
> >new file mode 100644
> >index 0000000..438605f
> >--- /dev/null
> >+++ b/recipes-kernel/linux/linux-omap-psp-2.6.32/0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch
> >@@ -0,0 +1,59 @@
> >+From 9ef8994ca43905bfee6af59e0fb0cedde9872f6c Mon Sep 17 00:00:00 2001
> >+From: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> >+Date: Mon, 23 Jul 2012 22:18:29 +0300
> >+Subject: [PATCH] ARM: sysfs_v7: add explicit .arch_extension into assembler
> >+ code
> >+
> >+The change fixes a compilation problem with binutils-2.21 or higher:
> >+
> >+ Error: selected processor does not support ARM mode `smc #0'
> >+
> >+With recent toolchains the `smc #0' instruction may be used either in
> >+assembler sources without .arch directive, or `.arch_extension sec' shall
> >+precede it.
> >+
> >+Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> >+---
> >+ arch/arm/kernel/Makefile | 1 +
> >+ arch/arm/kernel/sysfs_v7.c | 6 ++++++
> >+ 2 files changed, 7 insertions(+)
> >+
> >+diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
> >+index ee20134..bb3bc7e 100644
> >+--- a/arch/arm/kernel/Makefile
> >++++ b/arch/arm/kernel/Makefile
> >+@@ -39,6 +39,7 @@ obj-$(CONFIG_KGDB) += kgdb.o
> >+ obj-$(CONFIG_ARM_UNWIND) += unwind.o
> >+ obj-$(CONFIG_HAVE_TCM) += tcm.o
> >+ obj-$(CONFIG_CPU_V7_SYSFS) += sysfs_v7.o
> >++CFLAGS_sysfs_v7.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
> >+
> >+ obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
> >+ AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
> >+diff --git a/arch/arm/kernel/sysfs_v7.c b/arch/arm/kernel/sysfs_v7.c
> >+index 5ed32fb..d357b52 100644
> >+--- a/arch/arm/kernel/sysfs_v7.c
> >++++ b/arch/arm/kernel/sysfs_v7.c
> >+@@ -78,6 +78,9 @@ static ssize_t aux_ctl_store(struct sys_device *dev,
> >+ val&= ~2;
> >+ asm ("mov r0, %0 \n\t"
> >+ "mov r12, #3 \n\t"
> >++#ifdef REQUIRES_SEC
> >++ ".arch_extension sec\n\t"
> >++#endif
> >+ "smc #0 \n\t"
> >+ :: "r"(val) : "r0", "r12");
> >+
> >+@@ -109,6 +112,9 @@ static ssize_t l2_aux_ctl_store(struct sys_device *dev,
> >+ SETBITS(val, 0xbc00000, new);
> >+ asm ("mov r0, %0 \n\t"
> >+ "mov r12, #2 \n\t"
> >++#ifdef REQUIRES_SEC
> >++ ".arch_extension sec\n\t"
> >++#endif
> >+ "smc #0 \n\t"
> >+ :: "r"(val) : "r0", "r12");
> >+
> >+--
> >+1.7.10
> >+
> >diff --git a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> >index 61fc24f..2cfad0c 100644
> >--- a/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> >+++ b/recipes-kernel/linux/linux-omap-psp_2.6.32.bb
> >@@ -139,6 +139,7 @@ SRC_URI += "git://arago-project.org/git/projects/linux-omap3.git;protocol=git;br
> > file://0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch \
> > file://porches.patch \
> > file://0001-cgroupfs-create-sys-fs-cgroup-to-mount-cgroupfs-on.patch \
> >+ file://0001-ARM-sysfs_v7-add-explicit-.arch_extension-into-assem.patch \
> > file://defconfig"
> >
> > SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build
2012-07-30 22:10 ` Denys Dmytriyenko
@ 2012-07-31 7:34 ` Vladimir Zapolskiy
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Zapolskiy @ 2012-07-31 7:34 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-ti
Hi Denys,
On 31.07.2012 01:10, Denys Dmytriyenko wrote:
> On Mon, Jul 30, 2012 at 10:56:53PM +0300, Vladimir Zapolskiy wrote:
>> Hi,
>>
>> any comments about the issue? Should I firstly create a bug in
>> http://bugzilla.yoctoproject.org, if I want to fix the problem?
>
> I would rather try updating it to 2.6.37 - hopefully that one doesn't have
> this issue with recent binutils... Do you have any specific requirements to
> stay with 2.6.32 instead? If not, 2.6.37 is what is being released as part of
> SDK for AM37x EVM - I'll look into porting it into meta-ti...
thank you in advance. There is no objection from my side about such upgrade.
And you're right, linux-omapl138-psp-2.6.37 doesn't contain similar
problematic
patches, which should be fixed or removed.
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-31 7:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 10:34 [PATCH v2] linux-omap-psp 2.6.32: fix am37x-evm failing build Vladimir Zapolskiy
2012-07-30 19:56 ` Vladimir Zapolskiy
2012-07-30 22:10 ` Denys Dmytriyenko
2012-07-31 7:34 ` Vladimir Zapolskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.