mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:x86/irq 2/3] arch/x86/kernel/irq.c:461:24: error: call to undeclared function '__this_cpu_ptr'; ISO C99 and later do not support implicit function declarations
@ 2025-12-18  0:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-18  0:13 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: llvm, oe-kbuild-all, linux-kernel, x86

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/irq
head:   64d4c88270cf90089434e3db67ed443fd982a9a2
commit: 329e2051476858f264e2c217c6db4e68e203d5db [2/3] x86/irq: Cleanup posted MSI code
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20251218/202512180805.DvPn2cDt-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251218/202512180805.DvPn2cDt-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/202512180805.DvPn2cDt-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kernel/irq.c:461:24: error: call to undeclared function '__this_cpu_ptr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     461 |         struct pi_desc *pid = __this_cpu_ptr(&posted_msi_pi_desc);
         |                               ^
>> arch/x86/kernel/irq.c:461:18: error: incompatible integer to pointer conversion initializing 'struct pi_desc *' with an expression of type 'int' [-Wint-conversion]
     461 |         struct pi_desc *pid = __this_cpu_ptr(&posted_msi_pi_desc);
         |                         ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/__this_cpu_ptr +461 arch/x86/kernel/irq.c

   454	
   455	/*
   456	 * For MSIs that are delivered as posted interrupts, the CPU notifications
   457	 * can be coalesced if the MSIs arrive in high frequency bursts.
   458	 */
   459	DEFINE_IDTENTRY_SYSVEC(sysvec_posted_msi_notification)
   460	{
 > 461		struct pi_desc *pid = __this_cpu_ptr(&posted_msi_pi_desc);
   462		struct pt_regs *old_regs = set_irq_regs(regs);
   463	
   464		/* Mark the handler active for intel_ack_posted_msi_irq() */
   465		__this_cpu_write(posted_msi_handler_active, true);
   466		inc_irq_stat(posted_msi_notification_count);
   467		irq_enter();
   468	
   469		/*
   470		 * Loop only MAX_POSTED_MSI_COALESCING_LOOP - 1 times here to take
   471		 * the final handle_pending_pir() invocation after clearing the
   472		 * outstanding notification bit into account.
   473		 */
   474		for (int i = 1; i < MAX_POSTED_MSI_COALESCING_LOOP; i++) {
   475			if (!handle_pending_pir(pid->pir, regs))
   476				break;
   477		}
   478	
   479		/*
   480		 * Clear the outstanding notification bit to rearm the notification
   481		 * mechanism.
   482		 */
   483		pi_clear_on(pid);
   484	
   485		/*
   486		 * Clearing the ON bit can race with a notification. Process the
   487		 * PIR bits one last time so that handling the new interrupts is
   488		 * not delayed until the next notification happens.
   489		 */
   490		handle_pending_pir(pid->pir, regs);
   491	
   492		apic_eoi();
   493		irq_exit();
   494		__this_cpu_write(posted_msi_handler_active, false);
   495		set_irq_regs(old_regs);
   496	}
   497	#endif /* X86_POSTED_MSI */
   498	

-- 
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:[~2025-12-18  0:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-18  0:13 [tip:x86/irq 2/3] arch/x86/kernel/irq.c:461:24: error: call to undeclared function '__this_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

all inboxes | Powered by JetHome®