Commit db013018 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'irq-urgent-2025-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Fix error code in the irqchip/mchp-eic driver

 - Fix setup_percpu_irq() affinity assumptions

 - Remove the unused irq_domain_add_tree() function

* tag 'irq-urgent-2025-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()
  irqdomain: Delete irq_domain_add_tree()
  genirq: Allow NULL affinity for setup_percpu_irq()
parents edbe4072 7dbc0d40
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -109,10 +109,6 @@ irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hw
如果hwirq号可以非常大,树状映射是一个很好的选择,因为它不需要分配一个和最大hwirq
号一样大的表。 缺点是,hwirq到IRQ号的查找取决于表中有多少条目。

irq_domain_add_tree()和irq_domain_create_tree()在功能上是等价的,除了第一
个参数不同——前者接受一个Open Firmware特定的 'struct device_node' ,而后者接受
一个更通用的抽象 'struct fwnode_handle' 。

很少有驱动应该需要这个映射。

无映射
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ static int mchp_eic_domain_alloc(struct irq_domain *domain, unsigned int virq,

	ret = irq_domain_translate_twocell(domain, fwspec, &hwirq, &type);
	if (ret || hwirq >= MCHP_EIC_NIRQ)
		return ret;
		return ret ?: -EINVAL;

	switch (type) {
	case IRQ_TYPE_EDGE_RISING:
+0 −16
Original line number Diff line number Diff line
@@ -730,22 +730,6 @@ static inline void msi_device_domain_free_wired(struct irq_domain *domain, unsig
}
#endif

static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
						     const struct irq_domain_ops *ops,
						     void *host_data)
{
	struct irq_domain_info info = {
		.fwnode		= of_fwnode_handle(of_node),
		.hwirq_max	= ~0U,
		.ops		= ops,
		.host_data	= host_data,
	};
	struct irq_domain *d;

	d = irq_domain_instantiate(&info);
	return IS_ERR(d) ? NULL : d;
}

static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
						       unsigned int size,
						       const struct irq_domain_ops *ops,
+3 −0
Original line number Diff line number Diff line
@@ -2470,6 +2470,9 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
	if (retval < 0)
		return retval;

	if (!act->affinity)
		act->affinity = cpu_online_mask;

	retval = __setup_irq(irq, desc, act);

	if (retval)