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

[xen master] x86/apic: remove cpu_mask_to_apicid hook



commit 4fad52d207f3d3505cdb5e519ab4d71fcac7f067
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Mon Oct 13 15:55:17 2025 +0200
Commit:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Wed Nov 26 09:46:17 2025 +0100

    x86/apic: remove cpu_mask_to_apicid hook
    
    All implementations use the same hook.  No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/genapic/bigsmp.c      |  1 -
 xen/arch/x86/genapic/default.c     |  1 -
 xen/arch/x86/genapic/delivery.c    |  2 +-
 xen/arch/x86/genapic/x2apic.c      |  2 --
 xen/arch/x86/include/asm/genapic.h | 13 +------------
 5 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/genapic/bigsmp.c b/xen/arch/x86/genapic/bigsmp.c
index ddb3a0b5d7..066feb4a17 100644
--- a/xen/arch/x86/genapic/bigsmp.c
+++ b/xen/arch/x86/genapic/bigsmp.c
@@ -48,7 +48,6 @@ const struct genapic __initconst_cf_clobber apic_bigsmp = {
        APIC_INIT("bigsmp", probe_bigsmp),
        .init_apic_ldr = init_apic_ldr_phys,
        .vector_allocation_cpumask = vector_allocation_cpumask_phys,
-       .cpu_mask_to_apicid = cpu_mask_to_apicid_phys,
        .send_IPI_mask = send_IPI_mask_phys,
        .send_IPI_self = send_IPI_self_legacy
 };
diff --git a/xen/arch/x86/genapic/default.c b/xen/arch/x86/genapic/default.c
index 16e1875f63..ab9a292464 100644
--- a/xen/arch/x86/genapic/default.c
+++ b/xen/arch/x86/genapic/default.c
@@ -18,7 +18,6 @@ const struct genapic __initconst_cf_clobber apic_default = {
        APIC_INIT("default", NULL),
        .init_apic_ldr = init_apic_ldr_flat,
        .vector_allocation_cpumask = vector_allocation_cpumask_phys,
-       .cpu_mask_to_apicid = cpu_mask_to_apicid_phys,
        .send_IPI_mask = send_IPI_mask_flat,
        .send_IPI_self = send_IPI_self_legacy
 };
diff --git a/xen/arch/x86/genapic/delivery.c b/xen/arch/x86/genapic/delivery.c
index 15100439be..5d105e8485 100644
--- a/xen/arch/x86/genapic/delivery.c
+++ b/xen/arch/x86/genapic/delivery.c
@@ -35,7 +35,7 @@ const cpumask_t *cf_check vector_allocation_cpumask_phys(int 
cpu)
        return cpumask_of(cpu);
 }
 
-unsigned int cf_check cpu_mask_to_apicid_phys(const cpumask_t *cpumask)
+unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
        /* As we are using single CPU as destination, pick only one CPU here */
        return cpu_physical_id(cpumask_any(cpumask));
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 58157c217e..f4709ab929 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -142,7 +142,6 @@ static const struct genapic __initconst_cf_clobber 
apic_x2apic_phys = {
     APIC_INIT("x2apic_phys", NULL),
     .init_apic_ldr = init_apic_ldr_phys,
     .vector_allocation_cpumask = vector_allocation_cpumask_phys,
-    .cpu_mask_to_apicid = cpu_mask_to_apicid_phys,
     .send_IPI_mask = send_IPI_mask_x2apic_phys,
     .send_IPI_self = send_IPI_self_x2apic
 };
@@ -162,7 +161,6 @@ static const struct genapic __initconst_cf_clobber 
apic_x2apic_mixed = {
      * hence are set to use Physical destination mode handlers.
      */
     .vector_allocation_cpumask = vector_allocation_cpumask_phys,
-    .cpu_mask_to_apicid = cpu_mask_to_apicid_phys,
 
     /*
      * The following fields are exclusively used by IPIs and hence are set to
diff --git a/xen/arch/x86/include/asm/genapic.h 
b/xen/arch/x86/include/asm/genapic.h
index 04d3f1de7a..6d979279bd 100644
--- a/xen/arch/x86/include/asm/genapic.h
+++ b/xen/arch/x86/include/asm/genapic.h
@@ -25,7 +25,6 @@ struct genapic {
 
        void (*init_apic_ldr)(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);
     void (*send_IPI_self)(uint8_t vector);
 };
@@ -36,16 +35,6 @@ struct genapic {
 
 #define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map)
 #define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr)
-#define cpu_mask_to_apicid(mask) ({ \
-       /* \
-        * There are a number of places where the address of a local variable \
-        * gets passed here. The use of ?: in alternative_call<N>() triggers an 
\
-        * "address of ... is always true" warning in such a case with at least 
\
-        * gcc 7 and 8. Hence the seemingly pointless local variable here. \
-        */ \
-       const cpumask_t *m_ = (mask); \
-       alternative_call(genapic.cpu_mask_to_apicid, m_); \
-})
 #define vector_allocation_cpumask(cpu) \
        alternative_call(genapic.vector_allocation_cpumask, cpu)
 
@@ -59,7 +48,7 @@ void cf_check init_apic_ldr_flat(void);
 void cf_check send_IPI_mask_flat(const cpumask_t *cpumask, int vector);
 
 void cf_check init_apic_ldr_phys(void);
-unsigned int cf_check cpu_mask_to_apicid_phys(const cpumask_t *cpumask);
+unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask);
 void cf_check send_IPI_mask_phys(const cpumask_t *mask, int vector);
 const cpumask_t *cf_check vector_allocation_cpumask_phys(int cpu);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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