Re: [PATCH] hw/intc: sifive_plic: fix hard-coded max priority level

2022-09-28 Thread Jim Shu
Hi Clément, Thanks for your opinion. I think it's a good enhancement. PLIC spec [1] says that interrupt source priority registers should be WARL fields to allow software to determine "the number and position of read-write bits" in each priority specification, if any. To simplify discovery of

Re: [PATCH] hw/intc: sifive_plic: fix hard-coded max priority level

2022-09-26 Thread Clément Chigot
Hi Jim, On Sun, Sep 25, 2022 at 3:26 PM Jim Shu wrote: > > The maximum priority level is hard-coded when writing to interrupt > priority register. However, when writing to priority threshold register, > the maximum priority level is from num_priorities Property which is > configured by platform.

[PATCH] hw/intc: sifive_plic: fix hard-coded max priority level

2022-09-25 Thread Jim Shu
The maximum priority level is hard-coded when writing to interrupt priority register. However, when writing to priority threshold register, the maximum priority level is from num_priorities Property which is configured by platform. Also change interrupt priority register to use num_priorities