Commit 95d77884c77beed676036d2f74d10b470a483c63
Committed by
Linus Torvalds
1 parent
03571e11c4
Exists in
master
and in
39 other branches
[PATCH] htirq: tidy up the htirq code
This moves the declarations for the architecture helpers into include/linux/htirq.h from the generic include/linux/pci.h. Hopefully this will make this distinction clearer. htirq.h is included where it is needed. The dependency on the msi code is fixed and removed. The Makefile is tidied up. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tony Luck <tony.luck@intel.com> Cc: Andi Kleen <ak@suse.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Greg KH <greg@kroah.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 7 changed files with 22 additions and 16 deletions Side-by-side Diff
arch/i386/kernel/io_apic.c
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | #include <linux/sysdev.h> |
34 | 34 | #include <linux/pci.h> |
35 | 35 | #include <linux/msi.h> |
36 | +#include <linux/htirq.h> | |
36 | 37 | |
37 | 38 | #include <asm/io.h> |
38 | 39 | #include <asm/smp.h> |
39 | 40 | |
... | ... | @@ -2409,9 +2410,8 @@ |
2409 | 2410 | |
2410 | 2411 | device_initcall(ioapic_init_sysfs); |
2411 | 2412 | |
2412 | -#ifdef CONFIG_PCI_MSI | |
2413 | 2413 | /* |
2414 | - * Dynamic irq allocate and deallocation for MSI | |
2414 | + * Dynamic irq allocate and deallocation | |
2415 | 2415 | */ |
2416 | 2416 | int create_irq(void) |
2417 | 2417 | { |
... | ... | @@ -2450,7 +2450,6 @@ |
2450 | 2450 | irq_vector[irq] = 0; |
2451 | 2451 | spin_unlock_irqrestore(&vector_lock, flags); |
2452 | 2452 | } |
2453 | -#endif /* CONFIG_PCI_MSI */ | |
2454 | 2453 | |
2455 | 2454 | /* |
2456 | 2455 | * MSI mesage composition |
arch/x86_64/kernel/io_apic.c
drivers/pci/Kconfig
drivers/pci/Makefile
... | ... | @@ -17,6 +17,9 @@ |
17 | 17 | # Build the PCI MSI interrupt support |
18 | 18 | obj-$(CONFIG_PCI_MSI) += msi.o |
19 | 19 | |
20 | +# Build the Hypertransport interrupt support | |
21 | +obj-$(CONFIG_HT_IRQ) += htirq.o | |
22 | + | |
20 | 23 | # |
21 | 24 | # Some architectures use the generic PCI setup functions |
22 | 25 | # |
... | ... | @@ -29,7 +32,6 @@ |
29 | 32 | obj-$(CONFIG_PPC64) += setup-bus.o |
30 | 33 | obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o |
31 | 34 | obj-$(CONFIG_X86_VISWS) += setup-irq.o |
32 | -obj-$(CONFIG_HT_IRQ) += htirq.o | |
33 | 35 | |
34 | 36 | # |
35 | 37 | # ACPI Related PCI FW Functions |
drivers/pci/htirq.c
include/linux/htirq.h
1 | +#ifndef LINUX_HTIRQ_H | |
2 | +#define LINUX_HTIRQ_H | |
3 | + | |
4 | +/* Helper functions.. */ | |
5 | +void write_ht_irq_low(unsigned int irq, u32 data); | |
6 | +void write_ht_irq_high(unsigned int irq, u32 data); | |
7 | +u32 read_ht_irq_low(unsigned int irq); | |
8 | +u32 read_ht_irq_high(unsigned int irq); | |
9 | +void mask_ht_irq(unsigned int irq); | |
10 | +void unmask_ht_irq(unsigned int irq); | |
11 | + | |
12 | +/* The arch hook for getting things started */ | |
13 | +int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); | |
14 | + | |
15 | +#endif /* LINUX_HTIRQ_H */ |
include/linux/pci.h
... | ... | @@ -615,20 +615,9 @@ |
615 | 615 | #endif |
616 | 616 | |
617 | 617 | #ifdef CONFIG_HT_IRQ |
618 | -/* Helper functions.. */ | |
619 | -void write_ht_irq_low(unsigned int irq, u32 data); | |
620 | -void write_ht_irq_high(unsigned int irq, u32 data); | |
621 | -u32 read_ht_irq_low(unsigned int irq); | |
622 | -u32 read_ht_irq_high(unsigned int irq); | |
623 | -void mask_ht_irq(unsigned int irq); | |
624 | -void unmask_ht_irq(unsigned int irq); | |
625 | - | |
626 | 618 | /* The functions a driver should call */ |
627 | 619 | int ht_create_irq(struct pci_dev *dev, int idx); |
628 | 620 | void ht_destroy_irq(unsigned int irq); |
629 | - | |
630 | -/* The arch hook for getting things started */ | |
631 | -int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); | |
632 | 621 | #endif /* CONFIG_HT_IRQ */ |
633 | 622 | |
634 | 623 | extern void pci_block_user_cfg_access(struct pci_dev *dev); |