Re: [PATCH 2/2] arm64/mm: Enable color zero pages
From: kernel test robot
Date: Fri Sep 18 2020 - 08:11:34 EST
Hi Gavin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on soc/for-next arm/for-next kvmarm/next v5.9-rc5 next-20200917]
[cannot apply to xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gavin-Shan/arm64-mm-Enable-color-zero-pages/20200916-112710
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r002-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 0ff28fa6a75617d61b1aeea77463d6a1684c3c89)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
>> arch/arm64/kernel/cacheinfo.c:62:8: error: implicit declaration of function 'FIELD_PREP' [-Werror,-Wimplicit-function-declaration]
val = FIELD_PREP(CSSELR_LEVEL_MASK, 0) |
^
>> arch/arm64/kernel/cacheinfo.c:68:16: error: implicit declaration of function 'FIELD_GET' [-Werror,-Wimplicit-function-declaration]
size = (1 << FIELD_GET(CCSIDR_64_LS_MASK, val)) *
^
arch/arm64/kernel/cacheinfo.c:68:16: note: did you mean 'FIELD_PREP'?
arch/arm64/kernel/cacheinfo.c:62:8: note: 'FIELD_PREP' declared here
val = FIELD_PREP(CSSELR_LEVEL_MASK, 0) |
^
arch/arm64/kernel/cacheinfo.c:72:16: error: implicit declaration of function 'FIELD_GET' [-Werror,-Wimplicit-function-declaration]
size = (1 << FIELD_GET(CCSIDR_32_LS_MASK, val)) *
^
3 errors generated.
# https://github.com/0day-ci/linux/commit/ab02baff46e4889747f134626f5cd3566fd90582
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gavin-Shan/arm64-mm-Enable-color-zero-pages/20200916-112710
git checkout ab02baff46e4889747f134626f5cd3566fd90582
vim +/FIELD_PREP +62 arch/arm64/kernel/cacheinfo.c
45
46 int cache_total_size(void)
47 {
48 unsigned int ctype, size;
49 unsigned long val;
50 bool ccidx = false;
51
52 /* Check first level cache is supported */
53 ctype = get_cache_type(1);
54 if (ctype == CACHE_TYPE_NOCACHE)
55 return 0;
56
57 /* ARMv8.3-CCIDX is supported or not */
58 val = read_sanitised_ftr_reg(SYS_ID_MMFR4_EL1);
59 ccidx = !!(val & (UL(0xF) << ID_AA64MMFR2_CCIDX_SHIFT));
60
61 /* Retrieve the information and calculate the total size */
> 62 val = FIELD_PREP(CSSELR_LEVEL_MASK, 0) |
63 FIELD_PREP(CSSERL_IND_MASK, 0);
64 write_sysreg(val, csselr_el1);
65
66 val = read_sysreg(ccsidr_el1);
67 if (ccidx) {
> 68 size = (1 << FIELD_GET(CCSIDR_64_LS_MASK, val)) *
69 (FIELD_GET(CCSIDR_64_ASSOC_MASK, val) + 1) *
70 (FIELD_GET(CCSIDR_64_SET_MASK, val) + 1);
71 } else {
72 size = (1 << FIELD_GET(CCSIDR_32_LS_MASK, val)) *
73 (FIELD_GET(CCSIDR_32_ASSOC_MASK, val) + 1) *
74 (FIELD_GET(CCSIDR_32_SET_MASK, val) + 1);
75 }
76
77 return size;
78 }
79
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip