diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-29 11:47:33 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-19 19:12:33 -0500 |
commit | ab3b37937e8f4fb38dc9780b7bc3fd3c5195cca3 (patch) | |
tree | d1d96406b6bfcfb93fcc71ea825c7f5c53cf9f06 /arch/x86/pci/irq.c | |
parent | b72d0db9dd41da1f2ec6274b03e8909583c64e41 (diff) |
x86: Add pci_init_irq to x86_init
Moorestown wants to reuse pcibios_init_irq but needs to provide its
own implementation of pci_enable_irq. After we distangled the init we
can move the init_irq call to x86_init and remove the pci_enable_irq
!= NULL check in pcibios_init_irq. pci_enable_irq is compile time
initialized to pirq_enable_irq and the special cases which override it
(visws and acpi) set the x86_init function pointer to noop. That
allows MSRT to override pci_enable_irq and otherwise run
pcibios_init_irq unmodified.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <43F901BD926A4E43B106BF17856F07559FB80CFF@orsmsx508.amr.corp.intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/pci/irq.c')
-rw-r--r-- | arch/x86/pci/irq.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 0696d506c4ad..0f40ff20dd67 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -53,7 +53,7 @@ struct irq_router_handler { | |||
53 | int (*probe)(struct irq_router *r, struct pci_dev *router, u16 device); | 53 | int (*probe)(struct irq_router *r, struct pci_dev *router, u16 device); |
54 | }; | 54 | }; |
55 | 55 | ||
56 | int (*pcibios_enable_irq)(struct pci_dev *dev) = NULL; | 56 | int (*pcibios_enable_irq)(struct pci_dev *dev) = pirq_enable_irq; |
57 | void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL; | 57 | void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL; |
58 | 58 | ||
59 | /* | 59 | /* |
@@ -1110,12 +1110,12 @@ static struct dmi_system_id __initdata pciirq_dmi_table[] = { | |||
1110 | { } | 1110 | { } |
1111 | }; | 1111 | }; |
1112 | 1112 | ||
1113 | int __init pcibios_irq_init(void) | 1113 | void __init pcibios_irq_init(void) |
1114 | { | 1114 | { |
1115 | DBG(KERN_DEBUG "PCI: IRQ init\n"); | 1115 | DBG(KERN_DEBUG "PCI: IRQ init\n"); |
1116 | 1116 | ||
1117 | if (pcibios_enable_irq || raw_pci_ops == NULL) | 1117 | if (raw_pci_ops == NULL) |
1118 | return 0; | 1118 | return; |
1119 | 1119 | ||
1120 | dmi_check_system(pciirq_dmi_table); | 1120 | dmi_check_system(pciirq_dmi_table); |
1121 | 1121 | ||
@@ -1142,8 +1142,6 @@ int __init pcibios_irq_init(void) | |||
1142 | pirq_table = NULL; | 1142 | pirq_table = NULL; |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | pcibios_enable_irq = pirq_enable_irq; | ||
1146 | |||
1147 | pcibios_fixup_irqs(); | 1145 | pcibios_fixup_irqs(); |
1148 | 1146 | ||
1149 | if (io_apic_assign_pci_irqs && pci_routeirq) { | 1147 | if (io_apic_assign_pci_irqs && pci_routeirq) { |
@@ -1157,8 +1155,6 @@ int __init pcibios_irq_init(void) | |||
1157 | for_each_pci_dev(dev) | 1155 | for_each_pci_dev(dev) |
1158 | pirq_enable_irq(dev); | 1156 | pirq_enable_irq(dev); |
1159 | } | 1157 | } |
1160 | |||
1161 | return 0; | ||
1162 | } | 1158 | } |
1163 | 1159 | ||
1164 | static void pirq_penalize_isa_irq(int irq, int active) | 1160 | static void pirq_penalize_isa_irq(int irq, int active) |