Skip to content

Move percpu code to common

Oleksii Kurochko xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesIn review
  2. v12 patches 11 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xen: introduce common macros for per-CPU sections defintionxen/arch/arm/xen.lds.S xen/arch/ppc/xen.lds.S xen/arch/x86/xen.lds.S +1 more+13 -245 replies
2/2xen: move per-cpu area management into common codexen/arch/arm/Makefile xen/arch/arm/include/asm/smp.h xen/arch/arm/percpu.c +12 more+140 -2212 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJulien GrallJan Beulich
1/2A-b A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] 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