xen/x86: Remove APIC_INTEGRATED() checks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Nov 2015 14:41:32 +0000 (14:41 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 30 May 2017 17:50:13 +0000 (18:50 +0100)
All 64bit processors have integrated APICs.  Xen has no need to attempt to
cope with external APICs.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/apic.c
xen/arch/x86/smpboot.c
xen/include/asm-x86/apicdef.h

index e32dcd7fb1bab472abfbda668a593ae4ad965f50..1dd188abd95667d071ac32a16f7c02e4a32d6295 100644 (file)
@@ -522,7 +522,7 @@ out:
 
 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;
index 50b907b07193628e675d92de73de84189c3ccf35..92fe4f2673f140aa2b463348c426aa4bae79cdc2 100644 (file)
@@ -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);
index da7f4d38cf6ce93018611de278e4f5a4d226f1c9..1b2c4520a102f4a56b1f6cb92e2414de4cc0005f 100644 (file)
@@ -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