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

[xen staging] x86/APIC: drop clustered_apic_check() hook



commit 56829b6ff98515ffdc478edc74cd5bcd437301aa
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Nov 5 13:34:12 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Nov 29 13:53:05 2021 +0000

    x86/APIC: drop clustered_apic_check() hook
    
    The hook functions have been empty forever (x2APIC) or issuing merely a
    printk() for a long time (xAPIC). Since that printk() is (a) generally
    useful (i.e. also in the x2APIC case) and (b) would better only be
    issued once the final APIC driver to use was determined, move (and
    generalize) it into connect_bsp_APIC().
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/acpi/boot.c                     |  2 --
 xen/arch/x86/apic.c                          |  6 ++++++
 xen/arch/x86/genapic/delivery.c              | 10 ----------
 xen/arch/x86/genapic/x2apic.c                |  6 ------
 xen/arch/x86/mpparse.c                       |  1 -
 xen/include/asm-x86/genapic.h                |  5 -----
 xen/include/asm-x86/mach-generic/mach_apic.h |  1 -
 7 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
index 5e38b4b17c..79c6a3e1f8 100644
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -674,9 +674,7 @@ static void __init acpi_process_madt(void)
                        error = acpi_parse_madt_ioapic_entries();
                        if (!error) {
                                acpi_ioapic = true;
-
                                smp_found_config = true;
-                               clustered_apic_check();
                        }
                }
                if (error == -EINVAL) {
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 030792cabb..55c103aaff 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -243,6 +243,12 @@ void __init connect_bsp_APIC(void)
         outb(0x70, 0x22);
         outb(0x01, 0x23);
     }
+
+    printk("Enabling APIC mode:  %s.  Using %d I/O APICs\n",
+           !INT_DEST_MODE ? "Physical"
+                          : init_apic_ldr == init_apic_ldr_flat ? "Flat"
+                                                                : "Clustered",
+           nr_ioapics);
     enable_apic_mode();
 }
 
diff --git a/xen/arch/x86/genapic/delivery.c b/xen/arch/x86/genapic/delivery.c
index 36ef033e65..548c33f282 100644
--- a/xen/arch/x86/genapic/delivery.c
+++ b/xen/arch/x86/genapic/delivery.c
@@ -19,11 +19,6 @@ void init_apic_ldr_flat(void)
        apic_write(APIC_LDR, val);
 }
 
-void __init clustered_apic_check_flat(void)
-{
-       printk("Enabling APIC mode:  Flat.  Using %d I/O APICs\n", nr_ioapics);
-}
-
 const cpumask_t *vector_allocation_cpumask_flat(int cpu)
 {
        return &cpu_online_map;
@@ -43,11 +38,6 @@ void init_apic_ldr_phys(void)
        /* We only deliver in phys mode - no setup needed. */
 }
 
-void __init clustered_apic_check_phys(void)
-{
-       printk("Enabling APIC mode:  Phys.  Using %d I/O APICs\n", nr_ioapics);
-}
-
 const cpumask_t *vector_allocation_cpumask_phys(int cpu)
 {
        return cpumask_of(cpu);
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 628b441da5..425f1ff460 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -75,10 +75,6 @@ static void init_apic_ldr_x2apic_cluster(void)
     cpumask_set_cpu(this_cpu, per_cpu(cluster_cpus, this_cpu));
 }
 
-static void __init clustered_apic_check_x2apic(void)
-{
-}
-
 static const cpumask_t *vector_allocation_cpumask_x2apic_cluster(int cpu)
 {
     return per_cpu(cluster_cpus, cpu);
@@ -175,7 +171,6 @@ static const struct genapic __initconstrel apic_x2apic_phys 
= {
     .int_delivery_mode = dest_Fixed,
     .int_dest_mode = 0 /* physical delivery */,
     .init_apic_ldr = init_apic_ldr_phys,
-    .clustered_apic_check = clustered_apic_check_x2apic,
     .vector_allocation_cpumask = vector_allocation_cpumask_phys,
     .cpu_mask_to_apicid = cpu_mask_to_apicid_phys,
     .send_IPI_mask = send_IPI_mask_x2apic_phys,
@@ -187,7 +182,6 @@ static const struct genapic __initconstrel 
apic_x2apic_cluster = {
     .int_delivery_mode = dest_LowestPrio,
     .int_dest_mode = 1 /* logical delivery */,
     .init_apic_ldr = init_apic_ldr_x2apic_cluster,
-    .clustered_apic_check = clustered_apic_check_x2apic,
     .vector_allocation_cpumask = vector_allocation_cpumask_x2apic_cluster,
     .cpu_mask_to_apicid = cpu_mask_to_apicid_x2apic_cluster,
     .send_IPI_mask = send_IPI_mask_x2apic_cluster,
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index dff02b142b..3df8c65f67 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -410,7 +410,6 @@ static int __init smp_read_mpc(struct mp_config_table *mpc)
                        }
                }
        }
