Index: sys/compat/linuxkpi/common/include/linux/interrupt.h =================================================================== --- sys/compat/linuxkpi/common/include/linux/interrupt.h +++ sys/compat/linuxkpi/common/include/linux/interrupt.h @@ -208,6 +208,7 @@ unsigned long data); extern void tasklet_enable(struct tasklet_struct *); extern void tasklet_disable(struct tasklet_struct *); +extern void tasklet_disable_nosync(struct tasklet_struct *); extern int tasklet_trylock(struct tasklet_struct *); extern void tasklet_unlock(struct tasklet_struct *); extern void tasklet_unlock_wait(struct tasklet_struct *ts); Index: sys/compat/linuxkpi/common/src/linux_tasklet.c =================================================================== --- sys/compat/linuxkpi/common/src/linux_tasklet.c +++ sys/compat/linuxkpi/common/src/linux_tasklet.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -62,6 +63,8 @@ DPCPU_DEFINE_STATIC(struct tasklet_worker, tasklet_worker); +#define smp_mb__after_atomic() barrier() + static void tasklet_handler(void *arg) { @@ -227,6 +230,13 @@ tasklet_unlock_wait(ts); } +void +tasklet_disable_nosync(struct tasklet_struct *ts) +{ + atomic_inc(&ts->count); + smp_mb__after_atomic(); +} + int tasklet_trylock(struct tasklet_struct *ts) {