From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Maulik Shah <mkshah@codeaurora.org>
Cc: andy.gross@linaro.org, linus.walleij@linaro.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, dianders@chromium.org,
swboyd@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org,
lsrao@codeaurora.org,
Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Subject: Re: [PATCH] pinctrl: qcom: Add affinity callbacks to msmgpio IRQ chip
Date: Tue, 12 May 2020 15:22:53 -0700 [thread overview]
Message-ID: <20200512222253.GP2165@builder.lan> (raw)
In-Reply-To: <1588314617-4556-1-git-send-email-mkshah@codeaurora.org>
On Thu 30 Apr 23:30 PDT 2020, Maulik Shah wrote:
> From: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
>
> Wakeup capable GPIO IRQs routed via PDC are not being migrated when a CPU
> is hotplugged. Add affinity callbacks to msmgpio IRQ chip to update the
> affinity of wakeup capable IRQs.
>
> Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy")
> Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
> [mkshah: updated commit text and minor code fixes]
> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/pinctrl/qcom/pinctrl-msm.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index 29259fe..83b7d64 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -1033,6 +1033,29 @@ static void msm_gpio_irq_relres(struct irq_data *d)
> module_put(gc->owner);
> }
>
> +static int msm_gpio_irq_set_affinity(struct irq_data *d,
> + const struct cpumask *dest, bool force)
> +{
> + struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> + struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
> +
> + if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
> + return irq_chip_set_affinity_parent(d, dest, force);
> +
> + return 0;
> +}
> +
> +static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
> +{
> + struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
> + struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
> +
> + if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
> + return irq_chip_set_vcpu_affinity_parent(d, vcpu_info);
> +
> + return 0;
> +}
> +
> static void msm_gpio_irq_handler(struct irq_desc *desc)
> {
> struct gpio_chip *gc = irq_desc_get_handler_data(desc);
> @@ -1131,6 +1154,8 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
> pctrl->irq_chip.irq_set_wake = msm_gpio_irq_set_wake;
> pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres;
> pctrl->irq_chip.irq_release_resources = msm_gpio_irq_relres;
> + pctrl->irq_chip.irq_set_affinity = msm_gpio_irq_set_affinity;
> + pctrl->irq_chip.irq_set_vcpu_affinity = msm_gpio_irq_set_vcpu_affinity;
>
> np = of_parse_phandle(pctrl->dev->of_node, "wakeup-parent", 0);
> if (np) {
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
prev parent reply other threads:[~2020-05-12 22:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 6:30 [PATCH] pinctrl: qcom: Add affinity callbacks to msmgpio IRQ chip Maulik Shah
2020-05-01 15:10 ` Doug Anderson
2020-05-03 7:53 ` Stephen Boyd
2020-05-12 12:30 ` Linus Walleij
2020-05-12 22:22 ` Bjorn Andersson [this message]
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=20200512222253.GP2165@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=andy.gross@linaro.org \
--cc=dianders@chromium.org \
--cc=ilina@codeaurora.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsrao@codeaurora.org \
--cc=mkshah@codeaurora.org \
--cc=rnayak@codeaurora.org \
--cc=swboyd@chromium.org \
--cc=vnkgutta@codeaurora.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 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.