mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: Use the correct format specifier
1. One should use 'PRIpaddr' to display 'paddr_t' variables. 2. One should use 'PRIx64' to display 'u64' in hex format. The current use of 'PRIpaddr' for printing PTE is buggy as this is not a physical address. Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
5f5d25c84c
commit
13bfdceda0
3 files changed
+9
-9
No files matched your search
@@ -1315,7 +1315,7 @@ static int __init make_memory_node(const struct domain *d,
|
||||
dt_dprintk("Create memory node\n");
|
||||
|
||||
/* ePAPR 3.4 */
|
||||
snprintf(buf, sizeof(buf), "memory@%"PRIx64, mem->bank[i].start);
|
||||
snprintf(buf, sizeof(buf), "memory@%"PRIpaddr, mem->bank[i].start);
|
||||
res = fdt_begin_node(fdt, buf);
|
||||
if ( res )
|
||||
return res;
|
||||
@@ -1383,7 +1383,7 @@ static int __init make_shm_memory_node(const struct domain *d,
|
||||
__be32 *cells;
|
||||
unsigned int len = (addrcells + sizecells) * sizeof(__be32);
|
||||
|
||||
snprintf(buf, sizeof(buf), "xen-shmem@%"PRIx64, mem->bank[i].start);
|
||||
snprintf(buf, sizeof(buf), "xen-shmem@%"PRIpaddr, mem->bank[i].start);
|
||||
res = fdt_begin_node(fdt, buf);
|
||||
if ( res )
|
||||
return res;
|
||||
@@ -2719,7 +2719,7 @@ static int __init make_gicv2_domU_node(struct kernel_info *kinfo)
|
||||
/* Placeholder for interrupt-controller@ + a 64-bit number + \0 */
|
||||
char buf[38];
|
||||
|
||||
snprintf(buf, sizeof(buf), "interrupt-controller@%"PRIx64,
|
||||
snprintf(buf, sizeof(buf), "interrupt-controller@%"PRIpaddr,
|
||||
vgic_dist_base(&d->arch.vgic));
|
||||
res = fdt_begin_node(fdt, buf);
|
||||
if ( res )
|
||||
@@ -2775,7 +2775,7 @@ static int __init make_gicv3_domU_node(struct kernel_info *kinfo)
|
||||
char buf[38];
|
||||
unsigned int i, len = 0;
|
||||
|
||||
snprintf(buf, sizeof(buf), "interrupt-controller@%"PRIx64,
|
||||
snprintf(buf, sizeof(buf), "interrupt-controller@%"PRIpaddr,
|
||||
vgic_dist_base(&d->arch.vgic));
|
||||
|
||||
res = fdt_begin_node(fdt, buf);
|
||||
@@ -2861,7 +2861,7 @@ static int __init make_vpl011_uart_node(struct kernel_info *kinfo)
|
||||
/* Placeholder for sbsa-uart@ + a 64-bit number + \0 */
|
||||
char buf[27];
|
||||
|
||||
snprintf(buf, sizeof(buf), "sbsa-uart@%"PRIx64, d->arch.vpl011.base_addr);
|
||||
snprintf(buf, sizeof(buf), "sbsa-uart@%"PRIpaddr, d->arch.vpl011.base_addr);
|
||||
res = fdt_begin_node(fdt, buf);
|
||||
if ( res )
|
||||
return res;
|
||||
|
||||
@@ -1049,7 +1049,7 @@ static void __init gicv2_dt_init(void)
|
||||
if ( csize < SZ_8K )
|
||||
{
|
||||
printk(XENLOG_WARNING "GICv2: WARNING: "
|
||||
"The GICC size is too small: %#"PRIx64" expected %#x\n",
|
||||
"The GICC size is too small: %#"PRIpaddr" expected %#x\n",
|
||||
csize, SZ_8K);
|
||||
if ( platform_has_quirk(PLATFORM_QUIRK_GIC_64K_STRIDE) )
|
||||
{
|
||||
@@ -1280,11 +1280,11 @@ static int __init gicv2_init(void)
|
||||
gicv2.map_cbase += aliased_offset;
|
||||
|
||||
printk(XENLOG_WARNING
|
||||
"GICv2: Adjusting CPU interface base to %#"PRIx64"\n",
|
||||
"GICv2: Adjusting CPU interface base to %#"PRIpaddr"\n",
|
||||
cbase + aliased_offset);
|
||||
} else if ( csize == SZ_128K )
|
||||
printk(XENLOG_WARNING
|
||||
"GICv2: GICC size=%#"PRIx64" but not aliased\n",
|
||||
"GICv2: GICC size=%#"PRIpaddr" but not aliased\n",
|
||||
csize);
|
||||
|
||||
gicv2.map_hbase = ioremap_nocache(hbase, PAGE_SIZE);
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ void dump_pt_walk(paddr_t ttbr, paddr_t addr,
|
||||
|
||||
pte = mapping[offsets[level]];
|
||||
|
||||
printk("%s[0x%03x] = 0x%"PRIpaddr"\n",
|
||||
printk("%s[0x%03x] = 0x%"PRIx64"\n",
|
||||
level_strs[level], offsets[level], pte.bits);
|
||||
|
||||
if ( level == 3 || !pte.walk.valid || !pte.walk.table )
|
||||
|
||||