Skip to contentSkip to conversation

irqchip/irq-csky-mpintc: Fixup mask/unmask un-implementation

PATCH Applied [email protected] 2 participants 3 messages Nov 1, 2021 – Nov 12, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH v2 1/1 irqchip/irq-csky-mpintc: Fixup mask/unmask un-implementation

From: Guo Ren <[email protected]>

The mask/unmask must be implemented, and enable/disable supplement them if the HW requires something different at startup time. When irq source is disabled by mask, mpintc could complete irq normally.

So just replace the with mask/unmask function.

Cc Marc Zyngier <[email protected]>

---

Changes since V2:
- Correct Marc's email
- Remove Tested-by
- Rename the functions to match the fields

---
 drivers/irqchip/irq-csky-mpintc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/irqchip/irq-csky-mpintc.c +4 -4
index a1534edef7fa..870dcb3486a8 100644
@@ -78,7 +78,7 @@ static void csky_mpintc_handler(struct pt_regs *regs)
 		readl_relaxed(reg_base + INTCL_RDYIR), regs);
 }
 
-static void csky_mpintc_enable(struct irq_data *d)
+static void csky_mpintc_unmask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -87,7 +87,7 @@ static void csky_mpintc_enable(struct irq_data *d)
 	writel_relaxed(d->hwirq, reg_base + INTCL_SENR);
 }
 
-static void csky_mpintc_disable(struct irq_data *d)
+static void csky_mpintc_mask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -164,8 +164,8 @@ static int csky_irq_set_affinity(struct irq_data *d,
 static struct irq_chip csky_irq_chip = {
 	.name           = "C-SKY SMP Intc",
 	.irq_eoi	= csky_mpintc_eoi,
-	.irq_enable	= csky_mpintc_enable,
-	.irq_disable	= csky_mpintc_disable,
+	.irq_unmask	= csky_mpintc_unmask,
+	.irq_mask	= csky_mpintc_mask,
 	.irq_set_type	= csky_mpintc_set_type,
 #ifdef CONFIG_SMP
 	.irq_set_affinity = csky_irq_set_affinity,
Signature · 1 line
2.25.1
merge bot Applied
#1 lore raw

[irqchip: irq/irqchip-fixes] irqchip/csky-mpintc: Fixup mask/unmask implementation

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID:     e5f041b6867f2990e55adb47482efc3653674de5
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e5f041b6867f2990e55adb47482efc3653674de5
Author:        Guo Ren <[email protected]>
AuthorDate:    Mon, 01 Nov 2021 21:45:34 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Sat, 06 Nov 2021 14:24:04 

irqchip/csky-mpintc: Fixup mask/unmask implementation

The mask/unmask must be implemented, and enable/disable supplement them if the HW requires something different at startup time. When irq source is disabled by mask, mpintc could complete irq normally.

So drop enable/disable if favour of mask/unmask.

---
 drivers/irqchip/irq-csky-mpintc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/irqchip/irq-csky-mpintc.c +4 -4
index cb403c9..4aebd67 100644
@@ -78,7 +78,7 @@ static void csky_mpintc_handler(struct pt_regs *regs)
 		readl_relaxed(reg_base + INTCL_RDYIR));
 }
 
-static void csky_mpintc_enable(struct irq_data *d)
+static void csky_mpintc_unmask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -87,7 +87,7 @@ static void csky_mpintc_enable(struct irq_data *d)
 	writel_relaxed(d->hwirq, reg_base + INTCL_SENR);
 }
 
-static void csky_mpintc_disable(struct irq_data *d)
+static void csky_mpintc_mask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -164,8 +164,8 @@ static int csky_irq_set_affinity(struct irq_data *d,
 static struct irq_chip csky_irq_chip = {
 	.name           = "C-SKY SMP Intc",
 	.irq_eoi	= csky_mpintc_eoi,
-	.irq_enable	= csky_mpintc_enable,
-	.irq_disable	= csky_mpintc_disable,
+	.irq_unmask	= csky_mpintc_unmask,
+	.irq_mask	= csky_mpintc_mask,
 	.irq_set_type	= csky_mpintc_set_type,
 #ifdef CONFIG_SMP
 	.irq_set_affinity = csky_irq_set_affinity,
merge bot Applied
#2 lore raw

[irqchip: irq/irqchip-fixes] irqchip/csky-mpintc: Fixup mask/unmask implementation

In reply to [email protected]
The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID:     1cbb418b69ed28f3395c6208931843a53d3fbcbe
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/1cbb418b69ed28f3395c6208931843a53d3fbcbe
Author:        Guo Ren <[email protected]>
AuthorDate:    Mon, 01 Nov 2021 21:45:34 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Fri, 12 Nov 2021 16:09:50 

irqchip/csky-mpintc: Fixup mask/unmask implementation

The mask/unmask must be implemented, and enable/disable supplement them if the HW requires something different at startup time. When irq source is disabled by mask, mpintc could complete irq normally.

So drop enable/disable if favour of mask/unmask.

---
 drivers/irqchip/irq-csky-mpintc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/irqchip/irq-csky-mpintc.c +4 -4
index cb403c9..4aebd67 100644
@@ -78,7 +78,7 @@ static void csky_mpintc_handler(struct pt_regs *regs)
 		readl_relaxed(reg_base + INTCL_RDYIR));
 }
 
-static void csky_mpintc_enable(struct irq_data *d)
+static void csky_mpintc_unmask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -87,7 +87,7 @@ static void csky_mpintc_enable(struct irq_data *d)
 	writel_relaxed(d->hwirq, reg_base + INTCL_SENR);
 }
 
-static void csky_mpintc_disable(struct irq_data *d)
+static void csky_mpintc_mask(struct irq_data *d)
 {
 	void __iomem *reg_base = this_cpu_read(intcl_reg);
 
@@ -164,8 +164,8 @@ static int csky_irq_set_affinity(struct irq_data *d,
 static struct irq_chip csky_irq_chip = {
 	.name           = "C-SKY SMP Intc",
 	.irq_eoi	= csky_mpintc_eoi,
-	.irq_enable	= csky_mpintc_enable,
-	.irq_disable	= csky_mpintc_disable,
+	.irq_unmask	= csky_mpintc_unmask,
+	.irq_mask	= csky_mpintc_mask,
 	.irq_set_type	= csky_mpintc_set_type,
 #ifdef CONFIG_SMP
 	.irq_set_affinity = csky_irq_set_affinity,