]> xenbits.xensource.com Git - xen.git/commit
xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y 4.20.0-rc3
authorMichal Orzel <michal.orzel@amd.com>
Tue, 28 Jan 2025 09:40:02 +0000 (10:40 +0100)
committerMichal Orzel <michal.orzel@amd.com>
Wed, 29 Jan 2025 07:34:43 +0000 (08:34 +0100)
commit45c65669bf34bfad9ff6de0dabae2cb201239e34
treea693a424029167e9e4c0bb4d440a43dd8645352b
parentd59699e63d239ffde4fb9364b2e8dd20b7acd1ac
xen/arm: Fix build issue when CONFIG_PHYS_ADDR_T_32=y

On Arm32, when CONFIG_PHYS_ADDR_T_32 is set, a build failure is observed:
arch/arm/platforms/vexpress.c: In function 'vexpress_smp_init':
arch/arm/platforms/vexpress.c:102:12: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'long long unsigned int' [-Werror=format=]
  102 |     printk("Set SYS_FLAGS to %"PRIpaddr" (%p)\n",

When CONFIG_PHYS_ADDR_T_32 is set, paddr_t is defined as unsigned long.
Commit 96f35de69e59 dropped __virt_to_maddr() which used paddr_t as a
return type. Without a cast, the expression type is unsigned long long
which causes the issue. Fix it.

Fixes: 96f35de69e59 ("x86+Arm: drop (rename) __virt_to_maddr() / __maddr_to_virt()")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Tested-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/include/asm/mm.h