From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH v2 4/8] powerpc/xive: introduce xive_esb_write()
Date: Fri, 18 Aug 2017 15:57:06 +1000 [thread overview]
Message-ID: <20170818055706.GT5509@umbus.fritz.box> (raw)
In-Reply-To: <20170811142341.22715-5-clg@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]
On Fri, Aug 11, 2017 at 04:23:37PM +0200, Cédric Le Goater wrote:
Rationale in the commit message, maybe.
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> arch/powerpc/sysdev/xive/common.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index 8a58662ed793..ac5f18a66742 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -203,6 +203,15 @@ static u8 xive_esb_read(struct xive_irq_data *xd, u32 offset)
> return (u8)val;
> }
>
> +static void xive_esb_write(struct xive_irq_data *xd, u32 offset, u64 data)
> +{
> + /* Handle HW errata */
> + if (xd->flags & XIVE_IRQ_FLAG_SHIFT_BUG)
> + offset |= offset << 4;
> +
> + out_be64(xd->eoi_mmio + offset, data);
> +}
> +
> #ifdef CONFIG_XMON
> static void xive_dump_eq(const char *name, struct xive_q *q)
> {
> @@ -297,7 +306,7 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd)
> {
> /* If the XIVE supports the new "store EOI facility, use it */
> if (xd->flags & XIVE_IRQ_FLAG_STORE_EOI)
> - out_be64(xd->eoi_mmio + XIVE_ESB_STORE_EOI, 0);
> + xive_esb_write(xd, XIVE_ESB_STORE_EOI, 0);
> else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) {
> /*
> * The FW told us to call it. This happens for some
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-08-18 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-11 14:23 [PATCH v2 0/8] guest exploitation of the XIVE interrupt controller Cédric Le Goater
2017-08-11 14:23 ` [PATCH v2 1/8] powerpc/xive: introduce a common routine xive_queue_page_alloc() Cédric Le Goater
2017-08-14 4:52 ` David Gibson
2017-08-11 14:23 ` [PATCH v2 2/8] powerpc/xive: guest exploitation of the XIVE interrupt controller Cédric Le Goater
2017-08-14 6:26 ` David Gibson
2017-08-11 14:23 ` [PATCH v2 3/8] powerpc/xive: rename xive_poke_esb() in xive_esb_read() Cédric Le Goater
2017-08-18 5:56 ` David Gibson
2017-08-11 14:23 ` [PATCH v2 4/8] powerpc/xive: introduce xive_esb_write() Cédric Le Goater
2017-08-18 5:57 ` David Gibson [this message]
2017-08-11 14:23 ` [PATCH v2 5/8] powerpc/xive: add the HW IRQ number under xive_irq_data Cédric Le Goater
2017-08-11 14:23 ` [PATCH v2 6/8] powerpc/xive: introduce H_INT_ESB hcall Cédric Le Goater
2017-08-11 14:23 ` [PATCH v2 7/8] powerpc/xive: add XIVE Exploitation Mode to CAS Cédric Le Goater
2017-08-11 14:23 ` [PATCH v2 8/8] powerpc/xive: improve debugging macros Cédric Le Goater
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=20170818055706.GT5509@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=benh@kernel.crashing.org \
--cc=clg@kaod.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).