Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-19 Thread Sam Ravnborg
On Sun, Aug 19, 2012 at 04:07:10AM +0200, Andi Kleen wrote:
> > > +config BROKEN_RODATA
> > > + bool
> > > + default y
> > 
> > Could you please change this so we have a commonly defined 
> > HAVE_BROKEN_RODATA
> > symbol. Then arch's that have broken RO data can select this symbol.
> > If we experience tomorrow that sparc have the same issue then with
> > this patch sparc has to create a local definition of this symbol.
> 
> Here's an updated patch with the config placed in init/Kconfig.

Looks good!

> I'm not going to repost the whole series.
> 
> -Andi
> 
> ---
> 
> Disable const sections for PA-RISC v2
> 
> The PA-RISC tool chain seems to have some problem with correct read/write
> attributes on sections. This causes problems when the const sections
> are fixed up for other architecture to only contain truly read-only
> data.
> 
> Disable const sections for PA-RISC
> 
> This can cause a bit of noise with modpost.
> 
> v2: Move config to init/Kconfig
> Cc: james.bottom...@hansenpartnership.com
Acked-by: Sam Ravnborg 

> Signed-off-by: Andi Kleen 

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-19 Thread Sam Ravnborg
On Sun, Aug 19, 2012 at 04:07:10AM +0200, Andi Kleen wrote:
   +config BROKEN_RODATA
   + bool
   + default y
  
  Could you please change this so we have a commonly defined 
  HAVE_BROKEN_RODATA
  symbol. Then arch's that have broken RO data can select this symbol.
  If we experience tomorrow that sparc have the same issue then with
  this patch sparc has to create a local definition of this symbol.
 
 Here's an updated patch with the config placed in init/Kconfig.

Looks good!

 I'm not going to repost the whole series.
 
 -Andi
 
 ---
 
 Disable const sections for PA-RISC v2
 
 The PA-RISC tool chain seems to have some problem with correct read/write
 attributes on sections. This causes problems when the const sections
 are fixed up for other architecture to only contain truly read-only
 data.
 
 Disable const sections for PA-RISC
 
 This can cause a bit of noise with modpost.
 
 v2: Move config to init/Kconfig
 Cc: james.bottom...@hansenpartnership.com
Acked-by: Sam Ravnborg s...@ravnborg.org

 Signed-off-by: Andi Kleen a...@linux.intel.com

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Andi Kleen
> > +config BROKEN_RODATA
> > +   bool
> > +   default y
> 
> Could you please change this so we have a commonly defined HAVE_BROKEN_RODATA
> symbol. Then arch's that have broken RO data can select this symbol.
> If we experience tomorrow that sparc have the same issue then with
> this patch sparc has to create a local definition of this symbol.

Here's an updated patch with the config placed in init/Kconfig.
I'm not going to repost the whole series.

-Andi

---

Disable const sections for PA-RISC v2

The PA-RISC tool chain seems to have some problem with correct read/write
attributes on sections. This causes problems when the const sections
are fixed up for other architecture to only contain truly read-only
data.

Disable const sections for PA-RISC

This can cause a bit of noise with modpost.

v2: Move config to init/Kconfig
Cc: james.bottom...@hansenpartnership.com
Signed-off-by: Andi Kleen 
---
 arch/parisc/Kconfig  |1 +
 include/linux/init.h |   27 +++
 init/Kconfig |6 ++
 3 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b5..77f9c81 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -19,6 +19,7 @@ config PARISC
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_SMP_IDLE_THREAD
select GENERIC_STRNCPY_FROM_USER
+   select BROKEN_RODATA
 
help
  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/include/linux/init.h b/include/linux/init.h
index 5e664f6..c2f06b3 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -43,10 +43,21 @@
discard it in modules) */
 #define __init __section(.init.text) __cold notrace
 #define __initdata __section(.init.data)
-#define __initconst__section(.init.rodata)
+#define __initconst__constsection(.init.rodata)
 #define __exitdata __section(.exit.data)
 #define __exit_call__used __section(.exitcall.exit)
 
