x86/irq/32: Invoke irq_ctx_init() from init_IRQ()
authorThomas Gleixner <tglx@linutronix.de>
Sun, 14 Apr 2019 16:00:03 +0000 (18:00 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 17 Apr 2019 13:30:12 +0000 (15:30 +0200)
irq_ctx_init() is invoked from native_init_IRQ() or from xen_init_IRQ()
code. There is no reason to have this split. The interrupt stacks must be
allocated no matter what.

Invoke it from init_IRQ() before invoking the native or XEN init
implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Josh Abraham <j.abraham1776@gmail.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Nicolai Stange <nstange@suse.de>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: x86-ml <x86@kernel.org>
Cc: xen-devel@lists.xenproject.org
Link: https://lkml.kernel.org/r/20190414160146.001162606@linutronix.de
arch/x86/kernel/irqinit.c
drivers/xen/events/events_base.c

index a0693b71cfc1cc4bb99af19ed7b9d07bfca80c33..26b5cb5386b9bebb39f1ff3e8a70f4e745deeb5d 100644 (file)
@@ -91,6 +91,8 @@ void __init init_IRQ(void)
        for (i = 0; i < nr_legacy_irqs(); i++)
                per_cpu(vector_irq, 0)[ISA_IRQ_VECTOR(i)] = irq_to_desc(i);
 
+       irq_ctx_init(smp_processor_id());
+
        x86_init.irqs.intr_init();
 }
 
@@ -104,6 +106,4 @@ void __init native_init_IRQ(void)
 
        if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs())
                setup_irq(2, &irq2);
-
-       irq_ctx_init(smp_processor_id());
 }
index 117e76b2f9391a1983a0c46b3276e7606412977e..084e45882c7374fc3c3b88c191e5b2e520df31e9 100644 (file)
@@ -1687,7 +1687,6 @@ void __init xen_init_IRQ(void)
 
 #ifdef CONFIG_X86
        if (xen_pv_domain()) {
-               irq_ctx_init(smp_processor_id());
                if (xen_initial_domain())
                        pci_xen_initial_domain();
        }