]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pkeys: Fix build error with PPC_MEM_KEYS disabled
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Mon, 17 Aug 2020 10:33:01 +0000 (16:03 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 17 Aug 2020 13:33:00 +0000 (23:33 +1000)
commit4ec3fbc1f27a76f1844f39545a7387f78b75f425
treef459b066ab131dfe85866523e4eb31dd04acf62e
parent266e67235ca5f9f0b6f6479f7ab05757c3d789c1
powerpc/pkeys: Fix build error with PPC_MEM_KEYS disabled

IS_ENABLED() instead of #ifdef still requires variable declaration.
In this specific case, default_uamor is declared in asm/pkeys.h which
is only included if PPC_MEM_KEYS is enabled.

arch/powerpc/mm/book3s64/hash_utils.c: In function ‘hash__early_init_mmu_secondary’:
arch/powerpc/mm/book3s64/hash_utils.c:1119:21: error: ‘default_uamor’ undeclared (first use in this function)
 1119 |   mtspr(SPRN_UAMOR, default_uamor);
      |                     ^~~~~~~~~~~~~

Fixes: 81aae4a33b20 ("powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000)")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200817103301.158836-1-aneesh.kumar@linux.ibm.com
arch/powerpc/mm/book3s64/hash_utils.c