summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlex Studer <[email protected]>2025-02-14 01:27:38 -0500
committerAnup Patel <[email protected]>2025-02-19 21:49:08 +0530
commit6019259dfbdf9322858b4e7cfc3d1448376e2aa0 (patch)
tree1bd69717c2d2f0237e3b05bf59d1705f36bc508e /scripts
parenta2c172f526b52eb428d9077fab8cd8690c7e2f19 (diff)
lib: utils/irqchip: Match against more specific compatible strings first
The T-HEAD C90x PLIC has some special quirks, such as the S-mode delegation bit. OpenSBI currently handles this by checking the compatible string in the device tree. However, this matching is done in the order of the fdt_match array. So if a device tree contains both strings, for example: compatible = "thead,c900-plic", "riscv,plic0"; Then OpenSBI will match against the generic "riscv,plic0" string, since that appears first in the fdt_match array. This means it will fail to set the S-mode delegation bit, and Linux will fail to boot. In some cases, it is not possible to change the compatible string to just the T-HEAD PLIC, as older versions of Linux only recognize the RISC-V compatible string. This patch fixes that by moving the RISC-V string to the end, ensuring that the more specific options get matched first. Signed-off-by: Alex Studer <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions