All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Move {acpi_}device_init() and device_get_class() to common code
@ 2024-09-26 16:54 Oleksii Kurochko
  2024-09-26 16:54 ` [PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION Oleksii Kurochko
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Oleksii Kurochko @ 2024-09-26 16:54 UTC (permalink / raw)
  To: xen-devel
  Cc: Oleksii Kurochko, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Julien Grall, Stefano Stabellini,
	Bertrand Marquis, Michal Orzel, Volodymyr Babchuk,
	Shawn Anastasio, Alistair Francis, Bob Eshleman, Connor Davis

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



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-09-27 11:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 16:54 [PATCH v4 0/6] Move {acpi_}device_init() and device_get_class() to common code Oleksii Kurochko
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

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.