[{"id":1750774,"web_url":"http://patchwork.ozlabs.org/comment/1750774/","msgid":"<20170818055631.GS5509@umbus.fritz.box>","date":"2017-08-18T05:56:31","subject":"Re: [PATCH v2 3/8] powerpc/xive: rename xive_poke_esb() in\n\txive_esb_read()","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Fri, Aug 11, 2017 at 04:23:36PM +0200, Cédric Le Goater wrote:\n> xive_poke_esb() is performing a load/read so it is better named as\n> xive_esb_read() as we will need to introduce a xive_esb_write()\n> routine. Also use the XIVE_ESB_LOAD_EOI offset when EOI'ing LSI\n> interrupts.\n> \n> Signed-off-by: Cédric Le Goater <clg@kaod.org>\n\nReviewed-by: David Gibson <david@gibson.dropbear.id.au>\n\n> ---\n> \n>  Changes since v1:\n> \n>  - fixed naming.\n>  \n>  arch/powerpc/sysdev/xive/common.c | 20 ++++++++++----------\n>  1 file changed, 10 insertions(+), 10 deletions(-)\n> \n> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c\n> index 8774af7a4105..8a58662ed793 100644\n> --- a/arch/powerpc/sysdev/xive/common.c\n> +++ b/arch/powerpc/sysdev/xive/common.c\n> @@ -190,7 +190,7 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, bool just_peek)\n>   * This is used to perform the magic loads from an ESB\n>   * described in xive.h\n>   */\n> -static u8 xive_poke_esb(struct xive_irq_data *xd, u32 offset)\n> +static u8 xive_esb_read(struct xive_irq_data *xd, u32 offset)\n>  {\n>  \tu64 val;\n>  \n> @@ -227,7 +227,7 @@ void xmon_xive_do_dump(int cpu)\n>  \txive_dump_eq(\"IRQ\", &xc->queue[xive_irq_priority]);\n>  #ifdef CONFIG_SMP\n>  \t{\n> -\t\tu64 val = xive_poke_esb(&xc->ipi_data, XIVE_ESB_GET);\n> +\t\tu64 val = xive_esb_read(&xc->ipi_data, XIVE_ESB_GET);\n>  \t\txmon_printf(\"  IPI state: %x:%c%c\\n\", xc->hw_ipi,\n>  \t\t\tval & XIVE_ESB_VAL_P ? 'P' : 'p',\n>  \t\t\tval & XIVE_ESB_VAL_P ? 'Q' : 'q');\n> @@ -326,9 +326,9 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd)\n>  \t\t * properly.\n>  \t\t */\n>  \t\tif (xd->flags & XIVE_IRQ_FLAG_LSI)\n> -\t\t\tin_be64(xd->eoi_mmio);\n> +\t\t\txive_esb_read(xd, XIVE_ESB_LOAD_EOI);\n>  \t\telse {\n> -\t\t\teoi_val = xive_poke_esb(xd, XIVE_ESB_SET_PQ_00);\n> +\t\t\teoi_val = xive_esb_read(xd, XIVE_ESB_SET_PQ_00);\n>  \t\t\tDBG_VERBOSE(\"eoi_val=%x\\n\", offset, eoi_val);\n>  \n>  \t\t\t/* Re-trigger if needed */\n> @@ -383,12 +383,12 @@ static void xive_do_source_set_mask(struct xive_irq_data *xd,\n>  \t * ESB accordingly on unmask.\n>  \t */\n>  \tif (mask) {\n> -\t\tval = xive_poke_esb(xd, XIVE_ESB_SET_PQ_01);\n> +\t\tval = xive_esb_read(xd, XIVE_ESB_SET_PQ_01);\n>  \t\txd->saved_p = !!(val & XIVE_ESB_VAL_P);\n>  \t} else if (xd->saved_p)\n> -\t\txive_poke_esb(xd, XIVE_ESB_SET_PQ_10);\n> +\t\txive_esb_read(xd, XIVE_ESB_SET_PQ_10);\n>  \telse\n> -\t\txive_poke_esb(xd, XIVE_ESB_SET_PQ_00);\n> +\t\txive_esb_read(xd, XIVE_ESB_SET_PQ_00);\n>  }\n>  \n>  /*\n> @@ -768,7 +768,7 @@ static int xive_irq_retrigger(struct irq_data *d)\n>  \t * To perform a retrigger, we first set the PQ bits to\n>  \t * 11, then perform an EOI.\n>  \t */\n> -\txive_poke_esb(xd, XIVE_ESB_SET_PQ_11);\n> +\txive_esb_read(xd, XIVE_ESB_SET_PQ_11);\n>  \n>  \t/*\n>  \t * Note: We pass \"0\" to the hw_irq argument in order to\n> @@ -803,7 +803,7 @@ static int xive_irq_set_vcpu_affinity(struct irq_data *d, void *state)\n>  \t\tirqd_set_forwarded_to_vcpu(d);\n>  \n>  \t\t/* Set it to PQ=10 state to prevent further sends */\n> -\t\tpq = xive_poke_esb(xd, XIVE_ESB_SET_PQ_10);\n> +\t\tpq = xive_esb_read(xd, XIVE_ESB_SET_PQ_10);\n>  \n>  \t\t/* No target ? nothing to do */\n>  \t\tif (xd->target == XIVE_INVALID_TARGET) {\n> @@ -832,7 +832,7 @@ static int xive_irq_set_vcpu_affinity(struct irq_data *d, void *state)\n>  \t\t * for sure the queue slot is no longer in use.\n>  \t\t */\n>  \t\tif (pq & 2) {\n> -\t\t\tpq = xive_poke_esb(xd, XIVE_ESB_SET_PQ_11);\n> +\t\t\tpq = xive_esb_read(xd, XIVE_ESB_SET_PQ_11);\n>  \t\t\txd->saved_p = true;\n>  \n>  \t\t\t/*","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 [IPv6:2401:3900:2:1::3])\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 3xYcrB48Byz9t2W\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 18 Aug 2017 19:15:38 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xYcrB2G3dzDrKJ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 18 Aug 2017 19:15:38 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xYcpG5MY0zDrJD\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 18 Aug 2017 19:13:58 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xYcpG3sNwz9t2y; Fri, 18 Aug 2017 19:13:58 +1000 (AEST)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"ZBS7k0cT\"; \n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"ZBS7k0cT\"; \n\tdkim-atps=neutral","lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au\n\theader.b=\"ZBS7k0cT\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1503047638;\n\tbh=yfAQNqEXliDNd3yMBBf/5n40QAWkj+jlyg4uepooqW0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZBS7k0cTl8Gw5nqgFTbXFr1x74xgHWN2+BecWQack+n3dUEggGTtPpr7pFMjJVyGm\n\tzPiOzUR+JQG+sshVmOgXZYrcix63SMjFgQDHu4ehDvgUe1sSfm9KAp4foY8WTuaebA\n\tmWJWfx2iMwa2iknBi3dJizUlms3qC9eeJpOXfxi0=","Date":"Fri, 18 Aug 2017 15:56:31 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"=?iso-8859-1?Q?C=E9dric?= Le Goater <clg@kaod.org>","Subject":"Re: [PATCH v2 3/8] powerpc/xive: rename xive_poke_esb() in\n\txive_esb_read()","Message-ID":"<20170818055631.GS5509@umbus.fritz.box>","References":"<20170811142341.22715-1-clg@kaod.org>\n\t<20170811142341.22715-4-clg@kaod.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"19HmC3QOnaNVzKTI\"","Content-Disposition":"inline","In-Reply-To":"<20170811142341.22715-4-clg@kaod.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","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":"linuxppc-dev@lists.ozlabs.org, Paul Mackerras <paulus@samba.org>","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>"}}]