[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/x86: Remove APIC_INTEGRATED() checks



commit 7b0007af3a1fc7be87a63e010d4d7b268627e930
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Nov 17 14:41:32 2015 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue May 30 18:50:13 2017 +0100

    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 <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 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(-)

diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index e32dcd7..1dd188a 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -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;
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 50b907b..92fe4f2 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -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);
diff --git a/xen/include/asm-x86/apicdef.h b/xen/include/asm-x86/apicdef.h
index da7f4d3..1b2c452 100644
--- a/xen/include/asm-x86/apicdef.h
+++ b/xen/include/asm-x86/apicdef.h
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.