All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: mm: remove the BUG_ON check of mapping the last 4K bytes of memory
@ 2022-01-25 15:55 Jisheng Zhang
  2022-01-25 16:10 ` Alexandre Ghiti
  0 siblings, 1 reply; 4+ messages in thread
From: Jisheng Zhang @ 2022-01-25 15:55 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: linux-riscv, linux-kernel, Alexandre Ghiti

remove the BUG_ON check of mapping the last 4K bytes of the addressable
memory since "this is true for every kernel actually" as pointed out
by Alexandre.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Alexandre Ghiti <alex@ghiti.fr>
---
 arch/riscv/mm/init.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index cf4d018b7d66..8347d0fda8cd 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -811,14 +811,6 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
 	BUG_ON((PAGE_OFFSET % PGDIR_SIZE) != 0);
 	BUG_ON((kernel_map.phys_addr % PMD_SIZE) != 0);
 
-#ifdef CONFIG_64BIT
-	/*
-	 * The last 4K bytes of the addressable memory can not be mapped because
-	 * of IS_ERR_VALUE macro.
-	 */
-	BUG_ON((kernel_map.virt_addr + kernel_map.size) > ADDRESS_SPACE_END - SZ_4K);
-#endif
-
 	pt_ops_set_early();
 
 	/* Setup early PGD for fixmap */
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-18 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-25 15:55 [PATCH] riscv: mm: remove the BUG_ON check of mapping the last 4K bytes of memory Jisheng Zhang
2022-01-25 16:10 ` Alexandre Ghiti
2022-02-14 23:41   ` Palmer Dabbelt
2022-02-18 14:00     ` Alexandre Ghiti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.