aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_64.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-06-07 11:53:57 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 03:13:22 -0400
commit46b3b4ef1ea2a0892b9b38b6a0c65a3f33b504aa (patch)
tree763a57cf7ec860f6c37555882a64c392cf96a426 /arch/x86/kernel/io_apic_64.c
parentd3f020d2f9bb9a61ca64d4eb058c9f68f827a2b4 (diff)
x86, io-apic: use predefined names instead of numeric constants
This patch replaces some hard-coded numbers with predefined names. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r--arch/x86/kernel/io_apic_64.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 40a184d4dff8..60a022d6de5e 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -183,7 +183,7 @@ static bool io_apic_level_ack_pending(unsigned int irq)
183 break; 183 break;
184 reg = io_apic_read(entry->apic, 0x10 + pin*2); 184 reg = io_apic_read(entry->apic, 0x10 + pin*2);
185 /* Is the remote IRR bit set? */ 185 /* Is the remote IRR bit set? */
186 if ((reg >> 14) & 1) { 186 if (reg & IO_APIC_REDIR_REMOTE_IRR) {
187 spin_unlock_irqrestore(&ioapic_lock, flags); 187 spin_unlock_irqrestore(&ioapic_lock, flags);
188 return true; 188 return true;
189 } 189 }
@@ -298,7 +298,7 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
298 break; 298 break;
299 io_apic_write(apic, 0x11 + pin*2, dest); 299 io_apic_write(apic, 0x11 + pin*2, dest);
300 reg = io_apic_read(apic, 0x10 + pin*2); 300 reg = io_apic_read(apic, 0x10 + pin*2);
301 reg &= ~0x000000ff; 301 reg &= ~IO_APIC_REDIR_VECTOR_MASK;
302 reg |= vector; 302 reg |= vector;
303 io_apic_modify(apic, reg); 303 io_apic_modify(apic, reg);
304 if (!entry->next) 304 if (!entry->next)
@@ -366,10 +366,11 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
366 static void name##_IO_APIC_irq (unsigned int irq) \ 366 static void name##_IO_APIC_irq (unsigned int irq) \
367 __DO_ACTION(R, ACTION, FINAL) 367 __DO_ACTION(R, ACTION, FINAL)
368 368
369DO_ACTION( __mask, 0, |= 0x00010000, io_apic_sync(entry->apic) ) 369/* mask = 1 */
370 /* mask = 1 */ 370DO_ACTION(__mask, 0, |= IO_APIC_REDIR_MASKED, io_apic_sync(entry->apic))
371DO_ACTION( __unmask, 0, &= 0xfffeffff, ) 371
372 /* mask = 0 */ 372/* mask = 0 */
373DO_ACTION(__unmask, 0, &= ~IO_APIC_REDIR_MASKED, )
373 374
374static void mask_IO_APIC_irq (unsigned int irq) 375static void mask_IO_APIC_irq (unsigned int irq)
375{ 376{