]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/apic: Nuke apic::apicid_to_cpu_present()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:03:59 +0000 (15:03 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 18:58:26 +0000 (11:58 -0700)
This is only used on 32bit and is a wrapper around
physid_set_mask_of_physid() in all 32bit APIC drivers.

Remove the callback and use physid_set_mask_of_physid() in the code
directly,

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic_flat_64.c
arch/x86/kernel/apic/apic_noop.c
arch/x86/kernel/apic/apic_numachip.c
arch/x86/kernel/apic/bigsmp_32.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/probe_32.c
arch/x86/kernel/apic/x2apic_cluster.c
arch/x86/kernel/apic/x2apic_phys.c
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/xen/apic.c

index f8a36319626ae2f9be72afd41d6f8ececf7062f8..3932089cb9afa9c8dc1b6afad1b8aaa8de00a443 100644 (file)
@@ -304,7 +304,6 @@ struct apic {
        void    (*ioapic_phys_id_map)(physid_mask_t *phys_map, physid_mask_t *retmap);
        void    (*setup_apic_routing)(void);
        int     (*cpu_present_to_apicid)(int mps_cpu);
-       void    (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap);
        int     (*phys_pkg_id)(int cpuid_apic, int index_msb);
 
        u32     (*get_apic_id)(unsigned long x);
index 4ddced9005d368b4e440667c29cc79defd65ebca..803cf0123f823abfe4bc4323f9634c93bb8f1789 100644 (file)
@@ -103,7 +103,6 @@ static struct apic apic_flat __ro_after_init = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = flat_phys_pkg_id,
 
        .get_apic_id                    = flat_get_apic_id,
@@ -181,7 +180,6 @@ static struct apic apic_physflat __ro_after_init = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = flat_phys_pkg_id,
 
        .get_apic_id                    = flat_get_apic_id,
index dee9e9c73ad93b173ebf26869f0a76049056c1d3..8cab632ed273a25f90e076c8c5ac42ff832539ef 100644 (file)
@@ -96,7 +96,6 @@ struct apic apic_noop __ro_after_init = {
        .ioapic_phys_id_map             = default_ioapic_phys_id_map,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = physid_set_mask_of_physid,
 
        .phys_pkg_id                    = noop_phys_pkg_id,
 
index d96d74cc8e8ec445a25511b90c669c75409f97ed..8f57155d5f30611a0ca27f84aa6e75895809d260 100644 (file)
@@ -255,7 +255,6 @@ static const struct apic apic_numachip1 __refconst = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = numachip_phys_pkg_id,
 
        .get_apic_id                    = numachip1_get_apic_id,
@@ -299,7 +298,6 @@ static const struct apic apic_numachip2 __refconst = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = numachip_phys_pkg_id,
 
        .get_apic_id                    = numachip2_get_apic_id,
index c688af49bf987b95d8958fd2ce8895e92fe87006..099611e4ea06cf2466df674c412786b1f9ab0a65 100644 (file)
@@ -103,7 +103,6 @@ static struct apic apic_bigsmp __ro_after_init = {
        .ioapic_phys_id_map             = bigsmp_ioapic_phys_id_map,
        .setup_apic_routing             = bigsmp_setup_apic_routing,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = physid_set_mask_of_physid,
        .phys_pkg_id                    = bigsmp_phys_pkg_id,
 
        .get_apic_id                    = bigsmp_get_apic_id,
index a8b329aab672c21ed7a8a427a9045a4293a06ea7..8c470995d8b4d35389546061d04afdbebec610af 100644 (file)
@@ -1512,11 +1512,10 @@ void __init setup_ioapic_ids_from_mpc_nocheck(void)
                        ioapics[ioapic_idx].mp_config.apicid = i;
                } else {
                        physid_mask_t tmp;
-                       apic->apicid_to_cpu_present(mpc_ioapic_id(ioapic_idx),
-                                                   &tmp);
-                       apic_printk(APIC_VERBOSE, "Setting %d in the "
-                                       "phys_id_present_map\n",
-                                       mpc_ioapic_id(ioapic_idx));
+
+                       physid_set_mask_of_physid(mpc_ioapic_id(ioapic_idx), &tmp);
+                       apic_printk(APIC_VERBOSE, "Setting %d in the phys_id_present_map\n",
+                                   mpc_ioapic_id(ioapic_idx));
                        physids_or(phys_id_present_map, phys_id_present_map, tmp);
                }
 
@@ -2546,7 +2545,7 @@ static int io_apic_get_unique_id(int ioapic, int apic_id)
                apic_id = i;
        }
 
-       apic->apicid_to_cpu_present(apic_id, &tmp);
+       physid_set_mask_of_physid(apic_id, &tmp);
        physids_or(apic_id_map, apic_id_map, tmp);
 
        if (reg_00.bits.ID != apic_id) {
index 68fc220efb95f9ac76c291bc0ef532075fc0c783..c6c3a4b2fcfa3b6a6d7ce6029e2aac2f21a7997f 100644 (file)
@@ -60,7 +60,6 @@ static struct apic apic_default __ro_after_init = {
        .ioapic_phys_id_map             = default_ioapic_phys_id_map,
        .setup_apic_routing             = setup_apic_flat_routing,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = physid_set_mask_of_physid,
        .phys_pkg_id                    = default_phys_pkg_id,
 
        .get_apic_id                    = default_get_apic_id,
index 931e0b9950f37a900f93f138c19740402f868c98..a8e7a8f8f22adc3eef16083d4ba39d1aa0582984 100644 (file)
@@ -249,7 +249,6 @@ static struct apic apic_x2apic_cluster __ro_after_init = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = x2apic_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index c3c2e9814ea1927c32b0423b5ee94cf0f548627b..5ac212940901a313a5aa691793d40fd6dbcc8ea4 100644 (file)
@@ -168,7 +168,6 @@ static struct apic apic_x2apic_phys __ro_after_init = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = x2apic_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index ab17e588fd9779d779052e8b78b8ccaefdc4ee54..d6b98bc0745ac970b3b3028ff7c3001ba67a27be 100644 (file)
@@ -840,7 +840,6 @@ static struct apic apic_x2apic_uv_x __ro_after_init = {
        .ioapic_phys_id_map             = NULL,
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = NULL,
        .phys_pkg_id                    = uv_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index 1ff8f75e5c88b7f8fcd27c046f71eb9d74356684..426f4a0ac664cb1c2862586eb0528845e1755d1c 100644 (file)
@@ -152,7 +152,6 @@ static struct apic xen_pv_apic = {
        .ioapic_phys_id_map             = default_ioapic_phys_id_map, /* Used on 32-bit */
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = xen_cpu_present_to_apicid,
-       .apicid_to_cpu_present          = physid_set_mask_of_physid, /* Used on 32-bit */
        .phys_pkg_id                    = xen_phys_pkg_id, /* detect_ht */
 
        .get_apic_id                    = xen_get_apic_id,