aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/page.h
diff options
context:
space:
mode:
authorGravatar Max Kellermann <max.kellermann@ionos.com> 2024-03-19 15:50:34 +0800
committerGravatar Huacai Chen <chenhuacai@loongson.cn> 2024-03-19 15:50:34 +0800
commitd42ab9af605ee406ec339e5e80a1c3a708637fd6 (patch)
tree6827e0de5fec51b003ee31f84a6b366686e688ab /arch/loongarch/include/asm/page.h
parentLoongArch: Change __my_cpu_offset definition to avoid mis-optimization (diff)
downloadlinux-d42ab9af605ee406ec339e5e80a1c3a708637fd6.tar.gz
linux-d42ab9af605ee406ec339e5e80a1c3a708637fd6.tar.bz2
linux-d42ab9af605ee406ec339e5e80a1c3a708637fd6.zip
LoongArch: Move {dmw,tlb}_virt_to_page() definition to page.h
These two functions are implemented in pgtable.c, and they are needed only by the virt_to_page() macro in page.h. Having the prototypes in pgtable.h causes a circular dependency between page.h and pgtable.h, because the virt_to_page() macro in page.h needs pgtable.h for these two functions, while pgtable.h needs various definitions from page.h (e.g. pte_t and pgt_t). Let's avoid this circular dependency by moving the function prototypes to page.h. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/page.h')
-rw-r--r--arch/loongarch/include/asm/page.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/page.h b/arch/loongarch/include/asm/page.h
index 63f137ce82a4..2391fcd18908 100644
--- a/arch/loongarch/include/asm/page.h
+++ b/arch/loongarch/include/asm/page.h
@@ -83,6 +83,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x))
+struct page *dmw_virt_to_page(unsigned long kaddr);
+struct page *tlb_virt_to_page(unsigned long kaddr);
+
#define virt_to_pfn(kaddr) PFN_DOWN(PHYSADDR(kaddr))
#define virt_to_page(kaddr) \