+/* 
+ * Some architecture have tool chains which do not handle rodata attributes
+ * correctly. For those disable special sections for const, so that other
+ * architectures can annotate correctly.
+ */
+#ifdef CONFIG_BROKEN_RODATA
+#define __constsection(x)
+#else
+#define __constsection(x) __section(x)
+#endif
+
 /*
  * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -66,7 +77,7 @@
  */
 #define __ref__section(.ref.text) noinline
 #define __refdata__section(.ref.data)
-#define __refconst   __section(.ref.rodata)
+#define __refconst   __constsection(.ref.rodata)
 
 /* compatibility defines */
 #define __init_refok __ref
@@ -85,26 +96,26 @@
 /* Used for HOTPLUG */
 #define __devinit__section(.devinit.text) __cold notrace
 #define __devinitdata__section(.devinit.data)
-#define __devinitconst   __section(.devinit.rodata)
+#define __devinitconst   __constsection(.devinit.rodata)
 #define __devexit__section(.devexit.text) __exitused __cold notrace
 #define __devexitdata__section(.devexit.data)
-#define __devexitconst   __section(.devexit.rodata)
+#define __devexitconst   __constsection(.devexit.rodata)
 
 /* Used for HOTPLUG_CPU */
 #define __cpuinit__section(.cpuinit.text) __cold notrace
 #define __cpuinitdata__section(.cpuinit.data)
-#define __cpuinitconst   __section(.cpuinit.rodata)
+#define __cpuinitconst   __constsection(.cpuinit.rodata)
 #define __cpuexit__section(.cpuexit.text) __exitused __cold notrace
 #define __cpuexitdata__section(.cpuexit.data)
-#define __cpuexitconst   __section(.cpuexit.rodata)
+#define __cpuexitconst   __constsection(.cpuexit.rodata)
 
 /* Used for MEMORY_HOTPLUG */
 #define __meminit__section(.meminit.text) __cold notrace
 #define __meminitdata__section(.meminit.data)
-#define __meminitconst   __section(.meminit.rodata)
+#define __meminitconst   __constsection(.meminit.rodata)
 #define __memexit__section(.memexit.text) __exitused __cold notrace
 #define __memexitdata__section(.memexit.data)
-#define __memexitconst   __section(.memexit.rodata)
+#define __memexitconst   __constsection(.memexit.rodata)
 
 /* For assembly routines */
 #define __HEAD .section".head.text","ax"
diff --git a/init/Kconfig b/init/Kconfig
index af6c7f8..a8785db 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1612,4 +1612,10 @@ config PADATA
depends on SMP
bool
 
+# Can be selected by architectures with broken toolchains
+# that get confused by correct const<->read_only section
+# mappings
+config BROKEN_RODATA
+   bool
+
 source "kernel/Kconfig.locks"
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Sam Ravnborg
On Sat, Aug 18, 2012 at 10:29:52AM -0700, Andi Kleen wrote:
> From: Andi Kleen 
> 
> The PA-RISC tool chain seems to have some problem with correct read/write
> attributes on sections. This causes problems when the const sections
> are fixed up for other architecture to only contain truly read-only
> data.
> 
> Disable const sections for PA-RISC
> 
> This can cause a bit of noise with modpost.
> 
> Cc: james.bottom...@hansenpartnership.com
> Signed-off-by: Andi Kleen 
> ---
>  arch/parisc/Kconfig  |4 
>  include/linux/init.h |   27 +++
>  2 files changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> index 3ff21b5..fbfeec9 100644
> --- a/arch/parisc/Kconfig
> +++ b/arch/parisc/Kconfig
> @@ -243,6 +243,10 @@ config NODES_SHIFT
>   default "3"
>   depends on NEED_MULTIPLE_NODES
>  
> +config BROKEN_RODATA
> + bool
> + default y

Could you please change this so we have a commonly defined HAVE_BROKEN_RODATA
symbol. Then arch's that have broken RO data can select this symbol.
If we experience tomorrow that sparc have the same issue then with
this patch sparc has to create a local definition of this symbol.

This allows you to add some comments of the usage of this symbol
in a common place too.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

The PA-RISC tool chain seems to have some problem with correct read/write
attributes on sections. This causes problems when the const sections
are fixed up for other architecture to only contain truly read-only
data.

Disable const sections for PA-RISC

This can cause a bit of noise with modpost.

