* [RFC] OMAP3+: boards: Fix the __initconst build error for devicetree/test branch
@ 2011-08-19 14:24 Cousson, Benoit
2011-08-19 14:40 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Cousson, Benoit @ 2011-08-19 14:24 UTC (permalink / raw)
To: Grant Likely, devicetree-discuss@lists.ozlabs.org
Cc: linux-omap, Balbi, Felipe, Nayak, Rajendra, G, Manjunath Kondaiah
Hi Grant,
The current devicetree/test branch is broken due to the introduction of the __initconst for dt_compat table.
My original basic fix is the following one, but Felipe figured out the root cause. So it can be fixed by adding an extra const to make the whole table const:
- const char **dt_compat; /* array of device tree
+ const char * const *dt_compat; /* array of device tree
That fix will require fixing all the current users of dt_compat with something like that:
-static const char *omap3_beagle_dt_match[] __initconst = {
+static const char * const omap3_beagle_dt_match[] __initconst = {
A couple of of_XXX APIs will have to updated as well, that's why I was wondering if you wanted to go that way.
Any thought?
Regards,
Benoit
---
>From fcee9dbfeb44dc5c5b79f002e63be6e00d8f82b6 Mon Sep 17 00:00:00 2001
From: Benoit Cousson <b-cousson@ti.com>
Date: Mon, 8 Aug 2011 11:30:45 +0200
Subject: [PATCH] OMAP3+: boards: Fix the __initconst build error
The __initconst introduced some build errors with the following
compiler version:
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1
arch/arm/mach-omap2/board-omap3beagle.c:566:20: error:
omap3_beagle_dt_match causes a section type conflict
Replace them by __initdata.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
---
arch/arm/mach-omap2/board-igep0020.c | 2 +-
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
arch/arm/mach-omap2/board-omap4panda.c | 2 +-
arch/arm/mach-omap2/board-overo.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 249165a..2521823 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -671,7 +671,7 @@ static void __init igep_init(void)
}
}
-static const char *igep2_dt_compat[] __initconst = {
+static const char *igep2_dt_compat[] __initdata = {
"ISEE,igep-v2",
NULL
};
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index b3b9cbc..a7923ca 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -563,7 +563,7 @@ static void __init omap3_beagle_init(void)
beagle_opp_init();
}
-static const char *omap3_beagle_dt_match[] __initconst = {
+static const char *omap3_beagle_dt_match[] __initdata = {
"ti,omap3-beagle",
NULL
};
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b526aa9..1c583c7 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -581,7 +581,7 @@ static void __init omap4_panda_map_io(void)
omap44xx_map_common_io();
}
-static const char *omap4_panda_match[] __initconst = {
+static const char *omap4_panda_match[] __initdata = {
"ti,omap4-panda",
NULL,
};
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 18ae2c2..f0b8489 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -560,7 +560,7 @@ static void __init overo_init(void)
"OVERO_GPIO_USBH_CPEN\n");
}
-static const char *omap3_overo_dt_match[] __initconst = {
+static const char *omap3_overo_dt_match[] __initdata = {
"gumstix,omap3-overo",
NULL
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC] OMAP3+: boards: Fix the __initconst build error for devicetree/test branch
2011-08-19 14:24 [RFC] OMAP3+: boards: Fix the __initconst build error for devicetree/test branch Cousson, Benoit
@ 2011-08-19 14:40 ` Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2011-08-19 14:40 UTC (permalink / raw)
To: Cousson, Benoit
Cc: Grant Likely, devicetree-discuss@lists.ozlabs.org, linux-omap,
Balbi, Felipe, Nayak, Rajendra, G, Manjunath Kondaiah
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
HI,
On Fri, Aug 19, 2011 at 04:24:00PM +0200, Cousson, Benoit wrote:
> Hi Grant,
>
> The current devicetree/test branch is broken due to the introduction
> of the __initconst for dt_compat table.
>
> My original basic fix is the following one, but Felipe figured out the
> root cause. So it can be fixed by adding an extra const to make the
> whole table const:
> - const char **dt_compat; /* array of device tree
> + const char * const *dt_compat; /* array of device tree
>
> That fix will require fixing all the current users of dt_compat with
> something like that:
>
> -static const char *omap3_beagle_dt_match[] __initconst = {
> +static const char * const omap3_beagle_dt_match[] __initconst = {
>
> A couple of of_XXX APIs will have to updated as well, that's why I was
> wondering if you wanted to go that way.
>
> Any thought?
the funny thing is that this was not happening with CodeSourcery 2011.03
when I sent the patch.
Maybe it's either a compiler bug on one of the toolchains or newer GCCs
are smart enough to create another section ??
But then again, 2011.03 isn't compiling sleep34xx.S:
arch/arm/mach-omap2/sleep34xx.S: Assembler messages:
arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not support ARM mode `smc #1'
arch/arm/mach-omap2/sleep34xx.S:418: Error: selected processor does not support ARM mode `smc #1'
arch/arm/mach-omap2/sleep34xx.S:429: Error: selected processor does not support ARM mode `smc #1'
arch/arm/mach-omap2/sleep34xx.S:454: Error: selected processor does not support ARM mode `smc #0'
arch/arm/mach-omap2/sleep34xx.S:460: Error: selected processor does not support ARM mode `smc #0'
arch/arm/mach-omap2/sleep34xx.S:465: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [arch/arm/mach-omap2/sleep34xx.o] Error 1
so it might be better to keep 2010.09 working.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-19 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 14:24 [RFC] OMAP3+: boards: Fix the __initconst build error for devicetree/test branch Cousson, Benoit
2011-08-19 14:40 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).