[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220420184056.7886-2-palmer@rivosinc.com>
Date: Wed, 20 Apr 2022 11:40:53 -0700
From: Palmer Dabbelt <palmer@...osinc.com>
To: linux-riscv@...ts.infradead.org, rdunlap@...radead.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, aou@...s.berkeley.edu,
anup@...infault.org, vincent.chen@...ive.com, guoren@...nel.org,
Atish Patra <atishp@...osinc.com>,
alexandre.ghiti@...onical.com, jszhang@...nel.org,
vitaly.wool@...sulko.com, gatecat@....me,
wangkefeng.wang@...wei.com, mick@....forth.gr,
panqinglin2020@...as.ac.cn, rppt@...nel.org,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux@...osinc.com, Palmer Dabbelt <palmer@...osinc.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH v2 1/4] RISC-V: Avoid empty create_*_mapping definitions
From: Palmer Dabbelt <palmer@...osinc.com>
At least one use of these, that in create_fdt_early_page_table(),
triggers warnings and should cause a real error (create_pmd_mpping()
ends up skipped on XIP_KERNEL).
Reported-by: kernel test robot <lkp@...el.com>
Fixes: 677b9eb8810e ("riscv: mm: Prepare pt_ops helper functions for sv57")
Signed-off-by: Palmer Dabbelt <palmer@...osinc.com>
---
arch/riscv/mm/init.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 9535bea8688c..7bc9a21e29fb 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -567,9 +567,9 @@ static void __init create_p4d_mapping(p4d_t *p4dp,
create_pte_mapping(__nextp, __va, __pa, __sz, __prot)
#define fixmap_pgd_next ((uintptr_t)fixmap_pte)
#define early_dtb_pgd_next ((uintptr_t)early_dtb_pmd)
-#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot)
-#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot)
-#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot)
+#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
+#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
+#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0)
#endif /* __PAGETABLE_PMD_FOLDED */
void __init create_pgd_mapping(pgd_t *pgdp,
--
2.34.1
Powered by blists - more mailing lists