* [opencloudos:linux-5.4/next 27252/27434] kernel/irq/manage.c:350:5: warning: no previous prototype for 'irq_update_affinity_desc'
@ 2024-03-04 23:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-04 23:19 UTC (permalink / raw)
To: jasperwang, kaixuxia, frankjpliu, kasong, sagazchen, kernelxing,
aurelianliu, jason.zeng, wu.zheng, yingbao.jia, pei.p.jia
Cc: oe-kbuild-all
tree: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git linux-5.4/next
head: 0e88d1c26496999d1b2e37f3393b602d28b03faf
commit: 17568159e8f86e6ce059ca5b8d54fa54042d1bed [27252/27434] genirq: Export affinity setter for modules
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20240305/202403050757.ZDfe69e3-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403050757.ZDfe69e3-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/202403050757.ZDfe69e3-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/irq/manage.c:350:5: warning: no previous prototype for 'irq_update_affinity_desc' [-Wmissing-prototypes]
350 | int irq_update_affinity_desc(unsigned int irq,
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/irq_update_affinity_desc +350 kernel/irq/manage.c
334
335 /**
336 * irq_update_affinity_desc - Update affinity management for an interrupt
337 * @irq: The interrupt number to update
338 * @affinity: Pointer to the affinity descriptor
339 *
340 * This interface can be used to configure the affinity management of
341 * interrupts which have been allocated already.
342 *
343 * There are certain limitations on when it may be used - attempts to use it
344 * for when the kernel is configured for generic IRQ reservation mode (in
345 * config GENERIC_IRQ_RESERVATION_MODE) will fail, as it may conflict with
346 * managed/non-managed interrupt accounting. In addition, attempts to use it on
347 * an interrupt which is already started or which has already been configured
348 * as managed will also fail, as these mean invalid init state or double init.
349 */
> 350 int irq_update_affinity_desc(unsigned int irq,
351 struct irq_affinity_desc *affinity)
352 {
353 struct irq_desc *desc;
354 unsigned long flags;
355 bool activated;
356 int ret = 0;
357
358 /*
359 * Supporting this with the reservation scheme used by x86 needs
360 * some more thought. Fail it for now.
361 */
362 if (IS_ENABLED(CONFIG_GENERIC_IRQ_RESERVATION_MODE))
363 return -EOPNOTSUPP;
364
365 desc = irq_get_desc_buslock(irq, &flags, 0);
366 if (!desc)
367 return -EINVAL;
368
369 /* Requires the interrupt to be shut down */
370 if (irqd_is_started(&desc->irq_data)) {
371 ret = -EBUSY;
372 goto out_unlock;
373 }
374
375 /* Interrupts which are already managed cannot be modified */
376 if (irqd_affinity_is_managed(&desc->irq_data)) {
377 ret = -EBUSY;
378 goto out_unlock;
379 }
380
381 /*
382 * Deactivate the interrupt. That's required to undo
383 * anything an earlier activation has established.
384 */
385 activated = irqd_is_activated(&desc->irq_data);
386 if (activated)
387 irq_domain_deactivate_irq(&desc->irq_data);
388
389 if (affinity->is_managed) {
390 irqd_set(&desc->irq_data, IRQD_AFFINITY_MANAGED);
391 irqd_set(&desc->irq_data, IRQD_MANAGED_SHUTDOWN);
392 }
393
394 cpumask_copy(desc->irq_common_data.affinity, &affinity->mask);
395
396 /* Restore the activation state */
397 if (activated)
398 irq_domain_activate_irq(&desc->irq_data, false);
399
400 out_unlock:
401 irq_put_desc_busunlock(desc, flags);
402 return ret;
403 }
404
--
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:[~2024-03-04 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 23:19 [opencloudos:linux-5.4/next 27252/27434] kernel/irq/manage.c:350:5: warning: no previous prototype for 'irq_update_affinity_desc' kernel test robot
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.