linux/arch/x86/kernel/apic
Jiang Liu d7f3d47818 x86, irq: Introduce mechanisms to support dynamically allocate IRQ for IOAPIC
Currently x86 support identity mapping between GSI(IOAPIC pin) and IRQ
number, so continous IRQs at low end are statically allocated to IOAPICs
at boot time. This design causes trouble to support IOAPIC hotplug.

This patch implements basic mechanism to dynamically allocate IRQ on
demand for IOAPIC pins by using irqdomain framework.

It first adds several fields into struct ioapic to support irqdomain.
Then it implements an algorithm to dynamically allocate IRQ number
for IOAPIC pins on demand.

Currently it supports three types of irqdomain:
1) LEGACY: used to support IOAPIC hosting legacy IRQs and building
   identity mapping for legacy IRQs. A speical case, we dynamically
   allocate IRQ number for IOAPIC pin which has GSI number below
   nr_legacy_irqs() but isn't legacy IRQ. This is for backward
   compatibility and avoid regression.
2) STRICT: build identity mapping between GSI and IRQ nubmer.
3) DYNAMIC: dynamically allocate IRQ number for IOAPIC pin on demand.

Legacy(ISA) IRQs is not managed by irqdomain because there may be
multiple pins sharing the same IRQ number and current irqdomain only
supports 1:1 mapping between pins and IRQ.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Link: http://lkml.kernel.org/r/1402302011-23642-24-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-06-21 23:05:42 +02:00
..
apic_flat_64.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic_noop.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic_numachip.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
apic.c x86, mpparse: Simplify arch/x86/include/asm/mpspec.h 2014-06-21 23:05:40 +02:00
bigsmp_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
hw_nmi.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-12 19:18:49 -07:00
io_apic.c x86, irq: Introduce mechanisms to support dynamically allocate IRQ for IOAPIC 2014-06-21 23:05:42 +02:00
ipi.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile x86, platforms: Remove NUMAQ 2014-02-27 08:07:39 -08:00
probe_32.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
probe_64.c x86/platform: Introduce APIC post-initialization callback 2012-06-06 09:06:19 +02:00
x2apic_cluster.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
x2apic_phys.c x86/apic: Switch wait_for_init_deassert() to a bool flag 2014-02-09 15:15:08 +01:00
x2apic_uv_x.c x86/UV: Set n_lshift based on GAM_GR_CONFIG MMR for UV3 2014-04-01 12:10:44 +02:00