diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-19 23:50:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:52:54 -0400 |
commit | 8ea5371baa82db452a8d93e9977b418d30944e32 (patch) | |
tree | 5cf78a2c4b72c44141d7a46b639bf39abb7178db /arch | |
parent | 1d02519242c23450b043e5e8a9e3cb84a8666fe3 (diff) |
x86: ordering functions in io_apic_64.c
try to make functions have the same order between 32-bit and 64-bit.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 30d2e3811313..07e1e45ee026 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -409,40 +409,6 @@ static bool io_apic_level_ack_pending(unsigned int irq) | |||
409 | return false; | 409 | return false; |
410 | } | 410 | } |
411 | 411 | ||
412 | /* | ||
413 | * Synchronize the IO-APIC and the CPU by doing | ||
414 | * a dummy read from the IO-APIC | ||
415 | */ | ||
416 | static inline void io_apic_sync(unsigned int apic) | ||
417 | { | ||
418 | struct io_apic __iomem *io_apic = io_apic_base(apic); | ||
419 | readl(&io_apic->data); | ||
420 | } | ||
421 | |||
422 | #define __DO_ACTION(R, ACTION, FINAL) \ | ||
423 | \ | ||
424 | { \ | ||
425 | int pin; \ | ||
426 | struct irq_cfg *cfg; \ | ||
427 | struct irq_pin_list *entry; \ | ||
428 | \ | ||
429 | cfg = irq_cfg(irq); \ | ||
430 | entry = cfg->irq_2_pin; \ | ||
431 | for (;;) { \ | ||
432 | unsigned int reg; \ | ||
433 | if (!entry) \ | ||
434 | break; \ | ||
435 | pin = entry->pin; \ | ||
436 | reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \ | ||
437 | reg ACTION; \ | ||
438 | io_apic_modify(entry->apic, reg); \ | ||
439 | FINAL; \ | ||
440 | if (!entry->next) \ | ||
441 | break; \ | ||
442 | entry = entry->next; \ | ||
443 | } \ | ||
444 | } | ||
445 | |||
446 | union entry_union { | 412 | union entry_union { |
447 | struct { u32 w1, w2; }; | 413 | struct { u32 w1, w2; }; |
448 | struct IO_APIC_route_entry entry; | 414 | struct IO_APIC_route_entry entry; |
@@ -627,6 +593,39 @@ static void __init replace_pin_at_irq(unsigned int irq, | |||
627 | add_pin_to_irq(irq, newapic, newpin); | 593 | add_pin_to_irq(irq, newapic, newpin); |
628 | } | 594 | } |
629 | 595 | ||
596 | /* | ||
597 | * Synchronize the IO-APIC and the CPU by doing | ||
598 | * a dummy read from the IO-APIC | ||
599 | */ | ||
600 | static inline void io_apic_sync(unsigned int apic) | ||
601 | { | ||
602 | struct io_apic __iomem *io_apic = io_apic_base(apic); | ||
603 | readl(&io_apic->data); | ||
604 | } | ||
605 | |||
606 | #define __DO_ACTION(R, ACTION, FINAL) \ | ||
607 | \ | ||
608 | { \ | ||
609 | int pin; \ | ||
610 | struct irq_cfg *cfg; \ | ||
611 | struct irq_pin_list *entry; \ | ||
612 | \ | ||
613 | cfg = irq_cfg(irq); \ | ||
614 | entry = cfg->irq_2_pin; \ | ||
615 | for (;;) { \ | ||
616 | unsigned int reg; \ | ||
617 | if (!entry) \ | ||
618 | break; \ | ||
619 | pin = entry->pin; \ | ||
620 | reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \ | ||
621 | reg ACTION; \ | ||
622 | io_apic_modify(entry->apic, reg); \ | ||
623 | FINAL; \ | ||
624 | if (!entry->next) \ | ||
625 | break; \ | ||
626 | entry = entry->next; \ | ||
627 | } \ | ||
628 | } | ||
630 | 629 | ||
631 | #define DO_ACTION(name,R,ACTION, FINAL) \ | 630 | #define DO_ACTION(name,R,ACTION, FINAL) \ |
632 | \ | 631 | \ |