Skip to content

Commit 526cb04

Browse files
Oleksii Kurochkoorzelmichal
authored andcommitted
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@gmail.com> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
1 parent a010efd commit 526cb04

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

xen/arch/arm/domain_build.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ int __init make_psci_node(void *fdt)
11631163
return res;
11641164
}
11651165

1166-
int __init make_cpus_node(const struct domain *d, void *fdt)
1166+
int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
11671167
{
11681168
int res;
11691169
const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
@@ -1177,6 +1177,7 @@ int __init make_cpus_node(const struct domain *d, void *fdt)
11771177
/* Keep the compiler happy with -Og */
11781178
bool clock_valid = false;
11791179
uint64_t mpidr_aff;
1180+
void *fdt = kinfo->fdt;
11801181

11811182
dt_dprintk("Create cpus node\n");
11821183

@@ -1625,7 +1626,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
16251626
if ( res )
16261627
return res;
16271628

1628-
res = make_cpus_node(d, kinfo->fdt);
1629+
res = make_cpus_node(d, kinfo);
16291630
if ( res )
16301631
return res;
16311632

xen/common/device-tree/dom0less-build.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static int __init prepare_dtb_domU(struct domain *d, struct kernel_info *kinfo)
534534
if ( ret )
535535
goto err;
536536

537-
ret = make_cpus_node(d, kinfo->fdt);
537+
ret = make_cpus_node(d, kinfo);
538538
if ( ret )
539539
goto err;
540540

xen/include/xen/fdt-domain-build.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int construct_domain(struct domain *d, struct kernel_info *kinfo);
2525
int construct_hwdom(struct kernel_info *kinfo,
2626
const struct dt_device_node *node);
2727
int make_chosen_node(const struct kernel_info *kinfo);
28-
int make_cpus_node(const struct domain *d, void *fdt);
28+
int make_cpus_node(const struct domain *d, struct kernel_info *kinfo);
2929
int make_hypervisor_node(struct domain *d, const struct kernel_info *kinfo,
3030
int addrcells, int sizecells);
3131
int make_memory_node(const struct kernel_info *kinfo, int addrcells,

0 commit comments

Comments
 (0)