[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208311846.og5KyJFd-lkp@intel.com>
Date: Wed, 31 Aug 2022 18:10:10 +0800
From: kernel test robot <lkp@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [peterz-queue:perf/wip.rewrite 1/8] kernel/events/core.c:4809:31:
sparse: sparse: symbol 'find_get_pmu_context' was not declared. Should it be
static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/wip.rewrite
head: 1a76bb2b00e68728753191bdc81ce890db4dd783
commit: 34b71f229ea6723f8ad70c1a9777f838873b78d0 [1/8] perf: Rewrite core context handling
config: mips-randconfig-s031-20220830
compiler: mipsel-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=34b71f229ea6723f8ad70c1a9777f838873b78d0
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/wip.rewrite
git checkout 34b71f229ea6723f8ad70c1a9777f838873b78d0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash kernel/events/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
kernel/events/core.c:1377:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1377:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1377:15: sparse: struct perf_event_context *
kernel/events/core.c:1390:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1390:28: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1390:28: sparse: struct perf_event_context *
kernel/events/core.c:3453:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3453:20: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3453:20: sparse: struct perf_event_context *
kernel/events/core.c:3457:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3457:18: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3457:18: sparse: struct perf_event_context *
kernel/events/core.c:3458:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3458:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3458:23: sparse: struct perf_event_context *
kernel/events/core.c:3495:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3495:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3495:25: sparse: struct perf_event_context *
kernel/events/core.c:3496:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3496:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3496:25: sparse: struct perf_event_context *
kernel/events/core.c:3913:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3913:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3913:15: sparse: struct perf_event_context *
kernel/events/core.c:4307:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:4307:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:4307:15: sparse: struct perf_event_context *
kernel/events/core.c:4790:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:4790:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:4790:25: sparse: struct perf_event_context *
>> kernel/events/core.c:4809:31: sparse: sparse: symbol 'find_get_pmu_context' was not declared. Should it be static?
kernel/events/core.c:6167:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6167:9: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6167:9: sparse: struct perf_buffer *
kernel/events/core.c:5639:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got int @@
kernel/events/core.c:5883:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5883:22: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5883:22: sparse: struct perf_buffer *
kernel/events/core.c:6007:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6007:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6007:14: sparse: struct perf_buffer *
kernel/events/core.c:6040:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6040:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6040:14: sparse: struct perf_buffer *
kernel/events/core.c:6097:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6097:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6097:14: sparse: struct perf_buffer *
kernel/events/core.c:6188:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6188:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6188:14: sparse: struct perf_buffer *
kernel/events/core.c:6204:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:6204:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:6204:14: sparse: struct perf_buffer *
kernel/events/core.c:7851:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7851:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7851:15: sparse: struct perf_event_context *
kernel/events/core.c:7897:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7897:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7897:15: sparse: struct perf_event_context *
kernel/events/core.c:7936:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7936:13: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:7936:13: sparse: struct perf_buffer *
kernel/events/core.c:8040:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:8040:61: sparse: expected struct task_struct *p
kernel/events/core.c:8040:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:8042:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:8042:61: sparse: expected struct task_struct *p
kernel/events/core.c:8042:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:8741:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8741:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:8741:15: sparse: struct perf_event_context *
kernel/events/core.c:9732:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9732:9: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9732:9: sparse: struct swevent_hlist *
kernel/events/core.c:9771:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9771:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9771:17: sparse: struct swevent_hlist *
kernel/events/core.c:9952:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9952:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:9952:23: sparse: struct perf_event_context *
kernel/events/core.c:11111:1: sparse: sparse: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
kernel/events/core.c:12862:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12862:9: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12862:9: sparse: struct perf_event_context *
kernel/events/core.c:12956:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12956:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12956:15: sparse: struct perf_event_context *
kernel/events/core.c:12968:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12968:9: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12968:9: sparse: struct perf_event_context *
kernel/events/core.c:13392:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:13392:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:13392:17: sparse: struct swevent_hlist *
kernel/events/core.c:161:9: sparse: sparse: context imbalance in 'perf_ctx_lock' - wrong count at exit
kernel/events/core.c:169:17: sparse: sparse: context imbalance in 'perf_ctx_unlock' - unexpected unlock
kernel/events/core.c: note: in included file (through include/linux/rcupdate.h, include/linux/rculist.h, include/linux/dcache.h, ...):
include/linux/rcutiny.h:114:44: sparse: sparse: context imbalance in 'perf_lock_task_context' - different lock contexts for basic block
kernel/events/core.c:1424:17: sparse: sparse: context imbalance in 'perf_pin_task_context' - unexpected unlock
kernel/events/core.c:2766:9: sparse: sparse: context imbalance in '__perf_install_in_context' - wrong count at exit
kernel/events/core.c:4764:17: sparse: sparse: context imbalance in 'find_get_context' - unexpected unlock
kernel/events/core.c: note: in included file:
kernel/events/internal.h:202:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *src @@
kernel/events/core.c:9581:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9581:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9581:17: sparse: struct swevent_hlist *
kernel/events/core.c:9601:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9601:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9601:17: sparse: struct swevent_hlist *
kernel/events/core.c:9721:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9721:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9721:16: sparse: struct swevent_hlist *
kernel/events/core.c:9721:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9721:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9721:16: sparse: struct swevent_hlist *
kernel/events/core.c:9721:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9721:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9721:16: sparse: struct swevent_hlist *
vim +/find_get_pmu_context +4809 kernel/events/core.c
4808
> 4809 struct perf_event_pmu_context *
4810 find_get_pmu_context(struct pmu *pmu, struct perf_event_context *ctx,
4811 struct perf_event *event)
4812 {
4813 struct perf_event_pmu_context *new = NULL, *epc;
4814 void *task_ctx_data = NULL;
4815
4816 if (!ctx->task) {
4817 struct perf_cpu_pmu_context *cpc;
4818
4819 cpc = per_cpu_ptr(pmu->cpu_pmu_context, event->cpu);
4820 epc = &cpc->epc;
4821
4822 if (!epc->ctx) {
4823 atomic_set(&epc->refcount, 1);
4824 epc->embedded = 1;
4825 raw_spin_lock_irq(&ctx->lock);
4826 list_add(&epc->pmu_ctx_entry, &ctx->pmu_ctx_list);
4827 epc->ctx = ctx;
4828 raw_spin_unlock_irq(&ctx->lock);
4829 } else {
4830 WARN_ON_ONCE(epc->ctx != ctx);
4831 atomic_inc(&epc->refcount);
4832 }
4833
4834 return epc;
4835 }
4836
4837 new = kzalloc(sizeof(*epc), GFP_KERNEL);
4838 if (!new)
4839 return ERR_PTR(-ENOMEM);
4840
4841 if (event->attach_state & PERF_ATTACH_TASK_DATA) {
4842 task_ctx_data = alloc_task_ctx_data(pmu);;
4843 if (!task_ctx_data) {
4844 kfree(new);
4845 return ERR_PTR(-ENOMEM);
4846 }
4847 }
4848
4849 __perf_init_event_pmu_context(new, pmu);
4850
4851 raw_spin_lock_irq(&ctx->lock);
4852 list_for_each_entry(epc, &ctx->pmu_ctx_list, pmu_ctx_entry) {
4853 if (epc->pmu == pmu) {
4854 WARN_ON_ONCE(epc->ctx != ctx);
4855 atomic_inc(&epc->refcount);
4856 goto found_epc;
4857 }
4858 }
4859
4860 epc = new;
4861 new = NULL;
4862
4863 list_add(&epc->pmu_ctx_entry, &ctx->pmu_ctx_list);
4864 epc->ctx = ctx;
4865
4866 found_epc:
4867 if (task_ctx_data && !epc->task_ctx_data) {
4868 epc->task_ctx_data = task_ctx_data;
4869 task_ctx_data = NULL;
4870 ctx->nr_task_data++;
4871 }
4872 raw_spin_unlock_irq(&ctx->lock);
4873
4874 free_task_ctx_data(pmu, task_ctx_data);
4875 kfree(new);
4876
4877 return epc;
4878 }
4879
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (123404 bytes)
Powered by blists - more mailing lists