Cc: james.bottom...@hansenpartnership.com
Signed-off-by: Andi Kleen 
---
 arch/parisc/Kconfig  |4 
 include/linux/init.h |   27 +++
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b5..fbfeec9 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -243,6 +243,10 @@ config NODES_SHIFT
default "3"
depends on NEED_MULTIPLE_NODES
 
+config BROKEN_RODATA
+   bool
+   default y
+
 source "kernel/Kconfig.preempt"
 source "kernel/Kconfig.hz"
 source "mm/Kconfig"
diff --git a/include/linux/init.h b/include/linux/init.h
index 5e664f6..c2f06b3 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -43,10 +43,21 @@
discard it in modules) */
 #define __init __section(.init.text) __cold notrace
 #define __initdata __section(.init.data)
-#define __initconst__section(.init.rodata)
+#define __initconst__constsection(.init.rodata)
 #define __exitdata __section(.exit.data)
 #define __exit_call__used __section(.exitcall.exit)
 
+/* 
+ * Some architecture have tool chains which do not handle rodata attributes
+ * correctly. For those disable special sections for const, so that other
+ * architectures can annotate correctly.
+ */
+#ifdef CONFIG_BROKEN_RODATA
+#define __constsection(x)
+#else
+#define __constsection(x) __section(x)
+#endif
+
 /*
  * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -66,7 +77,7 @@
  */
 #define __ref__section(.ref.text) noinline
 #define __refdata__section(.ref.data)
-#define __refconst   __section(.ref.rodata)
+#define __refconst   __constsection(.ref.rodata)
 
 /* compatibility defines */
 #define __init_refok __ref
@@ -85,26 +96,26 @@
 /* Used for HOTPLUG */
 #define __devinit__section(.devinit.text) __cold notrace
 #define __devinitdata__section(.devinit.data)
-#define __devinitconst   __section(.devinit.rodata)
+#define __devinitconst   __constsection(.devinit.rodata)
 #define __devexit__section(.devexit.text) __exitused __cold notrace
 #define __devexitdata__section(.devexit.data)
-#define __devexitconst   __section(.devexit.rodata)
+#define __devexitconst   __constsection(.devexit.rodata)
 
 /* Used for HOTPLUG_CPU */
 #define __cpuinit__section(.cpuinit.text) __cold notrace
 #define __cpuinitdata__section(.cpuinit.data)
-#define __cpuinitconst   __section(.cpuinit.rodata)
+#define __cpuinitconst   __constsection(.cpuinit.rodata)
 #define __cpuexit__section(.cpuexit.text) __exitused __cold notrace
 #define __cpuexitdata__section(.cpuexit.data)
-#define __cpuexitconst   __section(.cpuexit.rodata)
+#define __cpuexitconst   __constsection(.cpuexit.rodata)
 
 /* Used for MEMORY_HOTPLUG */
 #define __meminit__section(.meminit.text) __cold notrace
 #define __meminitdata__section(.meminit.data)
-#define __meminitconst   __section(.meminit.rodata)
+#define __meminitconst   __constsection(.meminit.rodata)
 #define __memexit__section(.memexit.text) __exitused __cold notrace
 #define __memexitdata__section(.memexit.data)
-#define __memexitconst   __section(.memexit.rodata)
+#define __memexitconst   __constsection(.memexit.rodata)
 
 /* For assembly routines */
 #define __HEAD .section".head.text","ax"
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com

The PA-RISC tool chain seems to have some problem with correct read/write
attributes on sections. This causes problems when the const sections
are fixed up for other architecture to only contain truly read-only
data.

Disable const sections for PA-RISC

This can cause a bit of noise with modpost.

Cc: james.bottom...@hansenpartnership.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
 arch/parisc/Kconfig  |4 
 include/linux/init.h |   27 +++
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b5..fbfeec9 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -243,6 +243,10 @@ config NODES_SHIFT
default 3
depends on NEED_MULTIPLE_NODES
 
+config BROKEN_RODATA
+   bool
+   default y
+
 source kernel/Kconfig.preempt
 source kernel/Kconfig.hz
 source mm/Kconfig
diff --git a/include/linux/init.h b/include/linux/init.h
index 5e664f6..c2f06b3 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -43,10 +43,21 @@
discard it in modules) */
 #define __init __section(.init.text) __cold notrace
 #define __initdata __section(.init.data)
