kernel: bump 5.15 to 5.15.132
[openwrt/openwrt.git] / target / linux / generic / backport-5.15 / 300-v5.18-pinctrl-qcom-Return--EINVAL-for-setting-affinity-if-no-IRQ-parent.patch
1 From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2 To: linus.walleij@linaro.org
3 Cc: bjorn.andersson@linaro.org, dianders@chromium.org,
4 linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
5 linux-kernel@vger.kernel.org,
6 Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
7 Subject: [PATCH] pinctrl: qcom: Return -EINVAL for setting affinity if no IRQ
8 parent
9 Date: Thu, 13 Jan 2022 21:56:17 +0530
10 Message-Id: <20220113162617.131697-1-manivannan.sadhasivam@linaro.org>
11
12 The MSM GPIO IRQ controller relies on the parent IRQ controller to set the
13 CPU affinity for the IRQ. And this is only valid if there is any wakeup
14 parent available and defined in DT.
15
16 For the case of no parent IRQ controller defined in DT,
17 msm_gpio_irq_set_affinity() and msm_gpio_irq_set_vcpu_affinity() should
18 return -EINVAL instead of 0 as the affinity can't be set.
19
20 Otherwise, below warning will be printed by genirq:
21
22 genirq: irq_chip msmgpio did not update eff. affinity mask of irq 70
23
24 Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
25 ---
26 drivers/pinctrl/qcom/pinctrl-msm.c | 4 ++--
27 1 file changed, 2 insertions(+), 2 deletions(-)
28
29 --- a/drivers/pinctrl/qcom/pinctrl-msm.c
30 +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
31 @@ -1157,7 +1157,7 @@ static int msm_gpio_irq_set_affinity(str
32 if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
33 return irq_chip_set_affinity_parent(d, dest, force);
34
35 - return 0;
36 + return -EINVAL;
37 }
38
39 static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
40 @@ -1168,7 +1168,7 @@ static int msm_gpio_irq_set_vcpu_affinit
41 if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
42 return irq_chip_set_vcpu_affinity_parent(d, vcpu_info);
43
44 - return 0;
45 + return -EINVAL;
46 }
47
48 static void msm_gpio_irq_handler(struct irq_desc *desc)