diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index fc1241240b39..90994a2f2315 100644 --- a/sys/compat/linuxkpi/common/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -31,12 +31,15 @@ #ifndef _LINUX_INTERRUPT_H_ #define _LINUX_INTERRUPT_H_ +#include #include #include #include +#include #include #include +#include typedef irqreturn_t (*irq_handler_t)(int, void *); @@ -183,6 +186,19 @@ free_irq(unsigned int irq, void *device) kfree(irqe); } +static inline int +irq_set_affinity_hint(int vector, cpumask_t *mask) +{ + int error; + + if (mask != NULL) + error = intr_setaffinity(vector, CPU_WHICH_IRQ, mask); + else + error = intr_setaffinity(vector, CPU_WHICH_IRQ, cpuset_root); + + return (-error); +} + /* * LinuxKPI tasklet support */