Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330029
b: refs/heads/master
c: 754b7b6
h: refs/heads/master
i:
  330027: 6d5524f
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Oct 5, 2012
1 parent ae1d015 commit 924a5d2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f6d93aa9d96cc9022b51bd10d462b03296be146
refs/heads/master: 754b7b63d112ecc771e376388dcefd7b79bf5c4b
1 change: 1 addition & 0 deletions trunk/arch/parisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config PARISC
select HAVE_PERF_EVENTS
select GENERIC_ATOMIC64 if !64BIT
select HAVE_GENERIC_HARDIRQS
select BROKEN_RODATA
select GENERIC_IRQ_PROBE
select GENERIC_PCI_IOMAP
select IRQ_PER_CPU
Expand Down
27 changes: 19 additions & 8 deletions trunk/include/linux/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1581,4 +1581,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"

0 comments on commit 924a5d2

Please sign in to comment.