[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<VI1PR09MB233382AE574F4D619B8525C094172@VI1PR09MB2333.eurprd09.prod.outlook.com>
Date: Sun, 5 Jan 2025 08:12:59 +0000
From: Vladimir Kondratiev <Vladimir.Kondratiev@...ileye.com>
To: Anup Patel <anup@...infault.org>
CC: 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>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] irqchip/riscv-aplic: add support for hart indexes
>> Risc-V APLIC specification defines "hart index" in [1]:
>>
>> Within a given interrupt domain, each of the domain’s harts has a
>> unique index number in the range 0 to 214 − 1 (= 16,383). The index
>> number a domain associates with a hart may or may not have any
>> relationship to the unique hart identifier (“hart ID”) that the
>> RISC-V Privileged Architecture assigns to the hart. Two different
>> interrupt domains may employ entirely different index numbers for
>> the same set of harts.
>Rather than this, better cite the text in "4.5 Memory-mapped control
>region for an interrupt domain".
Adding quote from 4.5 to the commit message
>> Support arbitrary hart indexes specified in optional APLIC property
>> "riscv,hart-index" that should be array of u32 elements, one per
>> interrupt target. If this property not specified, fallback is to use
>> hart ids, with hart index for each APLIC to be (hartid - hartid0)
>> where hartid0 is hart id for the 1-st target.
>This is an incorrect assumption in the default cause. The HART IDs
>of the HARTs targeted by an APLIC domain can be non-contiguous.
Fixing this to say "fallback to logical indexes"
>How about this ?
Taking your approach. Applying idea from
ef7080bd30ba ("irqchip/riscv-aplic: Simplify the initialization code")
Will shortly re-submit as "V2"
Powered by blists - more mailing lists