-       clustered_apic_check();
        if (!num_processors)
                printk(KERN_ERR "SMP mptable: no processors registered!\n");
        return num_processors;
diff --git a/xen/include/asm-x86/genapic.h b/xen/include/asm-x86/genapic.h
index 5aa35ceb5f..dd7dfe96a3 100644
--- a/xen/include/asm-x86/genapic.h
+++ b/xen/include/asm-x86/genapic.h
@@ -32,7 +32,6 @@ struct genapic {
        int int_delivery_mode;
        int int_dest_mode;
        void (*init_apic_ldr)(void);
-       void (*clustered_apic_check)(void);
        const cpumask_t *(*vector_allocation_cpumask)(int cpu);
        unsigned int (*cpu_mask_to_apicid)(const cpumask_t *cpumask);
        void (*send_IPI_mask)(const cpumask_t *mask, int vector);
@@ -54,7 +53,6 @@ extern const struct genapic apic_bigsmp;
 void send_IPI_self_legacy(uint8_t vector);
 
 void init_apic_ldr_flat(void);
-void clustered_apic_check_flat(void);
 unsigned int cpu_mask_to_apicid_flat(const cpumask_t *cpumask);
 void send_IPI_mask_flat(const cpumask_t *mask, int vector);
 const cpumask_t *vector_allocation_cpumask_flat(int cpu);
@@ -62,14 +60,12 @@ const cpumask_t *vector_allocation_cpumask_flat(int cpu);
        .int_delivery_mode = dest_LowestPrio, \
        .int_dest_mode = 1 /* logical delivery */, \
        .init_apic_ldr = init_apic_ldr_flat, \
-       .clustered_apic_check = clustered_apic_check_flat, \
        .vector_allocation_cpumask = vector_allocation_cpumask_flat, \
        .cpu_mask_to_apicid = cpu_mask_to_apicid_flat, \
        .send_IPI_mask = send_IPI_mask_flat, \
        .send_IPI_self = send_IPI_self_legacy
 
 void init_apic_ldr_phys(void);
-void clustered_apic_check_phys(void);
 unsigned int cpu_mask_to_apicid_phys(const cpumask_t *cpumask);
 void send_IPI_mask_phys(const cpumask_t *mask, int vector);
 const cpumask_t *vector_allocation_cpumask_phys(int cpu);
@@ -77,7 +73,6 @@ const cpumask_t *vector_allocation_cpumask_phys(int cpu);
        .int_delivery_mode = dest_Fixed, \
        .int_dest_mode = 0 /* physical delivery */, \
        .init_apic_ldr = init_apic_ldr_phys, \
-       .clustered_apic_check = clustered_apic_check_phys, \
        .vector_allocation_cpumask = vector_allocation_cpumask_phys, \
        .cpu_mask_to_apicid = cpu_mask_to_apicid_phys, \
        .send_IPI_mask = send_IPI_mask_phys, \
diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h 
b/xen/include/asm-x86/mach-generic/mach_apic.h
index 75f1e766b0..b6f6361c60 100644
--- a/xen/include/asm-x86/mach-generic/mach_apic.h
+++ b/xen/include/asm-x86/mach-generic/mach_apic.h
@@ -14,7 +14,6 @@
 #define INT_DEST_MODE (genapic.int_dest_mode)
 #define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map)
 #define init_apic_ldr (genapic.init_apic_ldr)
-#define clustered_apic_check (genapic.clustered_apic_check)
 #define cpu_mask_to_apicid(mask) ({ \
        /* \
         * There are a number of places where the address of a local variable \
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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