Skip to content

Commit

Permalink
powerpc/mm: Fix typo in IS_ENABLED()
Browse files Browse the repository at this point in the history
IS_ENABLED() matches names exactly, so the missing "CONFIG_" prefix
means this code would never be built.

Also fixes a missing newline in pr_warn().

Fixes: 970d54f ("powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/202006050717.A2F9809E@keescook
  • Loading branch information
Joe Perches authored and Michael Ellerman committed Jun 22, 2020
1 parent f0993c8 commit 55bd9ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/mm/book3s64/hash_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,11 +663,10 @@ static void __init htab_init_page_sizes(void)
* Pick a size for the linear mapping. Currently, we only
* support 16M, 1M and 4K which is the default
*/
if (IS_ENABLED(STRICT_KERNEL_RWX) &&
if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX) &&
(unsigned long)_stext % 0x1000000) {
if (mmu_psize_defs[MMU_PAGE_16M].shift)
pr_warn("Kernel not 16M aligned, "
"disabling 16M linear map alignment");
pr_warn("Kernel not 16M aligned, disabling 16M linear map alignment\n");
aligned = false;
}

Expand Down

0 comments on commit 55bd9ac

Please sign in to comment.