public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv,aplic: support for hart indexes
@ 2025-01-02  9:41 Vladimir Kondratiev
  2025-01-02  9:41 ` [PATCH 1/2] dt-bindings: interrupt-controller: add risc-v,aplic " Vladimir Kondratiev
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Vladimir Kondratiev @ 2025-01-02  9:41 UTC (permalink / raw)
  To: Anup Patel, Thomas Gleixner, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-riscv, linux-kernel, Vladimir Kondratiev

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-01-10  7:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02  9:41 [PATCH 0/2] riscv,aplic: support for hart indexes Vladimir Kondratiev
2025-01-02  9:41 ` [PATCH 1/2] dt-bindings: interrupt-controller: add risc-v,aplic " Vladimir Kondratiev
2025-01-02 15:20   ` Anup Patel
2025-01-02 16:10   ` Krzysztof Kozlowski
2025-01-07  8:59     ` Vladimir Kondratiev
2025-01-02  9:41 ` [PATCH 2/2] irqchip/riscv-aplic: add support for " Vladimir Kondratiev
2025-01-02 15:54   ` Anup Patel
2025-01-05  8:12     ` Vladimir Kondratiev
2025-01-05  8:39     ` [PATCH v2] " Vladimir Kondratiev
2025-01-06 16:22       ` Anup Patel
2025-01-07  7:58         ` [PATCH v3 0/2] riscv,aplic: " Vladimir Kondratiev
2025-01-07  7:58           ` [PATCH v3 1/2] dt-bindings: interrupt-controller: add risc-v,aplic " Vladimir Kondratiev
2025-01-08 12:25             ` Anup Patel
2025-01-09  7:56             ` Krzysztof Kozlowski
2025-01-09  9:13               ` Vladimir Kondratiev
2025-01-10  7:46                 ` Krzysztof Kozlowski
2025-01-07  7:58           ` [PATCH v3 2/2] irqchip/riscv-aplic: add support for " Vladimir Kondratiev
2025-01-08 12:27             ` Anup Patel
2025-01-02 12:48 ` [PATCH 0/2] riscv,aplic: " Anup Patel
2025-01-02 14:01   ` Vladimir Kondratiev
2025-01-02 14:41     ` Anup Patel
2025-01-02 15:07       ` Vladimir Kondratiev
2025-01-02 15:19         ` Anup Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox