arch/powerpc/mm/book3s64/hash_utils.c:1119:21: error: 'default_uamor' undeclared

From: kernel test robot
Date: Sun Aug 16 2020 - 09:51:25 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4b6c093e21d36bede0fd88fd0aeb3b03647260e4
commit: 6553fb799f601497ca0703682e2aff131197dc5c powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000)
date: 6 days ago
config: powerpc-skiroot_defconfig (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6553fb799f601497ca0703682e2aff131197dc5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from arch/powerpc/include/asm/processor.h:9,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from arch/powerpc/mm/book3s64/hash_utils.c:21:
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);
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/reg.h:1394:33: note: in definition of macro 'mtspr'
1394 | : "r" ((unsigned long)(v)) \
| ^
arch/powerpc/mm/book3s64/hash_utils.c:1119:21: note: each undeclared identifier is reported only once for each function it appears in
1119 | mtspr(SPRN_UAMOR, default_uamor);
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/reg.h:1394:33: note: in definition of macro 'mtspr'
1394 | : "r" ((unsigned long)(v)) \
| ^
arch/powerpc/mm/book3s64/hash_utils.c: At top level:
arch/powerpc/mm/book3s64/hash_utils.c:1503:5: error: no previous prototype for '__hash_page' [-Werror=missing-prototypes]
1503 | int __hash_page(unsigned long trap, unsigned long ea, unsigned long dsisr,
| ^~~~~~~~~~~
arch/powerpc/mm/book3s64/hash_utils.c:1838:6: error: no previous prototype for 'low_hash_fault' [-Werror=missing-prototypes]
1838 | void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc)
| ^~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/hash_utils.c:1855:6: error: no previous prototype for 'hpte_insert_repeating' [-Werror=missing-prototypes]
1855 | long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6553fb799f601497ca0703682e2aff131197dc5c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6553fb799f601497ca0703682e2aff131197dc5c
vim +/default_uamor +1119 arch/powerpc/mm/book3s64/hash_utils.c

757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1098
757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1099 #ifdef CONFIG_SMP
756d08d1ba169e arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-04-29 1100 void hash__early_init_mmu_secondary(void)
757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1101 {
757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1102 /* Initialize hash table for that CPU */
b5dcc6096971b7 arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-04-29 1103 if (!firmware_has_feature(FW_FEATURE_LPAR)) {
cac4a185405d44 arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-11-17 1104
b5dcc6096971b7 arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-04-29 1105 if (!cpu_has_feature(CPU_FTR_ARCH_300))
799d6046d3fb55 arch/powerpc/mm/hash_utils_64.c Paul Mackerras 2005-11-10 1106 mtspr(SPRN_SDR1, _SDR1);
b5dcc6096971b7 arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-04-29 1107 else
5223134029a87d arch/powerpc/mm/book3s64/hash_utils.c Claudio Carvalho 2019-08-22 1108 set_ptcr_when_no_uv(__pa(partition_tb) |
5223134029a87d arch/powerpc/mm/book3s64/hash_utils.c Claudio Carvalho 2019-08-22 1109 (PATB_SIZE_SHIFT - 12));
b5dcc6096971b7 arch/powerpc/mm/hash_utils_64.c Aneesh Kumar K.V 2016-04-29 1110 }
376af5947c0e44 arch/powerpc/mm/hash_utils_64.c Michael Ellerman 2014-07-10 1111 /* Initialize SLB */
757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1112 slb_initialize();
d4748276ae14ce arch/powerpc/mm/hash_utils_64.c Nicholas Piggin 2017-12-24 1113
d4748276ae14ce arch/powerpc/mm/hash_utils_64.c Nicholas Piggin 2017-12-24 1114 if (cpu_has_feature(CPU_FTR_ARCH_206)
d4748276ae14ce arch/powerpc/mm/hash_utils_64.c Nicholas Piggin 2017-12-24 1115 && cpu_has_feature(CPU_FTR_HVMODE))
d4748276ae14ce arch/powerpc/mm/hash_utils_64.c Nicholas Piggin 2017-12-24 1116 tlbiel_all();
e0d8e991be641b arch/powerpc/mm/book3s64/hash_utils.c Aneesh Kumar K.V 2020-07-09 1117
6553fb799f6014 arch/powerpc/mm/book3s64/hash_utils.c Aneesh Kumar K.V 2020-08-10 1118 if (IS_ENABLED(CONFIG_PPC_MEM_KEYS) && mmu_has_feature(MMU_FTR_PKEY))
e0d8e991be641b arch/powerpc/mm/book3s64/hash_utils.c Aneesh Kumar K.V 2020-07-09 @1119 mtspr(SPRN_UAMOR, default_uamor);
799d6046d3fb55 arch/powerpc/mm/hash_utils_64.c Paul Mackerras 2005-11-10 1120 }
757c74d298dc84 arch/powerpc/mm/hash_utils_64.c Benjamin Herrenschmidt 2009-03-19 1121 #endif /* CONFIG_SMP */
799d6046d3fb55 arch/powerpc/mm/hash_utils_64.c Paul Mackerras 2005-11-10 1122

:::::: The code at line 1119 was first introduced by commit
:::::: e0d8e991be641ba0034c67785bf86f6c097869d6 powerpc/book3s64/kuap: Move UAMOR setup to key init function

:::::: TO: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip