Commit fc9ea0b6 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] atm/ambassador: fix init section references

atm/ambassador: fix text section references to __init text and __initdata;

The biggest negative about this AFAIK is that it makes ucode_data
non-initdata, and that moves about 8 KB of data from .init.data
to .data.  Similarly, .text increases by approx. 1300 bytes (on x86-32).

Error: ./drivers/atm/ambassador.o .text refers to 0000000000002a07 R_X86_64_PC32     .init.text+0x0000000000000149
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002a45 R_X86_64_32S      .init.data+0x0000000000000040
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002a7c R_X86_64_PC32     .init.data+0x0000000000000020
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002a83 R_X86_64_PC32     .init.data+0x000000000000001c
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002b40 R_X86_64_PC32     .init.text+0x0000000000000149
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002bbc R_X86_64_PC32     .init.text+0x0000000000000149
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002c0f R_X86_64_32S      .init.data+0x0000000000000024
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002c17 R_X86_64_32S      .init.data+0x0000000000000020
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002c3c R_X86_64_PC32     .init.data+0xfffffffffffffffc
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002c6a R_X86_64_PC32     .init.text+0x0000000000000149
Error: ./drivers/atm/ambassador.o .text refers to 0000000000002c77 R_X86_64_32S      .init.data+0x0000000000000040
Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0562d051
...@@ -296,16 +296,16 @@ static inline void __init show_version (void) { ...@@ -296,16 +296,16 @@ static inline void __init show_version (void) {
#endif #endif
#define UCODE2(x) #x #define UCODE2(x) #x
static u32 __initdata ucode_start = static u32 __devinitdata ucode_start =
#include UCODE(start) #include UCODE(start)
; ;
static region __initdata ucode_regions[] = { static region __devinitdata ucode_regions[] = {
#include UCODE(regions) #include UCODE(regions)
{ 0, 0 } { 0, 0 }
}; };
static u32 __initdata ucode_data[] = { static u32 __devinitdata ucode_data[] = {
#include UCODE(data) #include UCODE(data)
0xdeadbeef 0xdeadbeef
}; };
...@@ -1539,7 +1539,7 @@ static void do_housekeeping (unsigned long arg) { ...@@ -1539,7 +1539,7 @@ static void do_housekeeping (unsigned long arg) {
/********** creation of communication queues **********/ /********** creation of communication queues **********/
static int __init create_queues (amb_dev * dev, unsigned int cmds, static int __devinit create_queues (amb_dev * dev, unsigned int cmds,
unsigned int txs, unsigned int * rxs, unsigned int txs, unsigned int * rxs,
unsigned int * rx_buffer_sizes) { unsigned int * rx_buffer_sizes) {
unsigned char pool; unsigned char pool;
...@@ -1769,7 +1769,7 @@ static int decode_loader_result (loader_command cmd, u32 result) ...@@ -1769,7 +1769,7 @@ static int decode_loader_result (loader_command cmd, u32 result)
return res; return res;
} }
static int __init do_loader_command (volatile loader_block * lb, static int __devinit do_loader_command (volatile loader_block * lb,
const amb_dev * dev, loader_command cmd) { const amb_dev * dev, loader_command cmd) {
unsigned long timeout; unsigned long timeout;
...@@ -1825,7 +1825,7 @@ static int __init do_loader_command (volatile loader_block * lb, ...@@ -1825,7 +1825,7 @@ static int __init do_loader_command (volatile loader_block * lb,
/* loader: determine loader version */ /* loader: determine loader version */
static int __init get_loader_version (loader_block * lb, static int __devinit get_loader_version (loader_block * lb,
const amb_dev * dev, u32 * version) { const amb_dev * dev, u32 * version) {
int res; int res;
...@@ -1841,7 +1841,7 @@ static int __init get_loader_version (loader_block * lb, ...@@ -1841,7 +1841,7 @@ static int __init get_loader_version (loader_block * lb,
/* loader: write memory data blocks */ /* loader: write memory data blocks */
static int __init loader_write (loader_block * lb, static int __devinit loader_write (loader_block * lb,
const amb_dev * dev, const u32 * data, const amb_dev * dev, const u32 * data,
u32 address, unsigned int count) { u32 address, unsigned int count) {
unsigned int i; unsigned int i;
...@@ -1860,7 +1860,7 @@ static int __init loader_write (loader_block * lb, ...@@ -1860,7 +1860,7 @@ static int __init loader_write (loader_block * lb,
/* loader: verify memory data blocks */ /* loader: verify memory data blocks */
static int __init loader_verify (loader_block * lb, static int __devinit loader_verify (loader_block * lb,
const amb_dev * dev, const u32 * data, const amb_dev * dev, const u32 * data,
u32 address, unsigned int count) { u32 address, unsigned int count) {
unsigned int i; unsigned int i;
...@@ -1885,7 +1885,7 @@ static int __init loader_verify (loader_block * lb, ...@@ -1885,7 +1885,7 @@ static int __init loader_verify (loader_block * lb,
/* loader: start microcode */ /* loader: start microcode */
static int __init loader_start (loader_block * lb, static int __devinit loader_start (loader_block * lb,
const amb_dev * dev, u32 address) { const amb_dev * dev, u32 address) {
PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); PRINTD (DBG_FLOW|DBG_LOAD, "loader_start");
...@@ -1961,7 +1961,7 @@ static int amb_reset (amb_dev * dev, int diags) { ...@@ -1961,7 +1961,7 @@ static int amb_reset (amb_dev * dev, int diags) {
/********** transfer and start the microcode **********/ /********** transfer and start the microcode **********/
static int __init ucode_init (loader_block * lb, amb_dev * dev) { static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
unsigned int i = 0; unsigned int i = 0;
unsigned int total = 0; unsigned int total = 0;
const u32 * pointer = ucode_data; const u32 * pointer = ucode_data;
...@@ -2011,7 +2011,7 @@ static inline u32 bus_addr(void * addr) { ...@@ -2011,7 +2011,7 @@ static inline u32 bus_addr(void * addr) {
return cpu_to_be32 (virt_to_bus (addr)); return cpu_to_be32 (virt_to_bus (addr));
} }
static int __init amb_talk (amb_dev * dev) { static int __devinit amb_talk (amb_dev * dev) {
adap_talk_block a; adap_talk_block a;
unsigned char pool; unsigned char pool;
unsigned long timeout; unsigned long timeout;
...@@ -2058,7 +2058,7 @@ static int __init amb_talk (amb_dev * dev) { ...@@ -2058,7 +2058,7 @@ static int __init amb_talk (amb_dev * dev) {
} }
// get microcode version // get microcode version
static void __init amb_ucode_version (amb_dev * dev) { static void __devinit amb_ucode_version (amb_dev * dev) {
u32 major; u32 major;
u32 minor; u32 minor;
command cmd; command cmd;
...@@ -2085,7 +2085,7 @@ static u8 bit_swap (u8 byte) ...@@ -2085,7 +2085,7 @@ static u8 bit_swap (u8 byte)
} }
// get end station address // get end station address
static void __init amb_esi (amb_dev * dev, u8 * esi) { static void __devinit amb_esi (amb_dev * dev, u8 * esi) {
u32 lower4; u32 lower4;
u16 upper2; u16 upper2;
command cmd; command cmd;
...@@ -2131,7 +2131,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb) ...@@ -2131,7 +2131,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb)
return; return;
} }
static int __init amb_init (amb_dev * dev) static int __devinit amb_init (amb_dev * dev)
{ {
loader_block lb; loader_block lb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment