diff options
| author | Clément Léger <[email protected]> | 2025-01-10 14:15:50 +0100 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-01-30 10:30:45 +0530 |
| commit | 3943ddbaab00247b391128ae0a1f9258d4007f4f (patch) | |
| tree | 10b556c86d053a762a301341c1aac87cfee3b71d /include | |
| parent | bd613dd92113f683052acfb23d9dc8ba60029e0a (diff) | |
lib: sbi: pmu: fix usage of sbi_pmu_irq_bit()
While sbi_pmu_irq_bit() was used to delegate irq to S-mode, LCOFIP usage
was still hardcoded in various places. This led to change the returned
value of sbi_pmu_irq_bit() to be a bit number rather than a bit mask
since it returns an 'int' and we need to obtain the bit number itself to
handle it in the IRQs handlers. Add a similar function to return the
irq mask which can also be used where the mask is required rather than
the bit itself.
Signed-off-by: Clément Léger <[email protected]>
Reviewed-by: Samuel Holland <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_pmu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_pmu.h b/include/sbi/sbi_pmu.h index 3649d476..c0e25f5a 100644 --- a/include/sbi/sbi_pmu.h +++ b/include/sbi/sbi_pmu.h @@ -114,6 +114,9 @@ void sbi_pmu_exit(struct sbi_scratch *scratch); /** Return the pmu irq bit depending on extension existence */ int sbi_pmu_irq_bit(void); +/** Return the pmu irq mask or 0 if the pmu overflow irq is not supported */ +unsigned long sbi_pmu_irq_mask(void); + /** * Add the hardware event to counter mapping information. This should be called * from the platform code to update the mapping table. |
