[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 1/2] xen/device-tree: Move Arm's setup.c bootinfo functions to common



On Mon, 2024-08-05 at 13:58 +0200, Jan Beulich wrote:
> On 05.08.2024 13:33, Oleksii Kurochko wrote:
> > From: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> > 
> > Arm's setup.c contains a collection of functions for parsing memory
> > map
> > and other boot information from a device tree. Since these routines
> > are
> > generally useful on any architecture that supports device tree
> > booting,
> > move them into xen/common/device-tree.
> > 
> > Also, common/device_tree.c has been moved to the device-tree folder
> > with
> > the corresponding updates to common/Makefile and common/device-
> > tree/Makefile.
> > 
> > Mentioning of arm32 is changed to CONFIG_SEPARATE_XENHEAP in
> > comparison with
> > original ARM's code as now it is moved in common code.
> > 
> > Suggested-by: Julien Grall <julien@xxxxxxx>
> > Signed-off-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> > Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
> > ---
> > Changes in V8:
> >  - add the version of Xen from which bootinfo.c was derived from.
> >  - update the commit message.
> >  - add Acked-by: Julien Grall <jgrall@xxxxxxxxxx>.
> > ---
> > Changes in V7:
> >  - move obj-$(CONFIG_HAS_DEVICE_TREE) += device-tree/ to proper
> > place in common/Makefile.
> >  - rename macros __XEN_BOOTFDT_H__ to XEN_BOOTFDT_H to not violate
> > MISRA rule 21.1.
> >  - drop definition of "#define MAX_FDT_SIZE SZ_2M" in xen/bootfdt.h
> > as it is expected to
> >    be arch-specific. Back "#define MAX_FDT_SIZE SZ_2M" to
> > arm/setup.h where it was before
> >    these changes.
> >  - git mv xen/common/device_tree.c xen/common/device-tree/ and
> > update correspondingly
> >    Makefiles of common/ and common/device-tree
> >  - update the commit message
> > ---
> > Changes in V6:
> >  - update the version of the patch to v6.   
> > ---
> > Changes in V5:
> >  - After rebase the Shawn's patch v4 on top of current staging the
> > following
> >    was done:
> >    - add xen/include/xen/bootfdt.h to MAINTAINERS file.
> >    - drop message "Early device tree parsing and".
> >    - After rebase on top of the current staging the following
> > changes were done:
> >      - init bootinfo variable in <common/device-tree/bootinfo.c>
> > with BOOTINFO_INIT;
> >      - update the code of dt_unreserved_regions():
> >          CONFIG_STATIC_SHM related changes and getting of
> > reserved_mem
> >          bootinfo_get_shmem()
> >      - update the code of meminfo_overlap_check():
> >          add check ( INVALID_PADDR == bank_start ) to if case.
> >      - update the code of check_reserved_regions_overlap():
> >          CONFIG_STATIC_SHM related changes.
> >      - struct bootinfo was updated ( CONFIG_STATIC_SHM changes )
> >      - add shared_meminfo ( because of CONFIG_STATIC_SHM )
> >      - struct struct membanks was update with __struct group so
> > <xen/kernel> is
> >        neeeded to be included in bootfdt.h
> >      - move BOOTINFO_ACPI_INIT, BOOTINFO_SHMEM_INIT, BOOTINFO_INIT
> > to generic bootfdt.h
> >      - bootinfo_get_reserved_mem(), bootinfo_get_mem(),
> > bootinfo_get_acpi(),
> >        bootinfo_get_shmem() and bootinfo_get_shmem_extra() were
> > moved to xen/bootfdt.h
> >    - s/arm32/CONFIG_SEPARATE_XENHEAP/
> >    - add inclusion of <xen/macros.h> because there are function in
> > <xen/bootfdt.h> which
> >      are using container_of().
> >  ---
> > Changes in v4:
> >   - create new xen/include/bootinfo.h rather than relying on arch's
> >     asm/setup.h to provide required definitions for bootinfo.c
> >   - build bootinfo.c as .init.o
> >   - clean up and sort bootinfo.c's #includes
> >   - use CONFIG_SEPARATE_XENHEAP rather than CONFIG_ARM_32 to guard
> >     xenheap-specific behavior of populate_boot_allocator
> >   - (MAINTAINERS) include all of common/device-tree rather than
> > just
> >     bootinfo.c
> > ---
> >  MAINTAINERS                          |    2 +
> >  xen/arch/arm/include/asm/setup.h     |  185 +--
> >  xen/arch/arm/setup.c                 |  432 -----
> >  xen/common/Makefile                  |    2 +-
> >  xen/common/device-tree/Makefile      |    2 +
> >  xen/common/device-tree/bootinfo.c    |  459 ++++++
> >  xen/common/device-tree/device_tree.c | 2253
> > ++++++++++++++++++++++++++
> >  xen/common/device_tree.c             | 2253 ----------------------
> > ----
> >  xen/include/xen/bootfdt.h            |  195 +++
> >  9 files changed, 2913 insertions(+), 2870 deletions(-)
> >  create mode 100644 xen/common/device-tree/Makefile
> >  create mode 100644 xen/common/device-tree/bootinfo.c
> >  create mode 100644 xen/common/device-tree/device_tree.c
> 
> Can the moved file please be in sync with its directory, naming (i.e.
> dash
> vs underscore) wise? I also expect the diff would be quite a bit
> smaller
> with git's rename detection properly enabled.
Sure, I will sent new patch series version soon. Thanks.

~ Oleksii



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.