Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/intr.c
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | intr_init(void *unused) | ||||
for (i = 0; i < NIRQ; ++i) { | for (i = 0; i < NIRQ; ++i) { | ||||
snprintf(&intrnames[i * INTRNAME_LEN], INTRNAME_LEN, "%-*s", | snprintf(&intrnames[i * INTRNAME_LEN], INTRNAME_LEN, "%-*s", | ||||
INTRNAME_LEN - 1, ""); | INTRNAME_LEN - 1, ""); | ||||
} | } | ||||
} | } | ||||
SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); | SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); | ||||
const char * | |||||
arm_describe_irq(int irq) | |||||
{ | |||||
static char buffer[8]; | |||||
sprintf(buffer, "%d", irq); | |||||
return (buffer); | |||||
} | |||||
ian: this static buffer is not SMP-safe (although I think it would take something like two hot-plug… | |||||
void | void | ||||
arm_setup_irqhandler(const char *name, driver_filter_t *filt, | arm_setup_irqhandler(const char *name, driver_filter_t *filt, | ||||
void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) | void (*hand)(void*), void *arg, int irq, int flags, void **cookiep) | ||||
{ | { | ||||
struct intr_event *event; | struct intr_event *event; | ||||
int error; | int error; | ||||
if (irq < 0 || irq >= NIRQ) | if (irq < 0 || irq >= NIRQ) | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |
this static buffer is not SMP-safe (although I think it would take something like two hot-plug devices being handled concurrently on two different cores both of which trigger the loading of drivers and resource allocation, and both arriving here at the same time to get a glich).