Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78006
b: refs/heads/master
c: 312b148
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg committed Jan 28, 2008
1 parent 5098e46 commit 8b57c86
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 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: e241a630374e06aecdae2884af8b652d3b4d6c37
refs/heads/master: 312b1485fb509c9bc32eda28ad29537896658cb8
3 changes: 3 additions & 0 deletions trunk/include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define DATA_DATA \
*(.data) \
*(.data.init.refok) \
*(.ref.data) \
DEV_KEEP(init.data) \
DEV_KEEP(exit.data) \
CPU_KEEP(init.data) \
Expand Down Expand Up @@ -169,6 +170,7 @@
\
/* __*init sections */ \
__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
*(.ref.rodata) \
DEV_KEEP(init.rodata) \
DEV_KEEP(exit.rodata) \
CPU_KEEP(init.rodata) \
Expand Down Expand Up @@ -202,6 +204,7 @@
#define TEXT_TEXT \
ALIGN_FUNCTION(); \
*(.text) \
*(.ref.text) \
*(.text.init.refok) \
*(.exit.text.refok) \
DEV_KEEP(init.text) \
Expand Down
34 changes: 27 additions & 7 deletions trunk/include/linux/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,26 @@
* when early init has completed so all such references are potential bugs.
* For exit sections the same issue exists.
* The following markers are used for the cases where the reference to
* the init/exit section (code or data) is valid and will teach modpost
* not to issue a warning.
* the *init / *exit section (code or data) is valid and will teach
* modpost not to issue a warning.
* The markers follow same syntax rules as __init / __initdata. */
#define __init_refok noinline __section(.text.init.refok)
#define __initdata_refok __section(.data.init.refok)
#define __exit_refok noinline __section(.exit.text.refok)
#define __ref __section(.ref.text) noinline
#define __refdata __section(.ref.data)
#define __refconst __section(.ref.rodata)

/* backward compatibility note
* A few places hardcode the old section names:
* .text.init.refok
* .data.init.refok
* .exit.text.refok
* They should be converted to use the defines from this file
*/

/* compatibility defines */
#define __init_refok __ref
#define __initdata_refok __refdata
#define __exit_refok __ref


#ifdef MODULE
#define __exitused
Expand Down Expand Up @@ -93,11 +107,9 @@

/* For assembly routines */
#define __INIT .section ".init.text","ax"
#define __INIT_REFOK .section ".text.init.refok","ax"
#define __FINIT .previous

#define __INITDATA .section ".init.data","aw"
#define __INITDATA_REFOK .section ".data.init.refok","aw"

#define __DEVINIT .section ".devinit.text", "ax"
#define __DEVINITDATA .section ".devinit.data", "aw"
Expand All @@ -108,6 +120,14 @@
#define __MEMINIT .section ".meminit.text", "ax"
#define __MEMINITDATA .section ".meminit.data", "aw"

/* silence warnings when references are OK */
#define __REF .section ".ref.text", "ax"
#define __REFDATA .section ".ref.data", "aw"
#define __REFCONST .section ".ref.rodata", "aw"
/* backward compatibility */
#define __INIT_REFOK .section __REF
#define __INITDATA_REFOK .section __REFDATA

#ifndef __ASSEMBLY__
/*
* Used for initialization calls..
Expand Down

0 comments on commit 8b57c86

Please sign in to comment.