[PATCH 1/8] device property: Add firmware node IRQ affinity callbacks

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Nov 16 23:42:24 PST 2026


On Mon, Nov 16, 2026 at 06:21:28PM +0000, Leo Yan wrote:
> Platform IRQ affinity lookup currently selects the OF or ACPI helper
> directly. Add fwnode_irq_get_affinity() and an irq_get_affinity operation
> implemented by both firmware types.
> 
> Use the new helper for platform devices, preserving the existing fallback
> to cpu_possible_mask when affinity information is unavailable.

>From this commit message it's unclear why we do that. Is it any helpful in the
future? If yes, for what?

...

> static const struct cpumask *get_irq_affinity(struct platform_device *dev,

>  {
>  	const struct cpumask *mask = NULL;
>  #ifndef CONFIG_SPARC

> -	struct fwnode_handle *fwnode = dev_fwnode(&dev->dev);
> -

Might be unneeded churn — you can leave these two lines being untouched.

> -	if (is_of_node(fwnode))
> -		mask = of_irq_get_affinity(to_of_node(fwnode), num);
> -	else if (is_acpi_device_node(fwnode))
> -		mask = acpi_irq_get_affinity(ACPI_HANDLE_FWNODE(fwnode), num);

> +	mask = fwnode_irq_get_affinity(dev_fwnode(&dev->dev), num);

	mask = fwnode_irq_get_affinity(fwnode, num);

>  #endif

>  	return mask ?: cpu_possible_mask;

But I understand the point as we have only a single user left. So I am not
objecting the proposed approach, just pointed out on an alternative.

...

> +++ b/include/linux/fwnode.h

>  struct fwnode_operations;
>  struct device;
> +struct cpumask;

Yes, it's a bit disordered, can you place the new one before the 'device'
to follow alphabetical order?

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list