[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250109113814.3254448-1-vladimir.kondratiev@mobileye.com>
Date: Thu, 9 Jan 2025 13:38:12 +0200
From: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
To: Anup Patel <anup@...infault.org>,
Thomas Gleixner <tglx@...utronix.de>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>
Cc: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org,
Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
Subject: [PATCH v4 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
Changed from v1:
1. use as fallback logical indexes instead of hart ids
2. refactor code to avoid unnecessary memory allocation
Changed from v2:
1. change property name to plural "riscv,hart-indexes"
Changed from v3:
1. added missing recepients as per "get_maintainer.pl"
no other changes
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, 30 insertions(+), 3 deletions(-)
base-commit: 9d89551994a430b50c4fffcb1e617a057fa76e20
--
2.43.0
Powered by blists - more mailing lists