From: kernel test robot <lkp@intel.com>
To: Lukasz Luba <lukasz.luba@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Cc: kbuild-all@lists.01.org, sudeep.holla@arm.com,
cristian.marussi@arm.com, viresh.kumar@linaro.org,
lukasz.luba@arm.com, rjw@rjwysocki.net
Subject: Re: [PATCH 2/4] scmi: perf: Extend protocol to support performance statistics
Date: Fri, 31 Jul 2020 09:50:30 +0800 [thread overview]
Message-ID: <202007310954.HV0iwbGo%lkp@intel.com> (raw)
In-Reply-To: <20200729151208.27737-3-lukasz.luba@arm.com>
[-- Attachment #1: Type: text/plain, Size: 5215 bytes --]
Hi Lukasz,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200729]
[cannot apply to pm/linux-next tip/auto-latest linux/master linus/master v5.8-rc7 v5.8-rc6 v5.8-rc5 v5.8-rc7]
[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/Lukasz-Luba/CPUFreq-statistics-retrieved-by-drivers/20200729-231539
base: 04b4571786305a76ad81757bbec78eb16a5de582
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/firmware/arm_scmi/perf.c: In function 'scmi_dvfs_stats_get':
>> drivers/firmware/arm_scmi/perf.c:905:17: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^~~~~~~
>> drivers/firmware/arm_scmi/perf.c:905:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^
drivers/firmware/arm_scmi/perf.c:909:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
909 | raw_stats[1] = vmalloc(domain_stats->size);
| ^
>> drivers/firmware/arm_scmi/perf.c:911:3: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
911 | vfree(raw_stats[0]);
| ^~~~~
cc1: some warnings being treated as errors
vim +/vmalloc +905 drivers/firmware/arm_scmi/perf.c
868
869 static int
870 scmi_dvfs_stats_get(const struct scmi_handle *handle, u32 domain_id,
871 struct scmi_perf_domain_stats *stats)
872 {
873 struct scmi_perf_domain_stats_desc *domain_stats;
874 struct scmi_perf_domain_raw_stats *raw_stats[2];
875 struct scmi_perf_info *pi = handle->perf_priv;
876 struct scmi_perf_level_raw_stats *perf;
877 int i, index, ret = -EINVAL;
878 struct perf_dom_info *dom;
879 u64 transition_count = 0;
880 struct scmi_opp *opp;
881
882 if (!stats)
883 return -EINVAL;
884
885 if (!pi->stats_virt_addr || !pi->stats_desc ||
886 !pi->stats_desc->domain_stats)
887 return -ENOENT;
888
889 if (pi->stats_desc->domain_count <= domain_id ||
890 !pi->stats_desc->domain_stats[domain_id].addr)
891 return -ENOENT;
892
893 dom = pi->dom_info + domain_id;
894 if (!dom)
895 return -EIO;
896
897 domain_stats = &pi->stats_desc->domain_stats[domain_id];
898
899 if (!domain_stats->opp_map) {
900 ret = scmi_dvfs_setup_opps_mapping(handle, domain_id);
901 if (ret)
902 return ret;
903 }
904
> 905 raw_stats[0] = vmalloc(domain_stats->size);
906 if (!raw_stats[0])
907 return -ENOMEM;
908
909 raw_stats[1] = vmalloc(domain_stats->size);
910 if (!raw_stats[1]) {
> 911 vfree(raw_stats[0]);
912 return -ENOMEM;
913 }
914
915 /*
916 * Let's try 10 times. If two consecutive reads are the same - done.
917 * This approach is aligned with SCMI v2 specification.
918 */
919 for (i = 0; i < 10; i++) {
920 memcpy_fromio(raw_stats[0], domain_stats->addr,
921 domain_stats->size);
922 memcpy_fromio(raw_stats[1], domain_stats->addr,
923 domain_stats->size);
924 if (!memcmp(raw_stats[0], raw_stats[1], domain_stats->size)) {
925 ret = 0;
926 break;
927 }
928 }
929
930 if (ret)
931 goto free_buf;
932
933 for (i = 0; i < dom->opp_count; i++) {
934 perf = &raw_stats[0]->perf_level[i];
935
936 transition_count += __le64_to_cpu(perf->usage_count);
937 stats->time_in_state[i] =
938 __le64_to_cpu(perf->total_residency_us);
939
940 /* Speed-up and initialize the frequencies only once. */
941 if (stats->freq_table[i] == 0) {
942 index = domain_stats->opp_map[i];
943 opp = &dom->opp[index];
944 stats->freq_table[i] = opp->perf * dom->mult_factor;
945 }
946 }
947
948 stats->total_trans = transition_count;
949
950 stats->last_index = __le16_to_cpu(raw_stats[0]->curr_perf_level_id);
951 stats->last_time = __le64_to_cpu(raw_stats[0]->ts_last_change_us);
952
953 free_buf:
954 vfree(raw_stats[1]);
955 vfree(raw_stats[0]);
956
957 return ret;
958 }
959
---
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: 67601 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Lukasz Luba <lukasz.luba@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Cc: kbuild-all@lists.01.org, viresh.kumar@linaro.org,
rjw@rjwysocki.net, cristian.marussi@arm.com,
sudeep.holla@arm.com, lukasz.luba@arm.com
Subject: Re: [PATCH 2/4] scmi: perf: Extend protocol to support performance statistics
Date: Fri, 31 Jul 2020 09:50:30 +0800 [thread overview]
Message-ID: <202007310954.HV0iwbGo%lkp@intel.com> (raw)
In-Reply-To: <20200729151208.27737-3-lukasz.luba@arm.com>
[-- Attachment #1: Type: text/plain, Size: 5215 bytes --]
Hi Lukasz,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200729]
[cannot apply to pm/linux-next tip/auto-latest linux/master linus/master v5.8-rc7 v5.8-rc6 v5.8-rc5 v5.8-rc7]
[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/Lukasz-Luba/CPUFreq-statistics-retrieved-by-drivers/20200729-231539
base: 04b4571786305a76ad81757bbec78eb16a5de582
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/firmware/arm_scmi/perf.c: In function 'scmi_dvfs_stats_get':
>> drivers/firmware/arm_scmi/perf.c:905:17: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^~~~~~~
>> drivers/firmware/arm_scmi/perf.c:905:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^
drivers/firmware/arm_scmi/perf.c:909:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
909 | raw_stats[1] = vmalloc(domain_stats->size);
| ^
>> drivers/firmware/arm_scmi/perf.c:911:3: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
911 | vfree(raw_stats[0]);
| ^~~~~
cc1: some warnings being treated as errors
vim +/vmalloc +905 drivers/firmware/arm_scmi/perf.c
868
869 static int
870 scmi_dvfs_stats_get(const struct scmi_handle *handle, u32 domain_id,
871 struct scmi_perf_domain_stats *stats)
872 {
873 struct scmi_perf_domain_stats_desc *domain_stats;
874 struct scmi_perf_domain_raw_stats *raw_stats[2];
875 struct scmi_perf_info *pi = handle->perf_priv;
876 struct scmi_perf_level_raw_stats *perf;
877 int i, index, ret = -EINVAL;
878 struct perf_dom_info *dom;
879 u64 transition_count = 0;
880 struct scmi_opp *opp;
881
882 if (!stats)
883 return -EINVAL;
884
885 if (!pi->stats_virt_addr || !pi->stats_desc ||
886 !pi->stats_desc->domain_stats)
887 return -ENOENT;
888
889 if (pi->stats_desc->domain_count <= domain_id ||
890 !pi->stats_desc->domain_stats[domain_id].addr)
891 return -ENOENT;
892
893 dom = pi->dom_info + domain_id;
894 if (!dom)
895 return -EIO;
896
897 domain_stats = &pi->stats_desc->domain_stats[domain_id];
898
899 if (!domain_stats->opp_map) {
900 ret = scmi_dvfs_setup_opps_mapping(handle, domain_id);
901 if (ret)
902 return ret;
903 }
904
> 905 raw_stats[0] = vmalloc(domain_stats->size);
906 if (!raw_stats[0])
907 return -ENOMEM;
908
909 raw_stats[1] = vmalloc(domain_stats->size);
910 if (!raw_stats[1]) {
> 911 vfree(raw_stats[0]);
912 return -ENOMEM;
913 }
914
915 /*
916 * Let's try 10 times. If two consecutive reads are the same - done.
917 * This approach is aligned with SCMI v2 specification.
918 */
919 for (i = 0; i < 10; i++) {
920 memcpy_fromio(raw_stats[0], domain_stats->addr,
921 domain_stats->size);
922 memcpy_fromio(raw_stats[1], domain_stats->addr,
923 domain_stats->size);
924 if (!memcmp(raw_stats[0], raw_stats[1], domain_stats->size)) {
925 ret = 0;
926 break;
927 }
928 }
929
930 if (ret)
931 goto free_buf;
932
933 for (i = 0; i < dom->opp_count; i++) {
934 perf = &raw_stats[0]->perf_level[i];
935
936 transition_count += __le64_to_cpu(perf->usage_count);
937 stats->time_in_state[i] =
938 __le64_to_cpu(perf->total_residency_us);
939
940 /* Speed-up and initialize the frequencies only once. */
941 if (stats->freq_table[i] == 0) {
942 index = domain_stats->opp_map[i];
943 opp = &dom->opp[index];
944 stats->freq_table[i] = opp->perf * dom->mult_factor;
945 }
946 }
947
948 stats->total_trans = transition_count;
949
950 stats->last_index = __le16_to_cpu(raw_stats[0]->curr_perf_level_id);
951 stats->last_time = __le64_to_cpu(raw_stats[0]->ts_last_change_us);
952
953 free_buf:
954 vfree(raw_stats[1]);
955 vfree(raw_stats[0]);
956
957 return ret;
958 }
959
---
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: 67601 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/4] scmi: perf: Extend protocol to support performance statistics
Date: Fri, 31 Jul 2020 09:50:30 +0800 [thread overview]
Message-ID: <202007310954.HV0iwbGo%lkp@intel.com> (raw)
In-Reply-To: <20200729151208.27737-3-lukasz.luba@arm.com>
[-- Attachment #1: Type: text/plain, Size: 5355 bytes --]
Hi Lukasz,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200729]
[cannot apply to pm/linux-next tip/auto-latest linux/master linus/master v5.8-rc7 v5.8-rc6 v5.8-rc5 v5.8-rc7]
[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/Lukasz-Luba/CPUFreq-statistics-retrieved-by-drivers/20200729-231539
base: 04b4571786305a76ad81757bbec78eb16a5de582
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/firmware/arm_scmi/perf.c: In function 'scmi_dvfs_stats_get':
>> drivers/firmware/arm_scmi/perf.c:905:17: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^~~~~~~
>> drivers/firmware/arm_scmi/perf.c:905:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
905 | raw_stats[0] = vmalloc(domain_stats->size);
| ^
drivers/firmware/arm_scmi/perf.c:909:15: warning: assignment to 'struct scmi_perf_domain_raw_stats *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
909 | raw_stats[1] = vmalloc(domain_stats->size);
| ^
>> drivers/firmware/arm_scmi/perf.c:911:3: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
911 | vfree(raw_stats[0]);
| ^~~~~
cc1: some warnings being treated as errors
vim +/vmalloc +905 drivers/firmware/arm_scmi/perf.c
868
869 static int
870 scmi_dvfs_stats_get(const struct scmi_handle *handle, u32 domain_id,
871 struct scmi_perf_domain_stats *stats)
872 {
873 struct scmi_perf_domain_stats_desc *domain_stats;
874 struct scmi_perf_domain_raw_stats *raw_stats[2];
875 struct scmi_perf_info *pi = handle->perf_priv;
876 struct scmi_perf_level_raw_stats *perf;
877 int i, index, ret = -EINVAL;
878 struct perf_dom_info *dom;
879 u64 transition_count = 0;
880 struct scmi_opp *opp;
881
882 if (!stats)
883 return -EINVAL;
884
885 if (!pi->stats_virt_addr || !pi->stats_desc ||
886 !pi->stats_desc->domain_stats)
887 return -ENOENT;
888
889 if (pi->stats_desc->domain_count <= domain_id ||
890 !pi->stats_desc->domain_stats[domain_id].addr)
891 return -ENOENT;
892
893 dom = pi->dom_info + domain_id;
894 if (!dom)
895 return -EIO;
896
897 domain_stats = &pi->stats_desc->domain_stats[domain_id];
898
899 if (!domain_stats->opp_map) {
900 ret = scmi_dvfs_setup_opps_mapping(handle, domain_id);
901 if (ret)
902 return ret;
903 }
904
> 905 raw_stats[0] = vmalloc(domain_stats->size);
906 if (!raw_stats[0])
907 return -ENOMEM;
908
909 raw_stats[1] = vmalloc(domain_stats->size);
910 if (!raw_stats[1]) {
> 911 vfree(raw_stats[0]);
912 return -ENOMEM;
913 }
914
915 /*
916 * Let's try 10 times. If two consecutive reads are the same - done.
917 * This approach is aligned with SCMI v2 specification.
918 */
919 for (i = 0; i < 10; i++) {
920 memcpy_fromio(raw_stats[0], domain_stats->addr,
921 domain_stats->size);
922 memcpy_fromio(raw_stats[1], domain_stats->addr,
923 domain_stats->size);
924 if (!memcmp(raw_stats[0], raw_stats[1], domain_stats->size)) {
925 ret = 0;
926 break;
927 }
928 }
929
930 if (ret)
931 goto free_buf;
932
933 for (i = 0; i < dom->opp_count; i++) {
934 perf = &raw_stats[0]->perf_level[i];
935
936 transition_count += __le64_to_cpu(perf->usage_count);
937 stats->time_in_state[i] =
938 __le64_to_cpu(perf->total_residency_us);
939
940 /* Speed-up and initialize the frequencies only once. */
941 if (stats->freq_table[i] == 0) {
942 index = domain_stats->opp_map[i];
943 opp = &dom->opp[index];
944 stats->freq_table[i] = opp->perf * dom->mult_factor;
945 }
946 }
947
948 stats->total_trans = transition_count;
949
950 stats->last_index = __le16_to_cpu(raw_stats[0]->curr_perf_level_id);
951 stats->last_time = __le64_to_cpu(raw_stats[0]->ts_last_change_us);
952
953 free_buf:
954 vfree(raw_stats[1]);
955 vfree(raw_stats[0]);
956
957 return ret;
958 }
959
---
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: 67601 bytes --]
next prev parent reply other threads:[~2020-07-31 1:51 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 15:12 [PATCH 0/4] CPUFreq statistics retrieved by drivers Lukasz Luba
2020-07-29 15:12 ` Lukasz Luba
2020-07-29 15:12 ` [PATCH 1/4] cpufreq: Add support for statistics read from drivers Lukasz Luba
2020-07-29 15:12 ` Lukasz Luba
2020-07-29 15:12 ` [PATCH 2/4] scmi: perf: Extend protocol to support performance statistics Lukasz Luba
2020-07-29 15:12 ` Lukasz Luba
2020-07-31 1:50 ` kernel test robot [this message]
2020-07-31 1:50 ` kernel test robot
2020-07-31 1:50 ` kernel test robot
2020-07-31 15:15 ` Cristian Marussi
2020-07-31 15:15 ` Cristian Marussi
2020-08-04 11:10 ` Lukasz Luba
2020-08-04 11:10 ` Lukasz Luba
2020-07-29 15:12 ` [PATCH 3/4] cpufreq: scmi: Move scmi_cpufreq_driver structure to the top Lukasz Luba
2020-07-29 15:12 ` Lukasz Luba
2020-07-29 15:12 ` [PATCH 4/4] cpufreq: scmi: Read statistics from FW shared memory Lukasz Luba
2020-07-29 15:12 ` Lukasz Luba
2020-07-30 8:53 ` [PATCH 0/4] CPUFreq statistics retrieved by drivers Viresh Kumar
2020-07-30 8:53 ` Viresh Kumar
2020-07-30 9:10 ` Sudeep Holla
2020-07-30 9:10 ` Sudeep Holla
2020-07-30 9:36 ` Lukasz Luba
2020-07-30 9:36 ` Lukasz Luba
2020-07-31 15:56 ` Sudeep Holla
2020-07-31 15:56 ` Sudeep Holla
2020-08-04 17:19 ` Florian Fainelli
2020-08-04 17:19 ` Florian Fainelli
2020-08-05 12:36 ` Sudeep Holla
2020-08-05 12:36 ` Sudeep Holla
2020-08-04 5:35 ` Viresh Kumar
2020-08-04 5:35 ` Viresh Kumar
2020-08-04 10:29 ` Lukasz Luba
2020-08-04 10:29 ` Lukasz Luba
2020-08-04 10:38 ` Viresh Kumar
2020-08-04 10:38 ` Viresh Kumar
2020-08-04 10:44 ` Lukasz Luba
2020-08-04 10:44 ` Lukasz Luba
2020-09-02 7:26 ` Viresh Kumar
2020-09-02 7:26 ` Viresh Kumar
2020-08-04 17:27 ` Florian Fainelli
2020-08-04 17:27 ` Florian Fainelli
2020-08-05 11:04 ` Lukasz Luba
2020-08-05 11:04 ` Lukasz Luba
2020-08-05 13:04 ` Viresh Kumar
2020-08-05 13:04 ` Viresh Kumar
2020-08-05 16:03 ` Sudeep Holla
2020-08-05 16:03 ` Sudeep Holla
2020-08-05 17:33 ` Florian Fainelli
2020-08-05 17:33 ` Florian Fainelli
2020-08-06 13:37 ` Sudeep Holla
2020-08-06 13:37 ` Sudeep Holla
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=202007310954.HV0iwbGo%lkp@intel.com \
--to=lkp@intel.com \
--cc=cristian.marussi@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rjw@rjwysocki.net \
--cc=sudeep.holla@arm.com \
--cc=viresh.kumar@linaro.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.