From: "tip-bot2 for Tianyang Zhang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Jianmin Lv <lvjianmin@loongson.cn>,
Liupu Wang <wangliupu@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
Tianyang Zhang <zhangtianyang@loongson.cn>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/core] irqchip/loongson-pch-msi: Prepare get_pch_msi_handle() for AVECINTC
Date: Fri, 23 Aug 2024 18:45:05 -0000 [thread overview]
Message-ID: <172443870536.2215.16437712166328065700.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240823104337.25577-1-zhangtianyang@loongson.cn>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: a1d4646d34c6642194a421ca9afbd060b0f9aa00
Gitweb: https://git.kernel.org/tip/a1d4646d34c6642194a421ca9afbd060b0f9aa00
Author: Tianyang Zhang <zhangtianyang@loongson.cn>
AuthorDate: Fri, 23 Aug 2024 18:43:36 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 23 Aug 2024 20:40:27 +02:00
irqchip/loongson-pch-msi: Prepare get_pch_msi_handle() for AVECINTC
On Loongson-3C6000 and higher systems with AVECINTC irqchip, there may
be multiple PCI segments, but only one PCH-MSI irq domain. In this case,
let get_pch_msi_handle() return the first domain handle.
Co-developed-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Co-developed-by: Liupu Wang <wangliupu@loongson.cn>
Signed-off-by: Liupu Wang <wangliupu@loongson.cn>
Co-developed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Tianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240823104337.25577-1-zhangtianyang@loongson.cn
---
drivers/irqchip/irq-loongson-pch-msi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loongson-pch-msi.c
index d437318..0dc1455 100644
--- a/drivers/irqchip/irq-loongson-pch-msi.c
+++ b/drivers/irqchip/irq-loongson-pch-msi.c
@@ -255,17 +255,17 @@ IRQCHIP_DECLARE(pch_msi, "loongson,pch-msi-1.0", pch_msi_of_init);
#ifdef CONFIG_ACPI
struct fwnode_handle *get_pch_msi_handle(int pci_segment)
{
- int i;
+ if (cpu_has_avecint)
+ return pch_msi_handle[0];
- for (i = 0; i < MAX_IO_PICS; i++) {
+ for (int i = 0; i < MAX_IO_PICS; i++) {
if (msi_group[i].pci_segment == pci_segment)
return pch_msi_handle[i];
}
- return NULL;
+ return pch_msi_handle[0];
}
-int __init pch_msi_acpi_init(struct irq_domain *parent,
- struct acpi_madt_msi_pic *acpi_pchmsi)
+int __init pch_msi_acpi_init(struct irq_domain *parent, struct acpi_madt_msi_pic *acpi_pchmsi)
{
int ret;
struct fwnode_handle *domain_handle;
prev parent reply other threads:[~2024-08-23 18:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 10:43 [PATCH v11 6/7] " Tianyang Zhang
2024-08-23 10:43 ` [PATCH v11 7/7] irqchip/loongarch-avec: Add AVEC irqchip support Tianyang Zhang
2024-08-23 18:45 ` [tip: irq/core] " tip-bot2 for Tianyang Zhang
2024-08-23 18:45 ` tip-bot2 for Tianyang Zhang [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=172443870536.2215.16437712166328065700.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=chenhuacai@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lvjianmin@loongson.cn \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangliupu@loongson.cn \
--cc=x86@kernel.org \
--cc=zhangtianyang@loongson.cn \
/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
all inboxes | Powered by JetHome®