Move percpu code to common
v2 cover Move percpu code to common
The per-CPU area management code, which is largely common across architectures, is a strong candidate for consolidation into common code.
Currently, there is only one architectural-specific aspect:
1. INVALID_PERCPU_AREA:
ARM:
#define INVALID_PERCPU_AREA (-(long)__per_cpu_start)
x86:
#define INVALID_PERCPU_AREA (0x8000000000000000UL - (unsigned long)__per_cpu_start)These changes do not affect the functional behavior for x86.
For Arm add support of CPU_RESUME_FAILED, CPU_REMOVE and freeing of percpu in the case when system_state != SYS_STATE_suspend.
---
Changes in V2:
- update the cover letter message.
- move CPU_RESUME_FAILED, CPU_REMOVE handling to common code.
- rename PERCPU_SECTION to PERCPU_BSS.
- drop ARCH_PERCPU_AREA_CHECK and ARCH_CPU_PERCPU_CALLBACK and connected functions.
- All other changes look at specific patch.
---
Oleksii Kurochko (2):
xen: introduce common macros for per-CPU sections defintion
xen: move per-cpu area management into common code
xen/arch/arm/Makefile | 1 - xen/arch/arm/include/asm/smp.h | 7 +- xen/arch/arm/percpu.c | 85 ----------------------- xen/arch/arm/xen.lds.S | 9 +-- xen/arch/ppc/include/asm/smp.h | 6 -- xen/arch/ppc/stubs.c | 1 - xen/arch/ppc/xen.lds.S | 9 +-- xen/arch/riscv/include/asm/smp.h | 6 -- xen/arch/riscv/stubs.c | 1 - xen/arch/x86/Makefile | 1 - xen/arch/x86/include/asm/Makefile | 1 - xen/arch/x86/include/asm/percpu.h | 16 +++++ xen/arch/x86/percpu.c | 112 ------------------------------ xen/arch/x86/xen.lds.S | 9 +-- xen/common/Makefile | 1 + xen/common/percpu.c | 110 +++++++++++++++++++++++++++++ xen/include/asm-generic/percpu.h | 9 ++- xen/include/xen/percpu.h | 4 ++ xen/include/xen/xen.lds.h | 10 +++ 19 files changed, 153 insertions(+), 245 deletions(-) delete mode 100644 xen/arch/arm/percpu.c create mode 100644 xen/arch/x86/include/asm/percpu.h delete mode 100644 xen/arch/x86/percpu.c create mode 100644 xen/common/percpu.c
Signature · 1 line
2.46.1
PATCH v2 1/2 xen: introduce common macros for per-CPU sections defintion
Introduce PERCPU_BSS macro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data
This change simplifies the linker script maintenance and ensures a unified approach for per-CPU sections across different architectures.
Refactor the linker scripts for Arm, PPC, and x86 architectures by using the common macro PERCPU_BSS defined in xen/xen.lds.h to handle per-CPU data sections.
No functional changes.
---
Changes in V2:
- rename PERCPU_SECTION to PERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---
xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)
xen/arch/arm/xen.lds.S +1 -8
@@ -198,14 +198,7 @@ SECTIONS __bss_start = .; *(.bss.stack_aligned) *(.bss.page_aligned) - . = ALIGN(PAGE_SIZE); - __per_cpu_start = .; - *(.bss.percpu.page_aligned) - *(.bss.percpu) - . = ALIGN(SMP_CACHE_BYTES); - *(.bss.percpu.read_mostly) - . = ALIGN(SMP_CACHE_BYTES); - __per_cpu_data_end = .; + PERCPU_BSS *(.bss .bss.*) . = ALIGN(POINTER_ALIGN); __bss_end = .;
xen/arch/ppc/xen.lds.S +1 -8
@@ -148,14 +148,7 @@ SECTIONS __bss_start = .; *(.bss.stack_aligned) *(.bss.page_aligned) - . = ALIGN(PAGE_SIZE); - __per_cpu_start = .; - *(.bss.percpu.page_aligned) - *(.bss.percpu) - . = ALIGN(SMP_CACHE_BYTES); - *(.bss.percpu.read_mostly) - . = ALIGN(SMP_CACHE_BYTES); - __per_cpu_data_end = .; + PERCPU_BSS *(.bss .bss.*) . = ALIGN(POINTER_ALIGN); __bss_end = .;
xen/arch/x86/xen.lds.S +1 -8
@@ -321,14 +321,7 @@ SECTIONS DECL_SECTION(.bss) { __bss_start = .; *(.bss.page_aligned*) - . = ALIGN(PAGE_SIZE); - __per_cpu_start = .; - *(.bss.percpu.page_aligned) - *(.bss.percpu) - . = ALIGN(SMP_CACHE_BYTES); - *(.bss.percpu.read_mostly) - . = ALIGN(SMP_CACHE_BYTES); - __per_cpu_data_end = .; + PERCPU_BSS *(.bss .bss.*) . = ALIGN(POINTER_ALIGN); __bss_end = .;
xen/include/xen/xen.lds.h +10 -0
@@ -151,6 +151,16 @@#define LOCK_PROFILE_DATA #endif +#define PERCPU_BSS \ + . = ALIGN(PAGE_SIZE); \ + __per_cpu_start = .; \ + *(.bss.percpu.page_aligned) \ + *(.bss.percpu) \ + . = ALIGN(SMP_CACHE_BYTES); \ + *(.bss.percpu.read_mostly) \ + . = ALIGN(SMP_CACHE_BYTES); \ + __per_cpu_data_end = .; \ +#ifdef CONFIG_HAS_VPCI #define VPCI_ARRAY \ . = ALIGN(POINTER_ALIGN); \
Signature · 1 line
2.46.1
PATCH v2 2/2 xen: move per-cpu area management into common code
In reply to Oleksii KurochkoCentralize per-cpu area management to reduce code duplication and enhance maintainability across architectures.
The per-cpu area management code, which is largely common among architectures, is moved to a shared implementation in xen/common/percpu.c. This change includes:
* Remove percpu.c from the X86 and Arm architectures.
* For x86, define INVALID_PERCPU_AREAS and PARK_OFFLINE_CPUS.
* Drop the declaration of __per_cpu_offset[] from stubs.c in PPC and RISC-V to facilitate the build of the common per-cpu code.
No functional changes for x86.
For Arm add support of CPU_RESUME_FAILED, CPU_REMOVE and freeing of percpu in the case when system_state != SYS_STATE_suspend.
---
Changes in V2:
- move definition of park_offline_cpus for Arm, PPC and RISC-V to <asm-generic/percpu.h>
- add to arm/asm/smp.h inclusion of <xen/percpu.h>
( at least, it is needed as it uses DECLARE_PER_CPU and also to not break the build because of moved definition of park_offline_cpus to asm-generic/percpu.h )
- remove x86/percpu.c as all the code was moved to common percpu.c.
- add define PARK_OFFLINE_CPUS to x86/asm/percpu.h as x86 defines it in own way.
- drop ARCH_PERCPU_AREA_CHECK and ARCH_CPU_PERCPU_CALLBACK as the code inside this definitions were integrated to common code.
- use park_offline_cpus ? 0 : -EBUSY;
instead of arch_percpu_area_init_status() in init_percpu_area().
- update cpu_percpu_callback() to handle CPU_UP_CANCELED, case CPU_DEAD, case CPU_RESUME_FAILED and also CPU parking and SYS_STATE_suspend.
- move declaration of percpu_init_areas() to xen/percpu.h.
--- xen/arch/arm/Makefile | 1 - xen/arch/arm/include/asm/smp.h | 7 +- xen/arch/arm/percpu.c | 85 ----------------------- xen/arch/ppc/include/asm/smp.h | 6 -- xen/arch/ppc/stubs.c | 1 - xen/arch/riscv/include/asm/smp.h | 6 -- xen/arch/riscv/stubs.c | 1 - xen/arch/x86/Makefile | 1 - xen/arch/x86/include/asm/Makefile | 1 - xen/arch/x86/include/asm/percpu.h | 16 +++++ xen/arch/x86/percpu.c | 112 ------------------------------ xen/common/Makefile | 1 + xen/common/percpu.c | 110 +++++++++++++++++++++++++++++ xen/include/asm-generic/percpu.h | 9 ++- xen/include/xen/percpu.h | 4 ++ 15 files changed, 140 insertions(+), 221 deletions(-) delete mode 100644 xen/arch/arm/percpu.c create mode 100644 xen/arch/x86/include/asm/percpu.h delete mode 100644 xen/arch/x86/percpu.c create mode 100644 xen/common/percpu.c
xen/arch/arm/Makefile +0 -1
@@ -39,7 +39,6 @@ obj-$(CONFIG_MEM_ACCESS) += mem_access.o obj-y += mm.o obj-y += monitor.o obj-y += p2m.o -obj-y += percpu.o obj-y += platform.o obj-y += platform_hypercall.o obj-y += physdev.o
xen/arch/arm/include/asm/smp.h +1 -6
@@ -2,6 +2,7 @@#define __ASM_SMP_H#ifndef __ASSEMBLY__ +#include <xen/percpu.h> #include <xen/cpumask.h> #include <asm/current.h> #endif
@@ -12,12 +13,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); -/* -* Do we, for platform reasons, need to actually keep CPUs online when we -* would otherwise prefer them to be off? -*/ -#define park_offline_cpus false -extern void noreturnstop_cpu (void );extern int arch_smp_init (void );
xen/arch/arm/percpu.c deleted +0 -85
85 lines not on this page · raw message
xen/arch/ppc/include/asm/smp.h +0 -6
@@ -7,10 +7,4 @@DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask);DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask); -/* -* Do we, for platform reasons, need to actually keep CPUs online when we -* would otherwise prefer them to be off? -*/ -#define park_offline_cpus false -#endif
xen/arch/ppc/stubs.c +0 -1
@@ -141,7 +141,6 @@ void smp_send_state_dump(unsigned int cpu)/* domain.c */ DEFINE_PER_CPU(struct vcpu *, curr_vcpu); -unsigned long __per_cpu_offset[NR_CPUS ];void context_switch (struct vcpu *prev,struct vcpu *next) {
xen/arch/riscv/include/asm/smp.h +0 -6
@@ -8,12 +8,6 @@DECLARE_PER_CPU (cpumask_var_t, cpu_sibling_mask);DECLARE_PER_CPU (cpumask_var_t, cpu_core_mask); -/* -* Do we, for platform reasons, need to actually keep CPUs online when we -* would otherwise prefer them to be off? -*/ -#define park_offline_cpus false -#endif /*
xen/arch/riscv/stubs.c +0 -1
@@ -133,7 +133,6 @@ void smp_send_state_dump(unsigned int cpu)/* domain.c */ DEFINE_PER_CPU(struct vcpu *, curr_vcpu); -unsigned long __per_cpu_offset[NR_CPUS ];void context_switch (struct vcpu *prev,struct vcpu *next) {
xen/arch/x86/Makefile +0 -1
@@ -54,7 +54,6 @@ obj-y += mpparse.o obj-y += nmi.o obj-y += numa.o obj-y += pci.o -obj-y += percpu.o obj-y += physdev.o obj-$(CONFIG_COMPAT) += x86_64/physdev.o obj-y += psr.o
xen/arch/x86/include/asm/Makefile +0 -1
@@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y += div64.h -generic-y += percpu.h
xen/arch/x86/include/asm/percpu.h new file +16 -0
@@ -0,0 +1,16 @@ +#ifndef __X86_PERCPU_H__ +#define __X86_PERCPU_H__ + +#define PARK_OFFLINE_CPUS + +#include <asm-generic/percpu.h> + +/* +* Force uses of per_cpu() with an invalid area to attempt to access the +* middle of the non-canonical address space resulting in a #GP, rather than a +* possible #PF at (NULL + a little) which has security implications in the +* context of PV guests. +*/ +#define INVALID_PERCPU_AREA (0x8000000000000000UL - (unsigned long)__per_cpu_start) + +#endif /* __X86_PERCPU_H__ */
xen/arch/x86/percpu.c deleted +0 -112
112 lines not on this page · raw message
xen/common/Makefile +1 -0
@@ -31,6 +31,7 @@ obj-y += notifier.o obj-$(CONFIG_NUMA) += numa.o obj-y += page_alloc.o obj-y += pdx.o +obj-y += percpu.o obj-$(CONFIG_PERF_COUNTERS) += perfc.o obj-bin-$(CONFIG_HAS_PMAP) += pmap.init.o obj-y += preempt.o
xen/common/percpu.c new file +110 -0
110 lines not on this page · raw message
xen/include/asm-generic/percpu.h +8 -1
@@ -10,7 +10,14 @@extern char __per_cpu_start[];extern const char __per_cpu_data_end[];extern unsigned long __per_cpu_offset[NR_CPUS ]; -void percpu_init_areas (void ); + +#ifndef PARK_OFFLINE_CPUS +/* +* Do we, for platform reasons, need to actually keep CPUs online when we +* would otherwise prefer them to be off? +*/ +#define park_offline_cpus false +#endif #define per_cpu (var, cpu) \ (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
xen/include/xen/percpu.h +4 -0
@@ -33,4 +33,8 @@#define get_cpu_var (var) this_cpu(var)#define put_cpu_var (var) +#ifndef __ASSEMBLY__ +void percpu_init_areas (void ); +#endif +#endif /* __XEN_PERCPU_H__ */
Signature · 1 line
2.46.1
Re: [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion
In reply to Oleksii KurochkoQuoted 24 lines · Oleksii Kurochko
Introduce
PERCPU_BSSmacro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data
This change simplifies the linker script maintenance and ensures a unified approach for per-CPU sections across different architectures.Refactor the linker scripts for Arm, PPC, and x86 architectures by using the common macro
PERCPU_BSSdefined inxen/xen.lds.hto handle per-CPU data sections.No functional changes.
Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Julien Grall <[email protected]>Acked-by Jan Beulich <[email protected]>---
Changes in V2:
- renamePERCPU_SECTIONtoPERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---
Quoted 5 lines
xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)
Aren't you missing a hunk in riscv/xen.lds.S ?
~Andrew
Re: [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion
Quoted 28 lines · Andrew Cooper
Quoted 27 lines · Oleksii Kurochko
Introduce
PERCPU_BSSmacro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data This change simplifies the linker script maintenance and ensures a unified
approach for per-CPU sections across different architectures.Refactor the linker scripts for Arm, PPC, and x86 architectures by using
the common macroPERCPU_BSSdefined inxen/xen.lds.hto handle per- CPU
data sections.No functional changes.
Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Julien Grall <[email protected]>Acked-by Jan Beulich <[email protected]>---
Changes in V2:
- renamePERCPU_SECTIONtoPERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---
Quoted 7 lines
Quoted 5 lines
xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)Aren't you missing a hunk in
riscv/xen.lds.S?
I thought it would be better to add a hunk in riscv when percpu_init_areas() will be called in RISC-V's start_xen().
~ Oleksii
Re: [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion
Quoted 35 lines · On 25.09.2024 11:23, [email protected] wrote:
Quoted 34 lines · Andrew Cooper
Quoted 32 lines · Oleksii Kurochko
Introduce
PERCPU_BSSmacro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data This change simplifies the linker script maintenance and ensures a unified
approach for per-CPU sections across different architectures.Refactor the linker scripts for Arm, PPC, and x86 architectures by using
the common macroPERCPU_BSSdefined inxen/xen.lds.hto handle per- CPU
data sections.No functional changes.
Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Julien Grall <[email protected]>Acked-by Jan Beulich <[email protected]>---
Changes in V2:
- renamePERCPU_SECTIONtoPERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)
Quoted 3 lines
Quoted 1 line
Aren't you missing a hunk in
riscv/xen.lds.S?I thought it would be better to add a hunk in riscv when
percpu_init_areas()will be called in RISC-V'sstart_xen().
But you have the constructs you're replacing for the other architectures in RISC-V's xen.lds.S as well. They shouldn't stay around. It was actually an oversight of mine, so to retain my ack you will need to replace that too.
Jan
Re: [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion
In reply to [email protected]Quoted 29 lines · On 25/09/2024 10:23 am, [email protected] wrote:
Quoted 28 lines · Andrew Cooper
Quoted 27 lines · Oleksii Kurochko
Introduce
PERCPU_BSSmacro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data This change simplifies the linker script maintenance and ensures a unified
approach for per-CPU sections across different architectures.Refactor the linker scripts for Arm, PPC, and x86 architectures by using
the common macroPERCPU_BSSdefined inxen/xen.lds.hto handle per- CPU
data sections.No functional changes.
Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Julien Grall <[email protected]>Acked-by Jan Beulich <[email protected]>---
Changes in V2:
- renamePERCPU_SECTIONtoPERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)Aren't you missing a hunk in
riscv/xen.lds.S?I thought it would be better to add a hunk in riscv when
percpu_init_areas()will be called in RISC-V'sstart_xen().
If you didn't have the old form already, I'd agree. But right now this leaves RISC-V being the odd-architecture-out.
I can fix it on commit, to save another posting, if you're happy?
~Andrew
Re: [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion
Quoted 38 lines · Andrew Cooper
Quoted 37 lines · On 25/09/2024 10:23 am, [email protected] wrote:
Quoted 36 lines · Andrew Cooper
Quoted 35 lines · Oleksii Kurochko
Introduce
PERCPU_BSSmacro which manages:
* Alignment of the section start
* Insertion of per-CPU data sections
* Alignment and start/end markers for per-CPU data This change simplifies the linker script maintenance and ensures a
unified
approach for per-CPU sections across different architectures.Refactor the linker scripts for Arm, PPC, and x86 architectures by
using
the common macroPERCPU_BSSdefined inxen/xen.lds.hto handle per-
CPU
data sections.No functional changes.
Signed-off-by Oleksii Kurochko <[email protected]>Acked-by Julien Grall <[email protected]>Acked-by Jan Beulich <[email protected]>---
Changes in V2:
- renamePERCPU_SECTIONtoPERCPU_BSS
- update the commit message
- add Acked-by: Julien Grall <[email protected]>
- add Acked-by: Jan Beulich <[email protected]>
---xen/arch/arm/xen.lds.S | 9 +-------- xen/arch/ppc/xen.lds.S | 9 +-------- xen/arch/x86/xen.lds.S | 9 +-------- xen/include/xen/xen.lds.h | 10 ++++++++++ 4 files changed, 13 insertions(+), 24 deletions(-)
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Aren't you missing a hunk in
riscv/xen.lds.S?I thought it would be better to add a hunk in riscv when
percpu_init_areas()will be called in RISC-V'sstart_xen().If you didn't have the old form already, I'd agree. But right now this
leaves RISC-V being the odd-architecture-out.
Oh, I just missed that I had them already. I am just confused with my another patch series connected to DT device tree info section.
Quoted 2 lines
I can fix it on commit, to save another posting, if you're happy?
I would be happy with that. Thanks.
~ Oleksii
Re: [PATCH v2 2/2] xen: move per-cpu area management into common code
In reply to Oleksii Kurochkoxen/include/asm-generic/percpu.h line 11
Quoted 5 lines · Oleksii Kurochko
xen/include/asm-generic/percpu.h +0
-0@@ -10,7 +10,14 @@extern char __per_cpu_start[];extern const char __per_cpu_data_end[];
Afaics the only users of these two are in the new common/percpu.c. These decls want to mover there then, I think, to limit exposure.
xen/include/asm-generic/percpu.h line 12
Quoted 1 line
xen/include/asm-generic/percpu.h +0
-0extern unsigned long __per_cpu_offset[NR_CPUS ];
The definition for this moves to the new common/percpu.c. Hence this declaration wants to move to xen/percpu.c.
Overall with the generalization you do I'd expect asm-generic/percpu.h to go away altogether. That is, ...
xen/include/asm-generic/percpu.h line 20
Quoted 9 lines
xen/include/asm-generic/percpu.h +8
-1-void percpu_init_areas (void ); + +#ifndef PARK_OFFLINE_CPUS +/* +* Do we, for platform reasons, need to actually keep CPUs online when we +* would otherwise prefer them to be off? +*/ +#define park_offline_cpus false +#endif
... this, for example, would likely also better be put in xen/percpu.h in the new model.
Jan
Re: [PATCH v2 2/2] xen: move per-cpu area management into common code
Quoted 20 lines · Jan Beulich
xen/include/asm-generic/percpu.h line 11
Quoted 5 lines · Oleksii Kurochko
xen/include/asm-generic/percpu.h +0
-0@@ -10,7 +10,14 @@ extern char __per_cpu_start[]; extern const char __per_cpu_data_end[];Afaics the only users of these two are in the new
common/percpu.c. These
decls want to mover there then, I think, to limit exposure.xen/include/asm-generic/percpu.h line 12
Quoted 1 line
xen/include/asm-generic/percpu.h +0
-0extern unsigned long __per_cpu_offset[NR_CPUS];The definition for this moves to the new
common/percpu.c. Hence this declaration wants to move toxen/percpu.c.Overall with the generalization you do I'd expect asm-
generic/percpu.h
to go away altogether. That is, ...
Quoted 14 lines
xen/include/asm-generic/percpu.h line 20
Quoted 10 lines
xen/include/asm-generic/percpu.h +4
-1-void percpu_init_areas (void ); + +#ifndef PARK_OFFLINE_CPUS +/* +* Do we, for platform reasons, need to actually keep CPUs online when we
+ * would otherwise prefer them to be off?
+ */xen/include/asm-generic/percpu.h +2
-0+#define park_offline_cpus false +#endif ... this, for example, would likely also better be put in
xen/percpu.hin
the new model.
Agree, we could move everything to xen/percpu.h and just leave asm- generic/percpu.h empty for Arm, PPC and RISC-V usage and define asm/percpu.h only for x86.
I will stick to this approach.
Thanks.
~ Oleksii