Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/gic.c
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | gic_ipi_send(device_t dev, cpuset_t cpus, u_int ipi) | ||||
uint32_t val = 0, i; | uint32_t val = 0, i; | ||||
for (i = 0; i < MAXCPU; i++) | for (i = 0; i < MAXCPU; i++) | ||||
if (CPU_ISSET(i, &cpus)) | if (CPU_ISSET(i, &cpus)) | ||||
val |= 1 << (16 + i); | val |= 1 << (16 + i); | ||||
gic_d_write_4(sc, GICD_SGIR(0), val | ipi); | gic_d_write_4(sc, GICD_SGIR(0), val | ipi); | ||||
} | } | ||||
static int | |||||
arm_gic_ipi_read(device_t dev, int i) | |||||
{ | |||||
if (i != -1) { | |||||
/* | |||||
* The intr code will automagically give the frame pointer | |||||
* if the interrupt argument is 0. | |||||
*/ | |||||
if ((unsigned int)i > 16) | |||||
return (0); | |||||
return (i); | |||||
} | |||||
return (0x3ff); | |||||
} | |||||
static void | |||||
arm_gic_ipi_clear(device_t dev, int ipi) | |||||
{ | |||||
/* no-op */ | |||||
} | |||||
#endif | #endif | ||||
static device_method_t arm_gic_methods[] = { | static device_method_t arm_gic_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_attach, arm_gic_attach), | DEVMETHOD(device_attach, arm_gic_attach), | ||||
/* pic_if */ | /* pic_if */ | ||||
DEVMETHOD(pic_dispatch, gic_dispatch), | DEVMETHOD(pic_dispatch, gic_dispatch), | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |