[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202310202343.ARtbp2kg-lkp@intel.com>
Date: Fri, 20 Oct 2023 23:18:25 +0800
From: kernel test robot <lkp@...el.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: kernel/context_tracking.c:126:39: sparse: sparse: incorrect type in
initializer (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ce55c22ec8b223a90ff3e084d842f73cfba35588
commit: 481461f5109919babbb393d6f68002936b8e2493 linux/export.h: make <linux/export.h> independent of CONFIG_MODULES
date: 3 months ago
config: x86_64-alldefconfig (https://download.01.org/0day-ci/archive/20231020/202310202343.ARtbp2kg-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310202343.ARtbp2kg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310202343.ARtbp2kg-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/context_tracking.c:126:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct context_tracking * @@
kernel/context_tracking.c:126:39: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/context_tracking.c:126:39: sparse: got struct context_tracking *
kernel/context_tracking.c:165:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct context_tracking * @@
kernel/context_tracking.c:165:39: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/context_tracking.c:165:39: sparse: got struct context_tracking *
kernel/context_tracking.c:206:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct context_tracking * @@
kernel/context_tracking.c:206:39: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/context_tracking.c:206:39: sparse: got struct context_tracking *
kernel/context_tracking.c:261:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct context_tracking * @@
kernel/context_tracking.c:261:39: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/context_tracking.c:261:39: sparse: got struct context_tracking *
--
>> arch/x86/kernel/cpu/bugs.c:64:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/cpu/bugs.c:64:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/cpu/bugs.c:64:9: sparse: got unsigned long long *
arch/x86/kernel/cpu/bugs.c:74:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/cpu/bugs.c:74:13: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/cpu/bugs.c:74:13: sparse: got unsigned long long *
arch/x86/kernel/cpu/bugs.c:77:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/cpu/bugs.c:77:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/cpu/bugs.c:77:9: sparse: got unsigned long long *
arch/x86/kernel/cpu/bugs.c:89:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/cpu/bugs.c:89:16: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/cpu/bugs.c:89:16: sparse: got unsigned long long *
vim +126 kernel/context_tracking.c
172114552701b8 Frederic Weisbecker 2022-06-08 115
172114552701b8 Frederic Weisbecker 2022-06-08 116 /*
172114552701b8 Frederic Weisbecker 2022-06-08 117 * Enter an RCU extended quiescent state, which can be either the
172114552701b8 Frederic Weisbecker 2022-06-08 118 * idle loop or adaptive-tickless usermode execution.
172114552701b8 Frederic Weisbecker 2022-06-08 119 *
172114552701b8 Frederic Weisbecker 2022-06-08 120 * We crowbar the ->dynticks_nmi_nesting field to zero to allow for
172114552701b8 Frederic Weisbecker 2022-06-08 121 * the possibility of usermode upcalls having messed up our count
172114552701b8 Frederic Weisbecker 2022-06-08 122 * of interrupt nesting level during the prior busy period.
172114552701b8 Frederic Weisbecker 2022-06-08 123 */
171476775d32a4 Frederic Weisbecker 2022-06-08 124 static void noinstr ct_kernel_exit(bool user, int offset)
172114552701b8 Frederic Weisbecker 2022-06-08 125 {
172114552701b8 Frederic Weisbecker 2022-06-08 @126 struct context_tracking *ct = this_cpu_ptr(&context_tracking);
172114552701b8 Frederic Weisbecker 2022-06-08 127
172114552701b8 Frederic Weisbecker 2022-06-08 128 WARN_ON_ONCE(ct_dynticks_nmi_nesting() != DYNTICK_IRQ_NONIDLE);
172114552701b8 Frederic Weisbecker 2022-06-08 129 WRITE_ONCE(ct->dynticks_nmi_nesting, 0);
172114552701b8 Frederic Weisbecker 2022-06-08 130 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
172114552701b8 Frederic Weisbecker 2022-06-08 131 ct_dynticks_nesting() == 0);
172114552701b8 Frederic Weisbecker 2022-06-08 132 if (ct_dynticks_nesting() != 1) {
172114552701b8 Frederic Weisbecker 2022-06-08 133 // RCU will still be watching, so just do accounting and leave.
172114552701b8 Frederic Weisbecker 2022-06-08 134 ct->dynticks_nesting--;
172114552701b8 Frederic Weisbecker 2022-06-08 135 return;
172114552701b8 Frederic Weisbecker 2022-06-08 136 }
172114552701b8 Frederic Weisbecker 2022-06-08 137
172114552701b8 Frederic Weisbecker 2022-06-08 138 instrumentation_begin();
172114552701b8 Frederic Weisbecker 2022-06-08 139 lockdep_assert_irqs_disabled();
172114552701b8 Frederic Weisbecker 2022-06-08 140 trace_rcu_dyntick(TPS("Start"), ct_dynticks_nesting(), 0, ct_dynticks());
172114552701b8 Frederic Weisbecker 2022-06-08 141 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current));
172114552701b8 Frederic Weisbecker 2022-06-08 142 rcu_preempt_deferred_qs(current);
172114552701b8 Frederic Weisbecker 2022-06-08 143
171476775d32a4 Frederic Weisbecker 2022-06-08 144 // instrumentation for the noinstr ct_kernel_exit_state()
171476775d32a4 Frederic Weisbecker 2022-06-08 145 instrument_atomic_write(&ct->state, sizeof(ct->state));
172114552701b8 Frederic Weisbecker 2022-06-08 146
172114552701b8 Frederic Weisbecker 2022-06-08 147 instrumentation_end();
172114552701b8 Frederic Weisbecker 2022-06-08 148 WRITE_ONCE(ct->dynticks_nesting, 0); /* Avoid irq-access tearing. */
172114552701b8 Frederic Weisbecker 2022-06-08 149 // RCU is watching here ...
171476775d32a4 Frederic Weisbecker 2022-06-08 150 ct_kernel_exit_state(offset);
172114552701b8 Frederic Weisbecker 2022-06-08 151 // ... but is no longer watching here.
172114552701b8 Frederic Weisbecker 2022-06-08 152 rcu_dynticks_task_enter();
172114552701b8 Frederic Weisbecker 2022-06-08 153 }
172114552701b8 Frederic Weisbecker 2022-06-08 154
:::::: The code at line 126 was first introduced by commit
:::::: 172114552701b85d5c3b1a089a73ee85d0d7786b rcu/context-tracking: Move RCU-dynticks internal functions to context_tracking
:::::: TO: Frederic Weisbecker <frederic@...nel.org>
:::::: CC: Paul E. McKenney <paulmck@...nel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists