--- zzzz-none-000/linux-4.19.183/lib/ratelimit.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/lib/ratelimit.c 2023-06-28 08:54:21.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) @@ -64,7 +72,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; }