]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: mm: init: try best to use IS_ENABLED(CONFIG_64BIT) instead of #ifdef
authorJisheng Zhang <jszhang@kernel.org>
Mon, 6 Dec 2021 15:03:50 +0000 (23:03 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 19 Jan 2022 17:56:31 +0000 (09:56 -0800)
commit6e8a6119b868e1dba29a61e1f9fe9cd433ca90ff
tree35f66b211c5026dd53fec5280fc57fafc6c219d2
parent494c82a9203bb71b6d5499ec6a575522f4b380e3
riscv: mm: init: try best to use IS_ENABLED(CONFIG_64BIT) instead of #ifdef

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: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c