[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250102094116.3847894-1-vladimir.kondratiev@mobileye.com>
Date: Thu, 2 Jan 2025 11:41:14 +0200
From: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
To: Anup Patel <anup@...infault.org>,
Thomas Gleixner <tglx@...utronix.de>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
Subject: [PATCH 0/2] riscv,aplic: support for hart indexes
Risc-v APLIC uses "hart index" to access data per destination hart.
Current implementation assumes hart indexes are consecutive integers
starting from 0, while Risc-V documentation says it may be
arbitrary numbers, with a clue that it may be related to the hart IDs.
In all boards I see in today's kernel, hart IDs are consecutive
integers, thus using dart IDs is the same as indexes.
However, for the MIPS P8700, hart IDs are different from indexes,
on this SoC they encode thread number, core and cluster in bits
[0..3], [4..15], [16..19] resulting Soc consisting of 3 clusters *
4 cores * 2 threads with hart IDs:
0x0, 0x1, 0x10, 0x11, 0x20, 0x21, 0x30, 0x31, 0x10000 etc.
Change default hart index to be hart ID related to the start of domain,
and add optional property to configure arbitrary indexes.
Use of "device_property" API allows to cover both ACPI and OF in single
code
1-st commit adds dt-bindings, 2-nd - code
Vladimir Kondratiev (2):
dt-bindings: interrupt-controller: add risc-v,aplic hart indexes
irqchip/riscv-aplic: add support for hart indexes
.../interrupt-controller/riscv,aplic.yaml | 8 ++++++
drivers/irqchip/irq-riscv-aplic-direct.c | 25 +++++++++++++++++--
2 files changed, 31 insertions(+), 2 deletions(-)
base-commit: 5bea460cb3a4118c3914e5ce2787736a32365859
--
2.43.0
Powered by blists - more mailing lists