Skip to contentSkip to conversation

pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems

PATCH In review Mika Westerberg 2 participants 2 messages Dec 4, 2017 – Dec 7, 2017

Subsystems (3)
lore
Share & tools
lore

Mika Westerberg

author maintainer
#0 lore raw

PATCH v2 1/1 pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems

Guenter Roeck reported an interrupt storm on a prototype system which is based on Cyan Chromebook. The root cause turned out to be a incorrectly configured pin that triggers spurious interrupts. This will be fixed in coreboot but currently we need to prevent the interrupt storm from happening by masking all interrupts (but not GPEs) on those systems.

Fixes bcb48cca23ec ("pinctrl: cherryview: Do not mask all interrupts in probe")
Reported-and-tested-by Guenter Roeck <[email protected]>

---
Changes from v1:

* Correct Link to point to the right bugzilla entry
* Add missing Fixes: and Cc: lines
* Use GENMASK() instead

 drivers/pinctrl/intel/pinctrl-cherryview.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/pinctrl/intel/pinctrl-cherryview.c +16 -0
index aa6c9f569c2b..b1ae1618fefe 100644
@@ -1601,6 +1601,22 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
 			clear_bit(i, chip->irq.valid_mask);
 	}
 
+	/*
+	 * The same set of machines in chv_no_valid_mask[] have incorrectly
+	 * configured GPIOs that generate spurious interrupts so we use
+	 * this same list to apply another quirk for them.
+	 *
+	 * See also https://bugzilla.kernel.org/show_bug.cgi?id=197953.
+	 */
+	if (!need_valid_mask) {
+		/*
+		 * Mask all interrupts the community is able to generate
+		 * but leave the ones that can only generate GPEs unmasked.
+		 */
+		chv_writel(GENMASK(31, pctrl->community->nirqs),
+			   pctrl->regs + CHV_INTMASK);
+	}
+
 	/* Clear all interrupts */
 	chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
 
Signature · 1 line
2.15.0
#1 lore raw
Quoted 6 lines · Mika Westerberg

Guenter Roeck reported an interrupt storm on a prototype system which is based on Cyan Chromebook. The root cause turned out to be a incorrectly configured pin that triggers spurious interrupts. This will be fixed in coreboot but currently we need to prevent the interrupt storm from happening by masking all interrupts (but not GPEs) on those systems.

Quoted 8 lines
Fixes bcb48cca23ec ("pinctrl: cherryview: Do not mask all interrupts in probe")
Reported-and-tested-by Guenter Roeck <[email protected]>

---
Changes from v1:

Patch applied for fixes.

Yours,
Linus Walleij