Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] x86: i8253/i8259A lock cleanup

Introduce proper declarations for i8253_lock and i8259A_lock.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Ingo Molnar and committed by
Linus Torvalds
306e440d bcbda35c

+30 -18
+1 -1
arch/i386/kernel/apic.c
··· 35 35 #include <asm/desc.h> 36 36 #include <asm/arch_hooks.h> 37 37 #include <asm/hpet.h> 38 + #include <asm/i8253.h> 38 39 39 40 #include <mach_apic.h> 40 41 ··· 880 879 */ 881 880 static unsigned int __devinit get_8254_timer_count(void) 882 881 { 883 - extern spinlock_t i8253_lock; 884 882 unsigned long flags; 885 883 886 884 unsigned int count;
+2 -3
arch/i386/kernel/apm.c
··· 228 228 #include <asm/system.h> 229 229 #include <asm/uaccess.h> 230 230 #include <asm/desc.h> 231 + #include <asm/i8253.h> 231 232 232 233 #include "io_ports.h" 233 234 234 - extern spinlock_t i8253_lock; 235 235 extern unsigned long get_cmos_time(void); 236 236 extern void machine_real_restart(unsigned char *, int); 237 237 ··· 1168 1168 static void reinit_timer(void) 1169 1169 { 1170 1170 #ifdef INIT_TIMER_AFTER_SUSPEND 1171 - unsigned long flags; 1172 - extern spinlock_t i8253_lock; 1171 + unsigned long flags; 1173 1172 1174 1173 spin_lock_irqsave(&i8253_lock, flags); 1175 1174 /* set the clock to 100 Hz */
+1 -1
arch/i386/kernel/io_apic.c
··· 37 37 #include <asm/smp.h> 38 38 #include <asm/desc.h> 39 39 #include <asm/timer.h> 40 + #include <asm/i8259.h> 40 41 41 42 #include <mach_apic.h> 42 43 ··· 1567 1566 1568 1567 void /*__init*/ print_PIC(void) 1569 1568 { 1570 - extern spinlock_t i8259A_lock; 1571 1569 unsigned int v; 1572 1570 unsigned long flags; 1573 1571
+4 -1
arch/i386/kernel/time.c
··· 68 68 69 69 #include "io_ports.h" 70 70 71 - extern spinlock_t i8259A_lock; 71 + #include <asm/i8259.h> 72 + 72 73 int pit_latch_buggy; /* extern */ 73 74 74 75 #include "do_timer.h" ··· 85 84 86 85 DEFINE_SPINLOCK(rtc_lock); 87 86 EXPORT_SYMBOL(rtc_lock); 87 + 88 + #include <asm/i8253.h> 88 89 89 90 DEFINE_SPINLOCK(i8253_lock); 90 91 EXPORT_SYMBOL(i8253_lock);
+2 -2
arch/i386/kernel/timers/timer_cyclone.c
··· 17 17 #include <asm/io.h> 18 18 #include <asm/pgtable.h> 19 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 24 /* Number of usecs that the last interrupt was delayed */ 25 25 static int delay_at_last_interrupt;
+1 -3
arch/i386/kernel/timers/timer_pit.c
··· 15 15 #include <asm/smp.h> 16 16 #include <asm/io.h> 17 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 20 #include "do_timer.h" 22 21 #include "io_ports.h" 23 22 ··· 165 166 166 167 void setup_pit_timer(void) 167 168 { 168 - extern spinlock_t i8253_lock; 169 169 unsigned long flags; 170 170 171 171 spin_lock_irqsave(&i8253_lock, flags);
+1 -2
arch/i386/kernel/timers/timer_tsc.c
··· 24 24 #include "mach_timer.h" 25 25 26 26 #include <asm/hpet.h> 27 + #include <asm/i8253.h> 27 28 28 29 #ifdef CONFIG_HPET_TIMER 29 30 static unsigned long hpet_usec_quotient; ··· 35 34 static inline void cpufreq_delayed_get(void); 36 35 37 36 int tsc_disable __devinitdata = 0; 38 - 39 - extern spinlock_t i8253_lock; 40 37 41 38 static int use_tsc; 42 39 /* Number of usecs that the last interrupt was delayed */
+1 -1
arch/i386/mach-voyager/voyager_basic.c
··· 30 30 #include <linux/irq.h> 31 31 #include <asm/tlbflush.h> 32 32 #include <asm/arch_hooks.h> 33 + #include <asm/i8253.h> 33 34 34 35 /* 35 36 * Power off function, if any ··· 183 182 * and swiftly introduce it to something sharp and 184 183 * pointy. */ 185 184 __u16 val; 186 - extern spinlock_t i8253_lock; 187 185 188 186 spin_lock(&i8253_lock); 189 187
-1
arch/x86_64/kernel/io_apic.c
··· 1064 1064 1065 1065 void __apicdebuginit print_PIC(void) 1066 1066 { 1067 - extern spinlock_t i8259A_lock; 1068 1067 unsigned int v; 1069 1068 unsigned long flags; 1070 1069
+3 -1
drivers/ide/legacy/hd.c
··· 156 156 157 157 158 158 #if (HD_DELAY > 0) 159 + 160 + #include <asm/i8253.h> 161 + 159 162 unsigned long last_req; 160 163 161 164 unsigned long read_timer(void) 162 165 { 163 - extern spinlock_t i8253_lock; 164 166 unsigned long t, flags; 165 167 int i; 166 168
+2 -1
drivers/input/gameport/gameport.c
··· 60 60 61 61 #if defined(__i386__) 62 62 63 + #include <asm/i8253.h> 64 + 63 65 #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) 64 66 #define GET_TIME(x) do { x = get_time_pit(); } while (0) 65 67 66 68 static unsigned int get_time_pit(void) 67 69 { 68 - extern spinlock_t i8253_lock; 69 70 unsigned long flags; 70 71 unsigned int count; 71 72
+3 -1
drivers/input/joystick/analog.c
··· 140 140 */ 141 141 142 142 #ifdef __i386__ 143 + 144 + #include <asm/i8253.h> 145 + 143 146 #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) 144 147 #define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0))) 145 148 #define TIME_NAME (cpu_has_tsc?"TSC":"PIT") 146 149 static unsigned int get_time_pit(void) 147 150 { 148 - extern spinlock_t i8253_lock; 149 151 unsigned long flags; 150 152 unsigned int count; 151 153
+6
include/asm-i386/i8253.h
··· 1 + #ifndef __ASM_I8253_H__ 2 + #define __ASM_I8253_H__ 3 + 4 + extern spinlock_t i8253_lock; 5 + 6 + #endif /* __ASM_I8253_H__ */
+1
include/asm-i386/mach-default/do_timer.h
··· 1 1 /* defines for inline arch setup functions */ 2 2 3 3 #include <asm/apic.h> 4 + #include <asm/i8259.h> 4 5 5 6 /** 6 7 * do_timer_interrupt_hook - hook into timer tick
+2
include/asm-x86_64/io_apic.h
··· 217 217 218 218 void enable_NMI_through_LVT0 (void * dummy); 219 219 220 + extern spinlock_t i8259A_lock; 221 + 220 222 #endif