[PATCH v4 5/6] xen/riscv: add section for device information in linker script

Oleksii Kurochko posted 6 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH v4 5/6] xen/riscv: add section for device information in linker script
Posted by Oleksii Kurochko 2 months, 3 weeks ago
Introduce a new `.dev.info` section in the RISC-V 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>
---
Changes in V4:
 - use newly refactored DT_DEV_INFO
---
Changes in V3:
 - use refactored DT_DEV_INFO macros.
---
 xen/arch/riscv/xen.lds.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 871b47a235..c1400e0613 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -1,4 +1,6 @@
 #include <xen/lib.h>
+
+#define SIMPLE_DECL_SECTION
 #include <xen/xen.lds.h>
 
 OUTPUT_ARCH(riscv)
@@ -91,6 +93,8 @@ SECTIONS
         CONSTRUCTORS
     } :text
 
+    DT_DEV_INFO(.dev.info)            /* Devicetree based device info */
+
     . = ALIGN(PAGE_SIZE);             /* Init code and data */
     __init_begin = .;
     .init.text : {
-- 
2.46.1
Re: [PATCH v4 5/6] xen/riscv: add section for device information in linker script
Posted by Jan Beulich 2 months, 3 weeks ago
On 26.09.2024 18:54, Oleksii Kurochko wrote:
> Introduce a new `.dev.info` section in the RISC-V 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: Jan Beulich <jbeulich@suse.com>