smp: move cpu_is_offline() definition
PATCH 1/1 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.
xen/arch/arm/include/asm/smp.h +0 -2
@@ -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?
xen/arch/ppc/include/asm/smp.h +0 -2
@@ -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?
xen/arch/x86/include/asm/smp.h +0 -1
@@ -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);
xen/include/xen/smp.h +4 -0
@@ -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: */
Quoted 6 lines · Jan Beulich
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.hinstead, while still permittingasm/smp.hto define a custom variant if need be.Signed-off-by Jan Beulich <[email protected]>
Quoted 50 lines · Jan Beulich
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.hinstead, while still permittingasm/smp.hto define a custom variant if need be.Signed-off-by Jan Beulich <[email protected]>xen/arch/arm/include/asm/smp.h +0
-0@@ -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);xen/arch/arm/include/asm/smp.h +0
-2-#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?xen/arch/ppc/include/asm/smp.h +0
-0@@ -7,8 +7,6 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);xen/arch/ppc/include/asm/smp.h +0
-2-#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?xen/arch/x86/include/asm/smp.h +0
-0@@ -43,7 +43,6 @@ extern u32 x86_cpu_to_apicid[];
#definecpu_physical_id(cpu)x86_cpu_to_apicid[cpu]
-#definecpu_is_offline(cpu)unlikely(!cpu_online(cpu)) extern voidcpu_exit_clear(unsigned int cpu);
extern voidcpu_uninit(unsigned int cpu);
intcpu_add(uint32_t apic_id, uint32_t acpi_id, uint32_t pxm);xen/include/xen/smp.h +0
-0@@ -3,6 +3,10 @@
#include <asm/smp.h>xen/include/xen/smp.h +4
-0+#ifndef cpu_is_offline +#define cpu_is_offline (cpu) unlikely(!cpu_online(cpu)) +#endif +
Quoted 3 lines
/*
* stops all CPUs but the current one:
*/
Hi Jan,
Quoted 6 lines · Jan Beulich
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.hinstead, while still permittingasm/smp.hto define a custom variant if need be.Signed-off-by Jan Beulich <[email protected]>
Thanks,
Shawn
Hi Jan,
Quoted 5 lines · Jan Beulich
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.hinstead, while still permittingasm/smp.hto define a custom variant if need be.Signed-off-by Jan Beulich <[email protected]>
Cheers,
Signature · 1 line
Julien Grall