summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/hw_irq.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-05-15 22:05:16 +0200
committerIngo Molnar <mingo@elte.hu>2009-05-18 08:38:55 +0200
commite5198075c67a22ec9a09565b1ce88d3d3f5ba855 (patch)
tree3d4ea0efd8575e677509b022e649c62d4786ed55 /arch/x86/include/asm/hw_irq.h
parentx86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix (diff)
downloadlinux-e5198075c67a22ec9a09565b1ce88d3d3f5ba855.tar.xz
linux-e5198075c67a22ec9a09565b1ce88d3d3f5ba855.zip
x86, apic: introduce io_apic_irq_attr
according to Ingo, io_apic irq-setup related functions have too many parameters with a repetitive signature. So reduce related funcs to get less params by passing a pointer to a newly defined io_apic_irq_attr structure. v2: io_apic_irq ==> irq_attr triggering ==> trigger v3: add set_io_apic_irq_attr [ Impact: cleanup ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Len Brown <lenb@kernel.org> LKML-Reference: <4A08ACD3.2070401@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/hw_irq.h')
-rw-r--r--arch/x86/include/asm/hw_irq.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 26a40ab70131..a7d14bbae110 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -63,9 +63,26 @@ extern unsigned long io_apic_irqs;
extern void init_VISWS_APIC_irqs(void);
extern void setup_IO_APIC(void);
extern void disable_IO_APIC(void);
+
+struct io_apic_irq_attr {
+ int ioapic;
+ int ioapic_pin;
+ int trigger;
+ int polarity;
+};
+
+static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr,
+ int ioapic, int ioapic_pin,
+ int trigger, int polarity)
+{
+ irq_attr->ioapic = ioapic;
+ irq_attr->ioapic_pin = ioapic_pin;
+ irq_attr->trigger = trigger;
+ irq_attr->polarity = polarity;
+}
+
extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin,
- int *ioapic, int *ioapic_pin,
- int *trigger, int *polarity);
+ struct io_apic_irq_attr *irq_attr);
extern void setup_ioapic_dest(void);
extern void enable_IO_APIC(void);