Message ID | 05eeb53403017fb40c4debf8a33f70438953d6de.1726579819.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 |
Hi Oleksii, On 9/17/24 11:15 AM, Oleksii Kurochko wrote: > 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> > --- > Changes in V2: > - reuse DT_DEV_INFO_SEC introduced earlier in this patch series with using > of DECL_SECTION. > --- > xen/arch/ppc/xen.lds.S | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S > index 38cd857187..6e5582c3e4 100644 > --- a/xen/arch/ppc/xen.lds.S > +++ b/xen/arch/ppc/xen.lds.S > @@ -94,6 +94,9 @@ SECTIONS > CONSTRUCTORS > } :text > > + . = ALIGN(POINTER_ALIGN); /* Devicetree based device info */ > + DT_DEV_INFO_SEC(.dev.info, USE_DECL_SECTION) > + As I mentioned in my comment on patch 1, I think this should be done in the same style as the other xen.lds.h macros, which leaves the actual section declaration here in xen.lds.S and just uses the macro to fill in the definition. Whether or not that route is ultimately taken though, this change is fine from the PPC end of things: Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com> Thanks, Shawn
Hi Shawn, On Thu, 2024-09-19 at 16:10 -0500, Shawn Anastasio wrote: > Hi Oleksii, > > On 9/17/24 11:15 AM, Oleksii Kurochko wrote: > > 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> > > --- > > Changes in V2: > > - reuse DT_DEV_INFO_SEC introduced earlier in this patch series > > with using > > of DECL_SECTION. > > --- > > xen/arch/ppc/xen.lds.S | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S > > index 38cd857187..6e5582c3e4 100644 > > --- a/xen/arch/ppc/xen.lds.S > > +++ b/xen/arch/ppc/xen.lds.S > > @@ -94,6 +94,9 @@ SECTIONS > > CONSTRUCTORS > > } :text > > > > + . = ALIGN(POINTER_ALIGN); /* Devicetree based device > > info */ > > + DT_DEV_INFO_SEC(.dev.info, USE_DECL_SECTION) > > + > > As I mentioned in my comment on patch 1, I think this should be done > in > the same style as the other xen.lds.h macros, which leaves the actual > section declaration here in xen.lds.S and just uses the macro to fill > in > the definition. > > Whether or not that route is ultimately taken though, this change is > fine from the PPC end of things: > > Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com> As I mentioned in the reply to patch 1 I am okay with your suggested approach, I’ll wait for a bit to see if anyone has other comments and if it will be necessary I will update the current patch. Thanks. ~ Oleksii
diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S index 38cd857187..6e5582c3e4 100644 --- a/xen/arch/ppc/xen.lds.S +++ b/xen/arch/ppc/xen.lds.S @@ -94,6 +94,9 @@ SECTIONS CONSTRUCTORS } :text + . = ALIGN(POINTER_ALIGN); /* Devicetree based device info */ + DT_DEV_INFO_SEC(.dev.info, USE_DECL_SECTION) + . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; DECL_SECTION(.init.text) {
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> --- Changes in V2: - reuse DT_DEV_INFO_SEC introduced earlier in this patch series with using of DECL_SECTION. --- xen/arch/ppc/xen.lds.S | 3 +++ 1 file changed, 3 insertions(+)