History

Merge tag 'irq-urgent-2026-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull IRQ subsystem fixes from Ingo Molnar: - Revert a commit to the mbigen irqchip driver that caused a regression on two-port Hi1616 chips (Caina) - Fix a too-long-preemption-off bug in the stm32mp-exti irqchip driver, caused by a time unit ambiguity & mismatch (Ju Nan) - Remove the now completely unused irq_domain_add_linear() inline function (Jiri Slaby) * tag 'irq-urgent-2026-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/stm32mp-exti: Fix the unit of the hwspinlock timeout Revert "irqchip/mbigen: Fix mbigen node address layout" irqdomain: Delete irq_domain_add_linear()

Linus Torvalds committed 2 months ago

Commit b4851312 parents d3cbb9a d31fbba4 files · +6 −40Browse files

Unified · Split

4 files
  1. Documentation/translations/zh_CN/core-api/irq/irq-domain.rst +0 −4
  2. drivers/irqchip/irq-mbigen.c +4 −16
  3. drivers/irqchip/irq-stm32mp-exti.c +2 −2
  4. include/linux/irqdomain.h +0 −18
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst+0−4
@@ -90,10 +90,6 @@ irq_domain映射的类型 · 89 unmodified lines
90映射的优点是固定时间查找IRQ号,而且irq_descs只分配给在用的IRQ。 缺点是该表90映射的优点是固定时间查找IRQ号,而且irq_descs只分配给在用的IRQ。 缺点是该表
91必须尽可能大的hwirq号。91必须尽可能大的hwirq号。
92 92
93irq_domain_add_linear()和irq_domain_create_linear()在功能上是等价的,
94除了第一个参数不同--前者接受一个Open Firmware特定的 'struct device_node' 而
95后者接受一个更通用的抽象 'struct fwnode_handle' 。
96
97大多数驱动应该使用线性映射93大多数驱动应该使用线性映射
98 94
99树状映射95树状映射
drivers/irqchip/irq-mbigen.c+4−16
@@ -64,20 +64,6 @@ struct mbigen_device { · 63 unmodified lines
64 void __iomem *base;64 void __iomem *base;
65};65};
66 66
67static inline unsigned int get_mbigen_node_offset(unsigned int nid)
68{
69 unsigned int offset = nid * MBIGEN_NODE_OFFSET;
70
71 /*
72 * To avoid touched clear register in unexpected way, we need to directly
73 * skip clear register when access to more than 10 mbigen nodes.
74 */
75 if (nid >= (REG_MBIGEN_CLEAR_OFFSET / MBIGEN_NODE_OFFSET))
76 offset += MBIGEN_NODE_OFFSET;
77
78 return offset;
79}
80
81static inline unsigned int get_mbigen_vec_reg(irq_hw_number_t hwirq)67static inline unsigned int get_mbigen_vec_reg(irq_hw_number_t hwirq)
82{68{
83 unsigned int nid, pin;69 unsigned int nid, pin;
@@ -86,7 +72,8 @@ static inline unsigned int get_mbigen_vec_reg(irq_hw_number_t hwirq) · 2 unmodified lines
86 nid = hwirq / IRQS_PER_MBIGEN_NODE + 1;72 nid = hwirq / IRQS_PER_MBIGEN_NODE + 1;
87 pin = hwirq % IRQS_PER_MBIGEN_NODE;73 pin = hwirq % IRQS_PER_MBIGEN_NODE;
88 74
89 return pin * 4 + get_mbigen_node_offset(nid) + REG_MBIGEN_VEC_OFFSET;75 return pin * 4 + nid * MBIGEN_NODE_OFFSET
76 + REG_MBIGEN_VEC_OFFSET;
90}77}
91 78
92static inline void get_mbigen_type_reg(irq_hw_number_t hwirq,79static inline void get_mbigen_type_reg(irq_hw_number_t hwirq,
@@ -101,7 +88,8 @@ static inline void get_mbigen_type_reg(irq_hw_number_t hwirq, · 8 unmodified lines
101 *mask = 1 << (irq_ofst % 32);88 *mask = 1 << (irq_ofst % 32);
102 ofst = irq_ofst / 32 * 4;89 ofst = irq_ofst / 32 * 4;
103 90
104 *addr = ofst + get_mbigen_node_offset(nid) + REG_MBIGEN_TYPE_OFFSET;91 *addr = ofst + nid * MBIGEN_NODE_OFFSET
92 + REG_MBIGEN_TYPE_OFFSET;
105}93}
106 94
107static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,95static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,
drivers/irqchip/irq-stm32mp-exti.c+2−2
@@ -22,7 +22,7 @@ · 21 unmodified lines
22 22
23#define IRQS_PER_BANK 3223#define IRQS_PER_BANK 32
24 24
25#define HWSPNLCK_TIMEOUT 1000 /* usec */25#define HWSPNLCK_TIMEOUT_MS 1
26 26
27#define EXTI_EnCIDCFGR(n) (0x180 + (n) * 4)27#define EXTI_EnCIDCFGR(n) (0x180 + (n) * 4)
28#define EXTI_HWCFGR1 0x3f028#define EXTI_HWCFGR1 0x3f0
@@ -376,7 +376,7 @@ static int stm32mp_exti_set_type(struct irq_data *d, unsigned int type) · 347 unmodified lines
376 raw_spin_lock(&chip_data->rlock);376 raw_spin_lock(&chip_data->rlock);
377 377
378 if (hwlock) {378 if (hwlock) {
379 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT);379 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT_MS);
380 if (err) {380 if (err) {
381 pr_err("%s can't get hwspinlock (%d)\n", __func__, err);381 pr_err("%s can't get hwspinlock (%d)\n", __func__, err);
382 goto unlock;382 goto unlock;
include/linux/irqdomain.h+0−18
@@ -752,24 +752,6 @@ static inline void msi_device_domain_free_wired(struct irq_domain *domain, unsig · 751 unmodified lines
752}752}
753#endif753#endif
754 754
755static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
756 unsigned int size,
757 const struct irq_domain_ops *ops,
758 void *host_data)
759{
760 struct irq_domain_info info = {
761 .fwnode = of_fwnode_handle(of_node),
762 .size = size,
763 .hwirq_max = size,
764 .ops = ops,
765 .host_data = host_data,
766 };
767 struct irq_domain *d;
768
769 d = irq_domain_instantiate(&info);
770 return IS_ERR(d) ? NULL : d;
771}
772
773#else /* CONFIG_IRQ_DOMAIN */755#else /* CONFIG_IRQ_DOMAIN */
774static inline void irq_dispose_mapping(unsigned int virq) { }756static inline void irq_dispose_mapping(unsigned int virq) { }
775static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,757static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,