diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-18 12:34:36 +0800 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-09-04 15:34:33 +0200 |
| commit | bd7d57a03c4b0fa3b0291ec64d688ebfed5edffc (patch) | |
| tree | 0e1d7da8fca8b63a844df809de97da3725d56248 /scripts/Makefile.thinlto | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-next-bd7d57a03c4b0fa3b0291ec64d688ebfed5edffc.tar.gz linux-next-bd7d57a03c4b0fa3b0291ec64d688ebfed5edffc.zip | |
irqchip/riscv-imsic: Use GENMASK for base address masks
The IMSIC DT binding allows riscv,guest-index-bits up to 7 and
riscv,hart-index-bits up to 15. On RV32, guest-index-bits=7 and
hart-index-bits=13, together with the 12-bit IMSIC page offset, is a
binding-valid layout that consumes a 32-bit low-address mask.
The parser accepts this equality case because it rejects only values
larger than the remaining bit budget. The base address canonicalization
then builds the low-address mask with BIT(sum) - 1. When sum is 32 on
RV32, that expression shifts an unsigned long by its full width.
Keep the legal equality layout and express the mask with GENMASK(sum - 1,
0) instead. The existing parser bounds guarantee that sum - 1 is below
BITS_PER_LONG at both mask sites.
Fixes: 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20260718040000.004.929c1ef2-caplitmus-rv@iscas.ac.cn
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
