]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/platform/intel-mid: Make IRQ allocation a bit more flexible
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Jul 2017 17:34:02 +0000 (20:34 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Jul 2017 09:21:03 +0000 (11:21 +0200)
commit5b395e2be6c4621962889cb28ba2d6d1be42e39d
treeb50169db593ab0e225908f594e016f235dceb4c8
parentb0ee9effc17a1b52999934a73ec2ef1ddcc2bdab
x86/platform/intel-mid: Make IRQ allocation a bit more flexible

In the future we would use dynamic allocation for IRQ which brings
non-1:1 mapping for IOAPIC domain. Thus, we need to respect return value
of mp_map_gsi_to_irq() and assign it back to the device structure.

Besides that we need to read GSI from interrupt pin register to avoid
cases when some drivers will try to initialize PCI device twice in a row
which will call pcibios_enable_irq() twice as well.

serial 0000:00:04.1: Mapped GSI28 to IRQ5
serial 0000:00:04.2: Mapped GSI29 to IRQ5
serial 0000:00:04.3: Mapped GSI54 to IRQ5
8250_mid 0000:00:04.1: Mapped GSI28 to IRQ5
8250_mid 0000:00:04.2: Mapped GSI29 to IRQ6
8250_mid 0000:00:04.3: Mapped GSI54 to IRQ7

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-pci@vger.kernel.org
Link: http://lkml.kernel.org/r/20170724173402.12939-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/pci/intel_mid_pci.c
arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c