diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 19:25:18 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-22 19:25:18 -0500 |
commit | 54b56170e4517e9606b245c3f805fc96baa059f0 (patch) | |
tree | 9f8750ef972b4a7fdce530889dcbaf2a8b5b0d05 /arch/x86/kernel/i8259.c | |
parent | 1f91233c26fd5f7d6525fd29b95e4b50ca7a3e88 (diff) | |
parent | d02e30c31c57683a66ed68a1bcff900ca78f6d56 (diff) |
Merge remote branch 'origin/x86/apic' into x86/mrst
Conflicts:
arch/x86/kernel/apic/io_apic.c
Diffstat (limited to 'arch/x86/kernel/i8259.c')
-rw-r--r-- | arch/x86/kernel/i8259.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index 1c790e75f7a0..9bac6817456f 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | static int i8259A_auto_eoi; | 34 | static int i8259A_auto_eoi; |
35 | DEFINE_SPINLOCK(i8259A_lock); | 35 | DEFINE_RAW_SPINLOCK(i8259A_lock); |
36 | static void mask_and_ack_8259A(unsigned int); | 36 | static void mask_and_ack_8259A(unsigned int); |
37 | static void mask_8259A(void); | 37 | static void mask_8259A(void); |
38 | static void unmask_8259A(void); | 38 | static void unmask_8259A(void); |
@@ -74,13 +74,13 @@ static void disable_8259A_irq(unsigned int irq) | |||
74 | unsigned int mask = 1 << irq; | 74 | unsigned int mask = 1 << irq; |
75 | unsigned long flags; | 75 | unsigned long flags; |
76 | 76 | ||
77 | spin_lock_irqsave(&i8259A_lock, flags); | 77 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
78 | cached_irq_mask |= mask; | 78 | cached_irq_mask |= mask; |
79 | if (irq & 8) | 79 | if (irq & 8) |
80 | outb(cached_slave_mask, PIC_SLAVE_IMR); | 80 | outb(cached_slave_mask, PIC_SLAVE_IMR); |
81 | else | 81 | else |
82 | outb(cached_master_mask, PIC_MASTER_IMR); | 82 | outb(cached_master_mask, PIC_MASTER_IMR); |
83 | spin_unlock_irqrestore(&i8259A_lock, flags); | 83 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
84 | } | 84 | } |
85 | 85 | ||
86 | static void enable_8259A_irq(unsigned int irq) | 86 | static void enable_8259A_irq(unsigned int irq) |
@@ -88,13 +88,13 @@ static void enable_8259A_irq(unsigned int irq) | |||
88 | unsigned int mask = ~(1 << irq); | 88 | unsigned int mask = ~(1 << irq); |
89 | unsigned long flags; | 89 | unsigned long flags; |
90 | 90 | ||
91 | spin_lock_irqsave(&i8259A_lock, flags); | 91 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
92 | cached_irq_mask &= mask; | 92 | cached_irq_mask &= mask; |
93 | if (irq & 8) | 93 | if (irq & 8) |
94 | outb(cached_slave_mask, PIC_SLAVE_IMR); | 94 | outb(cached_slave_mask, PIC_SLAVE_IMR); |
95 | else | 95 | else |
96 | outb(cached_master_mask, PIC_MASTER_IMR); | 96 | outb(cached_master_mask, PIC_MASTER_IMR); |
97 | spin_unlock_irqrestore(&i8259A_lock, flags); | 97 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
98 | } | 98 | } |
99 | 99 | ||
100 | static int i8259A_irq_pending(unsigned int irq) | 100 | static int i8259A_irq_pending(unsigned int irq) |
@@ -103,12 +103,12 @@ static int i8259A_irq_pending(unsigned int irq) | |||
103 | unsigned long flags; | 103 | unsigned long flags; |
104 | int ret; | 104 | int ret; |
105 | 105 | ||
106 | spin_lock_irqsave(&i8259A_lock, flags); | 106 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
107 | if (irq < 8) | 107 | if (irq < 8) |
108 | ret = inb(PIC_MASTER_CMD) & mask; | 108 | ret = inb(PIC_MASTER_CMD) & mask; |
109 | else | 109 | else |
110 | ret = inb(PIC_SLAVE_CMD) & (mask >> 8); | 110 | ret = inb(PIC_SLAVE_CMD) & (mask >> 8); |
111 | spin_unlock_irqrestore(&i8259A_lock, flags); | 111 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
112 | 112 | ||
113 | return ret; | 113 | return ret; |
114 | } | 114 | } |
@@ -156,7 +156,7 @@ static void mask_and_ack_8259A(unsigned int irq) | |||
156 | unsigned int irqmask = 1 << irq; | 156 | unsigned int irqmask = 1 << irq; |
157 | unsigned long flags; | 157 | unsigned long flags; |
158 | 158 | ||
159 | spin_lock_irqsave(&i8259A_lock, flags); | 159 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
160 | /* | 160 | /* |
161 | * Lightweight spurious IRQ detection. We do not want | 161 | * Lightweight spurious IRQ detection. We do not want |
162 | * to overdo spurious IRQ handling - it's usually a sign | 162 | * to overdo spurious IRQ handling - it's usually a sign |
@@ -189,7 +189,7 @@ handle_real_irq: | |||
189 | outb(cached_master_mask, PIC_MASTER_IMR); | 189 | outb(cached_master_mask, PIC_MASTER_IMR); |
190 | outb(0x60+irq, PIC_MASTER_CMD); /* 'Specific EOI to master */ | 190 | outb(0x60+irq, PIC_MASTER_CMD); /* 'Specific EOI to master */ |
191 | } | 191 | } |
192 | spin_unlock_irqrestore(&i8259A_lock, flags); | 192 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
193 | return; | 193 | return; |
194 | 194 | ||
195 | spurious_8259A_irq: | 195 | spurious_8259A_irq: |
@@ -291,24 +291,24 @@ static void mask_8259A(void) | |||
291 | { | 291 | { |
292 | unsigned long flags; | 292 | unsigned long flags; |
293 | 293 | ||
294 | spin_lock_irqsave(&i8259A_lock, flags); | 294 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
295 | 295 | ||
296 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ | 296 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ |
297 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ | 297 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ |
298 | 298 | ||
299 | spin_unlock_irqrestore(&i8259A_lock, flags); | 299 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
300 | } | 300 | } |
301 | 301 | ||
302 | static void unmask_8259A(void) | 302 | static void unmask_8259A(void) |
303 | { | 303 | { |
304 | unsigned long flags; | 304 | unsigned long flags; |
305 | 305 | ||
306 | spin_lock_irqsave(&i8259A_lock, flags); | 306 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
307 | 307 | ||
308 | outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */ | 308 | outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */ |
309 | outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ | 309 | outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ |
310 | 310 | ||
311 | spin_unlock_irqrestore(&i8259A_lock, flags); | 311 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
312 | } | 312 | } |
313 | 313 | ||
314 | static void init_8259A(int auto_eoi) | 314 | static void init_8259A(int auto_eoi) |
@@ -317,7 +317,7 @@ static void init_8259A(int auto_eoi) | |||
317 | 317 | ||
318 | i8259A_auto_eoi = auto_eoi; | 318 | i8259A_auto_eoi = auto_eoi; |
319 | 319 | ||
320 | spin_lock_irqsave(&i8259A_lock, flags); | 320 | raw_spin_lock_irqsave(&i8259A_lock, flags); |
321 | 321 | ||
322 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ | 322 | outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ |
323 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ | 323 | outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */ |
@@ -362,7 +362,7 @@ static void init_8259A(int auto_eoi) | |||
362 | outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */ | 362 | outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */ |
363 | outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ | 363 | outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */ |
364 | 364 | ||
365 | spin_unlock_irqrestore(&i8259A_lock, flags); | 365 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
366 | } | 366 | } |
367 | 367 | ||
368 | /* | 368 | /* |