mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: chenjianguo <chenjianguo3@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Liyou (leeyou, RTOS)" <leeyou.li@huawei.com>,
	"Joey Yan(Bo)" <joey.yanbo@huawei.com>,
	"Xiaowei (C)" <xiaowei774@huawei.com>,
	"zhanghan (Q)" <zhanghan23@huawei.com>,
	Yangyingliang <yangyingliang@huawei.com>,
	yaohongbo <yaohongbo@huawei.com>, Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH] mbigen: don't clear eventid when free_irq
Date: Thu, 21 Mar 2019 09:11:35 +0000	[thread overview]
Message-ID: <20190321091135.5574b496@why.wild-wind.fr.eu.org> (raw)
In-Reply-To: <D08D06C366851D40A251D08BEEAA0F9A04367BD6@dggeml529-mbx.china.huawei.com>

On Sat, 16 Mar 2019 11:15:03 +0000
chenjianguo <chenjianguo3@huawei.com> wrote:

> From: Jianguo Chen <chenjianguo3@huawei.com>
> 
> mbigen_write_msg clears eventid bits of a mbigen register
> when free a interrupt, because msi_domain_deactivate memset
> struct msg to zero. Then multiple mbigen pins with zero eventid
> will report the same interrupt number.
> 
> The eventid clear call trace:
>                 free_irq
>                 __free_irq
>                 irq_shutdown
>                 irq_domain_deactivate_irq
>                 __irq_domain_deactivate_irq
>                 __irq_domain_deactivate_irq
>                 msi_domain_deactivate
>                 platform_msi_write_msg
>                 mbigen_write_msg
> 
> Signed-off-by: Jianguo Chen <chenjianguo3@huawei.com>
> ---
>   drivers/irqchip/irq-mbigen.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
> index 567b29c..fad7291 100644
> --- a/drivers/irqchip/irq-mbigen.c
> +++ b/drivers/irqchip/irq-mbigen.c
> @@ -161,6 +161,9 @@ static void mbigen_write_msg(struct msi_desc *desc,
> struct msi_msg *msg)
>         void __iomem *base = d->chip_data;
>         u32 val;
> 
> +       if (!msg->address_lo && !msg->address_hi)
> +               return;
> +
>         base += get_mbigen_vec_reg(d->hwirq);
>         val = readl_relaxed(base);
> 

For whatever reason, I couldn't apply this patch (even when fishing a
copy of this email from the archives). It seems to be corrupted is
various ways, so I had to write the patch from scratch, which is not the
most reliable way to work. Good thing this was something trivial, I
wouldn't do it for something more complicated.

In the future, please make sure to use 'git send-email' to send your
patches, as it is known to work correctly.

Thanks,

	M.
-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2019-03-21  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 11:15 chenjianguo
2019-03-21  9:11 ` Marc Zyngier [this message]
2019-03-21 13:21   ` Chen Jianguo

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=20190321091135.5574b496@why.wild-wind.fr.eu.org \
    --to=marc.zyngier@arm.com \
    --cc=chenjianguo3@huawei.com \
    --cc=jason@lakedaemon.net \
    --cc=joey.yanbo@huawei.com \
    --cc=leeyou.li@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=xiaowei774@huawei.com \
    --cc=yangyingliang@huawei.com \
    --cc=yaohongbo@huawei.com \
    --cc=zhanghan23@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®