diff options
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 5 | ||||
-rw-r--r-- | include/linux/irq.h | 2 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 7 | ||||
-rw-r--r-- | kernel/softirq.c | 5 |
4 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 6ad4658de705..d23aa82e7a7b 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3425,6 +3425,11 @@ int get_nr_irqs_gsi(void) | |||
3425 | return nr_irqs_gsi; | 3425 | return nr_irqs_gsi; |
3426 | } | 3426 | } |
3427 | 3427 | ||
3428 | unsigned int arch_dynirq_lower_bound(unsigned int from) | ||
3429 | { | ||
3430 | return from < nr_irqs_gsi ? nr_irqs_gsi : from; | ||
3431 | } | ||
3432 | |||
3428 | int __init arch_probe_nr_irqs(void) | 3433 | int __init arch_probe_nr_irqs(void) |
3429 | { | 3434 | { |
3430 | int nr; | 3435 | int nr; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 10a0b1ac4ea0..5c57efb863d0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -603,6 +603,8 @@ static inline u32 irq_get_trigger_type(unsigned int irq) | |||
603 | return d ? irqd_get_trigger_type(d) : 0; | 603 | return d ? irqd_get_trigger_type(d) : 0; |
604 | } | 604 | } |
605 | 605 | ||
606 | unsigned int arch_dynirq_lower_bound(unsigned int from); | ||
607 | |||
606 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | 608 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |
607 | struct module *owner); | 609 | struct module *owner); |
608 | 610 | ||
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index a7174617616b..bb07f2928f4b 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -363,6 +363,13 @@ __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | |||
363 | if (from > irq) | 363 | if (from > irq) |
364 | return -EINVAL; | 364 | return -EINVAL; |
365 | from = irq; | 365 | from = irq; |
366 | } else { | ||
367 | /* | ||
368 | * For interrupts which are freely allocated the | ||
369 | * architecture can force a lower bound to the @from | ||
370 | * argument. x86 uses this to exclude the GSI space. | ||
371 | */ | ||
372 | from = arch_dynirq_lower_bound(from); | ||
366 | } | 373 | } |
367 | 374 | ||
368 | mutex_lock(&sparse_irq_lock); | 375 | mutex_lock(&sparse_irq_lock); |
diff --git a/kernel/softirq.c b/kernel/softirq.c index b50990a5bea0..33e4648ae0e7 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -779,3 +779,8 @@ int __init __weak arch_early_irq_init(void) | |||
779 | { | 779 | { |
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | |||
783 | unsigned int __weak arch_dynirq_lower_bound(unsigned int from) | ||
784 | { | ||
785 | return from; | ||
786 | } | ||