Skip to content
Commit c1cb08c5 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Greg Kroah-Hartman
Browse files

riscv: mm: init: try best to use IS_ENABLED(CONFIG_64BIT) instead of #ifdef

[ Upstream commit 07aabe8f

 ]

Try our best to replace the conditional compilation using
"#ifdef CONFIG_64BIT" by a check for "IS_ENABLED(CONFIG_64BIT)", to
simplify the code and to increase compile coverage.

Now we can also remove the __maybe_unused used in max_mapped_addr
declaration.

We also remove the BUG_ON check of mapping the last 4K bytes of the
addressable memory since this is always true for every kernel actually.

Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
Reviewed-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Stable-dep-of: 994af182

 ("riscv: fix overlap of allocated page and PTR_ERR")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3a20de32
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment