diff options
-rw-r--r-- | arch/i386/kernel/apic.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/apm.c | 5 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/time.c | 5 | ||||
-rw-r--r-- | arch/i386/kernel/timers/timer_cyclone.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/timers/timer_pit.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/timers/timer_tsc.c | 3 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_basic.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 1 | ||||
-rw-r--r-- | drivers/ide/legacy/hd.c | 4 | ||||
-rw-r--r-- | drivers/input/gameport/gameport.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/analog.c | 4 | ||||
-rw-r--r-- | include/asm-i386/i8253.h | 6 | ||||
-rw-r--r-- | include/asm-i386/mach-default/do_timer.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/io_apic.h | 2 |
15 files changed, 30 insertions, 18 deletions
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 93df90bbb87e..bd1dbf3bd223 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/desc.h> | 35 | #include <asm/desc.h> |
36 | #include <asm/arch_hooks.h> | 36 | #include <asm/arch_hooks.h> |
37 | #include <asm/hpet.h> | 37 | #include <asm/hpet.h> |
38 | #include <asm/i8253.h> | ||
38 | 39 | ||
39 | #include <mach_apic.h> | 40 | #include <mach_apic.h> |
40 | 41 | ||
@@ -879,7 +880,6 @@ fake_ioapic_page: | |||
879 | */ | 880 | */ |
880 | static unsigned int __devinit get_8254_timer_count(void) | 881 | static unsigned int __devinit get_8254_timer_count(void) |
881 | { | 882 | { |
882 | extern spinlock_t i8253_lock; | ||
883 | unsigned long flags; | 883 | unsigned long flags; |
884 | 884 | ||
885 | unsigned int count; | 885 | unsigned int count; |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index d48ce9290963..064211d5f41b 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -228,10 +228,10 @@ | |||
228 | #include <asm/system.h> | 228 | #include <asm/system.h> |
229 | #include <asm/uaccess.h> | 229 | #include <asm/uaccess.h> |
230 | #include <asm/desc.h> | 230 | #include <asm/desc.h> |
231 | #include <asm/i8253.h> | ||
231 | 232 | ||
232 | #include "io_ports.h" | 233 | #include "io_ports.h" |
233 | 234 | ||
234 | extern spinlock_t i8253_lock; | ||
235 | extern unsigned long get_cmos_time(void); | 235 | extern unsigned long get_cmos_time(void); |
236 | extern void machine_real_restart(unsigned char *, int); | 236 | extern void machine_real_restart(unsigned char *, int); |
237 | 237 | ||
@@ -1168,8 +1168,7 @@ static void get_time_diff(void) | |||
1168 | static void reinit_timer(void) | 1168 | static void reinit_timer(void) |
1169 | { | 1169 | { |
1170 | #ifdef INIT_TIMER_AFTER_SUSPEND | 1170 | #ifdef INIT_TIMER_AFTER_SUSPEND |
1171 | unsigned long flags; | 1171 | unsigned long flags; |
1172 | extern spinlock_t i8253_lock; | ||
1173 | 1172 | ||
1174 | spin_lock_irqsave(&i8253_lock, flags); | 1173 | spin_lock_irqsave(&i8253_lock, flags); |
1175 | /* set the clock to 100 Hz */ | 1174 | /* set the clock to 100 Hz */ |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 35eb8e29c485..6578f40bd501 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/smp.h> | 37 | #include <asm/smp.h> |
38 | #include <asm/desc.h> | 38 | #include <asm/desc.h> |
39 | #include <asm/timer.h> | 39 | #include <asm/timer.h> |
40 | #include <asm/i8259.h> | ||
40 | 41 | ||
41 | #include <mach_apic.h> | 42 | #include <mach_apic.h> |
42 | 43 | ||
@@ -1566,7 +1567,6 @@ void print_all_local_APICs (void) | |||
1566 | 1567 | ||
1567 | void /*__init*/ print_PIC(void) | 1568 | void /*__init*/ print_PIC(void) |
1568 | { | 1569 | { |
1569 | extern spinlock_t i8259A_lock; | ||
1570 | unsigned int v; | 1570 | unsigned int v; |
1571 | unsigned long flags; | 1571 | unsigned long flags; |
1572 | 1572 | ||
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index e68d9fdb0759..2854c357377f 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -68,7 +68,8 @@ | |||
68 | 68 | ||
69 | #include "io_ports.h" | 69 | #include "io_ports.h" |
70 | 70 | ||
71 | extern spinlock_t i8259A_lock; | 71 | #include <asm/i8259.h> |
72 | |||
72 | int pit_latch_buggy; /* extern */ | 73 | int pit_latch_buggy; /* extern */ |
73 | 74 | ||
74 | #include "do_timer.h" | 75 | #include "do_timer.h" |
@@ -85,6 +86,8 @@ extern unsigned long wall_jiffies; | |||
85 | DEFINE_SPINLOCK(rtc_lock); | 86 | DEFINE_SPINLOCK(rtc_lock); |
86 | EXPORT_SYMBOL(rtc_lock); | 87 | EXPORT_SYMBOL(rtc_lock); |
87 | 88 | ||
89 | #include <asm/i8253.h> | ||
90 | |||
88 | DEFINE_SPINLOCK(i8253_lock); | 91 | DEFINE_SPINLOCK(i8253_lock); |
89 | EXPORT_SYMBOL(i8253_lock); | 92 | EXPORT_SYMBOL(i8253_lock); |
90 | 93 | ||
diff --git a/arch/i386/kernel/timers/timer_cyclone.c b/arch/i386/kernel/timers/timer_cyclone.c index f6f1206a11bb..13892a65c941 100644 --- a/arch/i386/kernel/timers/timer_cyclone.c +++ b/arch/i386/kernel/timers/timer_cyclone.c | |||
@@ -17,9 +17,9 @@ | |||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | #include <asm/fixmap.h> | 19 | #include <asm/fixmap.h> |
20 | #include "io_ports.h" | 20 | #include <asm/i8253.h> |
21 | 21 | ||
22 | extern spinlock_t i8253_lock; | 22 | #include "io_ports.h" |
23 | 23 | ||
24 | /* Number of usecs that the last interrupt was delayed */ | 24 | /* Number of usecs that the last interrupt was delayed */ |
25 | static int delay_at_last_interrupt; | 25 | static int delay_at_last_interrupt; |
diff --git a/arch/i386/kernel/timers/timer_pit.c b/arch/i386/kernel/timers/timer_pit.c index 967d5453cd0e..06de036a820c 100644 --- a/arch/i386/kernel/timers/timer_pit.c +++ b/arch/i386/kernel/timers/timer_pit.c | |||
@@ -15,9 +15,8 @@ | |||
15 | #include <asm/smp.h> | 15 | #include <asm/smp.h> |
16 | #include <asm/io.h> | 16 | #include <asm/io.h> |
17 | #include <asm/arch_hooks.h> | 17 | #include <asm/arch_hooks.h> |
18 | #include <asm/i8253.h> | ||
18 | 19 | ||
19 | extern spinlock_t i8259A_lock; | ||
20 | extern spinlock_t i8253_lock; | ||
21 | #include "do_timer.h" | 20 | #include "do_timer.h" |
22 | #include "io_ports.h" | 21 | #include "io_ports.h" |
23 | 22 | ||
@@ -166,7 +165,6 @@ struct init_timer_opts __initdata timer_pit_init = { | |||
166 | 165 | ||
167 | void setup_pit_timer(void) | 166 | void setup_pit_timer(void) |
168 | { | 167 | { |
169 | extern spinlock_t i8253_lock; | ||
170 | unsigned long flags; | 168 | unsigned long flags; |
171 | 169 | ||
172 | spin_lock_irqsave(&i8253_lock, flags); | 170 | spin_lock_irqsave(&i8253_lock, flags); |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index f46e625bab67..8f4e4d5bc560 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "mach_timer.h" | 24 | #include "mach_timer.h" |
25 | 25 | ||
26 | #include <asm/hpet.h> | 26 | #include <asm/hpet.h> |
27 | #include <asm/i8253.h> | ||
27 | 28 | ||
28 | #ifdef CONFIG_HPET_TIMER | 29 | #ifdef CONFIG_HPET_TIMER |
29 | static unsigned long hpet_usec_quotient; | 30 | static unsigned long hpet_usec_quotient; |
@@ -35,8 +36,6 @@ static inline void cpufreq_delayed_get(void); | |||
35 | 36 | ||
36 | int tsc_disable __devinitdata = 0; | 37 | int tsc_disable __devinitdata = 0; |
37 | 38 | ||
38 | extern spinlock_t i8253_lock; | ||
39 | |||
40 | static int use_tsc; | 39 | static int use_tsc; |
41 | /* Number of usecs that the last interrupt was delayed */ | 40 | /* Number of usecs that the last interrupt was delayed */ |
42 | static int delay_at_last_interrupt; | 41 | static int delay_at_last_interrupt; |
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 602aea240e9b..3e439ce5e1b2 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
32 | #include <asm/arch_hooks.h> | 32 | #include <asm/arch_hooks.h> |
33 | #include <asm/i8253.h> | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * Power off function, if any | 36 | * Power off function, if any |
@@ -182,7 +183,6 @@ voyager_timer_interrupt(struct pt_regs *regs) | |||
182 | * and swiftly introduce it to something sharp and | 183 | * and swiftly introduce it to something sharp and |
183 | * pointy. */ | 184 | * pointy. */ |
184 | __u16 val; | 185 | __u16 val; |
185 | extern spinlock_t i8253_lock; | ||
186 | 186 | ||
187 | spin_lock(&i8253_lock); | 187 | spin_lock(&i8253_lock); |
188 | 188 | ||
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 157190d986bb..d206d7e49cf5 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1064,7 +1064,6 @@ void print_all_local_APICs (void) | |||
1064 | 1064 | ||
1065 | void __apicdebuginit print_PIC(void) | 1065 | void __apicdebuginit print_PIC(void) |
1066 | { | 1066 | { |
1067 | extern spinlock_t i8259A_lock; | ||
1068 | unsigned int v; | 1067 | unsigned int v; |
1069 | unsigned long flags; | 1068 | unsigned long flags; |
1070 | 1069 | ||
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index e884cd4b22fd..242029c9c0ca 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c | |||
@@ -156,11 +156,13 @@ else \ | |||
156 | 156 | ||
157 | 157 | ||
158 | #if (HD_DELAY > 0) | 158 | #if (HD_DELAY > 0) |
159 | |||
160 | #include <asm/i8253.h> | ||
161 | |||
159 | unsigned long last_req; | 162 | unsigned long last_req; |
160 | 163 | ||
161 | unsigned long read_timer(void) | 164 | unsigned long read_timer(void) |
162 | { | 165 | { |
163 | extern spinlock_t i8253_lock; | ||
164 | unsigned long t, flags; | 166 | unsigned long t, flags; |
165 | int i; | 167 | int i; |
166 | 168 | ||
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 3e72c9b1461e..ab09cf4093e3 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -60,12 +60,13 @@ static void gameport_disconnect_port(struct gameport *gameport); | |||
60 | 60 | ||
61 | #if defined(__i386__) | 61 | #if defined(__i386__) |
62 | 62 | ||
63 | #include <asm/i8253.h> | ||
64 | |||
63 | #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) | 65 | #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) |
64 | #define GET_TIME(x) do { x = get_time_pit(); } while (0) | 66 | #define GET_TIME(x) do { x = get_time_pit(); } while (0) |
65 | 67 | ||
66 | static unsigned int get_time_pit(void) | 68 | static unsigned int get_time_pit(void) |
67 | { | 69 | { |
68 | extern spinlock_t i8253_lock; | ||
69 | unsigned long flags; | 70 | unsigned long flags; |
70 | unsigned int count; | 71 | unsigned int count; |
71 | 72 | ||
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 504b7d550567..c3a5739030c3 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c | |||
@@ -140,12 +140,14 @@ struct analog_port { | |||
140 | */ | 140 | */ |
141 | 141 | ||
142 | #ifdef __i386__ | 142 | #ifdef __i386__ |
143 | |||
144 | #include <asm/i8253.h> | ||
145 | |||
143 | #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) | 146 | #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) |
144 | #define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0))) | 147 | #define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0))) |
145 | #define TIME_NAME (cpu_has_tsc?"TSC":"PIT") | 148 | #define TIME_NAME (cpu_has_tsc?"TSC":"PIT") |
146 | static unsigned int get_time_pit(void) | 149 | static unsigned int get_time_pit(void) |
147 | { | 150 | { |
148 | extern spinlock_t i8253_lock; | ||
149 | unsigned long flags; | 151 | unsigned long flags; |
150 | unsigned int count; | 152 | unsigned int count; |
151 | 153 | ||
diff --git a/include/asm-i386/i8253.h b/include/asm-i386/i8253.h new file mode 100644 index 000000000000..015d8df07690 --- /dev/null +++ b/include/asm-i386/i8253.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_I8253_H__ | ||
2 | #define __ASM_I8253_H__ | ||
3 | |||
4 | extern spinlock_t i8253_lock; | ||
5 | |||
6 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h index 03dd13a48a8c..56211414fc95 100644 --- a/include/asm-i386/mach-default/do_timer.h +++ b/include/asm-i386/mach-default/do_timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | 2 | ||
3 | #include <asm/apic.h> | 3 | #include <asm/apic.h> |
4 | #include <asm/i8259.h> | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * do_timer_interrupt_hook - hook into timer tick | 7 | * do_timer_interrupt_hook - hook into timer tick |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 32573749004c..a8babd2bbe84 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -217,4 +217,6 @@ extern int assign_irq_vector(int irq); | |||
217 | 217 | ||
218 | void enable_NMI_through_LVT0 (void * dummy); | 218 | void enable_NMI_through_LVT0 (void * dummy); |
219 | 219 | ||
220 | extern spinlock_t i8259A_lock; | ||
221 | |||
220 | #endif | 222 | #endif |