diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 5a1252753dbb8b9d866a27a244aa8ed48da3b17d..b7287fb499f3f0537b1afd2111e3788976f94aa7 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -2409,9 +2410,8 @@ static int __init ioapic_init_sysfs(void) device_initcall(ioapic_init_sysfs); -#ifdef CONFIG_PCI_MSI /* - * Dynamic irq allocate and deallocation for MSI + * Dynamic irq allocate and deallocation */ int create_irq(void) { @@ -2450,7 +2450,6 @@ void destroy_irq(unsigned int irq) irq_vector[irq] = 0; spin_unlock_irqrestore(&vector_lock, flags); } -#endif /* CONFIG_PCI_MSI */ /* * MSI mesage composition diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index e55028fba942dc3b9a69e7b82d82d4537b277094..91728d9d34724fdcd175d83fce1c5d08290fe0dd 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef CONFIG_ACPI #include #endif diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 0af6d728841591c93822816375bf24b58cfa7539..30294127a0aa90484b907c235d4424ee773336b0 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -55,7 +55,6 @@ config PCI_DEBUG config HT_IRQ bool "Interrupts on hypertransport devices" default y - depends on PCI_MSI depends on X86_LOCAL_APIC && X86_IO_APIC help This allows native hypertransport devices to use interrupts. diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 04694ec7224ba792b7bd104424fd5b620d6d97ff..e3beb784406f69019511cebf7d8cd33542ccb99c 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -17,6 +17,9 @@ obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ # Build the PCI MSI interrupt support obj-$(CONFIG_PCI_MSI) += msi.o +# Build the Hypertransport interrupt support +obj-$(CONFIG_HT_IRQ) += htirq.o + # # Some architectures use the generic PCI setup functions # @@ -29,7 +32,6 @@ obj-$(CONFIG_PPC32) += setup-irq.o obj-$(CONFIG_PPC64) += setup-bus.o obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o -obj-$(CONFIG_HT_IRQ) += htirq.o # # ACPI Related PCI FW Functions diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index 4ba46359d367527247074be9a482c6a06a06b877..0e27f2404a83d81acd5abbae17d99483d59055a3 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c @@ -11,6 +11,7 @@ #include #include #include +#include /* Global ht irq lock. * diff --git a/include/linux/htirq.h b/include/linux/htirq.h new file mode 100644 index 0000000000000000000000000000000000000000..1f15ce279a237a9984b076f4bb903419140ba317 --- /dev/null +++ b/include/linux/htirq.h @@ -0,0 +1,15 @@ +#ifndef LINUX_HTIRQ_H +#define LINUX_HTIRQ_H + +/* Helper functions.. */ +void write_ht_irq_low(unsigned int irq, u32 data); +void write_ht_irq_high(unsigned int irq, u32 data); +u32 read_ht_irq_low(unsigned int irq); +u32 read_ht_irq_high(unsigned int irq); +void mask_ht_irq(unsigned int irq); +void unmask_ht_irq(unsigned int irq); + +/* The arch hook for getting things started */ +int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); + +#endif /* LINUX_HTIRQ_H */ diff --git a/include/linux/pci.h b/include/linux/pci.h index 0da5a4a8940f86168ab591c27a14c7a8effc669d..5c604f5fad67d94c31ba6feb193eb49c0f42d0c8 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -615,20 +615,9 @@ extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); #endif #ifdef CONFIG_HT_IRQ -/* Helper functions.. */ -void write_ht_irq_low(unsigned int irq, u32 data); -void write_ht_irq_high(unsigned int irq, u32 data); -u32 read_ht_irq_low(unsigned int irq); -u32 read_ht_irq_high(unsigned int irq); -void mask_ht_irq(unsigned int irq); -void unmask_ht_irq(unsigned int irq); - /* The functions a driver should call */ int ht_create_irq(struct pci_dev *dev, int idx); void ht_destroy_irq(unsigned int irq); - -/* The arch hook for getting things started */ -int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); #endif /* CONFIG_HT_IRQ */ extern void pci_block_user_cfg_access(struct pci_dev *dev);