-#define __initconst__section(.init.rodata)
+#define __initconst__constsection(.init.rodata)
 #define __exitdata __section(.exit.data)
 #define __exit_call__used __section(.exitcall.exit)
 
+/* 
+ * Some architecture have tool chains which do not handle rodata attributes
+ * correctly. For those disable special sections for const, so that other
+ * architectures can annotate correctly.
+ */
+#ifdef CONFIG_BROKEN_RODATA
+#define __constsection(x)
+#else
+#define __constsection(x) __section(x)
+#endif
+
 /*
  * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -66,7 +77,7 @@
  */
 #define __ref__section(.ref.text) noinline
 #define __refdata__section(.ref.data)
-#define __refconst   __section(.ref.rodata)
+#define __refconst   __constsection(.ref.rodata)
 
 /* compatibility defines */
 #define __init_refok __ref
@@ -85,26 +96,26 @@
 /* Used for HOTPLUG */
 #define __devinit__section(.devinit.text) __cold notrace
 #define __devinitdata__section(.devinit.data)
-#define __devinitconst   __section(.devinit.rodata)
+#define __devinitconst   __constsection(.devinit.rodata)
 #define __devexit__section(.devexit.text) __exitused __cold notrace
 #define __devexitdata__section(.devexit.data)
-#define __devexitconst   __section(.devexit.rodata)
+#define __devexitconst   __constsection(.devexit.rodata)
 
 /* Used for HOTPLUG_CPU */
 #define __cpuinit__section(.cpuinit.text) __cold notrace
 #define __cpuinitdata__section(.cpuinit.data)
-#define __cpuinitconst   __section(.cpuinit.rodata)
+#define __cpuinitconst   __constsection(.cpuinit.rodata)
 #define __cpuexit__section(.cpuexit.text) __exitused __cold notrace
 #define __cpuexitdata__section(.cpuexit.data)
-#define __cpuexitconst   __section(.cpuexit.rodata)
+#define __cpuexitconst   __constsection(.cpuexit.rodata)
 
 /* Used for MEMORY_HOTPLUG */
 #define __meminit__section(.meminit.text) __cold notrace
 #define __meminitdata__section(.meminit.data)
-#define __meminitconst   __section(.meminit.rodata)
+#define __meminitconst   __constsection(.meminit.rodata)
 #define __memexit__section(.memexit.text) __exitused __cold notrace
 #define __memexitdata__section(.memexit.data)
-#define __memexitconst   __section(.memexit.rodata)
+#define __memexitconst   __constsection(.memexit.rodata)
 
 /* For assembly routines */
 #define __HEAD .section.head.text,ax
-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Sam Ravnborg
On Sat, Aug 18, 2012 at 10:29:52AM -0700, Andi Kleen wrote:
 From: Andi Kleen a...@linux.intel.com
 
 The PA-RISC tool chain seems to have some problem with correct read/write
 attributes on sections. This causes problems when the const sections
 are fixed up for other architecture to only contain truly read-only
 data.
 
 Disable const sections for PA-RISC
 
 This can cause a bit of noise with modpost.
 
 Cc: james.bottom...@hansenpartnership.com
 Signed-off-by: Andi Kleen a...@linux.intel.com
 ---
  arch/parisc/Kconfig  |4 
  include/linux/init.h |   27 +++
  2 files changed, 23 insertions(+), 8 deletions(-)
 
 diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
 index 3ff21b5..fbfeec9 100644
 --- a/arch/parisc/Kconfig
 +++ b/arch/parisc/Kconfig
 @@ -243,6 +243,10 @@ config NODES_SHIFT
   default 3
   depends on NEED_MULTIPLE_NODES
  
 +config BROKEN_RODATA
 + bool
 + default y

Could you please change this so we have a commonly defined HAVE_BROKEN_RODATA
symbol. Then arch's that have broken RO data can select this symbol.
If we experience tomorrow that sparc have the same issue then with
this patch sparc has to create a local definition of this symbol.

This allows you to add some comments of the usage of this symbol
in a common place too.

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/31] Disable const sections for PA-RISC

