diff mbox series

[v3,3/5] xen/ppc: add section for device information in linker script

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

Commit Message

Oleksii Kurochko Sept. 24, 2024, 4:42 p.m. UTC
Introduce a new `.dev.info` section in the PPC linker script to
handle device-specific information. This section is required by
common code (common/device.c: device_init(), device_get_class() ).
This section is aligned to `POINTER_ALIGN`, with `_sdevice` and `_edevice`
marking the start and end of the section, respectively.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>
---
Changes in V2:
 - use refactored DT_DEV_INFO macros.
 - Add Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>
---
 xen/arch/ppc/xen.lds.S | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S
index 38cd857187..fb8f7703d4 100644
--- a/xen/arch/ppc/xen.lds.S
+++ b/xen/arch/ppc/xen.lds.S
@@ -94,6 +94,11 @@  SECTIONS
         CONSTRUCTORS
     } :text
 
+    . = ALIGN(POINTER_ALIGN);         /* Devicetree based device info */
+    DECL_SECTION(.dev.info) {
+        DT_DEV_INFO
+    } :text
+
     . = ALIGN(PAGE_SIZE);             /* Init code and data */
     __init_begin = .;
     DECL_SECTION(.init.text) {