diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-10-24 15:13:59 +0100 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-11-13 07:49:30 +0000 |
commit | 4ee8d0becddd65b27206cc01ed0d896a6605b82b (patch) | |
tree | f21e8bc9b2ea5b29d153500631f4224d9c793914 /plat/common/plat_gicv2.c | |
parent | 385f1dbb294b36c5fbdbbf3d10b6cb105239a76e (diff) |
GIC: Introduce API to get interrupt ID
Acknowledging interrupt shall return a raw value from the interrupt
controller in which the actual interrupt ID may be encoded. Add a
platform API to extract the actual interrupt ID from the raw value
obtained from interrupt controller.
Document the new function. Also clarify the semantics of interrupt
acknowledge.
Change-Id: I818dad7be47661658b16f9807877d259eb127405
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat/common/plat_gicv2.c')
-rw-r--r-- | plat/common/plat_gicv2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plat/common/plat_gicv2.c b/plat/common/plat_gicv2.c index 05fabcab..38e1a61e 100644 --- a/plat/common/plat_gicv2.c +++ b/plat/common/plat_gicv2.c @@ -277,3 +277,13 @@ unsigned int plat_ic_set_priority_mask(unsigned int mask) { return gicv2_set_pmr(mask); } + +unsigned int plat_ic_get_interrupt_id(unsigned int raw) +{ + unsigned int id = (raw & INT_ID_MASK); + + if (id == GIC_SPURIOUS_INTERRUPT) + id = INTR_ID_UNAVAILABLE; + + return id; +} |