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
--
2.46.1