summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/mv/mpic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arm/mv/mpic.c b/sys/arm/mv/mpic.c
index 813caf4..0682e14 100644
--- a/sys/arm/mv/mpic.c
+++ b/sys/arm/mv/mpic.c
@@ -378,10 +378,14 @@ int
pic_ipi_get(int i __unused)
{
uint32_t val;
+ int ipi;
val = MPIC_CPU_READ(mv_mpic_sc, MPIC_IN_DRBL);
- if (val)
- return (ffs(val) - 1);
+ if (val) {
+ ipi = ffs(val) - 1;
+ MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL, ~(1 << ipi));
+ return (ipi);
+ }
return (0x3ff);
}
@@ -389,10 +393,6 @@ pic_ipi_get(int i __unused)
void
pic_ipi_clear(int ipi)
{
- uint32_t val;
-
- val = ~(1 << ipi);
- MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL, val);
}
#endif
OpenPOWER on IntegriCloud