All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: linuxppc-dev@lists.ozlabs.org, kernel test robot <lkp@intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH v2 5/8] powerpc/xive: Drop check on irq_data in xive_core_debug_show()
Date: Tue, 9 Mar 2021 10:18:41 +0100	[thread overview]
Message-ID: <20210309101841.2117540f@bahia.lan> (raw)
In-Reply-To: <20210303174857.1760393-6-clg@kaod.org>

On Wed, 3 Mar 2021 18:48:54 +0100
Cédric Le Goater <clg@kaod.org> wrote:

> When looping on IRQ descriptor, irq_data is always valid.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state")
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---

Reviewed-by: Greg Kurz <groug@kaod.org>

>  arch/powerpc/sysdev/xive/common.c | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index 7581cb12bb53..60ebd6f4b31d 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -1586,6 +1586,8 @@ static void xive_debug_show_irq(struct seq_file *m, struct irq_data *d)
>  	u32 target;
>  	u8 prio;
>  	u32 lirq;
> +	struct xive_irq_data *xd;
> +	u64 val;
>  
>  	rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq);
>  	if (rc) {
> @@ -1596,17 +1598,14 @@ static void xive_debug_show_irq(struct seq_file *m, struct irq_data *d)
>  	seq_printf(m, "IRQ 0x%08x : target=0x%x prio=%02x lirq=0x%x ",
>  		   hw_irq, target, prio, lirq);
>  
> -	if (d) {
> -		struct xive_irq_data *xd = irq_data_get_irq_handler_data(d);
> -		u64 val = xive_esb_read(xd, XIVE_ESB_GET);
> -
> -		seq_printf(m, "flags=%c%c%c PQ=%c%c",
> -			   xd->flags & XIVE_IRQ_FLAG_STORE_EOI ? 'S' : ' ',
> -			   xd->flags & XIVE_IRQ_FLAG_LSI ? 'L' : ' ',
> -			   xd->flags & XIVE_IRQ_FLAG_H_INT_ESB ? 'H' : ' ',
> -			   val & XIVE_ESB_VAL_P ? 'P' : '-',
> -			   val & XIVE_ESB_VAL_Q ? 'Q' : '-');
> -	}
> +	xd = irq_data_get_irq_handler_data(d);
> +	val = xive_esb_read(xd, XIVE_ESB_GET);
> +	seq_printf(m, "flags=%c%c%c PQ=%c%c",
> +		   xd->flags & XIVE_IRQ_FLAG_STORE_EOI ? 'S' : ' ',
> +		   xd->flags & XIVE_IRQ_FLAG_LSI ? 'L' : ' ',
> +		   xd->flags & XIVE_IRQ_FLAG_H_INT_ESB ? 'H' : ' ',
> +		   val & XIVE_ESB_VAL_P ? 'P' : '-',
> +		   val & XIVE_ESB_VAL_Q ? 'Q' : '-');
>  	seq_puts(m, "\n");
>  }
>  


  reply	other threads:[~2021-03-09  9:28 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 17:48 [PATCH v2 0/8] powerpc/xive: Map one IPI interrupt per node Cédric Le Goater
2021-03-03 17:48 ` [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm, chip-id property Cédric Le Goater
2021-03-08 17:13   ` [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property Greg Kurz
2021-03-09 15:33     ` Cédric Le Goater
2021-03-09 17:08       ` Daniel Henrique Barboza
2021-03-09 17:26         ` Cédric Le Goater
2021-03-09 17:26           ` Cédric Le Goater
2021-03-12  1:55           ` David Gibson
2021-03-12  1:55             ` David Gibson
2021-03-12  9:53             ` Cédric Le Goater
2021-03-12  9:53               ` Cédric Le Goater
2021-03-12 12:18               ` Daniel Henrique Barboza
2021-03-12 12:18                 ` Daniel Henrique Barboza
2021-03-12 13:03                 ` Greg Kurz
2021-03-12 13:03                   ` Greg Kurz
2021-03-12 13:28                 ` Cédric Le Goater
2021-03-12 13:28                   ` Cédric Le Goater
2021-03-03 17:48 ` [PATCH v2 2/8] powerpc/xive: Introduce an IPI interrupt domain Cédric Le Goater
2021-03-08 17:55   ` Greg Kurz
2021-03-03 17:48 ` [PATCH v2 3/8] powerpc/xive: Remove useless check on XIVE_IPI_HW_IRQ Cédric Le Goater
2021-03-08 17:56   ` Greg Kurz
2021-03-03 17:48 ` [PATCH v2 4/8] powerpc/xive: Simplify xive_core_debug_show() Cédric Le Goater
2021-03-08 18:07   ` Greg Kurz
2021-03-08 18:11     ` Cédric Le Goater
2021-03-09  9:13       ` Greg Kurz
2021-03-09  9:42         ` Greg Kurz
2021-03-09 15:39           ` Cédric Le Goater
2021-03-03 17:48 ` [PATCH v2 5/8] powerpc/xive: Drop check on irq_data in xive_core_debug_show() Cédric Le Goater
2021-03-09  9:18   ` Greg Kurz [this message]
2021-03-03 17:48 ` [PATCH v2 6/8] powerpc/xive: Simplify the dump of XIVE interrupts under xmon Cédric Le Goater
2021-03-09  9:22   ` Greg Kurz
2021-03-03 17:48 ` [PATCH v2 7/8] powerpc/xive: Fix xmon command "dxi" Cédric Le Goater
2021-03-09 10:23   ` Greg Kurz
2021-03-09 15:49     ` Cédric Le Goater
2021-03-03 17:48 ` [PATCH v2 8/8] powerpc/xive: Map one IPI interrupt per node Cédric Le Goater
2021-03-09 13:23   ` Greg Kurz
2021-03-09 15:52     ` Cédric Le Goater
2021-03-30 16:18   ` 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=20210309101841.2117540f@bahia.lan \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.