[bcm28xx][arm64][ipi] Fix IPI on non-GIC based BCM28xx

This commit is contained in:
Gurjant Kalsi
2016-08-23 12:56:40 -07:00
parent bc5f276c02
commit c5b427333a
3 changed files with 14 additions and 5 deletions

View File

@@ -30,8 +30,11 @@
#if WITH_DEV_INTERRUPT_ARM_GIC
#include <dev/interrupt/arm_gic.h>
//#else
//#error need other implementation of interrupt controller that can ipi
#elif PLATFORM_BCM28XX
/* bcm28xx has a weird custom interrupt controller for MP */
extern void bcm28xx_send_ipi(uint irq, uint cpu_mask);
#else
#error need other implementation of interrupt controller that can ipi
#endif
#define LOCAL_TRACE 0
@@ -51,6 +54,12 @@ status_t arch_mp_send_ipi(mp_cpu_mask_t target, mp_ipi_t ipi)
LTRACEF("target 0x%x, gic_ipi %u\n", target, gic_ipi_num);
arm_gic_sgi(gic_ipi_num, ARM_GIC_SGI_FLAG_NS, target);
}
#elif PLATFORM_BCM2835
/* filter out targets outside of the range of cpus we care about */
target &= ((1UL << SMP_MAX_CPUS) - 1);
if (target != 0) {
bcm28xx_send_ipi(ipi, target);
}
#endif
return NO_ERROR;