linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/x86: actually allocate legacy interrupts on PV guests
@ 2016-04-20 13:15 Stefano Stabellini
  2016-04-21  9:08 ` Juergen Gross
  2016-04-21 11:02 ` Olaf Hering
  0 siblings, 2 replies; 12+ messages in thread
From: Stefano Stabellini @ 2016-04-20 13:15 UTC (permalink / raw)
  To: boris.ostrovsky
  Cc: sstabellini, linux-kernel, david.vrabel, jgross, xen-devel

b4ff8389ed14 is incomplete: relies on nr_legacy_irqs() to get the number
of legacy interrupts when actually nr_legacy_irqs() returns 0 after
probe_8259A(). Use NR_IRQS_LEGACY instead.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>

diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index beac4df..349b8ce 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -491,8 +491,11 @@ int __init pci_xen_initial_domain(void)
 #endif
 	__acpi_register_gsi = acpi_register_gsi_xen;
 	__acpi_unregister_gsi = NULL;
-	/* Pre-allocate legacy irqs */
-	for (irq = 0; irq < nr_legacy_irqs(); irq++) {
+	/*
+	 * Pre-allocate the legacy IRQs.  Use NR_LEGACY_IRQS here
+	 * because we don't have a PIC and thus nr_legacy_irqs() is zero.
+	 */
+	for (irq = 0; irq < NR_IRQS_LEGACY; irq++) {
 		int trigger, polarity;
 
 		if (acpi_get_override_irq(irq, &trigger, &polarity) == -1)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-16 15:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 13:15 [PATCH] xen/x86: actually allocate legacy interrupts on PV guests Stefano Stabellini
2016-04-21  9:08 ` Juergen Gross
2016-04-21  9:30   ` Stefano Stabellini
2016-04-27  5:02     ` Juergen Gross
2016-04-27  9:35       ` [Xen-devel] " David Vrabel
2016-04-27 13:38         ` Boris Ostrovsky
2016-04-27 13:40           ` David Vrabel
2016-04-27 14:03             ` Boris Ostrovsky
2016-05-16 11:23               ` Stefano Stabellini
2016-05-16 13:57                 ` Boris Ostrovsky
2016-05-16 15:21                   ` Stefano Stabellini
2016-04-21 11:02 ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).