All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Shawn Anastasio" <sanastasio@raptorengineering.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Bob Eshleman" <bobbyeshleman@gmail.com>,
	"Connor Davis" <connojdavis@gmail.com>
Subject: [PATCH v2 0/2] Move percpu code to common
Date: Tue, 24 Sep 2024 18:42:26 +0200	[thread overview]
Message-ID: <cover.1727185495.git.oleksii.kurochko@gmail.com> (raw)

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



             reply	other threads:[~2024-09-24 16:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 16:42 Oleksii Kurochko [this message]
2024-09-24 16:42 ` [PATCH v2 1/2] xen: introduce common macros for per-CPU sections defintion Oleksii Kurochko
2024-09-24 17:01   ` Andrew Cooper
2024-09-25  9:23     ` oleksii.kurochko
2024-09-25  9:56       ` Jan Beulich
2024-09-25  9:58       ` Andrew Cooper
2024-09-25 10:11         ` oleksii.kurochko
2024-09-24 16:42 ` [PATCH v2 2/2] xen: move per-cpu area management into common code Oleksii Kurochko
2024-09-25 15:12   ` Jan Beulich
2024-09-26  8:28     ` oleksii.kurochko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1727185495.git.oleksii.kurochko@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.