Skip to contentSkip to conversation

apic.c init section references

PATCH New Randy.Dunlap 1 participant 1 message Jun 15, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apic.c init section references

Fix init/initdata and static uses in arch/i386/kernel/apic.c

Error: ./arch/i386/kernel/apic.o .data refers to 0000009c R_386_32 .init.text

arch/i386/kernel/apic.c
void (*wait_timer_tick)(void) = wait_8254_wraparound; wait_8254_wraparound is __init. wait_timer_tick should be __initdata, which flows onto several other functions.

Also, __setup_APIC_LVTT() can be static since it is only called from within this source file.

Error no longer reported by reference_init.pl.

diffstat:=

 arch/i386/kernel/apic.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/i386/kernel/apic.c renamed from arch/i386/kernel/apic.c~apic_init +3 -3
diff -Naurp ./arch/i386/kernel/apic.c~apic_init ./arch/i386/kernel/apic.c
@@ -811,7 +811,7 @@ static void __init wait_8254_wraparound(
  * Default initialization for 8254 timers. If we use other timers like HPET,
  * we override this later
  */
-void (*wait_timer_tick)(void) = wait_8254_wraparound;
+void (*wait_timer_tick)(void) __initdata = wait_8254_wraparound;
 
 /*
  * This function sets up the local APIC timer, with a timeout of
@@ -826,7 +826,7 @@ void (*wait_timer_tick)(void) = wait_825
 
 #define APIC_DIVISOR 16
 
-void __setup_APIC_LVTT(unsigned int clocks)
+static void __setup_APIC_LVTT(unsigned int clocks)
 {
 	unsigned int lvtt_value, tmp_value, ver;
 
@@ -847,7 +847,7 @@ void __setup_APIC_LVTT(unsigned int cloc
 	apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
 }
 
-static void setup_APIC_timer(unsigned int clocks)
+static void __init setup_APIC_timer(unsigned int clocks)
 {
 	unsigned long flags;
 

--
~Randy