]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/apic: Remove check_phys_apicid_present()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:03:52 +0000 (15:03 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 18:58:22 +0000 (11:58 -0700)
The only silly usage site is gone. Remove the gunk which was even outright
wrong in the bigsmp_32 case which returned true unconditionally.

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_common.c
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/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 35d236b46ad7a6c1fda1c76c96d0ba37c4492bb1..098d193f93fb9500f7992dc358ad2149c004f7b5 100644 (file)
@@ -305,7 +305,6 @@ struct apic {
        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     (*check_phys_apicid_present)(int phys_apicid);
        int     (*phys_pkg_id)(int cpuid_apic, int index_msb);
 
        u32     (*get_apic_id)(unsigned long x);
@@ -485,7 +484,6 @@ extern u32 apic_flat_calc_apicid(unsigned int cpu);
 extern bool default_check_apicid_used(physid_mask_t *map, int apicid);
 extern void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap);
 extern int default_cpu_present_to_apicid(int mps_cpu);
-extern int default_check_phys_apicid_present(int phys_apicid);
 
 #else /* CONFIG_X86_LOCAL_APIC */
 
index e892506552c4bcf226de48f2bba180b2e85c7b13..41528bb3a608a8435527df193e94af9355da7e3d 100644 (file)
@@ -35,11 +35,6 @@ int default_cpu_present_to_apicid(int mps_cpu)
 }
 EXPORT_SYMBOL_GPL(default_cpu_present_to_apicid);
 
-int default_check_phys_apicid_present(int phys_apicid)
-{
-       return physid_isset(phys_apicid, phys_cpu_present_map);
-}
-
 int default_apic_id_valid(u32 apicid)
 {
        return (apicid < 255);
index 35cd1cb39fae261ef128225d99d5f5a8940452b6..00482cf8255a45bb5f90edac10c26bde1d31ee99 100644 (file)
@@ -124,7 +124,6 @@ static struct apic apic_flat __ro_after_init = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = flat_phys_pkg_id,
 
        .get_apic_id                    = flat_get_apic_id,
@@ -213,7 +212,6 @@ static struct apic apic_physflat __ro_after_init = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = flat_phys_pkg_id,
 
        .get_apic_id                    = flat_get_apic_id,
index 90bf11e6827cc69d1ccb1cba04ab1a295d3b7e05..c0c3b6bf79b5d74cefa79e6d230e446295537a52 100644 (file)
@@ -107,8 +107,6 @@ struct apic apic_noop __ro_after_init = {
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = physid_set_mask_of_physid,
 
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
-
        .phys_pkg_id                    = noop_phys_pkg_id,
 
        .get_apic_id                    = noop_get_apic_id,
index b6bbd7d2c4bcec155f0c8f7d185d11bee0c2b5aa..de16fde975681cf7590181d5b694d939aa83301f 100644 (file)
@@ -257,7 +257,6 @@ static const struct apic apic_numachip1 __refconst = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = numachip_phys_pkg_id,
 
        .get_apic_id                    = numachip1_get_apic_id,
@@ -303,7 +302,6 @@ static const struct apic apic_numachip2 __refconst = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = numachip_phys_pkg_id,
 
        .get_apic_id                    = numachip2_get_apic_id,
index 9e254dc94e55158d6924ccde061d4b9ec4853a18..6f4bd71e97ec4dcd06e55133f542c5a2b30b70d4 100644 (file)
@@ -63,11 +63,6 @@ static void bigsmp_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *re
        physids_promote(0xFFL, retmap);
 }
 
-static int bigsmp_check_phys_apicid_present(int phys_apicid)
-{
-       return 1;
-}
-
 static int bigsmp_phys_pkg_id(int cpuid_apic, int index_msb)
 {
        return cpuid_apic >> index_msb;
@@ -138,7 +133,6 @@ static struct apic apic_bigsmp __ro_after_init = {
        .setup_apic_routing             = bigsmp_setup_apic_routing,
        .cpu_present_to_apicid          = bigsmp_cpu_present_to_apicid,
        .apicid_to_cpu_present          = physid_set_mask_of_physid,
-       .check_phys_apicid_present      = bigsmp_check_phys_apicid_present,
        .phys_pkg_id                    = bigsmp_phys_pkg_id,
 
        .get_apic_id                    = bigsmp_get_apic_id,
index 8d1e456a77b8ffed04a6e385d57c11c12bfa757b..baa8b141eba143dceb1cb7140f61f22b64553e57 100644 (file)
@@ -80,7 +80,6 @@ static struct apic apic_default __ro_after_init = {
        .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,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = default_phys_pkg_id,
 
        .get_apic_id                    = default_get_apic_id,
index ce1021c0191da2f8d9034394c43eea5859495f7e..931e0b9950f37a900f93f138c19740402f868c98 100644 (file)
@@ -250,7 +250,6 @@ static struct apic apic_x2apic_cluster __ro_after_init = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = x2apic_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index 07bddaa08478f8ff111fff95d18892ef27a36511..9cf32ce779be58bee6f5053c2babf1caae6b0872 100644 (file)
@@ -174,7 +174,6 @@ static struct apic apic_x2apic_phys __ro_after_init = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = x2apic_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index 0e23e416459edf4716a0b04e128bd794cf34798c..0d812fdc9b25c264b6f58d5240f202c7c5348992 100644 (file)
@@ -846,7 +846,6 @@ static struct apic apic_x2apic_uv_x __ro_after_init = {
        .setup_apic_routing             = NULL,
        .cpu_present_to_apicid          = default_cpu_present_to_apicid,
        .apicid_to_cpu_present          = NULL,
-       .check_phys_apicid_present      = default_check_phys_apicid_present,
        .phys_pkg_id                    = uv_phys_pkg_id,
 
        .get_apic_id                    = x2apic_get_apic_id,
index a5428d971da2a4459f11ea828af5cbe4b37b07eb..c8240afca77cf80f259e1bb390749cb80d4e63a8 100644 (file)
@@ -154,7 +154,6 @@ static struct apic xen_pv_apic = {
        .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 */
-       .check_phys_apicid_present      = default_check_phys_apicid_present, /* smp_sanity_check needs it */
        .phys_pkg_id                    = xen_phys_pkg_id, /* detect_ht */
 
        .get_apic_id                    = xen_get_apic_id,