|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86: drop underscore-prefixed {maddr,virt} <=> page conversion macros
commit 16d5d2292abe7569c1cf737f04ca7308b9e489c0
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 30 08:46:49 2025 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 30 08:46:49 2025 +0200
x86: drop underscore-prefixed {maddr,virt} <=> page conversion macros
Unlike the ones converting to/from frame numbers, these don't have type-
safe overrides, and they also can't gain any within our present type
system. Unsurprisingly we also don't have any uses of the underscore-
prefixed variants.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/include/asm/mm.h | 4 ++--
xen/arch/x86/include/asm/page.h | 8 ++------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h
index 2665daa6f7..d6e80db71c 100644
--- a/xen/arch/x86/include/asm/mm.h
+++ b/xen/arch/x86/include/asm/mm.h
@@ -342,7 +342,7 @@ void init_frametable(void);
#define PDX_GROUP_SHIFT L2_PAGETABLE_SHIFT
/* Convert between Xen-heap virtual addresses and page-info structures. */
-static inline struct page_info *__virt_to_page(const void *v)
+static inline struct page_info *virt_to_page(const void *v)
{
unsigned long va = (unsigned long)v;
@@ -355,7 +355,7 @@ static inline struct page_info *__virt_to_page(const void
*v)
return frame_table + ((va - DIRECTMAP_VIRT_START) >> PAGE_SHIFT);
}
-static inline void *__page_to_virt(const struct page_info *pg)
+static inline void *page_to_virt(const struct page_info *pg)
{
ASSERT((unsigned long)pg - FRAMETABLE_VIRT_START < FRAMETABLE_SIZE);
/*
diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h
index e01af28916..24135f5968 100644
--- a/xen/arch/x86/include/asm/page.h
+++ b/xen/arch/x86/include/asm/page.h
@@ -238,8 +238,8 @@ void copy_page_sse2(void *to, const void *from);
#define page_to_mfn(pg) pdx_to_mfn((unsigned long)((pg) - frame_table))
/* Convert between machine addresses and page-info structures. */
-#define __maddr_to_page(ma) mfn_to_page(maddr_to_mfn(ma))
-#define __page_to_maddr(pg) mfn_to_maddr(page_to_mfn(pg))
+#define maddr_to_page(ma) mfn_to_page(maddr_to_mfn(ma))
+#define page_to_maddr(pg) mfn_to_maddr(page_to_mfn(pg))
/* Convert between frame number and address formats. */
#define __pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT)
@@ -256,10 +256,6 @@ void copy_page_sse2(void *to, const void *from);
#define mfn_valid(mfn) __mfn_valid(mfn_x(mfn))
#define virt_to_mfn(va) __virt_to_mfn(va)
#define mfn_to_virt(mfn) __mfn_to_virt(mfn)
-#define maddr_to_page(ma) __maddr_to_page(ma)
-#define page_to_maddr(pg) __page_to_maddr(pg)
-#define virt_to_page(va) __virt_to_page(va)
-#define page_to_virt(pg) __page_to_virt(pg)
#define pfn_to_paddr(pfn) __pfn_to_paddr(pfn)
#define paddr_to_pfn(pa) __paddr_to_pfn(pa)
#define paddr_to_pdx(pa) pfn_to_pdx(paddr_to_pfn(pa))
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |