From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 8 Nov 2023 05:48:25 +0800 [thread overview]
Message-ID: <202311080409.LlOfTR3m-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff
commit: 7a025e91abd23effe869a05d037b26770ffa0309 mm/vmstat: Use preempt_[dis|en]able_nested()
date: 1 year, 2 months ago
config: loongarch-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231108/202311080409.LlOfTR3m-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231108/202311080409.LlOfTR3m-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311080409.LlOfTR3m-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got unsigned int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got unsigned int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got unsigned int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got unsigned int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got int [noderef] __percpu *
>> mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:358:9: sparse: expected void *ptr
mm/vmstat.c:358:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:394:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:394:9: sparse: expected void *ptr
mm/vmstat.c:394:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:440:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:440:9: sparse: expected void *ptr
mm/vmstat.c:440:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:463:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:463:9: sparse: expected void *ptr
mm/vmstat.c:463:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got unsigned int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:496:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
mm/vmstat.c:496:9: sparse: expected void *ptr
mm/vmstat.c:496:9: sparse: got int [noderef] __percpu *
mm/vmstat.c:519:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
mm/vmstat.c:519:9: sparse: expected void *ptr
vim +358 mm/vmstat.c
337
338 /*
339 * For use when we know that interrupts are disabled,
340 * or when we know that preemption is disabled and that
341 * particular counter cannot be updated from interrupt context.
342 */
343 void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
344 long delta)
345 {
346 struct per_cpu_zonestat __percpu *pcp = zone->per_cpu_zonestats;
347 s8 __percpu *p = pcp->vm_stat_diff + item;
348 long x;
349 long t;
350
351 /*
352 * Accurate vmstat updates require a RMW. On !PREEMPT_RT kernels,
353 * atomicity is provided by IRQs being disabled -- either explicitly
354 * or via local_lock_irq. On PREEMPT_RT, local_lock_irq only disables
355 * CPU migrations and preemption potentially corrupts a counter so
356 * disable preemption.
357 */
> 358 preempt_disable_nested();
359
360 x = delta + __this_cpu_read(*p);
361
362 t = __this_cpu_read(pcp->stat_threshold);
363
364 if (unlikely(abs(x) > t)) {
365 zone_page_state_add(x, zone, item);
366 x = 0;
367 }
368 __this_cpu_write(*p, x);
369
370 preempt_enable_nested();
371 }
372 EXPORT_SYMBOL(__mod_zone_page_state);
373
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-07 21:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 21:48 kernel test robot [this message]
2023-11-10 15:43 ` mm/vmstat.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) Sebastian Andrzej Siewior
2023-11-11 1:56 ` Philip Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202311080409.LlOfTR3m-lkp@intel.com \
--to=lkp@intel.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox