--- zzzz-none-000/linux-3.10.107/lib/ratelimit.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/lib/ratelimit.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,6 +13,14 @@ #include #include +#if defined(CONFIG_AVM_FASTIRQ) + +#include +#define _BUILD_AVM_CONTEXT_FUNC(func) firq_##func + +#else +#define _BUILD_AVM_CONTEXT_FUNC(func) func +#endif /* * __ratelimit - rate limiting * @rs: ratelimit_state data @@ -39,7 +47,7 @@ * in addition to the one that will be printed by * the entity that is holding the lock already: */ - if (!raw_spin_trylock_irqsave(&rs->lock, flags)) + if (!_BUILD_AVM_CONTEXT_FUNC(raw_spin_trylock_irqsave)(&rs->lock, flags)) return 0; if (!rs->begin) @@ -49,7 +57,7 @@ if (rs->missed) printk(KERN_WARNING "%s: %d callbacks suppressed\n", func, rs->missed); - rs->begin = jiffies; + rs->begin = 0; rs->printed = 0; rs->missed = 0; } @@ -60,7 +68,7 @@ rs->missed++; ret = 0; } - raw_spin_unlock_irqrestore(&rs->lock, flags); + _BUILD_AVM_CONTEXT_FUNC(raw_spin_unlock_irqrestore)(&rs->lock, flags); return ret; }