diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-02-12 20:22:49 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-10-18 10:40:30 -0400 |
commit | 7b586d71858091f0958e5808b7e3d5390c2ae47d (patch) | |
tree | 6184c500731aad975103d8c87c5ee9ed18977040 | |
parent | d46a78b05c0e37f76ddf4a7a67bf0b6c68bada55 (diff) |
x86/io_apic: add get_nr_irqs_gsi()
Impact: new interface to get max GSI
Add get_nr_irqs_gsi() to return nr_irqs_gsi. Xen will use this to
determine how many irqs it needs to reserve for hardware irqs.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index c8be4566c3d2..a6b28d017c2f 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -169,6 +169,7 @@ extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | |||
169 | extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | 169 | extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); |
170 | 170 | ||
171 | extern void probe_nr_irqs_gsi(void); | 171 | extern void probe_nr_irqs_gsi(void); |
172 | extern int get_nr_irqs_gsi(void); | ||
172 | 173 | ||
173 | extern void setup_ioapic_ids_from_mpc(void); | 174 | extern void setup_ioapic_ids_from_mpc(void); |
174 | 175 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 20e47e045395..44bb914a42b2 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3649,6 +3649,11 @@ void __init probe_nr_irqs_gsi(void) | |||
3649 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | 3649 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); |
3650 | } | 3650 | } |
3651 | 3651 | ||
3652 | int get_nr_irqs_gsi(void) | ||
3653 | { | ||
3654 | return nr_irqs_gsi; | ||
3655 | } | ||
3656 | |||
3652 | #ifdef CONFIG_SPARSE_IRQ | 3657 | #ifdef CONFIG_SPARSE_IRQ |
3653 | int __init arch_probe_nr_irqs(void) | 3658 | int __init arch_probe_nr_irqs(void) |
3654 | { | 3659 | { |