[kees:kspp/memcpy/next-20210519/v0 52/53] include/linux/fortify-string.h:259:4: error: implicit declaration of function '__runtime_write_check_missing'; did you mean '__runtime_write_check'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210519/v0
head: 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd
commit: 0bee95cae61e3cfc979fb3baab53189b65f5f777 [52/53] [DEBUG] fortify: Warn about all cases where memcpy() cannot check bounds
config: s390-allyesconfig (attached as .config)
compiler: s390-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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210519/v0
git checkout 0bee95cae61e3cfc979fb3baab53189b65f5f777
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the kees/kspp/memcpy/next-20210519/v0 HEAD 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/string.h:260,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/linux/fortify-string.h: In function '__fortify_memcpy_chk':
>> include/linux/fortify-string.h:259:4: error: implicit declaration of function '__runtime_write_check_missing'; did you mean '__runtime_write_check'? [-Werror=implicit-function-declaration]
259 | __runtime_write_check_missing();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __runtime_write_check
>> include/linux/fortify-string.h:261:4: error: implicit declaration of function '__runtime_read_check_missing'; did you mean '__runtime_read_check'? [-Werror=implicit-function-declaration]
261 | __runtime_read_check_missing();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __runtime_read_check
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:118: scripts/mod/devicetable-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1307: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
In file included from include/linux/string.h:260,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/linux/fortify-string.h: In function '__fortify_memcpy_chk':
>> include/linux/fortify-string.h:259:4: error: implicit declaration of function '__runtime_write_check_missing'; did you mean '__runtime_write_check'? [-Werror=implicit-function-declaration]
259 | __runtime_write_check_missing();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __runtime_write_check
>> include/linux/fortify-string.h:261:4: error: implicit declaration of function '__runtime_read_check_missing'; did you mean '__runtime_read_check'? [-Werror=implicit-function-declaration]
261 | __runtime_read_check_missing();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __runtime_read_check
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:118: scripts/mod/devicetable-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1307: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +259 include/linux/fortify-string.h
181
182 /*
183 * To make sure the compiler can enforce protection against buffer overflows,
184 * memcpy() must not be used beyond individual array fields. If you need to
185 * copy across multiple array fields, please use struct_group() to create a
186 * named mirror of an anonymous struct union. (e.g. see struct sk_buff.)
187 *
188 * Mitigation coverage
189 * Bounds checking at:
190 * +-------+-------+-------+-------+
191 * | Compile time | Run time |
192 * memcpy() argument sizes: | write | read | write | read |
193 * +-------+-------+-------+-------+
194 * memcpy(known, known, constant) | y | y | n/a | n/a |
195 * memcpy(unknown, known, constant) | n | y | W | n/a |
196 * memcpy(known, unknown, constant) | y | n | n/a | W |
197 * memcpy(unknown, unknown, constant) | n | n | W | W |
198 * memcpy(known, known, dynamic) | n | n | B | B |
199 * memcpy(unknown, known, dynamic) | n | n | W | B |
200 * memcpy(known, unknown, dynamic) | n | n | B | W |
201 * memcpy(unknown, unknown, dynamic) | n | n | W | W |
202 * +-------+-------+-------+-------+
203 *
204 * y = deterministic compile-time bounds checking
205 * n = cannot do deterministic compile-time bounds checking
206 * n/a = no run-time bounds checking needed since compile-time deterministic
207 * W = compile-time warn about lack of any bounds checking
208 * B = perform run-time bounds checking
209 *
210 */
211 __FORTIFY_INLINE void __fortify_memcpy_chk(void *p, const void *q,
212 __kernel_size_t size,
213 const char *func)
214 {
215 size_t p_size = __builtin_object_size(p, 0);
216 size_t q_size = __builtin_object_size(q, 0);
217 size_t p_size_field = __builtin_object_size(p, 1);
218 size_t q_size_field = __builtin_object_size(q, 1);
219
220 if (__builtin_constant_p(size)) {
221 /*
222 * Length argument is a constant expression, so we
223 * can perform compile-time bounds checking where
224 * buffer sizes are known.
225 */
226
227 /*
228 * Call attention to 0-sized targets, which indicate
229 * 0-length target names like used by sk_buff.
230 */
231 if (!p_size_field && size > 0)
232 __write_zero();
233 if (!q_size_field && size > 0)
234 __read_zero();
235
236 /* Disallow size argument larger than dest/src field. */
237 if (p_size_field < size)
238 __write_overflow_field();
239 if (q_size_field < size)
240 __read_overflow2_field();
241 } else {
242 /*
243 * Length argument is not a constant expression, so
244 * run-time bounds checking can happen where buffer
245 * sizes are known.
246 */
247
248 /* Add build warnings to identify new run-time checks. */
249 if (p_size != p_size_field)
250 __runtime_write_check();
251 if (q_size != q_size_field)
252 __runtime_read_check();
253
254 /*
255 * Add build warnings to identify cases where it is
256 * not possible to perform run-time bounds checks.
257 */
258 if (p_size == (size_t)(-1))
> 259 __runtime_write_check_missing();
260 if (q_size == (size_t)(-1))
> 261 __runtime_read_check_missing();
262
263 /* Warn when writing beyond destination field size. */
264 WARN_ON(p_size != p_size_field && p_size_field < size);
265 /* Warn when reading beyond source field size. */
266 WARN_ON(q_size != q_size_field && q_size_field < size);
267
268 /*
269 * Always stop accesses beyond the struct that contains the
270 * field, when the buffer's remaining size is known.
271 */
272 if ((p_size != (size_t)(-1) && p_size < size) ||
273 (q_size != (size_t)(-1) && q_size < size))
274 fortify_panic(func);
275 }
276 }
277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
kernel/sched/fair.c:9551:12: warning: stack frame size of 1376 bytes in function 'load_balance'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1140ab592e2ebf8153d2b322604031a8868ce7a5
commit: 0826530de3cbdc89e60a89e86def94a5f0fc81ca sched/fair: Remove update of blocked load from newidle_balance
date: 9 weeks ago
config: mips-randconfig-r022-20210511 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0826530de3cbdc89e60a89e86def94a5f0fc81ca
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/fair.c:5381:6: warning: no previous prototype for function 'init_cfs_bandwidth' [-Wmissing-prototypes]
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
kernel/sched/fair.c:5381:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
static
kernel/sched/fair.c:11166:6: warning: no previous prototype for function 'free_fair_sched_group' [-Wmissing-prototypes]
void free_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void free_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:11168:5: warning: no previous prototype for function 'alloc_fair_sched_group' [-Wmissing-prototypes]
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
kernel/sched/fair.c:11168:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
^
static
kernel/sched/fair.c:11173:6: warning: no previous prototype for function 'online_fair_sched_group' [-Wmissing-prototypes]
void online_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11173:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void online_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:11175:6: warning: no previous prototype for function 'unregister_fair_sched_group' [-Wmissing-prototypes]
void unregister_fair_sched_group(struct task_group *tg) { }
^
kernel/sched/fair.c:11175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void unregister_fair_sched_group(struct task_group *tg) { }
^
static
kernel/sched/fair.c:486:20: warning: unused function 'list_del_leaf_cfs_rq' [-Wunused-function]
static inline void list_del_leaf_cfs_rq(struct cfs_rq *cfs_rq)
^
kernel/sched/fair.c:5362:20: warning: unused function 'sync_throttle' [-Wunused-function]
static inline void sync_throttle(struct task_group *tg, int cpu) {}
^
kernel/sched/fair.c:5387:37: warning: unused function 'tg_cfs_bandwidth' [-Wunused-function]
static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
^
kernel/sched/fair.c:5391:20: warning: unused function 'destroy_cfs_bandwidth' [-Wunused-function]
static inline void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
^
>> kernel/sched/fair.c:9551:12: warning: stack frame size of 1376 bytes in function 'load_balance' [-Wframe-larger-than=]
static int load_balance(int this_cpu, struct rq *this_rq,
^
10 warnings generated.
vim +/load_balance +9551 kernel/sched/fair.c
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9546
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9547 /*
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9548 * Check this_cpu to ensure it is balanced within domain. Attempt to move
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9549 * tasks if there is an imbalance.
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9550 */
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 @9551 static int load_balance(int this_cpu, struct rq *this_rq,
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9552 struct sched_domain *sd, enum cpu_idle_type idle,
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9553 int *continue_balancing)
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9554 {
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9555 int ld_moved, cur_ld_moved, active_balance = 0;
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9556 struct sched_domain *sd_parent = sd->parent;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9557 struct sched_group *group;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9558 struct rq *busiest;
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9559 struct rq_flags rf;
4ba2968420fa9d kernel/sched/fair.c Christoph Lameter 2014-08-26 9560 struct cpumask *cpus = this_cpu_cpumask_var_ptr(load_balance_mask);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9561
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9562 struct lb_env env = {
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9563 .sd = sd,
ddcdf6e7d9919d kernel/sched/fair.c Peter Zijlstra 2012-02-22 9564 .dst_cpu = this_cpu,
ddcdf6e7d9919d kernel/sched/fair.c Peter Zijlstra 2012-02-22 9565 .dst_rq = this_rq,
ae4df9d6c93510 kernel/sched/fair.c Peter Zijlstra 2017-05-01 9566 .dst_grpmask = sched_group_span(sd->groups),
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9567 .idle = idle,
eb95308ee2a694 kernel/sched/fair.c Peter Zijlstra 2012-04-17 9568 .loop_break = sched_nr_migrate_break,
b9403130a5350f kernel/sched/fair.c Michael Wang 2012-07-12 9569 .cpus = cpus,
0ec8aa00f2b4dc kernel/sched/fair.c Peter Zijlstra 2013-10-07 9570 .fbq_type = all,
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9571 .tasks = LIST_HEAD_INIT(env.tasks),
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9572 };
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9573
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9574 cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9575
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9576 schedstat_inc(sd->lb_count[idle]);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9577
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9578 redo:
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9579 if (!should_we_balance(&env)) {
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9580 *continue_balancing = 0;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9581 goto out_balanced;
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9582 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9583
23f0d2093c789e kernel/sched/fair.c Joonsoo Kim 2013-08-06 9584 group = find_busiest_group(&env);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9585 if (!group) {
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9586 schedstat_inc(sd->lb_nobusyg[idle]);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9587 goto out_balanced;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9588 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9589
b9403130a5350f kernel/sched/fair.c Michael Wang 2012-07-12 9590 busiest = find_busiest_queue(&env, group);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9591 if (!busiest) {
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9592 schedstat_inc(sd->lb_nobusyq[idle]);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9593 goto out_balanced;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9594 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9595
78feefc512a091 kernel/sched/fair.c Michael Wang 2012-08-06 9596 BUG_ON(busiest == env.dst_rq);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9597
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9598 schedstat_add(sd->lb_imbalance[idle], env.imbalance);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9599
1aaf90a4b88aae kernel/sched/fair.c Vincent Guittot 2015-02-27 9600 env.src_cpu = busiest->cpu;
1aaf90a4b88aae kernel/sched/fair.c Vincent Guittot 2015-02-27 9601 env.src_rq = busiest;
1aaf90a4b88aae kernel/sched/fair.c Vincent Guittot 2015-02-27 9602
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9603 ld_moved = 0;
8a41dfcda7a32e kernel/sched/fair.c Vincent Guittot 2021-01-07 9604 /* Clear this flag as soon as we find a pullable task */
8a41dfcda7a32e kernel/sched/fair.c Vincent Guittot 2021-01-07 9605 env.flags |= LBF_ALL_PINNED;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9606 if (busiest->nr_running > 1) {
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9607 /*
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9608 * Attempt to move tasks. If find_busiest_group has found
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9609 * an imbalance but busiest->nr_running <= 1, the group is
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9610 * still unbalanced. ld_moved simply stays zero, so it is
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9611 * correctly treated as an imbalance.
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9612 */
c82513e513556a kernel/sched/fair.c Peter Zijlstra 2012-04-26 9613 env.loop_max = min(sysctl_sched_nr_migrate, busiest->nr_running);
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9614
5d6523ebd2f67d kernel/sched/fair.c Peter Zijlstra 2012-03-10 9615 more_balance:
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9616 rq_lock_irqsave(busiest, &rf);
3bed5e2166a5e4 kernel/sched/fair.c Peter Zijlstra 2016-10-03 9617 update_rq_clock(busiest);
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9618
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9619 /*
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9620 * cur_ld_moved - load moved in current iteration
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9621 * ld_moved - cumulative load moved across iterations
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9622 */
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9623 cur_ld_moved = detach_tasks(&env);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9624
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9625 /*
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9626 * We've detached some tasks from busiest_rq. Every
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9627 * task is masked "TASK_ON_RQ_MIGRATING", so we can safely
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9628 * unlock busiest->lock, and we are able to be sure
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9629 * that nobody can manipulate the tasks in parallel.
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9630 * See task_rq_lock() family for the details.
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9631 */
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9632
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9633 rq_unlock(busiest, &rf);
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9634
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9635 if (cur_ld_moved) {
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9636 attach_tasks(&env);
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9637 ld_moved += cur_ld_moved;
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9638 }
163122b7fcfa28 kernel/sched/fair.c Kirill Tkhai 2014-08-20 9639
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9640 local_irq_restore(rf.flags);
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9641
f1cd0858100c67 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9642 if (env.flags & LBF_NEED_BREAK) {
f1cd0858100c67 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9643 env.flags &= ~LBF_NEED_BREAK;
f1cd0858100c67 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9644 goto more_balance;
f1cd0858100c67 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9645 }
f1cd0858100c67 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9646
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9647 /*
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9648 * Revisit (affine) tasks on src_cpu that couldn't be moved to
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9649 * us and move them to an alternate dst_cpu in our sched_group
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9650 * where they can run. The upper limit on how many times we
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9651 * iterate on same src_cpu is dependent on number of CPUs in our
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9652 * sched_group.
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9653 *
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9654 * This changes load balance semantics a bit on who can move
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9655 * load to a given_cpu. In addition to the given_cpu itself
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9656 * (or a ilb_cpu acting on its behalf where given_cpu is
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9657 * nohz-idle), we now have balance_cpu in a position to move
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9658 * load to given_cpu. In rare situations, this may cause
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9659 * conflicts (balance_cpu and given_cpu/ilb_cpu deciding
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9660 * _independently_ and at _same_ time to move some load to
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9661 * given_cpu) causing exceess load to be moved to given_cpu.
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9662 * This however should not happen so much in practice and
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9663 * moreover subsequent load balance cycles should correct the
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9664 * excess load moved.
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9665 */
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9666 if ((env.flags & LBF_DST_PINNED) && env.imbalance > 0) {
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9667
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9668 /* Prevent to re-select dst_cpu via env's CPUs */
c89d92eddfad11 kernel/sched/fair.c Viresh Kumar 2019-02-12 9669 __cpumask_clear_cpu(env.dst_cpu, env.cpus);
7aff2e3a56b724 kernel/sched/fair.c Vladimir Davydov 2013-09-15 9670
78feefc512a091 kernel/sched/fair.c Michael Wang 2012-08-06 9671 env.dst_rq = cpu_rq(env.new_dst_cpu);
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9672 env.dst_cpu = env.new_dst_cpu;
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9673 env.flags &= ~LBF_DST_PINNED;
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9674 env.loop = 0;
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9675 env.loop_break = sched_nr_migrate_break;
e02e60c109ca70 kernel/sched/fair.c Joonsoo Kim 2013-04-23 9676
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9677 /*
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9678 * Go back to "more_balance" rather than "redo" since we
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9679 * need to continue with same src_cpu.
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9680 */
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9681 goto more_balance;
88b8dac0a14c51 kernel/sched/fair.c Srivatsa Vaddagiri 2012-06-19 9682 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9683
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9684 /*
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9685 * We failed to reach balance because of affinity.
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9686 */
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9687 if (sd_parent) {
63b2ca30bdb3db kernel/sched/fair.c Nicolas Pitre 2014-05-26 9688 int *group_imbalance = &sd_parent->groups->sgc->imbalance;
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9689
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9690 if ((env.flags & LBF_SOME_PINNED) && env.imbalance > 0)
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9691 *group_imbalance = 1;
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9692 }
6263322c5e8ffd kernel/sched/fair.c Peter Zijlstra 2013-08-19 9693
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9694 /* All tasks on this runqueue were pinned by CPU affinity */
8e45cb545d98bc kernel/sched/fair.c Peter Zijlstra 2012-02-22 9695 if (unlikely(env.flags & LBF_ALL_PINNED)) {
c89d92eddfad11 kernel/sched/fair.c Viresh Kumar 2019-02-12 9696 __cpumask_clear_cpu(cpu_of(busiest), cpus);
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9697 /*
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9698 * Attempting to continue load balancing at the current
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9699 * sched_domain level only makes sense if there are
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9700 * active CPUs remaining as possible busiest CPUs to
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9701 * pull load from which are not contained within the
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9702 * destination group that is receiving any migrated
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9703 * load.
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9704 */
65a4433aebe36c kernel/sched/fair.c Jeffrey Hugo 2017-06-07 9705 if (!cpumask_subset(cpus, env.dst_grpmask)) {
bbf18b19495942 kernel/sched/fair.c Prashanth Nageshappa 2012-06-19 9706 env.loop = 0;
bbf18b19495942 kernel/sched/fair.c Prashanth Nageshappa 2012-06-19 9707 env.loop_break = sched_nr_migrate_break;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9708 goto redo;
bbf18b19495942 kernel/sched/fair.c Prashanth Nageshappa 2012-06-19 9709 }
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9710 goto out_all_pinned;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9711 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9712 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9713
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9714 if (!ld_moved) {
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9715 schedstat_inc(sd->lb_failed[idle]);
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9716 /*
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9717 * Increment the failure counter only on periodic balance.
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9718 * We do not want newidle balance, which can be very
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9719 * frequent, pollute the failure counter causing
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9720 * excessive cache_hot migrations and active balances.
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9721 */
58b26c4c025778 kernel/sched_fair.c Venkatesh Pallipadi 2010-09-10 9722 if (idle != CPU_NEWLY_IDLE)
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9723 sd->nr_balance_failed++;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9724
bd939f45da24e2 kernel/sched/fair.c Peter Zijlstra 2012-05-02 9725 if (need_active_balance(&env)) {
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9726 unsigned long flags;
8a8c69c3277886 kernel/sched/fair.c Peter Zijlstra 2016-10-04 9727
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9728 raw_spin_lock_irqsave(&busiest->lock, flags);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9729
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9730 /*
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9731 * Don't kick the active_load_balance_cpu_stop,
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9732 * if the curr task on busiest CPU can't be
97fb7a0a8944bd kernel/sched/fair.c Ingo Molnar 2018-03-03 9733 * moved to this_cpu:
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9734 */
3bd3706251ee8a kernel/sched/fair.c Sebastian Andrzej Siewior 2019-04-23 9735 if (!cpumask_test_cpu(this_cpu, busiest->curr->cpus_ptr)) {
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9736 raw_spin_unlock_irqrestore(&busiest->lock,
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9737 flags);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9738 goto out_one_pinned;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9739 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9740
8a41dfcda7a32e kernel/sched/fair.c Vincent Guittot 2021-01-07 9741 /* Record that we found at least one task that could run on this_cpu */
8a41dfcda7a32e kernel/sched/fair.c Vincent Guittot 2021-01-07 9742 env.flags &= ~LBF_ALL_PINNED;
8a41dfcda7a32e kernel/sched/fair.c Vincent Guittot 2021-01-07 9743
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9744 /*
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9745 * ->active_balance synchronizes accesses to
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9746 * ->active_balance_work. Once set, it's cleared
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9747 * only after active load balance is finished.
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9748 */
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9749 if (!busiest->active_balance) {
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9750 busiest->active_balance = 1;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9751 busiest->push_cpu = this_cpu;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9752 active_balance = 1;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9753 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9754 raw_spin_unlock_irqrestore(&busiest->lock, flags);
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9755
bd939f45da24e2 kernel/sched/fair.c Peter Zijlstra 2012-05-02 9756 if (active_balance) {
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9757 stop_one_cpu_nowait(cpu_of(busiest),
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9758 active_load_balance_cpu_stop, busiest,
969c79215a35b0 kernel/sched_fair.c Tejun Heo 2010-05-06 9759 &busiest->active_balance_work);
bd939f45da24e2 kernel/sched/fair.c Peter Zijlstra 2012-05-02 9760 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9761
d02c071183e1c0 kernel/sched/fair.c Srikar Dronamraju 2016-03-23 9762 /* We've kicked active balancing, force task migration. */
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9763 sd->nr_balance_failed = sd->cache_nice_tries+1;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9764 }
e9b9734b74656a kernel/sched/fair.c Vincent Guittot 2021-01-07 9765 } else {
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9766 sd->nr_balance_failed = 0;
e9b9734b74656a kernel/sched/fair.c Vincent Guittot 2021-01-07 9767 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9768
e9b9734b74656a kernel/sched/fair.c Vincent Guittot 2021-01-07 9769 if (likely(!active_balance) || need_active_balance(&env)) {
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9770 /* We were unbalanced, so reset the balancing interval */
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9771 sd->balance_interval = sd->min_interval;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9772 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9773
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9774 goto out;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9775
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9776 out_balanced:
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9777 /*
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9778 * We reach balance although we may have faced some affinity
f6cad8df6b30a5 kernel/sched/fair.c Vincent Guittot 2019-07-01 9779 * constraints. Clear the imbalance flag only if other tasks got
f6cad8df6b30a5 kernel/sched/fair.c Vincent Guittot 2019-07-01 9780 * a chance to move and fix the imbalance.
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9781 */
f6cad8df6b30a5 kernel/sched/fair.c Vincent Guittot 2019-07-01 9782 if (sd_parent && !(env.flags & LBF_ALL_PINNED)) {
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9783 int *group_imbalance = &sd_parent->groups->sgc->imbalance;
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9784
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9785 if (*group_imbalance)
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9786 *group_imbalance = 0;
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9787 }
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9788
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9789 out_all_pinned:
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9790 /*
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9791 * We reach balance because all tasks are pinned at this level so
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9792 * we can't migrate them. Let the imbalance flag set so parent level
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9793 * can try to migrate them.
afdeee0510db91 kernel/sched/fair.c Vincent Guittot 2014-08-26 9794 */
ae92882e5646d8 kernel/sched/fair.c Josh Poimboeuf 2016-06-17 9795 schedstat_inc(sd->lb_balanced[idle]);
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9796
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9797 sd->nr_balance_failed = 0;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9798
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9799 out_one_pinned:
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9800 ld_moved = 0;
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9801
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9802 /*
5ba553eff0c3a7 kernel/sched/fair.c Peter Zijlstra 2019-05-29 9803 * newidle_balance() disregards balance intervals, so we could
5ba553eff0c3a7 kernel/sched/fair.c Peter Zijlstra 2019-05-29 9804 * repeatedly reach this code, which would lead to balance_interval
5ba553eff0c3a7 kernel/sched/fair.c Peter Zijlstra 2019-05-29 9805 * skyrocketting in a short amount of time. Skip the balance_interval
5ba553eff0c3a7 kernel/sched/fair.c Peter Zijlstra 2019-05-29 9806 * increase logic to avoid that.
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9807 */
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9808 if (env.idle == CPU_NEWLY_IDLE)
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9809 goto out;
3f130a37c442d5 kernel/sched/fair.c Valentin Schneider 2018-09-26 9810
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9811 /* tune up the balancing interval */
47b7aee14fd7e4 kernel/sched/fair.c Valentin Schneider 2018-09-26 9812 if ((env.flags & LBF_ALL_PINNED &&
5b54b56be5b540 kernel/sched/fair.c Peter Zijlstra 2011-09-22 9813 sd->balance_interval < MAX_PINNED_INTERVAL) ||
47b7aee14fd7e4 kernel/sched/fair.c Valentin Schneider 2018-09-26 9814 sd->balance_interval < sd->max_interval)
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9815 sd->balance_interval *= 2;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9816 out:
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9817 return ld_moved;
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9818 }
1e3c88bdeb1260 kernel/sched_fair.c Peter Zijlstra 2009-12-17 9819
:::::: The code at line 9551 was first introduced by commit
:::::: 1e3c88bdeb1260edc341e45c9fb8efd182a5c511 sched: Move load balance code into sched_fair.c
:::::: TO: Peter Zijlstra <a.p.zijlstra(a)chello.nl>
:::::: CC: Ingo Molnar <mingo(a)elte.hu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[kees:kspp/memcpy/next-20210519/v0 49/53] drivers/scsi/aha1740.c:271:19: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210519/v0
head: 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd
commit: 431fe12213302a60466170edda968b1ce84c9c16 [49/53] fortify: Detect struct member overflows in mem{cpy,move,set}()
config: parisc-allyesconfig (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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210519/v0
git checkout 431fe12213302a60466170edda968b1ce84c9c16
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from arch/parisc/include/asm/hardware.h:5,
from arch/parisc/include/asm/processor.h:16,
from arch/parisc/include/asm/spinlock.h:7,
from arch/parisc/include/asm/atomic.h:22,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/blkdev.h:5,
from drivers/scsi/aha1740.c:40:
drivers/scsi/aha1740.c: In function 'aha1740_intr_handle':
>> drivers/scsi/aha1740.c:271:19: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
271 | sizeof(SCtmp->sense_buffer),
| ^
include/linux/string.h:276:21: note: in definition of macro 'memcpy_and_pad'
276 | memcpy(dest, src, dest_len); \
| ^~~~~~~~
vim +271 drivers/scsi/aha1740.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 206
^1da177e4c3f415 Linus Torvalds 2005-04-16 207 /* A "high" level interrupt handler */
7d12e780e003f93 David Howells 2006-10-05 208 static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
^1da177e4c3f415 Linus Torvalds 2005-04-16 209 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 210 struct Scsi_Host *host = (struct Scsi_Host *) dev_id;
91ebc1facd7797d Johannes Thumshirn 2018-06-13 211 void (*my_done)(struct scsi_cmnd *);
^1da177e4c3f415 Linus Torvalds 2005-04-16 212 int errstatus, adapstat;
^1da177e4c3f415 Linus Torvalds 2005-04-16 213 int number_serviced;
^1da177e4c3f415 Linus Torvalds 2005-04-16 214 struct ecb *ecbptr;
91ebc1facd7797d Johannes Thumshirn 2018-06-13 215 struct scsi_cmnd *SCtmp;
^1da177e4c3f415 Linus Torvalds 2005-04-16 216 unsigned int base;
^1da177e4c3f415 Linus Torvalds 2005-04-16 217 unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16 218 int handled = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 219 struct aha1740_sg *sgptr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 220 struct eisa_device *edev;
^1da177e4c3f415 Linus Torvalds 2005-04-16 221
^1da177e4c3f415 Linus Torvalds 2005-04-16 222 if (!host)
^1da177e4c3f415 Linus Torvalds 2005-04-16 223 panic("aha1740.c: Irq from unknown host!\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 224 spin_lock_irqsave(host->host_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16 225 base = host->io_port;
^1da177e4c3f415 Linus Torvalds 2005-04-16 226 number_serviced = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 227 edev = HOSTDATA(host)->edev;
^1da177e4c3f415 Linus Torvalds 2005-04-16 228
^1da177e4c3f415 Linus Torvalds 2005-04-16 229 while(inb(G2STAT(base)) & G2STAT_INTPEND) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 230 handled = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 231 DEB(printk("aha1740_intr top of loop.\n"));
^1da177e4c3f415 Linus Torvalds 2005-04-16 232 adapstat = inb(G2INTST(base));
^1da177e4c3f415 Linus Torvalds 2005-04-16 233 ecbptr = ecb_dma_to_cpu (host, inl(MBOXIN0(base)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 234 outb(G2CNTRL_IRST,G2CNTRL(base)); /* interrupt reset */
^1da177e4c3f415 Linus Torvalds 2005-04-16 235
^1da177e4c3f415 Linus Torvalds 2005-04-16 236 switch ( adapstat & G2INTST_MASK ) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 237 case G2INTST_CCBRETRY:
^1da177e4c3f415 Linus Torvalds 2005-04-16 238 case G2INTST_CCBERROR:
^1da177e4c3f415 Linus Torvalds 2005-04-16 239 case G2INTST_CCBGOOD:
^1da177e4c3f415 Linus Torvalds 2005-04-16 240 /* Host Ready -> Mailbox in complete */
^1da177e4c3f415 Linus Torvalds 2005-04-16 241 outb(G2CNTRL_HRDY,G2CNTRL(base));
^1da177e4c3f415 Linus Torvalds 2005-04-16 242 if (!ecbptr) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 243 printk("Aha1740 null ecbptr in interrupt (%x,%x,%x,%d)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 244 inb(G2STAT(base)),adapstat,
^1da177e4c3f415 Linus Torvalds 2005-04-16 245 inb(G2INTST(base)), number_serviced++);
^1da177e4c3f415 Linus Torvalds 2005-04-16 246 continue;
^1da177e4c3f415 Linus Torvalds 2005-04-16 247 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 248 SCtmp = ecbptr->SCpnt;
^1da177e4c3f415 Linus Torvalds 2005-04-16 249 if (!SCtmp) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 250 printk("Aha1740 null SCtmp in interrupt (%x,%x,%x,%d)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 251 inb(G2STAT(base)),adapstat,
^1da177e4c3f415 Linus Torvalds 2005-04-16 252 inb(G2INTST(base)), number_serviced++);
^1da177e4c3f415 Linus Torvalds 2005-04-16 253 continue;
^1da177e4c3f415 Linus Torvalds 2005-04-16 254 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 255 sgptr = (struct aha1740_sg *) SCtmp->host_scribble;
c66cc13c16377d1 FUJITA Tomonori 2007-05-14 256 scsi_dma_unmap(SCtmp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 257
^1da177e4c3f415 Linus Torvalds 2005-04-16 258 /* Free the sg block */
^1da177e4c3f415 Linus Torvalds 2005-04-16 259 dma_free_coherent (&edev->dev,
^1da177e4c3f415 Linus Torvalds 2005-04-16 260 sizeof (struct aha1740_sg),
^1da177e4c3f415 Linus Torvalds 2005-04-16 261 SCtmp->host_scribble,
^1da177e4c3f415 Linus Torvalds 2005-04-16 262 sgptr->sg_dma_addr);
^1da177e4c3f415 Linus Torvalds 2005-04-16 263
^1da177e4c3f415 Linus Torvalds 2005-04-16 264 /* Fetch the sense data, and tuck it away, in
^1da177e4c3f415 Linus Torvalds 2005-04-16 265 the required slot. The Adaptec
^1da177e4c3f415 Linus Torvalds 2005-04-16 266 automatically fetches it, and there is no
^1da177e4c3f415 Linus Torvalds 2005-04-16 267 guarantee that we will still have it in the
^1da177e4c3f415 Linus Torvalds 2005-04-16 268 cdb when we come back */
^1da177e4c3f415 Linus Torvalds 2005-04-16 269 if ( (adapstat & G2INTST_MASK) == G2INTST_CCBERROR ) {
123445f622832f3 Kees Cook 2021-04-14 270 memcpy_and_pad(SCtmp->sense_buffer,
123445f622832f3 Kees Cook 2021-04-14 @271 sizeof(SCtmp->sense_buffer),
123445f622832f3 Kees Cook 2021-04-14 272 ecbptr->sense,
123445f622832f3 Kees Cook 2021-04-14 273 min(sizeof(SCtmp->sense_buffer),
123445f622832f3 Kees Cook 2021-04-14 274 sizeof(ecbptr->sense)),
123445f622832f3 Kees Cook 2021-04-14 275 0);
^1da177e4c3f415 Linus Torvalds 2005-04-16 276 errstatus = aha1740_makecode(ecbptr->sense,ecbptr->status);
^1da177e4c3f415 Linus Torvalds 2005-04-16 277 } else
^1da177e4c3f415 Linus Torvalds 2005-04-16 278 errstatus = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 279 DEB(if (errstatus)
^1da177e4c3f415 Linus Torvalds 2005-04-16 280 printk("aha1740_intr_handle: returning %6x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 281 errstatus));
^1da177e4c3f415 Linus Torvalds 2005-04-16 282 SCtmp->result = errstatus;
^1da177e4c3f415 Linus Torvalds 2005-04-16 283 my_done = ecbptr->done;
^1da177e4c3f415 Linus Torvalds 2005-04-16 284 memset(ecbptr,0,sizeof(struct ecb));
^1da177e4c3f415 Linus Torvalds 2005-04-16 285 if ( my_done )
^1da177e4c3f415 Linus Torvalds 2005-04-16 286 my_done(SCtmp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 287 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 288
^1da177e4c3f415 Linus Torvalds 2005-04-16 289 case G2INTST_HARDFAIL:
^1da177e4c3f415 Linus Torvalds 2005-04-16 290 printk(KERN_ALERT "aha1740 hardware failure!\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 291 panic("aha1740.c"); /* Goodbye */
^1da177e4c3f415 Linus Torvalds 2005-04-16 292
^1da177e4c3f415 Linus Torvalds 2005-04-16 293 case G2INTST_ASNEVENT:
^1da177e4c3f415 Linus Torvalds 2005-04-16 294 printk("aha1740 asynchronous event: %02x %02x %02x %02x %02x\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 295 adapstat,
^1da177e4c3f415 Linus Torvalds 2005-04-16 296 inb(MBOXIN0(base)),
^1da177e4c3f415 Linus Torvalds 2005-04-16 297 inb(MBOXIN1(base)),
^1da177e4c3f415 Linus Torvalds 2005-04-16 298 inb(MBOXIN2(base)),
^1da177e4c3f415 Linus Torvalds 2005-04-16 299 inb(MBOXIN3(base))); /* Say What? */
^1da177e4c3f415 Linus Torvalds 2005-04-16 300 /* Host Ready -> Mailbox in complete */
^1da177e4c3f415 Linus Torvalds 2005-04-16 301 outb(G2CNTRL_HRDY,G2CNTRL(base));
^1da177e4c3f415 Linus Torvalds 2005-04-16 302 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 303
^1da177e4c3f415 Linus Torvalds 2005-04-16 304 case G2INTST_CMDGOOD:
^1da177e4c3f415 Linus Torvalds 2005-04-16 305 /* set immediate command success flag here: */
^1da177e4c3f415 Linus Torvalds 2005-04-16 306 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 307
^1da177e4c3f415 Linus Torvalds 2005-04-16 308 case G2INTST_CMDERROR:
^1da177e4c3f415 Linus Torvalds 2005-04-16 309 /* Set immediate command failure flag here: */
^1da177e4c3f415 Linus Torvalds 2005-04-16 310 break;
^1da177e4c3f415 Linus Torvalds 2005-04-16 311 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 312 number_serviced++;
^1da177e4c3f415 Linus Torvalds 2005-04-16 313 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 314
^1da177e4c3f415 Linus Torvalds 2005-04-16 315 spin_unlock_irqrestore(host->host_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16 316 return IRQ_RETVAL(handled);
^1da177e4c3f415 Linus Torvalds 2005-04-16 317 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 318
:::::: The code at line 271 was first introduced by commit
:::::: 123445f622832f3b4c854f0d32a6e109a51d37da scsi: aha1740: Avoid over-read of sense buffer
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Kees Cook <keescook(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[thomash:topic/ttm_branch_v3 14/14] drivers/gpu/drm/i915/gem/i915_gem_ttm.c:569:38: sparse: sparse: symbol 'i915_gem_ttm_obj_ops' was not declared. Should it be static?
by kernel test robot
tree: git://people.freedesktop.org/~thomash/linux topic/ttm_branch_v3
head: ed0bde777934916c30fbecb2b351f549eb3a0d0f
commit: ed0bde777934916c30fbecb2b351f549eb3a0d0f [14/14] drm/i915: Use ttm mmap handling for ttm bo's.
config: i386-randconfig-s001-20210520 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add thomash git://people.freedesktop.org/~thomash/linux
git fetch --no-tags thomash topic/ttm_branch_v3
git checkout ed0bde777934916c30fbecb2b351f549eb3a0d0f
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:60:22: sparse: sparse: symbol 'i915_lmem0_placement' was not declared. Should it be static?
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:67:22: sparse: sparse: symbol 'i915_lmem0_sys_placement' was not declared. Should it be static?
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:74:22: sparse: sparse: symbol 'i915_sys_placement' was not declared. Should it be static?
>> drivers/gpu/drm/i915/gem/i915_gem_ttm.c:569:38: sparse: sparse: symbol 'i915_gem_ttm_obj_ops' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[freescale-fslc:pr/344 14893/18956] drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1094:19: error: implicit declaration of function 'pci_iomap'; did you mean 'pcim_iomap'?
by kernel test robot
Hi Fugang,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc pr/344
head: 2cbb55e591febb414b623269d61d4444113c285f
commit: f186a4e65f54a28973c743f8c007b18c1ce95be6 [14893/18956] MLK-24962 net: wireless: nxp: mxm_wifiex: upgrade to mxm5x16203 release
config: sh-allmodconfig (attached as .config)
compiler: sh4-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://github.com/Freescale/linux-fslc/commit/f186a4e65f54a28973c743f8c0...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/344
git checkout f186a4e65f54a28973c743f8c007b18c1ce95be6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:31:
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.h:133:20: error: array type has incomplete element type 'struct msix_entry'
133 | struct msix_entry msix_entries[PCIE_NUM_MSIX_VECTORS];
| ^~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:394:5: warning: no previous prototype for 'woal_pcie_probe' [-Wmissing-prototypes]
394 | int woal_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
| ^~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: In function 'woal_pcie_probe':
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:441:6: error: implicit declaration of function 'pci_is_enabled'; did you mean 'pci_acs_enabled'? [-Werror=implicit-function-declaration]
441 | if (pci_is_enabled(pdev))
| ^~~~~~~~~~~~~~
| pci_acs_enabled
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: At top level:
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:896:13: warning: no previous prototype for 'woal_pcie_write_data_sync' [-Wmissing-prototypes]
896 | mlan_status woal_pcie_write_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:912:13: warning: no previous prototype for 'woal_pcie_read_data_sync' [-Wmissing-prototypes]
912 | mlan_status woal_pcie_read_data_sync(moal_handle *handle, mlan_buffer *pmbuf,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: In function 'woal_pcie_init':
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1089:8: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
1089 | ret = pci_request_region(pdev, 0, DRV_NAME);
| ^~~~~~~~~~~~~~~~~~
| pci_request_regions
>> drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1094:19: error: implicit declaration of function 'pci_iomap'; did you mean 'pcim_iomap'? [-Werror=implicit-function-declaration]
1094 | card->pci_mmap = pci_iomap(pdev, 0, 0);
| ^~~~~~~~~
| pcim_iomap
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1094:17: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1094 | card->pci_mmap = pci_iomap(pdev, 0, 0);
| ^
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1104:18: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1104 | card->pci_mmap1 = pci_iomap(pdev, 2, 0);
| ^
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1118:2: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
1118 | pci_release_region(pdev, 2);
| ^~~~~~~~~~~~~~~~~~
| pci_release_regions
>> drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1120:2: error: implicit declaration of function 'pci_iounmap'; did you mean 'pcim_iounmap'? [-Werror=implicit-function-declaration]
1120 | pci_iounmap(pdev, card->pci_mmap);
| ^~~~~~~~~~~
| pcim_iounmap
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: In function 'woal_pcie_register_dev':
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1174:9: error: implicit declaration of function 'pci_enable_msix_exact' [-Werror=implicit-function-declaration]
1174 | ret = pci_enable_msix_exact(pdev, card->msix_entries, nvec);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1197:6: error: implicit declaration of function 'pci_disable_msix'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
1197 | pci_disable_msix(pdev);
| ^~~~~~~~~~~~~~~~
| pci_disable_sriov
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1209:9: error: implicit declaration of function 'pci_enable_msi'; did you mean 'pci_enable_ats'? [-Werror=implicit-function-declaration]
1209 | ret = pci_enable_msi(pdev);
| ^~~~~~~~~~~~~~
| pci_enable_ats
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1216:5: error: implicit declaration of function 'pci_disable_msi'; did you mean 'pci_disable_ats'? [-Werror=implicit-function-declaration]
1216 | pci_disable_msi(pdev);
| ^~~~~~~~~~~~~~~
| pci_disable_ats
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c: At top level:
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1418:5: warning: no previous prototype for 'woal_pcie_dump_reg_info' [-Wmissing-prototypes]
1418 | int woal_pcie_dump_reg_info(moal_handle *phandle, t_u8 *buffer)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1752:13: warning: no previous prototype for 'woal_read_reg_eight_bit' [-Wmissing-prototypes]
1752 | mlan_status woal_read_reg_eight_bit(moal_handle *handle, t_u32 reg, t_u8 *data)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:1767:13: warning: no previous prototype for 'woal_pcie_rdwr_firmware' [-Wmissing-prototypes]
1767 | rdwr_status woal_pcie_rdwr_firmware(moal_handle *phandle, t_u8 doneflag)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:2013:6: warning: no previous prototype for 'woal_pcie_dump_fw_info_v2' [-Wmissing-prototypes]
2013 | void woal_pcie_dump_fw_info_v2(moal_handle *phandle)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:2192:6: warning: no previous prototype for 'woal_pcie_dump_fw_info' [-Wmissing-prototypes]
2192 | void woal_pcie_dump_fw_info(moal_handle *phandle)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_main.h:130,
from drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.h:62,
from drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c:31:
drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_priv.h:282:34: warning: 'woal_private_args' defined but not used [-Wunused-const-variable=]
282 | static const struct iw_priv_args woal_private_args[] = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1094 drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_pcie.c
688b67b2c7220b Fugang Duan 2020-04-19 1088
688b67b2c7220b Fugang Duan 2020-04-19 1089 ret = pci_request_region(pdev, 0, DRV_NAME);
688b67b2c7220b Fugang Duan 2020-04-19 1090 if (ret) {
688b67b2c7220b Fugang Duan 2020-04-19 1091 PRINTM(MERROR, "req_reg(0) error\n");
688b67b2c7220b Fugang Duan 2020-04-19 1092 goto err_req_region0;
688b67b2c7220b Fugang Duan 2020-04-19 1093 }
688b67b2c7220b Fugang Duan 2020-04-19 @1094 card->pci_mmap = pci_iomap(pdev, 0, 0);
688b67b2c7220b Fugang Duan 2020-04-19 1095 if (!card->pci_mmap) {
688b67b2c7220b Fugang Duan 2020-04-19 1096 PRINTM(MERROR, "iomap(0) error\n");
688b67b2c7220b Fugang Duan 2020-04-19 1097 goto err_iomap0;
688b67b2c7220b Fugang Duan 2020-04-19 1098 }
688b67b2c7220b Fugang Duan 2020-04-19 1099 ret = pci_request_region(pdev, 2, DRV_NAME);
688b67b2c7220b Fugang Duan 2020-04-19 1100 if (ret) {
688b67b2c7220b Fugang Duan 2020-04-19 1101 PRINTM(MERROR, "req_reg(2) error\n");
688b67b2c7220b Fugang Duan 2020-04-19 1102 goto err_req_region2;
688b67b2c7220b Fugang Duan 2020-04-19 1103 }
688b67b2c7220b Fugang Duan 2020-04-19 1104 card->pci_mmap1 = pci_iomap(pdev, 2, 0);
688b67b2c7220b Fugang Duan 2020-04-19 1105 if (!card->pci_mmap1) {
688b67b2c7220b Fugang Duan 2020-04-19 1106 PRINTM(MERROR, "iomap(2) error\n");
688b67b2c7220b Fugang Duan 2020-04-19 1107 goto err_iomap2;
688b67b2c7220b Fugang Duan 2020-04-19 1108 }
688b67b2c7220b Fugang Duan 2020-04-19 1109
6b4a83a75fc1dc Fugang Duan 2020-05-28 1110 PRINTM(MINFO,
6b4a83a75fc1dc Fugang Duan 2020-05-28 1111 "PCI memory map Virt0: %p PCI memory map Virt2: "
6b4a83a75fc1dc Fugang Duan 2020-05-28 1112 "%p\n",
6b4a83a75fc1dc Fugang Duan 2020-05-28 1113 card->pci_mmap, card->pci_mmap1);
688b67b2c7220b Fugang Duan 2020-04-19 1114
688b67b2c7220b Fugang Duan 2020-04-19 1115 return MLAN_STATUS_SUCCESS;
688b67b2c7220b Fugang Duan 2020-04-19 1116
688b67b2c7220b Fugang Duan 2020-04-19 1117 err_iomap2:
688b67b2c7220b Fugang Duan 2020-04-19 1118 pci_release_region(pdev, 2);
688b67b2c7220b Fugang Duan 2020-04-19 1119 err_req_region2:
688b67b2c7220b Fugang Duan 2020-04-19 @1120 pci_iounmap(pdev, card->pci_mmap);
688b67b2c7220b Fugang Duan 2020-04-19 1121 err_iomap0:
688b67b2c7220b Fugang Duan 2020-04-19 1122 pci_release_region(pdev, 0);
688b67b2c7220b Fugang Duan 2020-04-19 1123 err_req_region0:
688b67b2c7220b Fugang Duan 2020-04-19 1124 #if 0
688b67b2c7220b Fugang Duan 2020-04-19 1125 err_set_dma_mask:
688b67b2c7220b Fugang Duan 2020-04-19 1126 #endif
688b67b2c7220b Fugang Duan 2020-04-19 1127
:::::: The code at line 1094 was first introduced by commit
:::::: 688b67b2c7220b01521ffe560da7eee33042c7bd MLK-23806-01 net: wireless: nxp: mxm_wifiex: add initial MxM wifi driver
:::::: TO: Fugang Duan <fugang.duan(a)nxp.com>
:::::: CC: Fugang Duan <fugang.duan(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH v2 3/3] Input: mtk-pmic-keys - add support for MT6358
by kernel test robot
Hi Mattijs,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on input/next]
[also build test ERROR on v5.13-rc2 next-20210519]
[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/Mattijs-Korpershoek/input-MT6358...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: s390-randconfig-r014-20210519 (attached as .config)
compiler: s390-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://github.com/0day-ci/linux/commit/74aae2763d0c259046aa7079a46ba0dfe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mattijs-Korpershoek/input-MT6358-PMIC-button-support/20210513-001558
git checkout 74aae2763d0c259046aa7079a46ba0dfe1995e37
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/input/keyboard/mtk-pmic-keys.c:80:22: error: 'MT6358_TOPSTATUS' undeclared here (not in a function); did you mean 'MT6397_OCSTATUS0'?
80 | MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
| ^~~~~~~~~~~~~~~~
drivers/input/keyboard/mtk-pmic-keys.c:47:14: note: in definition of macro 'MTK_PMIC_KEYS_REGS'
47 | .deb_reg = _deb_reg, \
| ^~~~~~~~
>> drivers/input/keyboard/mtk-pmic-keys.c:85:18: error: 'MT6358_TOP_RST_MISC' undeclared here (not in a function); did you mean 'MT6397_TOP_RST_MISC'?
85 | .pmic_rst_reg = MT6358_TOP_RST_MISC,
| ^~~~~~~~~~~~~~~~~~~
| MT6397_TOP_RST_MISC
vim +80 drivers/input/keyboard/mtk-pmic-keys.c
77
78 static const struct mtk_pmic_regs mt6358_regs = {
79 .keys_regs[MTK_PMIC_PWRKEY_INDEX] =
> 80 MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
81 0x2, MT6358_PSC_TOP_INT_CON0, 0x5),
82 .keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
83 MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS,
84 0x8, MT6358_PSC_TOP_INT_CON0, 0xa),
> 85 .pmic_rst_reg = MT6358_TOP_RST_MISC,
86 };
87
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
net/mac80211/led.c:34:16: error: no member named 'name' in 'struct led_trigger'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: b64acb28da8394485f0762e657470c9fc33aca4d ath9k: fix build error with LEDS_CLASS=m
date: 4 months ago
config: powerpc64-randconfig-r011-20210520 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b64acb28da8394485f0762e657470c9fc33aca4d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:79:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:83:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:85:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/mac80211/led.c:10:
In file included from net/mac80211/led.h:9:
In file included from net/mac80211/ieee80211_i.h:16:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:87:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/mac80211/led.c:34:16: error: no member named 'name' in 'struct led_trigger'
local->rx_led.name = kasprintf(GFP_KERNEL, "%srx",
~~~~~~~~~~~~~ ^
net/mac80211/led.c:36:16: error: no member named 'name' in 'struct led_trigger'
local->tx_led.name = kasprintf(GFP_KERNEL, "%stx",
~~~~~~~~~~~~~ ^
net/mac80211/led.c:38:19: error: no member named 'name' in 'struct led_trigger'
local->assoc_led.name = kasprintf(GFP_KERNEL, "%sassoc",
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:40:19: error: no member named 'name' in 'struct led_trigger'
local->radio_led.name = kasprintf(GFP_KERNEL, "%sradio",
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:46:22: error: no member named 'name' in 'struct led_trigger'
kfree(local->rx_led.name);
~~~~~~~~~~~~~ ^
net/mac80211/led.c:47:22: error: no member named 'name' in 'struct led_trigger'
kfree(local->tx_led.name);
~~~~~~~~~~~~~ ^
net/mac80211/led.c:48:25: error: no member named 'name' in 'struct led_trigger'
kfree(local->assoc_led.name);
~~~~~~~~~~~~~~~~ ^
net/mac80211/led.c:49:25: error: no member named 'name' in 'struct led_trigger'
kfree(local->radio_led.name);
~~~~~~~~~~~~~~~~ ^
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
>> net/mac80211/led.c:54:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:65:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:694:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mac80211/led.c:74:57: error: no member named 'trigger' in 'struct led_classdev'
struct ieee80211_local *local = container_of(led_cdev->trigger,
~~~~~~~~ ^
include/linux/kernel.h:695:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MAC80211_LEDS
Depends on NET && WIRELESS && MAC80211 && (LEDS_CLASS || LEDS_CLASS
Selected by
- CARL9170_LEDS && NETDEVICES && WLAN && WLAN_VENDOR_ATH && CARL9170
vim +34 net/mac80211/led.c
cdcb006fbe7a74 net/mac80211/ieee80211_led.c Ivo van Doorn 2008-01-07 31
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 32 void ieee80211_alloc_led_names(struct ieee80211_local *local)
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 33 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 @34 local->rx_led.name = kasprintf(GFP_KERNEL, "%srx",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 35 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 36 local->tx_led.name = kasprintf(GFP_KERNEL, "%stx",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 37 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 38 local->assoc_led.name = kasprintf(GFP_KERNEL, "%sassoc",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 39 wiphy_name(local->hw.wiphy));
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 40 local->radio_led.name = kasprintf(GFP_KERNEL, "%sradio",
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 41 wiphy_name(local->hw.wiphy));
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 42 }
fe67c913f1ec2a net/mac80211/led.c Johannes Berg 2010-11-27 43
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 44 void ieee80211_free_led_names(struct ieee80211_local *local)
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 45 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 46 kfree(local->rx_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 47 kfree(local->tx_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 48 kfree(local->assoc_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 49 kfree(local->radio_led.name);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 50 }
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 51
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 52 static int ieee80211_tx_led_activate(struct led_classdev *led_cdev)
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 53 {
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 @54 struct ieee80211_local *local = container_of(led_cdev->trigger,
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 55 struct ieee80211_local,
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 56 tx_led);
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 57
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 58 atomic_inc(&local->tx_led_active);
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 59
2282e125a406e0 net/mac80211/led.c Uwe Kleine-König 2018-07-02 60 return 0;
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 61 }
8d5c25856859bd net/mac80211/led.c Johannes Berg 2015-04-23 62
:::::: The code at line 34 was first introduced by commit
:::::: 8d5c25856859bd826aca4b88103552a80b344cef mac80211: make LED triggering depend on activation
:::::: TO: Johannes Berg <johannes.berg(a)intel.com>
:::::: CC: Johannes Berg <johannes.berg(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
/usr/bin/ld: kernel/irq/generic-chip.o:undefined reference to `X86_FEATURE_XMM2'
by kernel test robot
Hi Johannes,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: a30cc14fe49c2d5913caf6b987d7cbd86c5e370b um: Don't use generic barrier.h
date: 1 year, 8 months ago
config: um-randconfig-r011-20210520 (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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a30cc14fe49c2d5913caf6b987d7cbd86c5e370b
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> /usr/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
>> /usr/bin/ld: kernel/irq/generic-chip.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM'
collect2: error: ld returned 1 exit status
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months