|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 2/3] xen/dom0less: pass kernel_info struct instead of fdt to make_cpus_node()
There are two reasons of this change:
1. Align prototype with what other make_*_node() are passed.
2. A follow-up RISC-V patch will call get_next_free_phandle() inside
make_cpus_node(), requiring mutable access to kinfo->free_phandle.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
xen/arch/arm/domain_build.c | 5 +++--
xen/common/device-tree/dom0less-build.c | 2 +-
xen/include/xen/fdt-domain-build.h | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 60a7cbf915a5..6740da3d324b 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1164,7 +1164,7 @@ int __init make_psci_node(void *fdt)
return res;
}
-int __init make_cpus_node(const struct domain *d, void *fdt)
+int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
{
int res;
const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
@@ -1178,6 +1178,7 @@ int __init make_cpus_node(const struct domain *d, void
*fdt)
/* Keep the compiler happy with -Og */
bool clock_valid = false;
uint64_t mpidr_aff;
+ void *fdt = kinfo;
dt_dprintk("Create cpus node\n");
@@ -1626,7 +1627,7 @@ static int __init handle_node(struct domain *d, struct
kernel_info *kinfo,
if ( res )
return res;
- res = make_cpus_node(d, kinfo->fdt);
+ res = make_cpus_node(d, kinfo);
if ( res )
return res;
diff --git a/xen/common/device-tree/dom0less-build.c
b/xen/common/device-tree/dom0less-build.c
index 9205f01f0a49..64b12d6aec62 100644
--- a/xen/common/device-tree/dom0less-build.c
+++ b/xen/common/device-tree/dom0less-build.c
@@ -535,7 +535,7 @@ static int __init prepare_dtb_domU(struct domain *d, struct
kernel_info *kinfo)
if ( ret )
goto err;
- ret = make_cpus_node(d, kinfo->fdt);
+ ret = make_cpus_node(d, kinfo);
if ( ret )
goto err;
diff --git a/xen/include/xen/fdt-domain-build.h
b/xen/include/xen/fdt-domain-build.h
index 220ae46ddbe1..2349baba3427 100644
--- a/xen/include/xen/fdt-domain-build.h
+++ b/xen/include/xen/fdt-domain-build.h
@@ -25,7 +25,7 @@ int construct_domain(struct domain *d, struct kernel_info
*kinfo);
int construct_hwdom(struct kernel_info *kinfo,
const struct dt_device_node *node);
int make_chosen_node(const struct kernel_info *kinfo);
-int make_cpus_node(const struct domain *d, void *fdt);
+int make_cpus_node(const struct domain *d, struct kernel_info *kinfo);
int make_hypervisor_node(struct domain *d, const struct kernel_info *kinfo,
int addrcells, int sizecells);
int make_memory_node(const struct kernel_info *kinfo, int addrcells,
--
2.53.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |