Skip to content

Commit 3b5244b

Browse files
jgross1hansendc
authored andcommitted
x86/xen/apic: Use standard apic driver mechanism for Xen PV
Instead of setting the Xen PV apic driver very early during boot, just use the standard apic driver probing by setting an appropriate x86_init.irqs.intr_mode_init callback. At the same time eliminate xen_apic_check() which has never been used. The #ifdef CONFIG_X86_LOCAL_APIC around the call of xen_init_apic() can be removed, too, as CONFIG_XEN depends on CONFIG_X86_LOCAL_APIC. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Tested-by: Michael Kelley <mikelley@microsoft.com> Tested-by: Sohil Mehta <sohil.mehta@intel.com> Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest) Link: https://lore.kernel.org/lkml/aa086365-fd02-210f-67c6-5c9175c0dfee@suse.com
1 parent 3af1e41 commit 3b5244b

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

arch/x86/xen/apic.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,8 @@ static struct apic xen_pv_apic = {
158158
.icr_write = xen_apic_icr_write,
159159
};
160160

161-
static void __init xen_apic_check(void)
162-
{
163-
apic_install_driver(&xen_pv_apic);
164-
}
165-
166161
void __init xen_init_apic(void)
167162
{
168163
x86_apic_ops.io_apic_read = xen_io_apic_read;
169-
/* On PV guests the APIC CPUID bit is disabled so none of the
170-
* routines end up executing. */
171-
if (!xen_initial_domain())
172-
apic_install_driver(&xen_pv_apic);
173-
174-
x86_platform.apic_post_init = xen_apic_check;
175164
}
176165
apic_driver(xen_pv_apic);

arch/x86/xen/enlighten_pv.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ asmlinkage __visible void __init xen_start_kernel(struct start_info *si)
13261326

13271327
x86_init.resources.memory_setup = xen_memory_setup;
13281328
x86_init.irqs.intr_mode_select = x86_init_noop;
1329-
x86_init.irqs.intr_mode_init = x86_init_noop;
1329+
x86_init.irqs.intr_mode_init = x86_64_probe_apic;
13301330
x86_init.oem.arch_setup = xen_arch_setup;
13311331
x86_init.oem.banner = xen_banner;
13321332
x86_init.hyper.init_platform = xen_pv_init_platform;
@@ -1366,12 +1366,10 @@ asmlinkage __visible void __init xen_start_kernel(struct start_info *si)
13661366

13671367
xen_init_capabilities();
13681368

1369-
#ifdef CONFIG_X86_LOCAL_APIC
13701369
/*
13711370
* set up the basic apic ops.
13721371
*/
13731372
xen_init_apic();
1374-
#endif
13751373

13761374
machine_ops = xen_machine_ops;
13771375

0 commit comments

Comments
 (0)