From: Serge Semin <fancer.lancer@gmail.com>
To: Jia He <justin.he@arm.com>
Cc: Hoan Tran <hoan@os.amperecomputing.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip
Date: Fri, 16 Oct 2020 19:39:39 +0300 [thread overview]
Message-ID: <20201016163939.ouxuphconlmlfze3@mobilestation> (raw)
In-Reply-To: <20201016153544.162611-1-justin.he@arm.com>
On Fri, Oct 16, 2020 at 11:35:44PM +0800, Jia He wrote:
> Commit 0ea683931adb ("gpio: dwapb: Convert driver to using the
> GPIO-lib-based IRQ-chip") missed the case in dwapb_irq_set_wake().
>
> Without this fix, probing the dwapb gpio driver will hit a error:
> "address between user and kernel address ranges" on a Ampere armv8a
> server and cause a panic.
It's strange I didn't get the same panic. Anyway, good catch! Certainly:
Acked-by: Serge Semin <fancer.lancer@gmail.com>
>
> Fixes: 0ea683931adb ("gpio: dwapb: Convert driver to using the
> GPIO-lib-based IRQ-chip")
> Signed-off-by: Jia He <justin.he@arm.com>
> ---
> drivers/gpio/gpio-dwapb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> index a5b326754124..2a9046c0fb16 100644
> --- a/drivers/gpio/gpio-dwapb.c
> +++ b/drivers/gpio/gpio-dwapb.c
> @@ -343,8 +343,8 @@ static int dwapb_irq_set_type(struct irq_data *d, u32 type)
> #ifdef CONFIG_PM_SLEEP
> static int dwapb_irq_set_wake(struct irq_data *d, unsigned int enable)
> {
> - struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
> - struct dwapb_gpio *gpio = igc->private;
> + struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> + struct dwapb_gpio *gpio = to_dwapb_gpio(gc);
> struct dwapb_context *ctx = gpio->ports[0].ctx;
> irq_hw_number_t bit = irqd_to_hwirq(d);
>
> --
> 2.17.1
>
next prev parent reply other threads:[~2020-10-16 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 15:35 [PATCH] gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip Jia He
2020-10-16 15:43 ` Andy Shevchenko
2020-10-16 16:39 ` Serge Semin [this message]
2020-10-26 14:50 ` Bartosz Golaszewski
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=20201016163939.ouxuphconlmlfze3@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=hoan@os.amperecomputing.com \
--cc=justin.he@arm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).