Skip to content

Commit 33efa7d

Browse files
committed
Merge tag 'irq_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov: - Fix missing prototypes warnings - Properly initialize work context when allocating it - Remove a method tracking when managed interrupts are suspended during hotplug, in favor of the code using a IRQ disable depth tracking now, and have interrupts get properly enabled again on restore - Make sure multiple CPUs getting hotplugged don't cause wrong tracking of the managed IRQ disable depth * tag 'irq_urgent_for_v6.16_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/ath79-misc: Fix missing prototypes warnings genirq/irq_sim: Initialize work context pointers properly genirq/cpuhotplug: Restore affinity even for suspended IRQ genirq/cpuhotplug: Rebalance managed interrupts across multi-CPU hotplug
2 parents 17ef32a + 3085ef9 commit 33efa7d

File tree

4 files changed

+11
-26
lines changed

4 files changed

+11
-26
lines changed

drivers/irqchip/irq-ath79-misc.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <linux/of_address.h>
1616
#include <linux/of_irq.h>
1717

18+
#include <asm/time.h>
19+
1820
#define AR71XX_RESET_REG_MISC_INT_STATUS 0
1921
#define AR71XX_RESET_REG_MISC_INT_ENABLE 4
2022

@@ -177,21 +179,3 @@ static int __init ar7240_misc_intc_of_init(
177179

178180
IRQCHIP_DECLARE(ar7240_misc_intc, "qca,ar7240-misc-intc",
179181
ar7240_misc_intc_of_init);
180-
181-
void __init ath79_misc_irq_init(void __iomem *regs, int irq,
182-
int irq_base, bool is_ar71xx)
183-
{
184-
struct irq_domain *domain;
185-
186-
if (is_ar71xx)
187-
ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask;
188-
else
189-
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
190-
191-
domain = irq_domain_create_legacy(NULL, ATH79_MISC_IRQ_COUNT,
192-
irq_base, 0, &misc_irq_domain_ops, regs);
193-
if (!domain)
194-
panic("Failed to create MISC irqdomain");
195-
196-
ath79_misc_intc_domain_init(domain, irq);
197-
}

kernel/irq/chip.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff,
205205

206206
void irq_startup_managed(struct irq_desc *desc)
207207
{
208+
struct irq_data *d = irq_desc_get_irq_data(desc);
209+
210+
/*
211+
* Clear managed-shutdown flag, so we don't repeat managed-startup for
212+
* multiple hotplugs, and cause imbalanced disable depth.
213+
*/
214+
irqd_clr_managed_shutdown(d);
215+
208216
/*
209217
* Only start it up when the disable depth is 1, so that a disable,
210218
* hotunplug, hotplug sequence does not end up enabling it during

kernel/irq/cpuhotplug.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,6 @@ static void irq_restore_affinity_of_irq(struct irq_desc *desc, unsigned int cpu)
210210
!irq_data_get_irq_chip(data) || !cpumask_test_cpu(cpu, affinity))
211211
return;
212212

213-
/*
214-
* Don't restore suspended interrupts here when a system comes back
215-
* from S3. They are reenabled via resume_device_irqs().
216-
*/
217-
if (desc->istate & IRQS_SUSPENDED)
218-
return;
219-
220213
if (irqd_is_managed_and_shutdown(data))
221214
irq_startup_managed(desc);
222215

kernel/irq/irq_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
202202
void *data)
203203
{
204204
struct irq_sim_work_ctx *work_ctx __free(kfree) =
205-
kmalloc(sizeof(*work_ctx), GFP_KERNEL);
205+
kzalloc(sizeof(*work_ctx), GFP_KERNEL);
206206

207207
if (!work_ctx)
208208
return ERR_PTR(-ENOMEM);

0 commit comments

Comments
 (0)