--- zzzz-none-000/linux-4.4.60/lib/ratelimit.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/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) @@ -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; }