public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [tglx-devel:cleanups 2/38] arch/x86/include/asm/msr.h:296:26: error: call to undeclared function 'raw_cpu_ptr'; ISO C99 and later do not support implicit function declarations
@ 2026-04-10 22:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-10 22:25 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git cleanups
head:   4f7b68811bb6be347b794010429e839e7a23b9d8
commit: b6f1012e23f9638e6c66029fa3d515ddf1775a80 [2/38] x86: Cleanup include recursion hell
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260411/202604110619.kzZCa62Z-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604110619.kzZCa62Z-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/202604110619.kzZCa62Z-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from io_uring/io_uring.c:44:
   In file included from include/linux/syscalls.h:84:
   In file included from include/uapi/linux/aio_abi.h:31:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:5:
   In file included from include/linux/fs_dirent.h:5:
   In file included from include/linux/stat.h:19:
   In file included from include/linux/time.h:60:
   In file included from include/linux/time32.h:13:
   In file included from include/linux/timex.h:67:
   In file included from arch/x86/include/asm/timex.h:6:
   In file included from arch/x86/include/asm/tsc.h:11:
>> arch/x86/include/asm/msr.h:293:47: warning: declaration of 'struct cpumask' will not be visible outside of this function [-Wvisibility]
     293 | static inline void rdmsr_on_cpus(const struct cpumask *m, u32 msr_no,
         |                                               ^
   arch/x86/include/asm/msr.h:298:47: warning: declaration of 'struct cpumask' will not be visible outside of this function [-Wvisibility]
     298 | static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no,
         |                                               ^
   2 warnings generated.
--
   In file included from arch/x86/events/probe.c:6:
>> arch/x86/include/asm/msr.h:293:47: warning: declaration of 'struct cpumask' will not be visible outside of this function [-Wvisibility]
     293 | static inline void rdmsr_on_cpus(const struct cpumask *m, u32 msr_no,
         |                                               ^
>> arch/x86/include/asm/msr.h:296:26: error: call to undeclared function 'raw_cpu_ptr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     296 |         rdmsr_on_cpu(0, msr_no, raw_cpu_ptr(&msrs->l), raw_cpu_ptr(&msrs->h));
         |                                 ^
>> arch/x86/include/asm/msr.h:296:26: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'u32 *' (aka 'unsigned int *') [-Wint-conversion]
     296 |         rdmsr_on_cpu(0, msr_no, raw_cpu_ptr(&msrs->l), raw_cpu_ptr(&msrs->h));
         |                                 ^~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/msr.h:273:67: note: passing argument to parameter 'l' here
     273 | static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
         |                                                                   ^
   arch/x86/include/asm/msr.h:296:49: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'u32 *' (aka 'unsigned int *') [-Wint-conversion]
     296 |         rdmsr_on_cpu(0, msr_no, raw_cpu_ptr(&msrs->l), raw_cpu_ptr(&msrs->h));
         |                                                        ^~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/msr.h:273:75: note: passing argument to parameter 'h' here
     273 | static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
         |                                                                           ^
   arch/x86/include/asm/msr.h:298:47: warning: declaration of 'struct cpumask' will not be visible outside of this function [-Wvisibility]
     298 | static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no,
         |                                               ^
>> arch/x86/include/asm/msr.h:301:26: error: call to undeclared function 'raw_cpu_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     301 |         wrmsr_on_cpu(0, msr_no, raw_cpu_read(msrs->l), raw_cpu_read(msrs->h));
         |                                 ^
   2 warnings and 4 errors generated.


vim +/raw_cpu_ptr +296 arch/x86/include/asm/msr.h

b6f1012e23f963 arch/x86/include/asm/msr.h Thomas Gleixner 2026-04-09  259  
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  260  int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  261  int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
d7484babd2c4dc arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  262  int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q);
c895ecdab2e4de arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  263  int wrmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 q);
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04  264  void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04  265  void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  266  int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  267  int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
5e404cb7ac4c09 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  268  int rdmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q);
27a23a544a55b5 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  269  int wrmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q);
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  270  int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]);
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  271  int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]);
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  272  #else  /*  CONFIG_SMP  */
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  273  static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  274  {
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  275  	rdmsr(msr_no, *l, *h);
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  276  	return 0;
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  277  }
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  278  static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  279  {
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  280  	wrmsr(msr_no, l, h);
c6f31932d0a1d2 include/asm-x86/msr.h      H. Peter Anvin  2008-08-25  281  	return 0;
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  282  }
d7484babd2c4dc arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  283  static inline int rdmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 *q)
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  284  {
c435e608cf59ff arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  285  	rdmsrq(msr_no, *q);
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  286  	return 0;
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  287  }
c895ecdab2e4de arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  288  static inline int wrmsrq_on_cpu(unsigned int cpu, u32 msr_no, u64 q)
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  289  {
78255eb2397332 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  290  	wrmsrq(msr_no, q);
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  291  	return 0;
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  292  }
0d0fbbddcc27c0 arch/x86/include/asm/msr.h Rusty Russell   2009-11-05 @293  static inline void rdmsr_on_cpus(const struct cpumask *m, u32 msr_no,
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04  294  				struct msr __percpu *msrs)
b034c19f9f61c8 arch/x86/include/asm/msr.h Borislav Petkov 2009-05-22  295  {
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04 @296  	rdmsr_on_cpu(0, msr_no, raw_cpu_ptr(&msrs->l), raw_cpu_ptr(&msrs->h));
b034c19f9f61c8 arch/x86/include/asm/msr.h Borislav Petkov 2009-05-22  297  }
0d0fbbddcc27c0 arch/x86/include/asm/msr.h Rusty Russell   2009-11-05  298  static inline void wrmsr_on_cpus(const struct cpumask *m, u32 msr_no,
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04  299  				struct msr __percpu *msrs)
b034c19f9f61c8 arch/x86/include/asm/msr.h Borislav Petkov 2009-05-22  300  {
5323922f50ecdf arch/x86/include/asm/msr.h Thomas Gleixner 2024-03-04 @301  	wrmsr_on_cpu(0, msr_no, raw_cpu_read(msrs->l), raw_cpu_read(msrs->h));
b034c19f9f61c8 arch/x86/include/asm/msr.h Borislav Petkov 2009-05-22  302  }
abb0ade013507c include/asm-x86/msr.h      Joe Perches     2008-03-23  303  static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
abb0ade013507c include/asm-x86/msr.h      Joe Perches     2008-03-23  304  				    u32 *l, u32 *h)
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  305  {
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  306  	return rdmsr_safe(msr_no, l, h);
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  307  }
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  308  static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  309  {
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  310  	return wrmsr_safe(msr_no, l, h);
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  311  }
5e404cb7ac4c09 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  312  static inline int rdmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 *q)
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  313  {
6fe22abacd40e2 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  314  	return rdmsrq_safe(msr_no, q);
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  315  }
27a23a544a55b5 arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  316  static inline int wrmsrq_safe_on_cpu(unsigned int cpu, u32 msr_no, u64 q)
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  317  {
6fa17efe45440f arch/x86/include/asm/msr.h Ingo Molnar     2025-04-09  318  	return wrmsrq_safe(msr_no, q);
1a6b991a9875a4 arch/x86/include/asm/msr.h Jacob Pan       2013-10-11  319  }
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  320  static inline int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  321  {
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  322  	return rdmsr_safe_regs(regs);
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  323  }
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  324  static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  325  {
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  326  	return wrmsr_safe_regs(regs);
8b956bf1f0f2b5 arch/x86/include/asm/msr.h H. Peter Anvin  2009-08-31  327  }
be7baf80a69964 include/asm-x86/msr.h      Thomas Gleixner 2007-10-23  328  #endif  /* CONFIG_SMP */
a5447e92e169da arch/x86/include/asm/msr.h Ingo Molnar     2025-04-13  329  

:::::: The code at line 296 was first introduced by commit
:::::: 5323922f50ecdf9d10cdd2fabd06507e5b4f3feb x86/msr: Add missing __percpu annotations

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Ingo Molnar <mingo@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-10 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 22:25 [tglx-devel:cleanups 2/38] arch/x86/include/asm/msr.h:296:26: error: call to undeclared function 'raw_cpu_ptr'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox