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.
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.