aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/visws_quirks.c
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@intel.com>2009-11-09 14:27:04 -0500
committerH. Peter Anvin <hpa@zytor.com>2010-02-19 19:25:17 -0500
commitb81bb373a7e832a43921356aa1291044d7f52fb1 (patch)
tree8008f5c30cae5bf5d8480b590cee63db01034333 /arch/x86/kernel/visws_quirks.c
parentef3548668c02cc8c3922f4423f32b53e662811c6 (diff)
x86, pic: Make use of legacy_pic abstraction
This patch replaces legacy PIC-related global variable and functions with the new legacy_pic abstraction. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> LKML-Reference: <43F901BD926A4E43B106BF17856F07559FB80D04@orsmsx508.amr.corp.intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/visws_quirks.c')
-rw-r--r--arch/x86/kernel/visws_quirks.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index b48ef6c0d716..f067e9556a47 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -505,7 +505,7 @@ static struct irq_chip cobalt_irq_type = {
505 */ 505 */
506static unsigned int startup_piix4_master_irq(unsigned int irq) 506static unsigned int startup_piix4_master_irq(unsigned int irq)
507{ 507{
508 init_8259A(0); 508 legacy_pic->init(0);
509 509
510 return startup_cobalt_irq(irq); 510 return startup_cobalt_irq(irq);
511} 511}
@@ -529,9 +529,6 @@ static struct irq_chip piix4_master_irq_type = {
529 529
530static struct irq_chip piix4_virtual_irq_type = { 530static struct irq_chip piix4_virtual_irq_type = {
531 .name = "PIIX4-virtual", 531 .name = "PIIX4-virtual",
532 .shutdown = disable_8259A_irq,
533 .enable = enable_8259A_irq,
534 .disable = disable_8259A_irq,
535}; 532};
536 533
537 534
@@ -606,7 +603,7 @@ static irqreturn_t piix4_master_intr(int irq, void *dev_id)
606 handle_IRQ_event(realirq, desc->action); 603 handle_IRQ_event(realirq, desc->action);
607 604
608 if (!(desc->status & IRQ_DISABLED)) 605 if (!(desc->status & IRQ_DISABLED))
609 enable_8259A_irq(realirq); 606 legacy_pic->chip->unmask(realirq);
610 607
611 return IRQ_HANDLED; 608 return IRQ_HANDLED;
612 609
@@ -625,6 +622,12 @@ static struct irqaction cascade_action = {
625 .name = "cascade", 622 .name = "cascade",
626}; 623};
627 624
625static inline void set_piix4_virtual_irq_type(void)
626{
627 piix4_virtual_irq_type.shutdown = i8259A_chip.mask;
628 piix4_virtual_irq_type.enable = i8259A_chip.unmask;
629 piix4_virtual_irq_type.disable = i8259A_chip.mask;
630}
628 631
629void init_VISWS_APIC_irqs(void) 632void init_VISWS_APIC_irqs(void)
630{ 633{
@@ -650,6 +653,7 @@ void init_VISWS_APIC_irqs(void)
650 desc->chip = &piix4_master_irq_type; 653 desc->chip = &piix4_master_irq_type;
651 } 654 }
652 else if (i < CO_IRQ_APIC0) { 655 else if (i < CO_IRQ_APIC0) {
656 set_piix4_virtual_irq_type();
653 desc->chip = &piix4_virtual_irq_type; 657 desc->chip = &piix4_virtual_irq_type;
654 } 658 }
655 else if (IS_CO_APIC(i)) { 659 else if (IS_CO_APIC(i)) {