[{"id":1761472,"web_url":"http://patchwork.ozlabs.org/comment/1761472/","msgid":"<1504243880.4974.71.camel@kernel.crashing.org>","date":"2017-09-01T05:31:20","subject":"Re: [PATCH v3 4/8] powerpc/xive: introduce xive_esb_write()","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"content":"On Wed, 2017-08-30 at 21:46 +0200, Cédric Le Goater wrote:\n> Some source support MMIO stores on the ESB page to perform EOI. Let's\n> introduce a specific routine for this case even if this should be the\n> only use of it.\n> \n> Signed-off-by: Cédric Le Goater <clg@kaod.org>\n> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>\nAcked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\n\n> ---\n>  arch/powerpc/sysdev/xive/common.c | 11 ++++++++++-\n>  1 file changed, 10 insertions(+), 1 deletion(-)\n> \n> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c\n> index 8a58662ed793..ac5f18a66742 100644\n> --- a/arch/powerpc/sysdev/xive/common.c\n> +++ b/arch/powerpc/sysdev/xive/common.c\n> @@ -203,6 +203,15 @@ static u8 xive_esb_read(struct xive_irq_data *xd, u32 offset)\n>  \treturn (u8)val;\n>  }\n>  \n> +static void xive_esb_write(struct xive_irq_data *xd, u32 offset, u64 data)\n> +{\n> +\t/* Handle HW errata */\n> +\tif (xd->flags & XIVE_IRQ_FLAG_SHIFT_BUG)\n> +\t\toffset |= offset << 4;\n> +\n> +\tout_be64(xd->eoi_mmio + offset, data);\n> +}\n> +\n>  #ifdef CONFIG_XMON\n>  static void xive_dump_eq(const char *name, struct xive_q *q)\n>  {\n> @@ -297,7 +306,7 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd)\n>  {\n>  \t/* If the XIVE supports the new \"store EOI facility, use it */\n>  \tif (xd->flags & XIVE_IRQ_FLAG_STORE_EOI)\n> -\t\tout_be64(xd->eoi_mmio + XIVE_ESB_STORE_EOI, 0);\n> +\t\txive_esb_write(xd, XIVE_ESB_STORE_EOI, 0);\n>  \telse if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) {\n>  \t\t/*\n>  \t\t * The FW told us to call it. This happens for some","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xk7GX4HN1z9sPm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 15:34:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xk7GX3VVszDrGr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 15:34:28 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xk7CQ29gczDqZx\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 15:31:46 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v815VKM7013279;\n\tFri, 1 Sep 2017 00:31:27 -0500"],"Message-ID":"<1504243880.4974.71.camel@kernel.crashing.org>","Subject":"Re: [PATCH v3 4/8] powerpc/xive: introduce xive_esb_write()","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"=?iso-8859-1?q?C=E9dric?= Le Goater <clg@kaod.org>,\n\tlinuxppc-dev@lists.ozlabs.org","Date":"Fri, 01 Sep 2017 15:31:20 +1000","In-Reply-To":"<20170830194617.26621-5-clg@kaod.org>","References":"<20170830194617.26621-1-clg@kaod.org>\n\t<20170830194617.26621-5-clg@kaod.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.5 (3.24.5-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Paul Mackerras <paulus@samba.org>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]