[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] smp: move cpu_is_offline() definition
commit cad6f9a4c12dd4d5cdb2620e3fe24727ee81c7ce Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Dec 14 10:56:07 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Dec 14 10:56:07 2023 +0100 smp: move cpu_is_offline() definition It's all the same for the 3 arch-es which have it, and RISC-V would introduce a 4th instance. Put it in xen/smp.h instead, while still permitting asm/smp.h to define a custom variant if need be. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxx> Reviewed-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> Acked-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/arch/arm/include/asm/smp.h | 2 -- xen/arch/ppc/include/asm/smp.h | 2 -- xen/arch/x86/include/asm/smp.h | 1 - xen/include/xen/smp.h | 4 ++++ 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/include/asm/smp.h b/xen/arch/arm/include/asm/smp.h index bd489793fa..e99a3a3f53 100644 --- a/xen/arch/arm/include/asm/smp.h +++ b/xen/arch/arm/include/asm/smp.h @@ -12,8 +12,6 @@ extern unsigned long smp_up_cpu; DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask); -#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) - /* * Do we, for platform reasons, need to actually keep CPUs online when we * would otherwise prefer them to be off? diff --git a/xen/arch/ppc/include/asm/smp.h b/xen/arch/ppc/include/asm/smp.h index eca43f0e6c..7b1517ce18 100644 --- a/xen/arch/ppc/include/asm/smp.h +++ b/xen/arch/ppc/include/asm/smp.h @@ -7,8 +7,6 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask); -#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) - /* * Do we, for platform reasons, need to actually keep CPUs online when we * would otherwise prefer them to be off? diff --git a/xen/arch/x86/include/asm/smp.h b/xen/arch/x86/include/asm/smp.h index 761edfcd34..c8c7960134 100644 --- a/xen/arch/x86/include/asm/smp.h +++ b/xen/arch/x86/include/asm/smp.h @@ -43,7 +43,6 @@ extern u32 x86_cpu_to_apicid[]; #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] -#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) 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); diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h index 0a9219173f..2ca9ff1bfc 100644 --- a/xen/include/xen/smp.h +++ b/xen/include/xen/smp.h @@ -3,6 +3,10 @@ #include <asm/smp.h> +#ifndef cpu_is_offline +#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) +#endif + /* * stops all CPUs but the current one: */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |