* [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead, c900-plic match string
[not found] <20220215153104.581786-1-sashal@kernel.org>
@ 2022-02-15 15:30 ` Sasha Levin
2022-02-20 9:54 ` [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead,c900-plic " Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2022-02-15 15:30 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Guo Ren, Anup Patel, Marc Zyngier, Palmer Dabbelt, Samuel Holland,
Thomas Gleixner, Sasha Levin, paul.walmsley, aou, linux-riscv
From: Guo Ren <guoren@linux.alibaba.com>
[ Upstream commit 1d4df649cbb4b26d19bea38ecff4b65b10a1bbca ]
The thead,c900-plic has been used in opensbi to distinguish
PLIC [1]. Although PLICs have the same behaviors in Linux,
they are different hardware with some custom initializing in
firmware(opensbi).
Qute opensbi patch commit-msg by Samuel:
The T-HEAD PLIC implementation requires setting a delegation bit
to allow access from S-mode. Now that the T-HEAD PLIC has its own
compatible string, set this bit automatically from the PLIC driver,
instead of reaching into the PLIC's MMIO space from another driver.
[1]: https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd62653b9fb31623a42ced45f38ea6
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Anup Patel <anup@brainfault.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220130135634.1213301-3-guoren@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/irqchip/irq-sifive-plic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 532e9d68c7042..767cdd3f773bb 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -258,3 +258,4 @@ static int __init plic_init(struct device_node *node,
IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */
+IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_init); /* for firmware driver */
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead,c900-plic match string
2022-02-15 15:30 ` [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead, c900-plic match string Sasha Levin
@ 2022-02-20 9:54 ` Pavel Machek
2022-02-20 11:05 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2022-02-20 9:54 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Guo Ren, Anup Patel, Marc Zyngier,
Palmer Dabbelt, Samuel Holland, Thomas Gleixner, paul.walmsley,
aou, linux-riscv
[-- Attachment #1.1: Type: text/plain, Size: 1135 bytes --]
Hi!
> [ Upstream commit 1d4df649cbb4b26d19bea38ecff4b65b10a1bbca ]
>
> The thead,c900-plic has been used in opensbi to distinguish
> PLIC [1]. Although PLICs have the same behaviors in Linux,
> they are different hardware with some custom initializing in
> firmware(opensbi).
>
> Qute opensbi patch commit-msg by Samuel:
>
> The T-HEAD PLIC implementation requires setting a delegation bit
> to allow access from S-mode. Now that the T-HEAD PLIC has its own
> compatible string, set this bit automatically from the PLIC driver,
> instead of reaching into the PLIC's MMIO space from another driver.
>
> [1]: https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd62653b9fb31623a42ced45f38ea6
>
The "thead,c900-plic" string is added into single place in the
kernel. This means that a) it will probably not do anything useful in
-stable kernels and b) it is certainly missing documentation etc.
In mainline, string is documented in
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead,c900-plic match string
2022-02-20 9:54 ` [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead,c900-plic " Pavel Machek
@ 2022-02-20 11:05 ` Marc Zyngier
0 siblings, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2022-02-20 11:05 UTC (permalink / raw)
To: Pavel Machek
Cc: Sasha Levin, linux-kernel, stable, Guo Ren, Anup Patel,
Palmer Dabbelt, Samuel Holland, Thomas Gleixner, paul.walmsley,
aou, linux-riscv
On 2022-02-20 09:54, Pavel Machek wrote:
> Hi!
>
>> [ Upstream commit 1d4df649cbb4b26d19bea38ecff4b65b10a1bbca ]
>>
>> The thead,c900-plic has been used in opensbi to distinguish
>> PLIC [1]. Although PLICs have the same behaviors in Linux,
>> they are different hardware with some custom initializing in
>> firmware(opensbi).
>>
>> Qute opensbi patch commit-msg by Samuel:
>>
>> The T-HEAD PLIC implementation requires setting a delegation bit
>> to allow access from S-mode. Now that the T-HEAD PLIC has its own
>> compatible string, set this bit automatically from the PLIC driver,
>> instead of reaching into the PLIC's MMIO space from another driver.
>>
>> [1]:
>> https://github.com/riscv-software-src/opensbi/commit/78c2b19218bd62653b9fb31623a42ced45f38ea6
>>
>
> The "thead,c900-plic" string is added into single place in the
> kernel. This means that a) it will probably not do anything useful in
> -stable kernels and b) it is certainly missing documentation etc.
>
> In mainline, string is documented in
> Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
(b) is certainly true. And to make the above comment useful, the missing
patch is 321a8be37e1a ("dt-bindings: update riscv plic compatible
string").
Regarding (a), the DT is provided by the firmware (as it should
be on any reasonable platform). As such, no need for this string to be
mentioned anywhere else but in the documentation.
Now, the real question is where there is any point in backporting
this to such an old kernel, as this HW is unlikely to ever run it.
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-20 11:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220215153104.581786-1-sashal@kernel.org>
2022-02-15 15:30 ` [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead, c900-plic match string Sasha Levin
2022-02-20 9:54 ` [PATCH AUTOSEL 4.19 03/11] irqchip/sifive-plic: Add missing thead,c900-plic " Pavel Machek
2022-02-20 11:05 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox