All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems
Date: Fri, 1 Dec 2017 10:21:27 -0800	[thread overview]
Message-ID: <20171201182127.GA15633@roeck-us.net> (raw)
In-Reply-To: <20171201102504.38709-1-mika.westerberg@linux.intel.com>

On Fri, Dec 01, 2017 at 01:25:04PM +0300, Mika Westerberg wrote:
> 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.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>  drivers/pinctrl/intel/pinctrl-cherryview.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
> index aa6c9f569c2b..083ffd397154 100644
> --- a/drivers/pinctrl/intel/pinctrl-cherryview.c
> +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
> @@ -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(~(BIT(pctrl->community->nirqs) - 1),
> +			   pctrl->regs + CHV_INTMASK);
> +	}
> +
>  	/* Clear all interrupts */
>  	chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
>  
> -- 
> 2.15.0
> 

  parent reply	other threads:[~2017-12-01 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 10:25 [PATCH] pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems Mika Westerberg
2017-12-01 12:35 ` Andy Shevchenko
2017-12-01 13:33   ` Mika Westerberg
2017-12-01 18:21 ` Guenter Roeck [this message]
2017-12-02 15:51 ` Linus Walleij
2017-12-02 17:25   ` Guenter Roeck
2017-12-03 14:00     ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171201182127.GA15633@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.