From: Marc Zyngier <maz@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1
Date: Fri, 06 May 2022 12:22:33 +0100 [thread overview]
Message-ID: <87r1567vnq.wl-maz@kernel.org> (raw)
In-Reply-To: <20220425113706.29310-2-pali@kernel.org>
On Mon, 25 Apr 2022 12:37:06 +0100,
Pali Rohár <pali@kernel.org> wrote:
>
> IRQs 0 and 1 cannot be mapped, they are handled internally by this driver
> and this driver does not call generic_handle_domain_irq() for these IRQs.
> So do not allow mapping these IRQs and correctly propagate error from the
> .irq_map callback.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Cc: stable@vger.kernel.org
> ---
> drivers/irqchip/irq-armada-370-xp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 1120084cba09..ebd76ea1c69b 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -546,6 +546,10 @@ static struct irq_chip armada_370_xp_irq_chip = {
> static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
> unsigned int virq, irq_hw_number_t hw)
> {
> + /* IRQs 0 and 1 cannot be mapped, they are handled internally */
> + if (hw <= 1)
> + return -EINVAL;
> +
> armada_370_xp_irq_mask(irq_get_irq_data(virq));
> if (!is_percpu_irq(hw))
> writel(hw, per_cpu_int_base +
> --
> 2.20.1
>
>
Given that this is completely academic and obviously doesn't affect
anyone, I have removed the Cc: stable from the patch when applying it.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1
Date: Fri, 06 May 2022 12:22:33 +0100 [thread overview]
Message-ID: <87r1567vnq.wl-maz@kernel.org> (raw)
In-Reply-To: <20220425113706.29310-2-pali@kernel.org>
On Mon, 25 Apr 2022 12:37:06 +0100,
Pali Rohár <pali@kernel.org> wrote:
>
> IRQs 0 and 1 cannot be mapped, they are handled internally by this driver
> and this driver does not call generic_handle_domain_irq() for these IRQs.
> So do not allow mapping these IRQs and correctly propagate error from the
> .irq_map callback.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Cc: stable@vger.kernel.org
> ---
> drivers/irqchip/irq-armada-370-xp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 1120084cba09..ebd76ea1c69b 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -546,6 +546,10 @@ static struct irq_chip armada_370_xp_irq_chip = {
> static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
> unsigned int virq, irq_hw_number_t hw)
> {
> + /* IRQs 0 and 1 cannot be mapped, they are handled internally */
> + if (hw <= 1)
> + return -EINVAL;
> +
> armada_370_xp_irq_mask(irq_get_irq_data(virq));
> if (!is_percpu_irq(hw))
> writel(hw, per_cpu_int_base +
> --
> 2.20.1
>
>
Given that this is completely academic and obviously doesn't affect
anyone, I have removed the Cc: stable from the patch when applying it.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-05-06 11:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 11:37 [PATCH 1/2] irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x Pali Rohár
2022-04-25 11:37 ` Pali Rohár
2022-04-25 11:37 ` [PATCH 2/2] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 Pali Rohár
2022-04-25 11:37 ` Pali Rohár
2022-04-29 12:30 ` Andrew Lunn
2022-04-29 12:30 ` Andrew Lunn
2022-05-01 12:02 ` Pali Rohár
2022-05-01 12:02 ` Pali Rohár
2022-05-06 11:22 ` Marc Zyngier [this message]
2022-05-06 11:22 ` Marc Zyngier
2022-05-06 11:25 ` [irqchip: irq/irqchip-next] " irqchip-bot for Pali Rohár
2022-04-29 12:23 ` [PATCH 1/2] irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x Andrew Lunn
2022-04-29 12:23 ` Andrew Lunn
2022-04-29 13:05 ` Pali Rohár
2022-04-29 13:05 ` Pali Rohár
2022-04-29 22:23 ` Andrew Lunn
2022-04-29 22:23 ` Andrew Lunn
2022-04-29 22:31 ` Pali Rohár
2022-04-29 22:31 ` Pali Rohár
2022-04-29 22:39 ` Andrew Lunn
2022-04-29 22:39 ` Andrew Lunn
2022-05-06 11:25 ` [irqchip: irq/irqchip-next] " irqchip-bot for Pali Rohár
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=87r1567vnq.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=andrew@lunn.ch \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tglx@linutronix.de \
/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.