From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Frederic Barrat <fbarrat@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, clg@kaod.org
Cc: andrew.donnellan@au1.ibm.com, vaibhav@linux.vnet.ibm.com
Subject: Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown
Date: Fri, 16 Mar 2018 09:59:08 +1100 [thread overview]
Message-ID: <1521154748.16434.173.camel@kernel.crashing.org> (raw)
In-Reply-To: <20180314165808.26628-1-fbarrat@linux.vnet.ibm.com>
On Wed, 2018-03-14 at 17:58 +0100, Frederic Barrat wrote:
> + if (irq == hw_irq) {
> + cur &= 1 << 31;
> + cur |= XIVE_BAD_IRQ;
> + *(q->qpage + idx) = cpu_to_be32(cur);
> + }
> +
> + idx = (idx + 1) & q->msk;
> + if (idx == 0)
> + toggle ^= 1;
> + } while (irq && (count < q->msk));
Safer to make the replacement an atomic with cmpxhg just in case you
found an old one trailing the queue that's just getting updated by HW.
Cheers,
Ben.
prev parent reply other threads:[~2018-03-15 22:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 16:58 [RFC] powerpc/xive: Remove irq from queue when it is shutdown Frederic Barrat
2018-03-14 17:47 ` Cédric Le Goater
2018-03-15 22:56 ` Benjamin Herrenschmidt
2018-03-15 22:59 ` Benjamin Herrenschmidt [this message]
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=1521154748.16434.173.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=andrew.donnellan@au1.ibm.com \
--cc=clg@kaod.org \
--cc=fbarrat@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vaibhav@linux.vnet.ibm.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 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).