mbox series

[v1,0/3] Move {acpi_}device_init() and device_get_class() to common code

Message ID cover.1726048521.git.oleksii.kurochko@gmail.com (mailing list archive)
Headers show
Series Move {acpi_}device_init() and device_get_class() to common code | expand

Message

Oleksii Kurochko Sept. 11, 2024, 10:04 a.m. UTC
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.

Oleksii Kurochko (3):
  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/ppc/xen.lds.S   |  7 ++++
 xen/arch/riscv/xen.lds.S |  8 ++++
 xen/common/Makefile      |  1 +
 xen/common/device.c      | 82 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 100 insertions(+), 69 deletions(-)
 create mode 100644 xen/common/device.c