Skip to content

Move {acpi_}device_init() and device_get_class() to common code

Oleksii Kurochko xen-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 6 repliesIn review
  2. v46 patches 13 repliesSuperseded
  3. v35 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches10 repliesSuperseded
v13 patches11 repliesSuperseded

Changes in v5 from the cover letter

- Rename SIMPLE_DECL_SECTION to DECL_SECTION_WITH_LADDR and update the other patches correspondingly.
- Drop macros argument for ACPI_DEV_INFO and DT_DEV_INFO.
---

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xen: introduce DECL_SECTION_WITH_LADDRxen/arch/ppc/xen.lds.S xen/arch/x86/xen.lds.S xen/include/xen/xen.lds.h+12 -23 replies
2/6xen: define ACPI and DT device info sections macrosxen/include/xen/xen.lds.h+16 -00 replies
3/6xen/arm: use {DT,ACPI}_DEV_INFO for device info sectionsxen/arch/arm/xen.lds.S+2 -120 replies
4/6xen/ppc: add section for device information in linker scriptxen/arch/ppc/xen.lds.S+2 -00 replies
5/6xen/riscv: add section for device information in linker scriptxen/arch/riscv/xen.lds.S+2 -00 replies
6/6xen/common: move device initialization code to common codexen/arch/arm/device.c xen/common/Makefile xen/common/device.c+86 -690 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchMichal OrzelShawn AnastasioJan Beulich
1/6A-b
2/6A-b
3/6R-b
4/6A-b
5/6A-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/6] Move {acpi_}device_init() and device_get_class() to common code

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 V5:
- Rename SIMPLE_DECL_SECTION to DECL_SECTION_WITH_LADDR and update the other patches correspondingly.
- Drop macros argument for ACPI_DEV_INFO and DT_DEV_INFO.
---
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 DECL_SECTION_WITH_LADDR
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    | 14 +------
 xen/arch/ppc/xen.lds.S    |  4 ++
 xen/arch/riscv/xen.lds.S  |  2 +
 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, 120 insertions(+), 83 deletions(-)
 create mode 100644 xen/common/device.c
Signature · 1 line
2.46.1