From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [norov:assert 4/6] arch/x86/kernel/nmi_selftest.c:27:8: error: unknown type name 'cpumask'; did you mean 'cpumask_t'?
Date: Tue, 07 Apr 2026 21:34:43 +0800 [thread overview]
Message-ID: <202604072149.txbSL5wq-lkp@intel.com> (raw)
tree: https://github.com/norov/linux assert
head: 5e88fbeeb3c7355139ca86067d68ea8c77534b92
commit: 7a49ab0bc5eb96c752ad339794e476c19613cb5d [4/6] nmi_selftest
config: x86_64-buildonly-randconfig-001-20260407 (https://download.01.org/0day-ci/archive/20260407/202604072149.txbSL5wq-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604072149.txbSL5wq-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/202604072149.txbSL5wq-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kernel/nmi_selftest.c:27:8: error: unknown type name 'cpumask'; did you mean 'cpumask_t'?
27 | static cpumask nmi_ipi_mask __initdata;
| ^~~~~~~
| cpumask_t
arch/x86/kernel/nmi_selftest.c: In function 'test_nmi_ipi_callback':
>> arch/x86/kernel/nmi_selftest.c:56:45: error: passing argument 2 of 'cpumask_test_and_clear_cpu' from incompatible pointer type [-Wincompatible-pointer-types]
56 | if (cpumask_test_and_clear_cpu(cpu, &nmi_ipi_mask))
| ^~~~~~~~~~~~~
| |
| int *
In file included from include/linux/smp.h:13,
from arch/x86/kernel/nmi_selftest.c:11:
include/linux/cpumask.h:677:58: note: expected 'struct cpumask *' but argument is of type 'int *'
677 | bool cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask)
| ~~~~~~~~~~~~~~~~^~~~~~~
arch/x86/kernel/nmi_selftest.c: In function 'remote_ipi':
>> arch/x86/kernel/nmi_selftest.c:92:22: error: passing argument 1 of 'cpumask_copy' from incompatible pointer type [-Wincompatible-pointer-types]
92 | cpumask_copy(&nmi_ipi_mask, cpu_online_mask);
| ^~~~~~~~~~~~~
| |
| int *
include/linux/cpumask.h:932:35: note: expected 'struct cpumask *' but argument is of type 'int *'
932 | void cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~^~~~
>> arch/x86/kernel/nmi_selftest.c:93:47: error: passing argument 2 of 'cpumask_clear_cpu' from incompatible pointer type [-Wincompatible-pointer-types]
93 | cpumask_clear_cpu(smp_processor_id(), &nmi_ipi_mask);
| ^~~~~~~~~~~~~
| |
| int *
include/linux/cpumask.h:629:72: note: expected 'struct cpumask *' but argument is of type 'int *'
629 | static __always_inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp)
| ~~~~~~~~~~~~~~~~^~~~
>> arch/x86/kernel/nmi_selftest.c:94:28: error: passing argument 1 of 'cpumask_empty' from incompatible pointer type [-Wincompatible-pointer-types]
94 | if (!cpumask_empty(&nmi_ipi_mask))
| ^~~~~~~~~~~~~
| |
| int *
include/linux/cpumask.h:846:65: note: expected 'const struct cpumask *' but argument is of type 'int *'
846 | static __always_inline bool cpumask_empty(const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
>> arch/x86/kernel/nmi_selftest.c:95:30: error: passing argument 1 of 'test_nmi_ipi' from incompatible pointer type [-Wincompatible-pointer-types]
95 | test_nmi_ipi(&nmi_ipi_mask);
| ^~~~~~~~~~~~~
| |
| int *
arch/x86/kernel/nmi_selftest.c:62:49: note: expected 'struct cpumask *' but argument is of type 'int *'
62 | static void __init test_nmi_ipi(struct cpumask *mask)
| ~~~~~~~~~~~~~~~~^~~~
arch/x86/kernel/nmi_selftest.c: In function 'local_ipi':
>> arch/x86/kernel/nmi_selftest.c:100:23: error: passing argument 1 of 'cpumask_clear' from incompatible pointer type [-Wincompatible-pointer-types]
100 | cpumask_clear(&nmi_ipi_mask);
| ^~~~~~~~~~~~~
| |
| int *
include/linux/cpumask.h:699:59: note: expected 'struct cpumask *' but argument is of type 'int *'
699 | static __always_inline void cpumask_clear(struct cpumask *dstp)
| ~~~~~~~~~~~~~~~~^~~~
>> arch/x86/kernel/nmi_selftest.c:101:45: error: passing argument 2 of 'cpumask_set_cpu' from incompatible pointer type [-Wincompatible-pointer-types]
101 | cpumask_set_cpu(smp_processor_id(), &nmi_ipi_mask);
| ^~~~~~~~~~~~~
| |
| int *
include/linux/cpumask.h:600:56: note: expected 'struct cpumask *' but argument is of type 'int *'
600 | void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
| ~~~~~~~~~~~~~~~~^~~~
arch/x86/kernel/nmi_selftest.c:102:22: error: passing argument 1 of 'test_nmi_ipi' from incompatible pointer type [-Wincompatible-pointer-types]
102 | test_nmi_ipi(&nmi_ipi_mask);
| ^~~~~~~~~~~~~
| |
| int *
arch/x86/kernel/nmi_selftest.c:62:49: note: expected 'struct cpumask *' but argument is of type 'int *'
62 | static void __init test_nmi_ipi(struct cpumask *mask)
| ~~~~~~~~~~~~~~~~^~~~
vim +27 arch/x86/kernel/nmi_selftest.c
> 11 #include <linux/smp.h>
12 #include <linux/cpumask.h>
13 #include <linux/delay.h>
14 #include <linux/init.h>
15 #include <linux/percpu.h>
16
17 #include <asm/apic.h>
18 #include <asm/nmi.h>
19
20 #define SUCCESS 0
21 #define FAILURE 1
22 #define TIMEOUT 2
23
24 static int __initdata nmi_fail;
25
26 /* check to see if NMI IPIs work on this machine */
> 27 static cpumask nmi_ipi_mask __initdata;
28
29 static int __initdata testcase_total;
30 static int __initdata testcase_successes;
31 static int __initdata unexpected_testcase_failures;
32 static int __initdata unexpected_testcase_unknowns;
33
34 static int __init nmi_unk_cb(unsigned int val, struct pt_regs *regs)
35 {
36 unexpected_testcase_unknowns++;
37 return NMI_HANDLED;
38 }
39
40 static void __init init_nmi_testsuite(void)
41 {
42 /* trap all the unknown NMIs we may generate */
43 register_nmi_handler(NMI_UNKNOWN, nmi_unk_cb, 0, "nmi_selftest_unk",
44 __initdata);
45 }
46
47 static void __init cleanup_nmi_testsuite(void)
48 {
49 unregister_nmi_handler(NMI_UNKNOWN, "nmi_selftest_unk");
50 }
51
52 static int __init test_nmi_ipi_callback(unsigned int val, struct pt_regs *regs)
53 {
54 int cpu = raw_smp_processor_id();
55
> 56 if (cpumask_test_and_clear_cpu(cpu, &nmi_ipi_mask))
57 return NMI_HANDLED;
58
59 return NMI_DONE;
60 }
61
62 static void __init test_nmi_ipi(struct cpumask *mask)
63 {
64 unsigned long timeout;
65
66 if (register_nmi_handler(NMI_LOCAL, test_nmi_ipi_callback,
67 NMI_FLAG_FIRST, "nmi_selftest", __initdata)) {
68 nmi_fail = FAILURE;
69 return;
70 }
71
72 /* sync above data before sending NMI */
73 wmb();
74
75 __apic_send_IPI_mask(mask, NMI_VECTOR);
76
77 /* Don't wait longer than a second */
78 timeout = USEC_PER_SEC;
79 while (!cpumask_empty(mask) && --timeout)
80 udelay(1);
81
82 /* What happens if we timeout, do we still unregister?? */
83 unregister_nmi_handler(NMI_LOCAL, "nmi_selftest");
84
85 if (!timeout)
86 nmi_fail = TIMEOUT;
87 return;
88 }
89
90 static void __init remote_ipi(void)
91 {
> 92 cpumask_copy(&nmi_ipi_mask, cpu_online_mask);
> 93 cpumask_clear_cpu(smp_processor_id(), &nmi_ipi_mask);
> 94 if (!cpumask_empty(&nmi_ipi_mask))
> 95 test_nmi_ipi(&nmi_ipi_mask);
96 }
97
98 static void __init local_ipi(void)
99 {
> 100 cpumask_clear(&nmi_ipi_mask);
> 101 cpumask_set_cpu(smp_processor_id(), &nmi_ipi_mask);
102 test_nmi_ipi(&nmi_ipi_mask);
103 }
104
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-07 13:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202604072149.txbSL5wq-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yury.norov@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.