[PATCH v3 0/5] Move {acpi_}device_init() and device_get_class() to common code

Oleksii Kurochko posted 5 patches 3 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1727193766.git.oleksii.kurochko@gmail.com
There is a newer version of this series
xen/arch/arm/device.c     | 71 +--------------------------------
xen/arch/arm/xen.lds.S    | 10 +----
xen/arch/ppc/xen.lds.S    |  5 +++
xen/arch/riscv/xen.lds.S  |  5 +++
xen/common/Makefile       |  2 +
xen/common/device.c       | 82 +++++++++++++++++++++++++++++++++++++++
xen/include/xen/xen.lds.h | 10 +++++
7 files changed, 108 insertions(+), 77 deletions(-)
create mode 100644 xen/common/device.c
[PATCH v3 0/5] Move {acpi_}device_init() and device_get_class() to common code
Posted by Oleksii Kurochko 3 months, 1 week ago
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 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 (5):
  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    | 10 +----
 xen/arch/ppc/xen.lds.S    |  5 +++
 xen/arch/riscv/xen.lds.S  |  5 +++
 xen/common/Makefile       |  2 +
 xen/common/device.c       | 82 +++++++++++++++++++++++++++++++++++++++
 xen/include/xen/xen.lds.h | 10 +++++
 7 files changed, 108 insertions(+), 77 deletions(-)
 create mode 100644 xen/common/device.c

-- 
2.46.1