diff options
author | Tony Luck <tony.luck@intel.com> | 2008-07-17 13:53:37 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-07-17 13:53:37 -0400 |
commit | fca515fbfa5ecd9f7b54db311317e2c877d7831a (patch) | |
tree | 66b44028b3ab5be068be78650932812520d78865 /arch/ia64/kernel/iosapic.c | |
parent | 2b04be7e8ab5756ea36e137dd03c8773d184e67e (diff) | |
parent | 4d58bbcc89e267d52b4df572acbf209a60a8a497 (diff) |
Pull pvops into release branch
Diffstat (limited to 'arch/ia64/kernel/iosapic.c')
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 39752cdef6ff..3bc2fa64f87f 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -585,6 +585,15 @@ static inline int irq_is_shared (int irq) | |||
585 | return (iosapic_intr_info[irq].count > 1); | 585 | return (iosapic_intr_info[irq].count > 1); |
586 | } | 586 | } |
587 | 587 | ||
588 | struct irq_chip* | ||
589 | ia64_native_iosapic_get_irq_chip(unsigned long trigger) | ||
590 | { | ||
591 | if (trigger == IOSAPIC_EDGE) | ||
592 | return &irq_type_iosapic_edge; | ||
593 | else | ||
594 | return &irq_type_iosapic_level; | ||
595 | } | ||
596 | |||
588 | static int | 597 | static int |
589 | register_intr (unsigned int gsi, int irq, unsigned char delivery, | 598 | register_intr (unsigned int gsi, int irq, unsigned char delivery, |
590 | unsigned long polarity, unsigned long trigger) | 599 | unsigned long polarity, unsigned long trigger) |
@@ -635,13 +644,10 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery, | |||
635 | iosapic_intr_info[irq].dmode = delivery; | 644 | iosapic_intr_info[irq].dmode = delivery; |
636 | iosapic_intr_info[irq].trigger = trigger; | 645 | iosapic_intr_info[irq].trigger = trigger; |
637 | 646 | ||
638 | if (trigger == IOSAPIC_EDGE) | 647 | irq_type = iosapic_get_irq_chip(trigger); |
639 | irq_type = &irq_type_iosapic_edge; | ||
640 | else | ||
641 | irq_type = &irq_type_iosapic_level; | ||
642 | 648 | ||
643 | idesc = irq_desc + irq; | 649 | idesc = irq_desc + irq; |
644 | if (idesc->chip != irq_type) { | 650 | if (irq_type != NULL && idesc->chip != irq_type) { |
645 | if (idesc->chip != &no_irq_type) | 651 | if (idesc->chip != &no_irq_type) |
646 | printk(KERN_WARNING | 652 | printk(KERN_WARNING |
647 | "%s: changing vector %d from %s to %s\n", | 653 | "%s: changing vector %d from %s to %s\n", |
@@ -974,6 +980,22 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, | |||
974 | } | 980 | } |
975 | 981 | ||
976 | void __init | 982 | void __init |
983 | ia64_native_iosapic_pcat_compat_init(void) | ||
984 | { | ||
985 | if (pcat_compat) { | ||
986 | /* | ||
987 | * Disable the compatibility mode interrupts (8259 style), | ||
988 | * needs IN/OUT support enabled. | ||
989 | */ | ||
990 | printk(KERN_INFO | ||
991 | "%s: Disabling PC-AT compatible 8259 interrupts\n", | ||
992 | __func__); | ||
993 | outb(0xff, 0xA1); | ||
994 | outb(0xff, 0x21); | ||
995 | } | ||
996 | } | ||
997 | |||
998 | void __init | ||
977 | iosapic_system_init (int system_pcat_compat) | 999 | iosapic_system_init (int system_pcat_compat) |
978 | { | 1000 | { |
979 | int irq; | 1001 | int irq; |
@@ -987,17 +1009,8 @@ iosapic_system_init (int system_pcat_compat) | |||
987 | } | 1009 | } |
988 | 1010 | ||
989 | pcat_compat = system_pcat_compat; | 1011 | pcat_compat = system_pcat_compat; |
990 | if (pcat_compat) { | 1012 | if (pcat_compat) |
991 | /* | 1013 | iosapic_pcat_compat_init(); |
992 | * Disable the compatibility mode interrupts (8259 style), | ||
993 | * needs IN/OUT support enabled. | ||
994 | */ | ||
995 | printk(KERN_INFO | ||
996 | "%s: Disabling PC-AT compatible 8259 interrupts\n", | ||
997 | __func__); | ||
998 | outb(0xff, 0xA1); | ||
999 | outb(0xff, 0x21); | ||
1000 | } | ||
1001 | } | 1014 | } |
1002 | 1015 | ||
1003 | static inline int | 1016 | static inline int |