]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
arch: drop get_processor_id()
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 10:26:29 +0000 (11:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Nov 2023 10:26:29 +0000 (11:26 +0100)
smp_processor_id() is what we commonly use; there's no need for it to
have an alias.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> # arm
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/arm/include/asm/current.h
xen/arch/arm/include/asm/smp.h
xen/arch/arm/smpboot.c
xen/arch/x86/include/asm/current.h
xen/arch/x86/include/asm/smp.h
xen/arch/x86/mm/mm-locks.h

index 6973eeb1d13ffa7f73868a7ed4b8b3382ed1b2f9..51d1c8efa83db444eaab718aedd3b20aa0777a00 100644 (file)
@@ -53,7 +53,7 @@ static inline struct cpu_info *get_cpu_info(void)
 
 DECLARE_PER_CPU(unsigned int, cpu_id);
 
-#define get_processor_id()     this_cpu(cpu_id)
+#define smp_processor_id()     this_cpu(cpu_id)
 #define set_processor_id(id)                            \
 do {                                                    \
     WRITE_SYSREG(__per_cpu_offset[(id)], TPIDR_EL2);    \
index 4fabdf5310d82827cfc6706c3ecf347db237bba5..22e12f38db6bc3b8eb90f81694f7d53818cfd6ae 100644 (file)
@@ -11,8 +11,6 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);
 
 #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
 
-#define smp_processor_id() get_processor_id()
-
 /*
  * Do we, for platform reasons, need to actually keep CPUs online when we
  * would otherwise prefer them to be off?
index ec76de3cac1214f19daa4d2b34d8c67a5e47a19c..5533aed455e71f1cea9d149f03e7ec86ff92b4b3 100644 (file)
@@ -401,7 +401,7 @@ void start_secondary(void)
 /* Shut down the current CPU */
 void __cpu_disable(void)
 {
-    unsigned int cpu = get_processor_id();
+    unsigned int cpu = smp_processor_id();
 
     local_irq_disable();
     gic_disable_cpu();
index da5e152a10cc8c4e731efe9c8874ff59e3a2a952..35cca5cbe4484c2d296e2ac3b01e46976ab75ed9 100644 (file)
@@ -99,7 +99,7 @@ static inline struct cpu_info *get_cpu_info(void)
 #define set_current(vcpu)     (get_cpu_info()->current_vcpu = (vcpu))
 #define current               (get_current())
 
-#define get_processor_id()    (get_cpu_info()->processor_id)
+#define smp_processor_id()    (get_cpu_info()->processor_id)
 #define guest_cpu_user_regs() (&get_cpu_info()->guest_cpu_user_regs)
 
 /*
index 41a3b6a0dadfefd6b508f35995ec80df829406bc..c0b5d7cdd8dd4947b71486285f7cb5e759628b57 100644 (file)
@@ -48,13 +48,6 @@ extern void cpu_exit_clear(unsigned int cpu);
 extern void cpu_uninit(unsigned int cpu);
 int cpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm);
 
-/*
- * This function is needed by all SMP systems. It must _always_ be valid
- * from the initial startup. We map APIC_BASE very early in page_setup(),
- * so this is correct in the x86 case.
- */
-#define smp_processor_id() get_processor_id()
-
 void __stop_this_cpu(void);
 
 long cf_check cpu_up_helper(void *data);
index 5a3f96fbaaddb064b93010cbfaa7f7c678b6fce7..00b1bc402d6dbbd15168c349418158b9b47e82ab 100644 (file)
@@ -122,7 +122,7 @@ static inline void mm_rwlock_init(mm_rwlock_t *l)
 
 static inline int mm_write_locked_by_me(mm_rwlock_t *l)
 {
-    return (l->locker == get_processor_id());
+    return (l->locker == smp_processor_id());
 }
 
 static inline void _mm_write_lock(const struct domain *d, mm_rwlock_t *l,
@@ -132,7 +132,7 @@ static inline void _mm_write_lock(const struct domain *d, mm_rwlock_t *l,
     {
         _check_lock_level(d, level);
         percpu_write_lock(p2m_percpu_rwlock, &l->lock);
-        l->locker = get_processor_id();
+        l->locker = smp_processor_id();
         l->locker_function = func;
         l->unlock_level = _get_lock_level();
         _set_lock_level(_lock_level(d, level));