[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/apic: Drop sync_Arb_IDs()
commit b89f8f054f9611804a920af4046fa1e97f9e3029 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Aug 29 17:02:47 2025 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon Sep 1 19:54:21 2025 +0100 x86/apic: Drop sync_Arb_IDs() It is not obvious at first glance, but this is dead logic. On Intel, xAPIC (which is what modern_apic() is really checking for) predates 64bit support, while the Family 0xf check on AMD is the K8 processor. Simply drop the logic, rather than trying to adjust vendor/family logic. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/apic.c | 32 -------------------------------- xen/arch/x86/include/asm/apic.h | 1 - xen/arch/x86/io_apic.c | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 70636b0bb5..7747718600 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -91,23 +91,6 @@ static enum apic_mode apic_boot_mode = APIC_MODE_INVALID; bool __read_mostly x2apic_enabled; bool __read_mostly directed_eoi_enabled; -static int modern_apic(void) -{ - unsigned int lvr, version; - /* AMD systems use old APIC versions, so check the CPU */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 >= 0xf) - return 1; - - /* Hygon systems use modern APIC */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) - return 1; - - lvr = apic_read(APIC_LVR); - version = GET_APIC_VERSION(lvr); - return version >= 0x14; -} - /* * 'what should we do if we get a hw irq event on an illegal vector'. * each architecture has to answer this themselves. @@ -396,21 +379,6 @@ int __init verify_local_APIC(void) return 1; } -void __init sync_Arb_IDs(void) -{ - /* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 - And not needed on AMD */ - if (modern_apic()) - return; - /* - * Wait for idle. - */ - apic_wait_icr_idle(); - - apic_printk(APIC_DEBUG, "Synchronizing Arb IDs.\n"); - apic_write(APIC_ICR, APIC_DEST_ALLINC | APIC_INT_LEVELTRIG | APIC_DM_INIT); -} - /* * An initial setup of the virtual wire mode. */ diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index d228549536..918f1cee35 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -166,7 +166,6 @@ extern void disconnect_bsp_APIC (int virt_wire_setup); extern void disable_local_APIC (void); extern int verify_local_APIC (void); extern void cache_APIC_registers (void); -extern void sync_Arb_IDs (void); extern void init_bsp_APIC (void); extern void setup_local_APIC(bool bsp); extern void init_apic_mappings (void); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 42a9b653d3..17e6827f4b 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2163,7 +2163,7 @@ void __init setup_IO_APIC(void) */ if (!acpi_ioapic) setup_ioapic_ids_from_mpc(); - sync_Arb_IDs(); + setup_IO_APIC_irqs(); init_IO_APIC_traps(); check_timer(); -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |