@@ -37,7 +37,7 @@ static void check_setup(int argc, char **argv)
phys_addr_t memsize = PHYS_END - PHYS_OFFSET;
phys_addr_t expected = ((phys_addr_t)val)*1024*1024;
- report("size = %d MB", memsize == expected,
+ report("size = %" PRIu64 " MB", memsize == expected,
memsize/1024/1024);
++nr_tests;
@@ -28,7 +28,7 @@ static void check_setup(int argc, char **argv)
phys_addr_t memsize = PHYSICAL_END - PHYSICAL_START;
phys_addr_t expected = ((phys_addr_t)val)*1024*1024;
- report("size = %d MB", memsize == expected,
+ report("size = %" PRIu64 " MB", memsize == expected,
memsize/1024/1024);
++nr_tests;
@@ -49,7 +49,7 @@ static void test_h_set_sprg0(int argc, char **argv)
rc = hcall(H_SET_SPRG0, sprg0_orig);
sprg0 = mfspr(SPR_SPRG0);
- report("sprg0 = 0x%llx",
+ report("sprg0 = 0x%" PRIx64,
rc == H_SUCCESS && sprg0 == sprg0_orig, sprg0_orig);
}
@@ -52,13 +52,13 @@ static void pf_isr(struct ex_regs *r)
switch (reason) {
case 0:
- report("unexpected #PF at %p", false, read_cr2());
+ report("unexpected #PF at 0x%lx", false, read_cr2());
break;
case KVM_PV_REASON_PAGE_NOT_PRESENT:
phys = virt_to_phys_cr3(virt);
install_pte(phys_to_virt(read_cr3()), 1, virt, phys, 0);
write_cr3(read_cr3());
- report("Got not present #PF token %x virt addr %p phys addr %p",
+ report("Got not present #PF token %lx virt addr %p phys addr 0x%" PRIx64,
true, read_cr2(), virt, phys);
while(phys) {
safe_halt(); /* enables irq */
@@ -66,7 +66,7 @@ static void pf_isr(struct ex_regs *r)
}
break;
case KVM_PV_REASON_PAGE_READY:
- report("Got present #PF token %x", true, read_cr2());
+ report("Got present #PF token %lx", true, read_cr2());
if ((uint32_t)read_cr2() == ~0)
break;
install_pte(phys_to_virt(read_cr3()), 1, virt, phys | PT_PRESENT_MASK | PT_WRITABLE_MASK, 0);
@@ -90,7 +90,7 @@ static void synic_test_prepare(void *ctx)
}
r = rdmsr(HV_X64_MSR_EOM);
if (r != 0) {
- report("Hyper-V SynIC test, EOM read 0x%llx", false, r);
+ report("Hyper-V SynIC test, EOM read 0x%" PRIx64, false, r);
goto ret;
}
@@ -23,7 +23,7 @@ void test_rdtscp(u64 aux)
wrmsr(MSR_TSC_AUX, aux);
rdtscp(&ecx);
- report("Test RDTSCP %d", ecx == aux, aux);
+ report("Test RDTSCP %" PRIu64, ecx == aux, aux);
}
int main()
Fix conversions that would trigger a warning if the format was checked by a compiler. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> --- arm/selftest.c | 2 +- powerpc/selftest.c | 2 +- powerpc/spapr_hcall.c | 2 +- x86/asyncpf.c | 6 +++--- x86/hyperv_synic.c | 2 +- x86/tsc.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)