]> xenbits.xensource.com Git - xen.git/commitdiff
x86/APIC: drop clustered_apic_check() hook
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Nov 2021 12:34:12 +0000 (13:34 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
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@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/acpi/boot.c
xen/arch/x86/apic.c
xen/arch/x86/genapic/delivery.c
xen/arch/x86/genapic/x2apic.c
xen/arch/x86/mpparse.c
xen/include/asm-x86/genapic.h
xen/include/asm-x86/mach-generic/mach_apic.h

index 5e38b4b17c19b63428d1287d2c150ea4d6006e66..79c6a3e1f8a6742af3f7e841a1a3ed1db5bfcc0e 100644 (file)
@@ -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) {
index 030792cabbe18701f7662565905e5022c24c396b..55c103aaffbbe49bd50312afa0172a4e706c3421 100644 (file)
@@ -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();
 }
 
index 36ef033e65685056abb919c81e716e8d33967f46..548c33f282dd399cef58a31d5c7f35f2a1a1e5fb 100644 (file)
@@ -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);
index 628b441da5f165de8e4c2cddbafc1baf3dfc0d27..425f1ff46099f38ca794149788bc0e5fb470c62f 100644 (file)
@@ -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,
index dff02b142b0bce33ddfed3960266844626759322..3df8c65f6762e0bec78664500182b37a535096e6 100644 (file)
@@ -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;
index 5aa35ceb5f10dc0bdc50c94df625cdb4cfc872c9..dd7dfe96a3ee93bd3f499e4a462e56e8a19eec26 100644 (file)
@@ -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, \
index 75f1e766b00173d0543f04782a20597dc25576c3..b6f6361c6046543dfc226e21411b659862c92fba 100644 (file)
@@ -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 \