From 22227f121bddb038a0335cf83a3c24f451e2e836 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 20 May 2014 13:39:43 +0200 Subject: dump: eliminate DumpState.page_shift ("guest's page shift") Just use TARGET_PAGE_BITS. "DumpState.page_shift" used to have type "uint32_t", while the replacement TARGET_PAGE_BITS has type "int". Since "DumpState.page_shift" was only used as bit shift counts in the paddr_to_pfn() and pfn_to_paddr() macros, this is safe. Suggested-by: Paolo Bonzini Signed-off-by: Laszlo Ersek Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- include/sysemu/dump.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index efab7a3..12af557 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -22,10 +22,10 @@ #define ARCH_PFN_OFFSET (0) -#define paddr_to_pfn(X, page_shift) \ - (((unsigned long long)(X) >> (page_shift)) - ARCH_PFN_OFFSET) -#define pfn_to_paddr(X, page_shift) \ - (((unsigned long long)(X) + ARCH_PFN_OFFSET) << (page_shift)) +#define paddr_to_pfn(X) \ + (((unsigned long long)(X) >> TARGET_PAGE_BITS) - ARCH_PFN_OFFSET) +#define pfn_to_paddr(X) \ + (((unsigned long long)(X) + ARCH_PFN_OFFSET) << TARGET_PAGE_BITS) /* * flag for compressed format -- cgit v1.1