From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC] cpuidle : Add support for pseudo-cpuidle driver
Date: Fri, 24 Jul 2020 18:51:32 +0800 [thread overview]
Message-ID: <202007241853.nee6PA5R%lkp@intel.com> (raw)
In-Reply-To: <20200723061339.9747-1-huntbag@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 7254 bytes --]
Hi Abhishek,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on pm/linux-next]
[also build test WARNING on linux/master linus/master v5.8-rc6 next-20200723]
[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/Abhishek-Goel/cpuidle-Add-support-for-pseudo-cpuidle-driver/20200723-141912
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/cpuidle/cpuidle-test.c:118:5: warning: no previous prototype for 'cpuidle_cpu_online' [-Wmissing-prototypes]
118 | int cpuidle_cpu_online(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
>> drivers/cpuidle/cpuidle-test.c:134:5: warning: no previous prototype for 'cpuidle_cpu_dead' [-Wmissing-prototypes]
134 | int cpuidle_cpu_dead(unsigned int cpu)
| ^~~~~~~~~~~~~~~~
>> drivers/cpuidle/cpuidle-test.c:145:5: warning: no previous prototype for 'cpuidle_driver_init' [-Wmissing-prototypes]
145 | int cpuidle_driver_init(void)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/cpuidle/cpuidle-test.c:166:5: warning: no previous prototype for 'add_cpuidle_states' [-Wmissing-prototypes]
166 | int add_cpuidle_states(void)
| ^~~~~~~~~~~~~~~~~~
drivers/cpuidle/cpuidle-test.c: In function 'add_cpuidle_states':
>> drivers/cpuidle/cpuidle-test.c:177:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
177 | int rc;
| ^~
drivers/cpuidle/cpuidle-test.c: At top level:
>> drivers/cpuidle/cpuidle-test.c:223:6: warning: no previous prototype for 'test_cpuidle_uninit' [-Wmissing-prototypes]
223 | void test_cpuidle_uninit(void)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/cpuidle/cpuidle-test.c:233:12: warning: no previous prototype for 'test_cpuidle_init' [-Wmissing-prototypes]
233 | int __init test_cpuidle_init(void)
| ^~~~~~~~~~~~~~~~~
>> drivers/cpuidle/cpuidle-test.c:266:13: warning: no previous prototype for 'test_cpuidle_exit' [-Wmissing-prototypes]
266 | void __exit test_cpuidle_exit(void)
| ^~~~~~~~~~~~~~~~~
vim +/cpuidle_cpu_online +118 drivers/cpuidle/cpuidle-test.c
117
> 118 int cpuidle_cpu_online(unsigned int cpu)
119 {
120 struct cpuidle_device *dev;
121
122 dev = per_cpu_ptr(test_cpuidle_devices, cpu);
123 if (!dev->registered) {
124 dev->cpu = cpu;
125 if (cpuidle_register_device(dev)) {
126 pr_notice("cpuidle_register_device %d failed!\n", cpu);
127 return -EIO;
128 }
129 }
130
131 return 0;
132 }
133
> 134 int cpuidle_cpu_dead(unsigned int cpu)
135 {
136 struct cpuidle_device *dev;
137
138 dev = per_cpu_ptr(test_cpuidle_devices, cpu);
139 if (dev->registered)
140 cpuidle_unregister_device(dev);
141
142 return 0;
143 }
144
> 145 int cpuidle_driver_init(void)
146 {
147 int idle_state;
148 struct cpuidle_driver *drv = &test_cpuidle_driver;
149
150 drv->state_count = 0;
151
152 for (idle_state = 0; idle_state < nr_states; ++idle_state) {
153 /* Is the state not enabled? */
154 if (cpuidle_state_table[idle_state].enter == NULL)
155 continue;
156
157 drv->states[drv->state_count] = /* structure copy */
158 cpuidle_state_table[idle_state];
159
160 drv->state_count += 1;
161 }
162
163 return 0;
164 }
165
> 166 int add_cpuidle_states(void)
167 {
168 /* Parse the module param and initialize the idle states here
169 * in cpuidle_state_table.
170 */
171 char *this_param;
172 char *input_name = name;
173 char *input_res = residency_us;
174 char *input_lat = latency_us;
175 int index = 1;
176 long temp;
> 177 int rc;
178
179 switch (sim_type) {
180 case 1:
181 cpuidle_state_table = cpuidle_states_ppc;
182 return 0;
183 case 2:
184 cpuidle_state_table = cpuidle_states_intel;
185 return 0;
186 case 3:
187 break;
188 default:
189 pr_warn("Sim value out of bound\n");
190 break;
191 }
192
193 if (strnlen(input_name, MAX_PARAM_LENGTH)) {
194 while ((this_param = strsep(&input_name, ",")) && index <= nr_states) {
195 strcpy(cpuidle_states[index].name, this_param);
196 cpuidle_states[index].enter = idle_loop;
197 index++;
198 }
199 }
200
201 if (strnlen(input_res, MAX_PARAM_LENGTH)) {
202 index = 1;
203 while ((this_param = strsep(&input_res, ",")) && index <= nr_states) {
204 rc = kstrtol(this_param, 10, &temp);
205 cpuidle_states[index].target_residency = temp;
206 index++;
207 }
208 }
209
210 if (strnlen(input_lat, MAX_PARAM_LENGTH)) {
211 index = 1;
212 while ((this_param = strsep(&input_lat, ",")) && index <= nr_states) {
213 rc = kstrtol(this_param, 10, &temp);
214 cpuidle_states[index].exit_latency = temp;
215 index++;
216 }
217 }
218
219 cpuidle_state_table = cpuidle_states;
220 return nr_states;
221 }
222
> 223 void test_cpuidle_uninit(void)
224 {
225 if (test_hp_idlestate)
226 cpuhp_remove_state(test_hp_idlestate);
227 cpuidle_unregister_driver(&test_cpuidle_driver);
228
229 free_percpu(test_cpuidle_devices);
230 test_cpuidle_devices = NULL;
231 }
232
> 233 int __init test_cpuidle_init(void)
234 {
235 int retval;
236
237 add_cpuidle_states();
238 cpuidle_driver_init();
239 retval = cpuidle_register(&test_cpuidle_driver, NULL);
240 if (retval) {
241 printk(KERN_DEBUG "Registration of test driver failed.\n");
242 return retval;
243 }
244
245 test_cpuidle_devices = alloc_percpu(struct cpuidle_device);
246 if (test_cpuidle_devices == NULL) {
247 cpuidle_unregister_driver(&test_cpuidle_driver);
248 return -ENOMEM;
249 }
250
251 retval = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
252 "cpuidle/powernv:online",
253 cpuidle_cpu_online,
254 cpuidle_cpu_dead);
255
256 if (retval < 0) {
257 test_cpuidle_uninit();
258 } else {
259 test_hp_idlestate = retval;
260 retval = 0;
261 }
262
263 return retval;
264 }
265
> 266 void __exit test_cpuidle_exit(void)
267 {
268 test_cpuidle_uninit();
269 }
270
---
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: 74086 bytes --]
next prev parent reply other threads:[~2020-07-24 10:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 6:13 [RFC] cpuidle : Add support for pseudo-cpuidle driver Abhishek Goel
2020-07-23 6:24 ` Randy Dunlap
2020-07-24 3:40 ` kernel test robot
2020-07-24 3:40 ` [RFC PATCH] cpuidle : cpuidle_cpu_online() can be static kernel test robot
2020-07-24 3:41 ` [RFC] cpuidle : Add support for pseudo-cpuidle driver kernel test robot
2020-07-24 10:51 ` kernel test robot [this message]
2020-08-05 11:56 ` Dan Carpenter
2020-08-05 11:56 ` Dan Carpenter
2020-08-20 19:33 ` Fontenot, Nathan
-- strict thread matches above, loose matches on Subject: below --
2020-08-01 8:30 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=202007241853.nee6PA5R%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.