]> xenbits.xensource.com Git - xen.git/commit
xen/arm: Introduce a wrapper for dt_device_get_address() to handle paddr_t
authorAyan Kumar Halder <ayan.kumar.halder@amd.com>
Thu, 18 May 2023 14:39:12 +0000 (15:39 +0100)
committerJulien Grall <jgrall@amazon.com>
Fri, 26 May 2023 12:13:19 +0000 (13:13 +0100)
commit1407cff85f103637ddf6d370ff489ccec92e32c5
tree947cd73dfd4a0627cae741efde0eebb7bc91415f
parent3d4b02468a6bff50cf1ca8046054822f10179796
xen/arm: Introduce a wrapper for dt_device_get_address() to handle paddr_t

dt_device_get_address() can accept uint64_t only for address and size.
However, the address/size denotes physical addresses. Thus, they should
be represented by 'paddr_t'.
Consequently, we introduce a wrapper for dt_device_get_address() ie
dt_device_get_paddr() which accepts address/size as paddr_t and inturn
invokes dt_device_get_address() after converting address/size to
uint64_t.

The reason for introducing this is that in future 'paddr_t' may not
always be 64-bit. Thus, we need an explicit wrapper to do the type
conversion and return an error in case of truncation.

With this, callers can now invoke dt_device_get_paddr(). However, ns16550.c
is left unchanged as it requires some prior cleanup. For details, see
https://patchew.org/Xen/20230413173735.48387-1-ayan.kumar.halder@amd.com.
This will be addressed in a subsequent series.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
23 files changed:
xen/arch/arm/domain_build.c
xen/arch/arm/gic-v2.c
xen/arch/arm/gic-v3-its.c
xen/arch/arm/gic-v3.c
xen/arch/arm/pci/pci-host-common.c
xen/arch/arm/platforms/brcm-raspberry-pi.c
xen/arch/arm/platforms/brcm.c
xen/arch/arm/platforms/exynos5.c
xen/arch/arm/platforms/sunxi.c
xen/arch/arm/platforms/xgene-storm.c
xen/common/device_tree.c
xen/drivers/char/cadence-uart.c
xen/drivers/char/exynos4210-uart.c
xen/drivers/char/imx-lpuart.c
xen/drivers/char/meson-uart.c
xen/drivers/char/mvebu-uart.c
xen/drivers/char/omap-uart.c
xen/drivers/char/pl011.c
xen/drivers/char/scif-uart.c
xen/drivers/passthrough/arm/ipmmu-vmsa.c
xen/drivers/passthrough/arm/smmu-v3.c
xen/drivers/passthrough/arm/smmu.c
xen/include/xen/device_tree.h