From: Marc Zyngier <maz@kernel.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>,
Huacai Chen <chenhuacai@gmail.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 2/4] irqchip/loongson-eiointc: Add suspend/resume support
Date: Wed, 19 Oct 2022 08:22:37 +0100 [thread overview]
Message-ID: <87lepcgtvm.wl-maz@kernel.org> (raw)
In-Reply-To: <20221017033904.2421723-3-chenhuacai@loongson.cn>
On Mon, 17 Oct 2022 04:39:02 +0100,
Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> Add suspend/resume support for EIOINTC irqchip, which is needed for
> upcoming suspend/hibernation.
>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
> drivers/irqchip/irq-loongson-eiointc.c | 31 ++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
> index 16e9af8d8b1e..c68f8de3ae09 100644
> --- a/drivers/irqchip/irq-loongson-eiointc.c
> +++ b/drivers/irqchip/irq-loongson-eiointc.c
> @@ -17,6 +17,7 @@
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> +#include <linux/syscore_ops.h>
>
> #define EIOINTC_REG_NODEMAP 0x14a0
> #define EIOINTC_REG_IPMAP 0x14c0
> @@ -301,6 +302,35 @@ static struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group
> return NULL;
> }
>
> +static int eiointc_suspend(void)
> +{
> + return 0;
> +}
> +
> +static void eiointc_resume(void)
> +{
> + int i, j;
> + struct irq_desc *desc;
> + struct irq_data *irq_data;
> +
> + eiointc_router_init(0);
> +
> + for (i = 0; i < nr_pics; i++) {
> + for (j = 0; j < VEC_COUNT; j++) {
> + desc = irq_resolve_mapping(eiointc_priv[i]->eiointc_domain, j);
> + if (desc && desc->handle_irq && desc->handle_irq != handle_bad_irq) {
> + irq_data = &desc->irq_data;
> + eiointc_set_irq_affinity(irq_data, irq_data->common->affinity, 0);
Changing the affinity without holding the irq_desc lock? What makes
this safe?
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-10-19 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 3:39 [PATCH 0/4] irqchip/loongson: Add suspend/resume support for irqchip drivers Huacai Chen
2022-10-17 3:39 ` [PATCH 1/4] irqchip/loongson-htvec: Add suspend/resume support Huacai Chen
2022-10-17 3:39 ` [PATCH 2/4] irqchip/loongson-eiointc: " Huacai Chen
2022-10-19 7:22 ` Marc Zyngier [this message]
2022-10-19 9:55 ` Huacai Chen
2022-10-17 3:39 ` [PATCH 3/4] irqchip/loongson-pch-pic: " Huacai Chen
2022-10-17 3:39 ` [PATCH 4/4] irqchip/loongson-pch-lpc: " Huacai Chen
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=87lepcgtvm.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=chenhuacai@gmail.com \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox