[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 2/3] xen/dom0less: pass kernel_info struct instead of fdt to make_cpus_node()
- To: "Orzel, Michal" <michal.orzel@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Tue, 21 Apr 2026 12:48:48 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 21 Apr 2026 10:48:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 4/20/26 9:29 AM, Orzel, Michal wrote:
On 16/04/2026 16:20, Oleksii Kurochko wrote:
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;
You're assigning kinfo to fdt pointer which is a bug.
Instead, you should do:
void *fdt = kinfo->fdt
Oh, right. Missed apply changes properly. As you noticed it was fixed in
the next patch.
Thanks.
~ Oleksii
|