From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static?
Date: Sun, 27 Jun 2021 22:28:26 +0800 [thread overview]
Message-ID: <202106272217.smfprcHM-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5441 bytes --]
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 625acffd7ae2c52898d249e6c5c39f348db0d8df
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date: 3 months ago
config: csky-randconfig-s032-20210627 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static?
>> arch/csky/kernel/perf_event.c:1178:34: sparse: sparse: incorrect type in argument 4 (different address spaces) @@ expected void [noderef] __percpu *percpu_dev_id @@ got struct pmu_hw_events * @@
arch/csky/kernel/perf_event.c:1178:34: sparse: expected void [noderef] __percpu *percpu_dev_id
arch/csky/kernel/perf_event.c:1178:34: sparse: got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1195:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __percpu * @@ got struct pmu_hw_events * @@
arch/csky/kernel/perf_event.c:1195:38: sparse: expected void [noderef] __percpu *
arch/csky/kernel/perf_event.c:1195:38: sparse: got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1293:5: sparse: sparse: symbol 'csky_pmu_device_probe' was not declared. Should it be static?
vim +/csky_pmu_event_set_period +878 arch/csky/kernel/perf_event.c
f50fd2d8524c15 Guo Ren 2019-01-02 877
f622fbf205966a Mao Han 2019-06-04 @878 int csky_pmu_event_set_period(struct perf_event *event)
f622fbf205966a Mao Han 2019-06-04 879 {
f622fbf205966a Mao Han 2019-06-04 880 struct hw_perf_event *hwc = &event->hw;
f622fbf205966a Mao Han 2019-06-04 881 s64 left = local64_read(&hwc->period_left);
f622fbf205966a Mao Han 2019-06-04 882 s64 period = hwc->sample_period;
f622fbf205966a Mao Han 2019-06-04 883 int ret = 0;
f622fbf205966a Mao Han 2019-06-04 884
f622fbf205966a Mao Han 2019-06-04 885 if (unlikely(left <= -period)) {
f622fbf205966a Mao Han 2019-06-04 886 left = period;
f622fbf205966a Mao Han 2019-06-04 887 local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04 888 hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04 889 ret = 1;
f622fbf205966a Mao Han 2019-06-04 890 }
f622fbf205966a Mao Han 2019-06-04 891
f622fbf205966a Mao Han 2019-06-04 892 if (unlikely(left <= 0)) {
f622fbf205966a Mao Han 2019-06-04 893 left += period;
f622fbf205966a Mao Han 2019-06-04 894 local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04 895 hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04 896 ret = 1;
f622fbf205966a Mao Han 2019-06-04 897 }
f622fbf205966a Mao Han 2019-06-04 898
f622fbf205966a Mao Han 2019-06-04 899 if (left > (s64)csky_pmu.max_period)
f622fbf205966a Mao Han 2019-06-04 900 left = csky_pmu.max_period;
f622fbf205966a Mao Han 2019-06-04 901
f622fbf205966a Mao Han 2019-06-04 902 /*
f622fbf205966a Mao Han 2019-06-04 903 * The hw event starts counting from this event offset,
f622fbf205966a Mao Han 2019-06-04 904 * mark it to be able to extract future "deltas":
f622fbf205966a Mao Han 2019-06-04 905 */
f622fbf205966a Mao Han 2019-06-04 906 local64_set(&hwc->prev_count, (u64)(-left));
f622fbf205966a Mao Han 2019-06-04 907
f622fbf205966a Mao Han 2019-06-04 908 if (hw_raw_write_mapping[hwc->idx] != NULL)
f622fbf205966a Mao Han 2019-06-04 909 hw_raw_write_mapping[hwc->idx]((u64)(-left) &
f622fbf205966a Mao Han 2019-06-04 910 csky_pmu.max_period);
f622fbf205966a Mao Han 2019-06-04 911
f622fbf205966a Mao Han 2019-06-04 912 cpwcr(HPOFSR, ~BIT(hwc->idx) & cprcr(HPOFSR));
f622fbf205966a Mao Han 2019-06-04 913
f622fbf205966a Mao Han 2019-06-04 914 perf_event_update_userpage(event);
f622fbf205966a Mao Han 2019-06-04 915
f622fbf205966a Mao Han 2019-06-04 916 return ret;
f622fbf205966a Mao Han 2019-06-04 917 }
f622fbf205966a Mao Han 2019-06-04 918
:::::: The code at line 878 was first introduced by commit
:::::: f622fbf205966a8e911f81a00db17997dd171404 csky: Add pmu interrupt support
:::::: TO: Mao Han <han_mao@c-sky.com>
:::::: CC: Guo Ren <ren_guo@c-sky.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32889 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Julian Braha <julianbraha@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static?
Date: Sun, 27 Jun 2021 22:28:26 +0800 [thread overview]
Message-ID: <202106272217.smfprcHM-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5349 bytes --]
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 625acffd7ae2c52898d249e6c5c39f348db0d8df
commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
date: 3 months ago
config: csky-randconfig-s032-20210627 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static?
>> arch/csky/kernel/perf_event.c:1178:34: sparse: sparse: incorrect type in argument 4 (different address spaces) @@ expected void [noderef] __percpu *percpu_dev_id @@ got struct pmu_hw_events * @@
arch/csky/kernel/perf_event.c:1178:34: sparse: expected void [noderef] __percpu *percpu_dev_id
arch/csky/kernel/perf_event.c:1178:34: sparse: got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1195:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __percpu * @@ got struct pmu_hw_events * @@
arch/csky/kernel/perf_event.c:1195:38: sparse: expected void [noderef] __percpu *
arch/csky/kernel/perf_event.c:1195:38: sparse: got struct pmu_hw_events *
>> arch/csky/kernel/perf_event.c:1293:5: sparse: sparse: symbol 'csky_pmu_device_probe' was not declared. Should it be static?
vim +/csky_pmu_event_set_period +878 arch/csky/kernel/perf_event.c
f50fd2d8524c15 Guo Ren 2019-01-02 877
f622fbf205966a Mao Han 2019-06-04 @878 int csky_pmu_event_set_period(struct perf_event *event)
f622fbf205966a Mao Han 2019-06-04 879 {
f622fbf205966a Mao Han 2019-06-04 880 struct hw_perf_event *hwc = &event->hw;
f622fbf205966a Mao Han 2019-06-04 881 s64 left = local64_read(&hwc->period_left);
f622fbf205966a Mao Han 2019-06-04 882 s64 period = hwc->sample_period;
f622fbf205966a Mao Han 2019-06-04 883 int ret = 0;
f622fbf205966a Mao Han 2019-06-04 884
f622fbf205966a Mao Han 2019-06-04 885 if (unlikely(left <= -period)) {
f622fbf205966a Mao Han 2019-06-04 886 left = period;
f622fbf205966a Mao Han 2019-06-04 887 local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04 888 hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04 889 ret = 1;
f622fbf205966a Mao Han 2019-06-04 890 }
f622fbf205966a Mao Han 2019-06-04 891
f622fbf205966a Mao Han 2019-06-04 892 if (unlikely(left <= 0)) {
f622fbf205966a Mao Han 2019-06-04 893 left += period;
f622fbf205966a Mao Han 2019-06-04 894 local64_set(&hwc->period_left, left);
f622fbf205966a Mao Han 2019-06-04 895 hwc->last_period = period;
f622fbf205966a Mao Han 2019-06-04 896 ret = 1;
f622fbf205966a Mao Han 2019-06-04 897 }
f622fbf205966a Mao Han 2019-06-04 898
f622fbf205966a Mao Han 2019-06-04 899 if (left > (s64)csky_pmu.max_period)
f622fbf205966a Mao Han 2019-06-04 900 left = csky_pmu.max_period;
f622fbf205966a Mao Han 2019-06-04 901
f622fbf205966a Mao Han 2019-06-04 902 /*
f622fbf205966a Mao Han 2019-06-04 903 * The hw event starts counting from this event offset,
f622fbf205966a Mao Han 2019-06-04 904 * mark it to be able to extract future "deltas":
f622fbf205966a Mao Han 2019-06-04 905 */
f622fbf205966a Mao Han 2019-06-04 906 local64_set(&hwc->prev_count, (u64)(-left));
f622fbf205966a Mao Han 2019-06-04 907
f622fbf205966a Mao Han 2019-06-04 908 if (hw_raw_write_mapping[hwc->idx] != NULL)
f622fbf205966a Mao Han 2019-06-04 909 hw_raw_write_mapping[hwc->idx]((u64)(-left) &
f622fbf205966a Mao Han 2019-06-04 910 csky_pmu.max_period);
f622fbf205966a Mao Han 2019-06-04 911
f622fbf205966a Mao Han 2019-06-04 912 cpwcr(HPOFSR, ~BIT(hwc->idx) & cprcr(HPOFSR));
f622fbf205966a Mao Han 2019-06-04 913
f622fbf205966a Mao Han 2019-06-04 914 perf_event_update_userpage(event);
f622fbf205966a Mao Han 2019-06-04 915
f622fbf205966a Mao Han 2019-06-04 916 return ret;
f622fbf205966a Mao Han 2019-06-04 917 }
f622fbf205966a Mao Han 2019-06-04 918
:::::: The code at line 878 was first introduced by commit
:::::: f622fbf205966a8e911f81a00db17997dd171404 csky: Add pmu interrupt support
:::::: TO: Mao Han <han_mao@c-sky.com>
:::::: CC: Guo Ren <ren_guo@c-sky.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32889 bytes --]
next reply other threads:[~2021-06-27 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 14:28 kernel test robot [this message]
2021-06-27 14:28 ` arch/csky/kernel/perf_event.c:878:6: sparse: sparse: symbol 'csky_pmu_event_set_period' was not declared. Should it be static? kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-07-26 1:39 kernel test robot
2021-07-26 1:39 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202106272217.smfprcHM-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.