]> xenbits.xensource.com Git - xen.git/commit
asm-generic: move parts of Arm's asm/kernel.h to common code
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Mon, 5 May 2025 18:10:33 +0000 (20:10 +0200)
committerStefano Stabellini <stefano.stabellini@amd.com>
Mon, 5 May 2025 21:38:59 +0000 (14:38 -0700)
commit02ac109aa5d9c42a5859e0b46d44844536abd4dd
tree81913858127cafefbfdfe3740b85c51501e1e7c5
parentad03faa942b953752a1e2083430be23033a3a5c3
asm-generic: move parts of Arm's asm/kernel.h to common code

Move the following parts to common with the following changes:
- struct kernel_info:
  - Create arch_kernel_info for arch specific kernel information.
    At the moment, it contains domain_type for Arm.
  - s/phandle_gic/phandle_intc to have more generic name suitable for other
    archs.
  - Make text_offset of zimage structure available for RISCV_64.
- Wrap by `#ifdef KERNEL_INFO_SHM_MEM_INIT` definition of KERNEL_SHM_MEM_INIT
  and wrap by `#ifndef KERNEL_INFO_INIT` definition of KERNEL_INFO_INIT to have
  ability to override KERNEL_INFO_SHM_MEM_INIT for arch in case it doesn't
  want to use generic one.
- Move DOM0LESS_* macros to dom0less-build.h.
- Move all others parts of Arm's kernel.h to xen/fdt-kernel.h.

Because of the changes in struct kernel_info the correspondent parts of Arm's
code are updated.

As part of this patch the following clean up happens:
- Drop asm/setup.h from asm/kernel.h as nothing depends from it.
  Add inclusion of asm/setup.h for a code which uses device_tree_get_reg() to
  avoid compilation issues for CONFIG_STATIC_MEMORY and CONFIG_STATIC_SHM.
- Drop inclusion of asm/kernel.h everywhere except xen/fdt-kernel.h.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
13 files changed:
xen/arch/arm/acpi/domain_build.c
xen/arch/arm/dom0less-build.c
xen/arch/arm/domain_build.c
xen/arch/arm/include/asm/domain_build.h
xen/arch/arm/include/asm/kernel.h
xen/arch/arm/include/asm/static-memory.h
xen/arch/arm/include/asm/static-shmem.h
xen/arch/arm/kernel.c
xen/arch/arm/static-memory.c
xen/arch/arm/static-shmem.c
xen/common/device-tree/dt-overlay.c
xen/include/asm-generic/dom0less-build.h
xen/include/xen/fdt-kernel.h [new file with mode: 0644]