xen/x86: Remove APIC_INTEGRATED() checks
PATCH 1/1 xen/x86: Remove APIC_INTEGRATED() checks
All 64bit processors have integrated APICs. Xen has no need to attempt to cope with external APICs.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
--- xen/arch/x86/apic.c | 9 +++------ xen/arch/x86/smpboot.c | 6 +----- xen/include/asm-x86/apicdef.h | 1 - 3 files changed, 4 insertions(+), 12 deletions(-)
xen/arch/x86/apic.c +3 -6
@@ -522,7 +522,7 @@ static void resume_x2apic(void)void setup_local_APIC (void ) { -unsigned long oldvalue, value, ver, maxlvt; +unsigned long oldvalue, value, maxlvt;int i, j;/* Pound the ESR really hard over the head with a big hammer - mbligh */
@@ -533,15 +533,12 @@ void setup_local_APIC(void)apic_write (APIC_ESR ,0 ); } - value =apic_read (APIC_LVR ); - ver =GET_APIC_VERSION (value); -BUILD_BUG_ON ((SPURIOUS_APIC_VECTOR &0x0f ) !=0x0f );/* * Double-check whether this APIC is really registered. */ -if (!APIC_INTEGRATED (ver) || !apic_id_registered ()) +if (!apic_id_registered ())BUG ();/*
@@ -1358,7 +1355,7 @@ int __init APIC_init_uniprocessor (void)/* * Complain if the BIOS pretends there is one. */ -if (!cpu_has_apic &&APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid])) { +if (!cpu_has_apic) {printk (KERN_ERR "BIOS bug, local APIC #%d not detected!...\n" , boot_cpu_physical_apicid); skip_ioapic_setup =1 ;
xen/arch/x86/smpboot.c +1 -5
@@ -385,9 +385,6 @@ static int wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)/* * Be paranoid about clearing APIC errors. */ -if ( !APIC_INTEGRATED (apic_version[phys_apicid]) ) -return -ENODEV ; -apic_read_around (APIC_SPIV );apic_write (APIC_ESR ,0 );apic_read (APIC_ESR );
@@ -835,8 +832,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) }/* If we couldn't find a local APIC, then get out of here now! */ -if ( !APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid]) - || !cpu_has_apic ) +if ( !cpu_has_apic ) {printk (KERN_ERR "BIOS bug, local APIC #%d not detected!...\n" , boot_cpu_physical_apicid);
xen/include/asm-x86/apicdef.h +0 -1
@@ -19,7 +19,6 @@#define APIC_LVR_DIRECTED_EOI (1 << 24)#define GET_APIC_VERSION (x) ((x)&0xFF)#define GET_APIC_MAXLVT (x) (((x)>>16)&0xFF) -#define APIC_INTEGRATED (x) ((x)&0xF0)#define APIC_XAPIC (x) ((x) >= 0x14)#define APIC_TASKPRI 0x80#define APIC_TPRI_MASK 0xFF
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 08.05.17 at 14:40, <[email protected]> wrote:
All 64bit processors have integrated APICs. Xen has no need to attempt to cope with external APICs.
Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 4 lines · Andrew Cooper
All 64bit processors have integrated APICs. Xen has no need to attempt to cope with external APICs.
Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel