Hi,
On 09/08/2023 11:50, Jan Beulich wrote:
Much like we have PAGE_OFFSET() there already, there's also no reason
for each arch to define identical PAGE_ALIGN().
Signed-off-by: Jan Beulich <jbeul...@suse.com>
--- a/xen/arch/arm/include/asm/page.h
+++ b/xen/arch/arm/include/asm/page.h
@@ -303,8 +303,6 @@ static inline int gva_to_ipa(vaddr_t va,
#endif /* __ASSEMBLY__ */
-#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
-
#endif /* __ARM_PAGE_H__ */
/*
--- a/xen/arch/x86/include/asm/page.h
+++ b/xen/arch/x86/include/asm/page.h
@@ -404,8 +404,6 @@ static inline void invalidate_icache(voi
#endif /* !__ASSEMBLY__ */
-#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
-
#endif /* __X86_PAGE_H__ */
/*
--- a/xen/include/xen/page-size.h
+++ b/xen/include/xen/page-size.h
@@ -10,7 +10,8 @@
*/
#define PAGE_SIZE (_AC(1,L) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
-#define PAGE_OFFSET(ptr) ((unsigned long)(ptr) & ~PAGE_MASK)
+#define PAGE_OFFSET(ptr) ((unsigned long)(ptr) & ~PAGE_MASK)
Please mention in the commit message that you took the opportunity to
re-indent PAGE_OFFSET(). With that:
Reviewed-by: Julien Grall <jgr...@amazon.com>
Cheers,
--
Julien Grall