[{"id":1761475,"web_url":"http://patchwork.ozlabs.org/comment/1761475/","msgid":"<1504244603.4974.73.camel@kernel.crashing.org>","date":"2017-09-01T05:43:23","subject":"Re: [PATCH v3 8/8] powerpc/xive: improve debugging macros","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> Having the CPU identifier in the debug logs is helpful when tracking\n> issues. Also add some more logging and fix a compile issue in\n> xive_do_source_eoi().\n> \n> Signed-off-by: Cédric Le Goater <clg@kaod.org>\n\nAcked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\n\n> ---\n>  arch/powerpc/sysdev/xive/common.c | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n> \n> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c\n> index 8fd58773c241..1c087ed7427f 100644\n> --- a/arch/powerpc/sysdev/xive/common.c\n> +++ b/arch/powerpc/sysdev/xive/common.c\n> @@ -40,7 +40,8 @@\n>  #undef DEBUG_ALL\n>  \n>  #ifdef DEBUG_ALL\n> -#define DBG_VERBOSE(fmt...)\tpr_devel(fmt)\n> +#define DBG_VERBOSE(fmt, ...)\tpr_devel(\"cpu %d - \" fmt, \\\n> +\t\t\t\t\t smp_processor_id(), ## __VA_ARGS__)\n>  #else\n>  #define DBG_VERBOSE(fmt...)\tdo { } while(0)\n>  #endif\n> @@ -344,7 +345,7 @@ void xive_do_source_eoi(u32 hw_irq, struct xive_irq_data *xd)\n>  \t\t\txive_esb_read(xd, XIVE_ESB_LOAD_EOI);\n>  \t\telse {\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> +\t\t\tDBG_VERBOSE(\"eoi_val=%x\\n\", eoi_val);\n>  \n>  \t\t\t/* Re-trigger if needed */\n>  \t\t\tif ((eoi_val & XIVE_ESB_VAL_Q) && xd->trig_mmio)\n> @@ -1004,6 +1005,9 @@ static void xive_ipi_eoi(struct irq_data *d)\n>  {\n>  \tstruct xive_cpu *xc = __this_cpu_read(xive_cpu);\n>  \n> +\tDBG_VERBOSE(\"IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\\n\",\n> +\t\t    d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio);\n> +\n>  \t/* Handle possible race with unplug and drop stale IPIs */\n>  \tif (!xc)\n>  \t\treturn;","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 3xk7VM6W1rz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 15:44:43 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xk7VM58L0zDqfx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 15:44:43 +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 3xk7TC0dpnzDqZv\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 15:43:42 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v815hNpR014084;\n\tFri, 1 Sep 2017 00:43:24 -0500"],"Message-ID":"<1504244603.4974.73.camel@kernel.crashing.org>","Subject":"Re: [PATCH v3 8/8] powerpc/xive: improve debugging macros","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:43:23 +1000","In-Reply-To":"<20170830194617.26621-9-clg@kaod.org>","References":"<20170830194617.26621-1-clg@kaod.org>\n\t<20170830194617.26621-9-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>"}}]