|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN v1 3/9] xen/arm: Always use 'u64' instead of 'paddr_t' for address and size in DT
Hi,This patch is actually a good example to demonstrate the extra amount of boiler plate required to use your new boiler. On 15/12/2022 19:32, Ayan Kumar Halder wrote: device_tree_get_reg(), dt_next_cell() uses u64 for address and size. Thus, the caller needs to be fixed to pass u64 values and then invoke translate_dt_address_size() to do the translation between u64 and paddr_t. Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> --- xen/arch/arm/bootfdt.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 0085c28d74..835bb5feb9 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -14,6 +14,7 @@ #include <xen/libfdt/libfdt.h> #include <xen/sort.h> #include <xsm/xsm.h> +#include <asm/platform.h> #include <asm/setup.h>static bool __init device_tree_node_matches(const void *fdt, int node, For a first 0 is a valid address. So we should not use is as initialization. If we function return a value, then this should be checked. If not, then it should be explained. In this case, it is not clear to me who is checking the conversion was successful. Overall, I think this will increase the amount of code. So before doing the modification, I think we need to agree on whether this is worth it to check the device-tree values. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |