[robh:arm64-user-perf-event-v11 4/5] arch/arm64/kernel/perf_event.c:1191:5: warning: no previous prototype for function 'armv8pmu_proc_user_access_handler'
From: kernel test robot <hidden>
Date: 2021-10-27 09:22:43
Also in:
lkml, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git arm64-user-perf-event-v11 head: a5385068d760ce1abfab2609fdb662164f12c494 commit: e4f5fa6593ffb8f5e5c167566839f7ecf97628e2 [4/5] arm64: perf: Enable PMU counter userspace access for perf event config: arm64-randconfig-r005-20211027 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72) 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 # https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?id=e4f5fa6593ffb8f5e5c167566839f7ecf97628e2 git remote add robh https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git git fetch --no-tags robh arm64-user-perf-event-v11 git checkout e4f5fa6593ffb8f5e5c167566839f7ecf97628e2 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:147:44: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:122:44: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD' #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_RD 0x4E ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:148:45: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:123:44: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR' #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_WR 0x4F ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:149:42: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:120:50: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD' #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_RD 0x4C ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:150:43: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:121:50: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR' #define ARMV8_IMPDEF_PERFCTR_L1D_TLB_REFILL_WR 0x4D ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:152:44: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(NODE)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:137:46: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD' #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_RD 0x60 ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~ arch/arm64/kernel/perf_event.c:153:45: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] [C(NODE)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm64/include/asm/perf_event.h:138:46: note: expanded from macro 'ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR' #define ARMV8_IMPDEF_PERFCTR_BUS_ACCESS_WR 0x61 ^~~~ arch/arm64/kernel/perf_event.c:140:2: note: previous initialization is here PERF_CACHE_MAP_ALL_UNSUPPORTED, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:40:31: note: expanded from macro 'PERF_CACHE_MAP_ALL_UNSUPPORTED' [0 ... C(RESULT_MAX) - 1] = CACHE_OP_UNSUPPORTED, \ ^~~~~~~~~~~~~~~~~~~~ include/linux/perf/arm_pmu.h:32:31: note: expanded from macro 'CACHE_OP_UNSUPPORTED' #define CACHE_OP_UNSUPPORTED 0xFFFF ^~~~~~
quoted
arch/arm64/kernel/perf_event.c:1191:5: warning: no previous prototype for function 'armv8pmu_proc_user_access_handler' [-Wmissing-prototypes]
int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
^
arch/arm64/kernel/perf_event.c:1191:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
^
static
57 warnings generated.
vim +/armv8pmu_proc_user_access_handler +1191 arch/arm64/kernel/perf_event.c
1190 1191 int armv8pmu_proc_user_access_handler(struct ctl_table *table, int write,
1192 void *buffer, size_t *lenp, loff_t *ppos)
1193 {
1194 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
1195 if (ret || !write || sysctl_perf_user_access)
1196 return ret;
1197
1198 on_each_cpu(armv8pmu_disable_user_access_ipi, NULL, 1);
1199 return 0;
1200 }
1201
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 41685 bytes