summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/page.h
diff options
context:
space:
mode:
authorKenneth Lee <liguozhu@hisilicon.com>2021-07-28 15:15:57 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-08-13 15:31:51 -0700
commitfb31f0a499332a053477ed57312b214e42476e6d (patch)
treefced1bec338729aa13e1a1b0828909981f1c4be3 /arch/riscv/include/asm/page.h
parentfe45ffa4c505783637233609b677446020738b87 (diff)
riscv: fix the global name pfn_base confliction error
RISCV uses a global variable pfn_base for page/pfn translation. But this is a common name and will be used elsewhere. In those cases, the page-pfn macros which refer to this name will be referred to the local/input variable instead. (such as in vfio_pin_pages_remote). This make everything wrong. This patch changes the name from pfn_base to riscv_pfn_base to fix this problem. Signed-off-by: Kenneth Lee <liguozhu@hisilicon.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm/page.h')
-rw-r--r--arch/riscv/include/asm/page.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
index 4da92cf28a19..d34327be7574 100644
--- a/arch/riscv/include/asm/page.h
+++ b/arch/riscv/include/asm/page.h
@@ -79,8 +79,8 @@ typedef struct page *pgtable_t;
#endif
#ifdef CONFIG_MMU
-extern unsigned long pfn_base;
-#define ARCH_PFN_OFFSET (pfn_base)
+extern unsigned long riscv_pfn_base;
+#define ARCH_PFN_OFFSET (riscv_pfn_base)
#else
#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
#endif /* CONFIG_MMU */