tree:
https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
devfreq-testing-qcom-l2
head: 0710a546fe23fc744371ae2eaab3877a2678f647
commit: 1b1177093e008343203b2a04ff8b015688516cb9 [2/3] devfreq: qcom: Add L2 Krait Cache
devfreq scaling driver
config: parisc-randconfig-r006-20210517 (attached as .config)
compiler: hppa-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
#
https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/...
git remote add chanwoo
https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing-qcom-l2
git checkout 1b1177093e008343203b2a04ff8b015688516cb9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/devfreq/krait-cache-devfreq.c:7:
include/linux/devfreq.h:117:2: error: expected specifier-qualifier-list before
'*' token
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:117:4: error: stray '@' in program
117 | * @up_threshold: If the load is over this value, the frequency jumps.
| ^
include/linux/devfreq.h:119:4: error: stray '@' in program
119 | * @down_differential: If the load is under upthreshold - downdifferential,
| ^
In file included from drivers/devfreq/krait-cache-devfreq.c:15:
drivers/devfreq/governor.h: In function 'devfreq_update_stats':
drivers/devfreq/governor.h:102:18: error: 'struct devfreq_dev_profile' has no
member named 'get_dev_status'
102 | if (!df->profile->get_dev_status)
| ^~
drivers/devfreq/governor.h:105:20: error: 'struct devfreq_dev_profile' has no
member named 'get_dev_status'
105 | return df->profile->get_dev_status(df->dev.parent,
&df->last_status);
| ^~
drivers/devfreq/krait-cache-devfreq.c: At top level:
> drivers/devfreq/krait-cache-devfreq.c:100:3: error: 'struct
devfreq_dev_profile' has no member named 'target'
100 | .target =
krait_cache_target,
| ^~~~~~
> drivers/devfreq/krait-cache-devfreq.c:100:12: warning:
initialization of 'long unsigned int' from 'int (*)(struct device *, long
unsigned int *, u32)' {aka 'int (*)(struct device *, long unsigned int *, unsigned
int)'} makes integer from pointer without a cast [-Wint-conversion]
100 |
.target = krait_cache_target,
| ^~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c:100:12: note: (near initialization for
'tegra_devfreq_profile.initial_freq')
> drivers/devfreq/krait-cache-devfreq.c:101:3: error: 'struct
devfreq_dev_profile' has no member named 'get_dev_status'
101 |
.get_dev_status = krait_cache_get_dev_status,
| ^~~~~~~~~~~~~~
> drivers/devfreq/krait-cache-devfreq.c:101:20: warning:
initialization of 'unsigned int' from 'int (*)(struct device *, struct
devfreq_dev_status *)' makes integer from pointer without a cast [-Wint-conversion]
101 | .get_dev_status = krait_cache_get_dev_status,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c:101:20: note: (near initialization for
'tegra_devfreq_profile.polling_ms')
> drivers/devfreq/krait-cache-devfreq.c:102:3: error: 'struct
devfreq_dev_profile' has no member named 'get_cur_freq'
102 |
.get_cur_freq = krait_cache_get_cur_freq
| ^~~~~~~~~~~~
> drivers/devfreq/krait-cache-devfreq.c:102:18: error: incompatible
types when initializing type 'enum devfreq_timer' using type 'int (*)(struct
device *, long unsigned int *)'
102 | .get_cur_freq =
krait_cache_get_cur_freq
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/devfreq/krait-cache-devfreq.c: In function 'krait_cache_notifier':
drivers/devfreq/krait-cache-devfreq.c:134:24: error: 'struct
devfreq_dev_profile' has no member named 'target'
134 | ret = devfreq->profile->target(data->dev, &freq, 0);
| ^~
> drivers/devfreq/krait-cache-devfreq.c:138:22: error: 'struct
devfreq_dev_profile' has no member named 'freq_table'
138 | if
(devfreq->profile->freq_table &&
| ^~
drivers/devfreq/krait-cache-devfreq.c: At top level:
> drivers/devfreq/krait-cache-devfreq.c:199:3: error: 'struct
devfreq_governor' has no member named 'immutable'
199 | .immutable
= true,
| ^~~~~~~~~
> drivers/devfreq/krait-cache-devfreq.c:199:15: warning: excess
elements in struct initializer
199 | .immutable = true,
| ^~~~
drivers/devfreq/krait-cache-devfreq.c:199:15: note: (near initialization for
'krait_devfreq_governor')
drivers/devfreq/krait-cache-devfreq.c: In function 'krait_cache_probe':
drivers/devfreq/krait-cache-devfreq.c:264:43: error: 'struct
devfreq_dev_profile' has no member named 'freq_table'
264 | data->freq_table = data->devfreq->profile->freq_table;
| ^~
vim +100 drivers/devfreq/krait-cache-devfreq.c
98
99 static struct devfreq_dev_profile tegra_devfreq_profile = {
100 .target = krait_cache_target,
101 .get_dev_status = krait_cache_get_dev_status,
102 .get_cur_freq = krait_cache_get_cur_freq
103 };
104
105 static int krait_cache_notifier(struct notifier_block *nb, unsigned long action,
106 void *v)
107 {
108 struct cpufreq_freqs *freqs;
109 unsigned int cpu, cur_cpu;
110 struct krait_data *data;
111 struct devfreq *devfreq;
112 unsigned long freq;
113 int ret = 0;
114
115 if (action != CPUFREQ_POSTCHANGE)
116 return NOTIFY_OK;
117
118 data = container_of(nb, struct krait_data, nb);
119 devfreq = data->devfreq;
120
121 mutex_lock_nested(&devfreq->lock, SINGLE_DEPTH_NESTING);
122
123 freqs = (struct cpufreq_freqs *)v;
124 freq = freqs->new;
125 cur_cpu = freqs->policy->cpu;
126
127 /* find the max freq across all core */
128 for_each_present_cpu(cpu)
129 if (cpu != cur_cpu)
130 freq = max(freq, (unsigned long)cpufreq_quick_get(cpu));
131
132 devfreq->governor->get_target_freq(devfreq, &freq);
133
134 ret = devfreq->profile->target(data->dev, &freq, 0);
135 if (ret < 0)
136 goto out;
137
138 if (devfreq->profile->freq_table &&
139
(devfreq_update_status(devfreq, freq)))
140 dev_err(data->dev,
141 "Couldn't update frequency transition information.\n");
142
143 devfreq->previous_freq = freq;
144
145 out:
146 mutex_unlock(&devfreq->lock);
147 return notifier_from_errno(ret);
148 };
149
150 static int krait_cache_governor_get_target(struct devfreq *devfreq,
151 unsigned long *freq)
152 {
153 unsigned int *l2_cpufreq;
154 unsigned long *freq_table;
155 unsigned long target_freq = *freq;
156 struct krait_data *data = dev_get_drvdata(devfreq->dev.parent);
157
158 l2_cpufreq = data->l2_cpufreq;
159 freq_table = data->freq_table;
160
161 /*
162 * Find the highest l2 freq interval based on the max cpufreq
163 * across all core
164 */
165 while (*(l2_cpufreq = l2_cpufreq + 1) && target_freq >= *l2_cpufreq)
166 freq_table = freq_table + 1;
167
168 *freq = *freq_table;
169
170 return 0;
171 };
172
173 static int krait_cache_governor_event_handler(struct devfreq *devfreq,
174 unsigned int event, void *data)
175 {
176 struct krait_data *kdata = dev_get_drvdata(devfreq->dev.parent);
177 int ret = 0;
178
179 switch (event) {
180 case DEVFREQ_GOV_START:
181 kdata->nb.notifier_call = krait_cache_notifier;
182 ret = cpufreq_register_notifier(&kdata->nb,
183 CPUFREQ_TRANSITION_NOTIFIER);
184 break;
185
186 case DEVFREQ_GOV_STOP:
187 cpufreq_unregister_notifier(&kdata->nb,
188 CPUFREQ_TRANSITION_NOTIFIER);
189 break;
190 }
191
192 return ret;
193 };
194
195 static struct devfreq_governor krait_devfreq_governor = {
196 .name = "krait_governor",
197 .get_target_freq = krait_cache_governor_get_target,
198 .event_handler = krait_cache_governor_event_handler,
199 .immutable = true,
200 };
201
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org