From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Shawn Anastasio" <sanastasio@raptorengineering.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Bob Eshleman" <bobbyeshleman@gmail.com>,
"Connor Davis" <connojdavis@gmail.com>
Subject: [PATCH v4 0/6] Move {acpi_}device_init() and device_get_class() to common code
Date: Thu, 26 Sep 2024 18:54:19 +0200 [thread overview]
Message-ID: <cover.1727365854.git.oleksii.kurochko@gmail.com> (raw)
The {acpi_}device_init() and device_get_class() functions are identical across
Arm and RISC-V, and they are likely to remain the same for other architectures
like PPC.
Since there is no architecture-specific logic within these functions, they are
good candidates to be moved to the common codebase.
This patch series refactors the code by moving these functions to the common
directory, reducing code duplication and simplifying future maintenance.
---
Changes in V4:
- Introduce SIMPLE_DECL_SECTION to cover the cases when an architecture wants
to use section declaration without specifying an load address.
- Refactor macors ACPI_DEV_INFO and DT_DEV_INFO and update their defintion.
---
Changes in V3:
- drop _SECTIONS from the name of the macros ADEV_INFO and DT_DEV_INFO
- update the definion of macros ADEV_INFO and DT_DEV_INFO
- drop DEVICE_INIT config.
---
Changes in v2:
- Introduce macros for definition of ACPI and Device Tree sections.
- Introduce CONFIG_DEVICE_INIT to make common/device.o compilable only for Arm,
PPC and RISC-V.
---
Oleksii Kurochko (6):
xen: introduce SIMPLE_DECL_SECTION
xen: define ACPI and DT device info sections macros
xen/arm: use {DT,ACPI}_DEV_INFO for device info sections
xen/ppc: add section for device information in linker script
xen/riscv: add section for device information in linker script
xen/common: move device initialization code to common code
xen/arch/arm/device.c | 71 +--------------------------------
xen/arch/arm/xen.lds.S | 16 ++------
xen/arch/ppc/xen.lds.S | 2 +
xen/arch/riscv/xen.lds.S | 4 ++
xen/arch/x86/xen.lds.S | 6 ++-
xen/common/Makefile | 2 +
xen/common/device.c | 82 +++++++++++++++++++++++++++++++++++++++
xen/include/xen/xen.lds.h | 22 +++++++++++
8 files changed, 122 insertions(+), 83 deletions(-)
create mode 100644 xen/common/device.c
--
2.46.1
next reply other threads:[~2024-09-26 16:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 16:54 Oleksii Kurochko [this message]
2024-09-26 16:54 ` [PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION Oleksii Kurochko
2024-09-27 6:36 ` Jan Beulich
2024-09-27 7:58 ` Roger Pau Monné
2024-09-27 9:07 ` oleksii.kurochko
2024-09-27 9:41 ` Roger Pau Monné
2024-09-27 10:42 ` oleksii.kurochko
2024-09-27 11:59 ` Jan Beulich
2024-09-26 16:54 ` [PATCH v4 2/6] xen: define ACPI and DT device info sections macros Oleksii Kurochko
2024-09-27 6:38 ` Jan Beulich
2024-09-27 7:28 ` Jan Beulich
2024-09-27 9:24 ` oleksii.kurochko
2024-09-26 16:54 ` [PATCH v4 3/6] xen/arm: use {DT,ACPI}_DEV_INFO for device info sections Oleksii Kurochko
2024-09-27 7:16 ` Michal Orzel
2024-09-27 9:17 ` oleksii.kurochko
2024-09-26 16:54 ` [PATCH v4 4/6] xen/ppc: add section for device information in linker script Oleksii Kurochko
2024-09-26 16:54 ` [PATCH v4 5/6] xen/riscv: " Oleksii Kurochko
2024-09-27 6:39 ` Jan Beulich
2024-09-26 16:54 ` [PATCH v4 6/6] xen/common: move device initialization code to common code Oleksii Kurochko
2024-09-27 7:40 ` Michal Orzel
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.1727365854.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.