2012-08-18 Thread Andi Kleen
  +config BROKEN_RODATA
  +   bool
  +   default y
 
 Could you please change this so we have a commonly defined HAVE_BROKEN_RODATA
 symbol. Then arch's that have broken RO data can select this symbol.
 If we experience tomorrow that sparc have the same issue then with
 this patch sparc has to create a local definition of this symbol.

Here's an updated patch with the config placed in init/Kconfig.
I'm not going to repost the whole series.

-Andi

---

Disable const sections for PA-RISC v2

The PA-RISC tool chain seems to have some problem with correct read/write
attributes on sections. This causes problems when the const sections
are fixed up for other architecture to only contain truly read-only
data.

Disable const sections for PA-RISC

This can cause a bit of noise with modpost.

v2: Move config to init/Kconfig
Cc: james.bottom...@hansenpartnership.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
 arch/parisc/Kconfig  |1 +
 include/linux/init.h |   27 +++
 init/Kconfig |6 ++
 3 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b5..77f9c81 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -19,6 +19,7 @@ config PARISC
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_SMP_IDLE_THREAD
select GENERIC_STRNCPY_FROM_USER
+   select BROKEN_RODATA
 
help
  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/include/linux/init.h b/include/linux/init.h
index 5e664f6..c2f06b3 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -43,10 +43,21 @@
discard it in modules) */
 #define __init __section(.init.text) __cold notrace
 #define __initdata __section(.init.data)
-#define __initconst__section(.init.rodata)
+#define __initconst__constsection(.init.rodata)
 #define __exitdata __section(.exit.data)
 #define __exit_call__used __section(.exitcall.exit)
 
+/* 
+ * Some architecture have tool chains which do not handle rodata attributes
+ * correctly. For those disable special sections for const, so that other
+ * architectures can annotate correctly.
+ */
+#ifdef CONFIG_BROKEN_RODATA
+#define __constsection(x)
+#else
+#define __constsection(x) __section(x)
+#endif
+
 /*
  * modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -66,7 +77,7 @@
  */
 #define __ref__section(.ref.text) noinline
 #define __refdata__section(.ref.data)
-#define __refconst   __section(.ref.rodata)
+#define __refconst   __constsection(.ref.rodata)
 
 /* compatibility defines */
 #define __init_refok __ref
@@ -85,26 +96,26 @@
 /* Used for HOTPLUG */
 #define __devinit__section(.devinit.text) __cold notrace
 #define __devinitdata__section(.devinit.data)
-#define __devinitconst   __section(.devinit.rodata)
+#define __devinitconst   __constsection(.devinit.rodata)
 #define __devexit__section(.devexit.text) __exitused __cold notrace
 #define __devexitdata__section(.devexit.data)
-#define __devexitconst   __section(.devexit.rodata)
+#define __devexitconst   __constsection(.devexit.rodata)
 
 /* Used for HOTPLUG_CPU */
 #define __cpuinit__section(.cpuinit.text) __cold notrace
 #define __cpuinitdata__section(.cpuinit.data)
-#define __cpuinitconst   __section(.cpuinit.rodata)
+#define __cpuinitconst   __constsection(.cpuinit.rodata)
 #define __cpuexit__section(.cpuexit.text) __exitused __cold notrace
 #define __cpuexitdata__section(.cpuexit.data)
-#define __cpuexitconst   __section(.cpuexit.rodata)
+#define __cpuexitconst   __constsection(.cpuexit.rodata)
 
 /* Used for MEMORY_HOTPLUG */
 #define __meminit__section(.meminit.text) __cold notrace
 #define __meminitdata__section(.meminit.data)
-#define __meminitconst   __section(.meminit.rodata)
+#define __meminitconst   __constsection(.meminit.rodata)
 #define __memexit__section(.memexit.text) __exitused __cold notrace
 #define __memexitdata__section(.memexit.data)
-#define __memexitconst   __section(.memexit.rodata)
+#define __memexitconst   __constsection(.memexit.rodata)
 
 /* For assembly routines */
 #define __HEAD .section.head.text,ax
diff --git a/init/Kconfig b/init/Kconfig
index af6c7f8..a8785db 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1612,4 +1612,10 @@ config PADATA
depends on SMP
bool
 
+# Can be selected by architectures with broken toolchains
+# that get confused by correct const-read_only section
+# mappings
+config BROKEN_RODATA
+   bool
+
 source kernel/Kconfig.locks
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/