mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Vladimir Kondratiev" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/aslint-sswi: Resolve hart index
Date: Thu, 26 Jun 2025 14:13:04 -0000	[thread overview]
Message-ID: <175094718429.406.16067714715595873535.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250612143911.3224046-6-vladimir.kondratiev@mobileye.com>

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     128ab2cfd0205fe395196a9f3221bcddd6adf54e
Gitweb:        https://git.kernel.org/tip/128ab2cfd0205fe395196a9f3221bcddd6adf54e
Author:        Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
AuthorDate:    Thu, 12 Jun 2025 17:39:09 +03:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 26 Jun 2025 16:06:40 +02:00

irqchip/aslint-sswi: Resolve hart index

Resolve hart index according to assignment in the "riscv,hart-indexes"
property as defined in the specification [1]

Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250612143911.3224046-6-vladimir.kondratiev@mobileye.com
Link: https://github.com/riscvarchive/riscv-aclint [1]

---
 drivers/irqchip/irq-aclint-sswi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c
index 9d8b19b..93e28e9 100644
--- a/drivers/irqchip/irq-aclint-sswi.c
+++ b/drivers/irqchip/irq-aclint-sswi.c
@@ -71,6 +71,7 @@ static int __init aclint_sswi_parse_irq(struct fwnode_handle *fwnode, void __iom
 	for (u32 i = 0; i < contexts; i++) {
 		struct of_phandle_args parent;
 		unsigned long hartid;
+		u32 hart_index;
 		int rc, cpu;
 
 		rc = of_irq_parse_one(to_of_node(fwnode), i, &parent);
@@ -86,6 +87,11 @@ static int __init aclint_sswi_parse_irq(struct fwnode_handle *fwnode, void __iom
 
 		cpu = riscv_hartid_to_cpuid(hartid);
 
+		rc = riscv_get_hart_index(fwnode, i, &hart_index);
+		if (rc) {
+			pr_warn("%pfwP: hart index [%d] not found\n", fwnode, i);
+			return -EINVAL;
+		}
 		per_cpu(sswi_cpu_regs, cpu) = reg + hart_index * 4;
 	}
 

  reply	other threads:[~2025-06-26 14:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 13:47 [PATCH v1 0/7] Risc-V ACLINT IPI controller Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-23 12:53   ` Alexandre Ghiti
2025-06-09 13:47 ` [PATCH v1 2/7] irqchip: riscv aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-12 12:50   ` Thomas Gleixner
2025-06-09 13:47 ` [PATCH v1 3/7] dt-bindings: interrupt-controller: add generic Risc-v aclint-sswi Vladimir Kondratiev
2025-06-09 16:01   ` Conor Dooley
2025-06-10  9:55     ` Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 4/7] irqchip: introduce generic Risc-V aclint-sswi Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 5/7] irqchip: aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 6/7] irqchip: aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-09 13:47 ` [PATCH v1 7/7] irqchip: aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-10 10:05 ` [PATCH v2 0/7] MIPS P8700 variant of the ACLINT IPI controller Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 2/7] irqchip: riscv aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 3/7] dt-bindings: interrupt-controller: add MIPS P8700 aclint-sswi Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 4/7] irqchip: MIPS P800 variant of aclint-sswi Vladimir Kondratiev
2025-06-10 10:09     ` Inochi Amaoto
2025-06-10 10:46       ` Vladimir Kondratiev
2025-06-10 10:53         ` Inochi Amaoto
2025-06-10 11:09           ` Vladimir Kondratiev
2025-06-10 11:20             ` Inochi Amaoto
2025-06-12 13:03     ` Thomas Gleixner
2025-06-12 14:38       ` Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 5/7] irqchip: aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 6/7] irqchip: aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-10 10:05   ` [PATCH v2 7/7] irqchip: aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-12 14:39 ` [PATCH v3 0/7] MIPS P8700 variant of the ACLINT IPI controller Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 1/7] riscv: helper to parse hart index Vladimir Kondratiev
2025-06-20 19:31     ` Thomas Gleixner
2025-06-26 14:13     ` [tip: irq/drivers] riscv: Helper " tip-bot2 for Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 2/7] irqchip/riscv-aplic: use riscv_get_hart_index() Vladimir Kondratiev
2025-06-26 14:13     ` [tip: irq/drivers] irqchip/riscv-aplic: Use riscv_get_hart_index() tip-bot2 for Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 3/7] dt-bindings: interrupt-controller: add MIPS P8700 aclint-sswi Vladimir Kondratiev
2025-06-12 15:35     ` Conor Dooley
2025-06-26 14:13     ` [tip: irq/drivers] dt-bindings: interrupt-controller: Add " tip-bot2 for Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 4/7] irqchip: MIPS P800 variant of aclint-sswi Vladimir Kondratiev
2025-06-26 14:13     ` [tip: irq/drivers] irqchip/thead-c900-aclint-sswi: Generalize aclint-sswi driver and add MIPS P800 support tip-bot2 for Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 5/7] irqchip/aslint-sswi: resolve hart index Vladimir Kondratiev
2025-06-26 14:13     ` tip-bot2 for Vladimir Kondratiev [this message]
2025-06-12 14:39   ` [PATCH v3 6/7] irqchip/aclint-sswi: reduce data scope Vladimir Kondratiev
2025-06-26 14:13     ` [tip: irq/drivers] irqchip/aclint-sswi: Reduce " tip-bot2 for Vladimir Kondratiev
2025-06-12 14:39   ` [PATCH v3 7/7] irqchip/aclint-sswi: remove extra includes Vladimir Kondratiev
2025-06-26 14:13     ` [tip: irq/drivers] irqchip/aclint-sswi: Remove unneeded includes tip-bot2 for Vladimir Kondratiev
2025-06-26 13:48   ` [PATCH v3 0/7] MIPS P8700 variant of the ACLINT IPI controller Thomas Gleixner

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=175094718429.406.16067714715595873535.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vladimir.kondratiev@mobileye.com \
    --cc=x86@kernel.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 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®