linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: "Alastair D'Silva" <alastair@au1.ibm.com>, linuxppc-dev@ozlabs.org
Cc: "Alastair D'Silva" <alastair@d-silva.org>,
	andrew.donnellan@au1.ibm.com, frederic.barrat@fr.ibm.com
Subject: Re: [PATCH] cxl: Prevent IRQ storm
Date: Wed, 26 Apr 2017 11:23:42 +0200	[thread overview]
Message-ID: <2354ad5d-e41f-555e-f129-157444973e1c@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170426064053.12009-1-alastair@au1.ibm.com>



Le 26/04/2017 à 08:40, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> In some situations, a faulty AFU slice may create an interrupt storm,
> rendering the machine unusable. Since these interrupts are informational
> only, present the interrupt once, then mask it off to prevent it from
> being retriggered until the card is reset.
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---

Patch looks good, thanks!
It doesn't apply cleanly on the 'next' tree due to the capi2 patchset 
though, so you should probably rebase on that tree. The bits have 
changed a bit on PSL9, but the approach still works (error type reported 
in the first byte, and the corresponding masking bits are still 
right-shifted by 32).

   Fred

>  drivers/misc/cxl/native.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
> index 7ae7105..4e8010f 100644
> --- a/drivers/misc/cxl/native.c
> +++ b/drivers/misc/cxl/native.c
> @@ -996,7 +996,7 @@ static void native_irq_wait(struct cxl_context *ctx)
>  static irqreturn_t native_slice_irq_err(int irq, void *data)
>  {
>  	struct cxl_afu *afu = data;
> -	u64 fir_slice, errstat, serr, afu_debug, afu_error, dsisr;
> +	u64 fir_slice, errstat, serr, afu_debug, afu_error, dsisr, irq_mask;
>
>  	/*
>  	 * slice err interrupt is only used with full PSL (no XSL)
> @@ -1014,6 +1014,10 @@ static irqreturn_t native_slice_irq_err(int irq, void *data)
>  	dev_crit(&afu->dev, "AFU_ERR_An: 0x%.16llx\n", afu_error);
>  	dev_crit(&afu->dev, "PSL_DSISR_An: 0x%.16llx\n", dsisr);
>
> +	/* mask off the IRQ so it won't retrigger until the card is reset */
> +	irq_mask = (serr & 0xff80000000000000ULL) >> 32;
> +	serr |= irq_mask;
> +
>  	cxl_p1n_write(afu, CXL_PSL_SERR_An, serr);
>
>  	return IRQ_HANDLED;
>

  parent reply	other threads:[~2017-04-26  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26  6:40 [PATCH] cxl: Prevent IRQ storm Alastair D'Silva
2017-04-26  6:56 ` Andrew Donnellan
2017-04-26  9:23 ` Frederic Barrat [this message]
2017-04-27  1:09   ` Alastair D'Silva
2017-04-27  1:13     ` Andrew Donnellan

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=2354ad5d-e41f-555e-f129-157444973e1c@linux.vnet.ibm.com \
    --to=fbarrat@linux.vnet.ibm.com \
    --cc=alastair@au1.ibm.com \
    --cc=alastair@d-silva.org \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=frederic.barrat@fr.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).