* [chanwoo:devfreq-testing-passive-gov 2/3] drivers/devfreq/governor_passive.c:59:28: error: 'struct cpuinfo_um' has no member named 'first_cpu'
@ 2021-05-06 19:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-06 19:24 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 15606 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-passive-gov
head: 6d4e4f9ca6cc295239851e29297a5499d41dea5e
commit: 583d8a1093b76e53f615ef3c7962e3849242a9ba [2/3] PM / devfreq: Add cpu based scaling support to passive governor
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/?id=583d8a1093b76e53f615ef3c7962e3849242a9ba
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-passive-gov
git checkout 583d8a1093b76e53f615ef3c7962e3849242a9ba
# save the attached .config to linux build tree
make W=1 W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_simpleondemand.c:10:
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/devfreq/governor_simpleondemand.c:11:
include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
--
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
include/linux/devfreq.h:331:27: note: in expansion of macro 'cpu_data'
331 | struct devfreq_cpu_data *cpu_data[NR_CPUS];
| ^~~~~~~~
In file included from drivers/devfreq/governor_passive.c:16:
include/linux/devfreq.h:332:1: warning: no semicolon at end of struct or union
332 | };
| ^
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'get_target_freq_with_cpufreq':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:52:27: note: in expansion of macro 'cpu_data'
52 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:58:22: note: in expansion of macro 'cpu_data'
58 | cpu_data = p_data->cpu_data[cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c:59:7: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
59 | if (!cpu_data || cpu_data->first_cpu != cpu)
| ^
>> drivers/devfreq/governor_passive.c:59:28: error: 'struct cpuinfo_um' has no member named 'first_cpu'
59 | if (!cpu_data || cpu_data->first_cpu != cpu)
| ^~
>> drivers/devfreq/governor_passive.c:63:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
63 | cpu_cur = cpu_data->cur_freq * HZ_PER_KHZ;
| ^~
>> drivers/devfreq/governor_passive.c:64:49: error: 'struct cpuinfo_um' has no member named 'dev'
64 | freq = get_taget_freq_by_required_opp(cpu_data->dev,
| ^~
>> drivers/devfreq/governor_passive.c:65:14: error: 'struct cpuinfo_um' has no member named 'opp_table'
65 | cpu_data->opp_table,
| ^~
>> drivers/devfreq/governor_passive.c:75:21: error: 'struct cpuinfo_um' has no member named 'min_freq'
75 | cpu_min = cpu_data->min_freq;
| ^~
>> drivers/devfreq/governor_passive.c:76:21: error: 'struct cpuinfo_um' has no member named 'max_freq'
76 | cpu_max = cpu_data->max_freq;
| ^~
drivers/devfreq/governor_passive.c:77:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
77 | cpu_cur = cpu_data->cur_freq;
| ^~
drivers/devfreq/governor_passive.c:50:31: warning: variable 'p_data' set but not used [-Wunused-but-set-variable]
50 | struct devfreq_passive_data *p_data =
| ^~~~~~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_notifier_call':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:214:27: note: in expansion of macro 'cpu_data'
214 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:220:10: note: in expansion of macro 'cpu_data'
220 | !data->cpu_data[freqs->policy->cpu])
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:223:19: note: in expansion of macro 'cpu_data'
223 | cpu_data = data->cpu_data[freqs->policy->cpu];
| ^~~~~~~~
drivers/devfreq/governor_passive.c:224:14: error: 'struct cpuinfo_um' has no member named 'cur_freq'
224 | if (cpu_data->cur_freq == freqs->new)
| ^~
drivers/devfreq/governor_passive.c:227:21: error: 'struct cpuinfo_um' has no member named 'cur_freq'
227 | cur_freq = cpu_data->cur_freq;
| ^~
drivers/devfreq/governor_passive.c:228:10: error: 'struct cpuinfo_um' has no member named 'cur_freq'
228 | cpu_data->cur_freq = freqs->new;
| ^~
drivers/devfreq/governor_passive.c:234:11: error: 'struct cpuinfo_um' has no member named 'cur_freq'
234 | cpu_data->cur_freq = cur_freq;
| ^~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_register_notifier':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:248:27: note: in expansion of macro 'cpu_data'
248 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:265:15: note: in expansion of macro 'cpu_data'
265 | if (p_data->cpu_data[cpu])
| ^~~~~~~~
>> drivers/devfreq/governor_passive.c:270:13: error: lvalue required as left operand of assignment
270 | cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
| ^
drivers/devfreq/governor_passive.c:271:8: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
271 | if (!cpu_data) {
| ^
drivers/devfreq/governor_passive.c:289:12: error: 'struct cpuinfo_um' has no member named 'dev'
289 | cpu_data->dev = cpu_dev;
| ^~
drivers/devfreq/governor_passive.c:290:12: error: 'struct cpuinfo_um' has no member named 'opp_table'
290 | cpu_data->opp_table = opp_table;
| ^~
drivers/devfreq/governor_passive.c:291:12: error: 'struct cpuinfo_um' has no member named 'first_cpu'
291 | cpu_data->first_cpu = cpumask_first(policy->related_cpus);
| ^~
drivers/devfreq/governor_passive.c:292:12: error: 'struct cpuinfo_um' has no member named 'cur_freq'
292 | cpu_data->cur_freq = policy->cur;
| ^~
drivers/devfreq/governor_passive.c:293:12: error: 'struct cpuinfo_um' has no member named 'min_freq'
293 | cpu_data->min_freq = policy->cpuinfo.min_freq;
| ^~
drivers/devfreq/governor_passive.c:294:12: error: 'struct cpuinfo_um' has no member named 'max_freq'
294 | cpu_data->max_freq = policy->cpuinfo.max_freq;
| ^~
In file included from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:92,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/devfreq/governor_passive.c:10:
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:296:12: note: in expansion of macro 'cpu_data'
296 | p_data->cpu_data[cpu] = cpu_data;
| ^~~~~~~~
drivers/devfreq/governor_passive.c: In function 'cpufreq_passive_unregister_notifier':
>> arch/um/include/asm/processor-generic.h:97:19: error: expected identifier or '(' before '&' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:321:27: note: in expansion of macro 'cpu_data'
321 | struct devfreq_cpu_data *cpu_data;
| ^~~~~~~~
>> arch/um/include/asm/processor-generic.h:97:18: error: expected identifier before '(' token
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:328:22: note: in expansion of macro 'cpu_data'
328 | cpu_data = p_data->cpu_data[cpu];
| ^~~~~~~~
arch/um/include/asm/processor-generic.h:97:18: warning: the address of 'boot_cpu_data' will always evaluate as 'true' [-Waddress]
97 | #define cpu_data (&boot_cpu_data)
| ^
drivers/devfreq/governor_passive.c:329:7: note: in expansion of macro 'cpu_data'
329 | if (cpu_data) {
| ^~~~~~~~
drivers/devfreq/governor_passive.c:330:16: error: 'struct cpuinfo_um' has no member named 'opp_table'
330 | if (cpu_data->opp_table)
| ^~
drivers/devfreq/governor_passive.c:331:38: error: 'struct cpuinfo_um' has no member named 'opp_table'
331 | dev_pm_opp_put_opp_table(cpu_data->opp_table);
| ^~
drivers/devfreq/governor_passive.c:333:13: error: lvalue required as left operand of assignment
333 | cpu_data = NULL;
| ^
vim +59 drivers/devfreq/governor_passive.c
46
47 static int get_target_freq_with_cpufreq(struct devfreq *devfreq,
48 unsigned long *target_freq)
49 {
50 struct devfreq_passive_data *p_data =
51 (struct devfreq_passive_data *)devfreq->data;
52 struct devfreq_cpu_data *cpu_data;
53 unsigned long cpu, cpu_cur, cpu_min, cpu_max, cpu_percent;
54 unsigned long dev_min, dev_max;
55 unsigned long freq = 0;
56
57 for_each_online_cpu(cpu) {
58 cpu_data = p_data->cpu_data[cpu];
> 59 if (!cpu_data || cpu_data->first_cpu != cpu)
60 continue;
61
62 /* Get target freq via required opps */
> 63 cpu_cur = cpu_data->cur_freq * HZ_PER_KHZ;
> 64 freq = get_taget_freq_by_required_opp(cpu_data->dev,
> 65 cpu_data->opp_table,
66 devfreq->opp_table, cpu_cur);
67 if (freq) {
68 *target_freq = max(freq, *target_freq);
69 continue;
70 }
71
72 /* Use Interpolation if required opps is not available */
73 devfreq_get_freq_range(devfreq, &dev_min, &dev_max);
74
> 75 cpu_min = cpu_data->min_freq;
> 76 cpu_max = cpu_data->max_freq;
77 cpu_cur = cpu_data->cur_freq;
78
79 cpu_percent = ((cpu_cur - cpu_min) * 100) / (cpu_max - cpu_min);
80 freq = dev_min + mult_frac(dev_max - dev_min, cpu_percent, 100);
81
82 *target_freq = max(freq, *target_freq);
83 }
84
85 return 0;
86 }
87
---
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: 24425 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-06 19:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 19:24 [chanwoo:devfreq-testing-passive-gov 2/3] drivers/devfreq/governor_passive.c:59:28: error: 'struct cpuinfo_um' has no member named 'first_cpu' kernel test robot
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.