diff options
| author | Mark Brown <broonie@kernel.org> | 2026-03-16 01:11:23 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-16 01:11:23 +0000 |
| commit | 3e9cda2f4a33c6becc99f8a78946cbd02983852f (patch) | |
| tree | b07c29745fc1253262804258f9af581c7e834ebb /include/linux/netdevice.h | |
| parent | 5e2f19ce90d5601f4250b510ed2f41160e5692e9 (diff) | |
| parent | c43988dfe25ba358b1df72201327ca719e8a369d (diff) | |
| download | lwn-3e9cda2f4a33c6becc99f8a78946cbd02983852f.tar.gz lwn-3e9cda2f4a33c6becc99f8a78946cbd02983852f.zip | |
ASoC: amd: Move to GPIO descriptors
Linus Walleij <linusw@kernel.org> says:
After a quick look and test-compile I can determine that
all of these drivers include <linux/gpio.h> for no reason
whatsoever, so fixing it is low hanging fruit.
Link: https://patch.msgid.link/20260314-asoc-amd-v1-0-31afed06e022@kernel.org
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 67e25f6d15a4..ae269a2e7f4d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3576,17 +3576,49 @@ struct page_pool_bh { }; DECLARE_PER_CPU(struct page_pool_bh, system_page_pool); +#define XMIT_RECURSION_LIMIT 8 + #ifndef CONFIG_PREEMPT_RT static inline int dev_recursion_level(void) { return this_cpu_read(softnet_data.xmit.recursion); } + +static inline bool dev_xmit_recursion(void) +{ + return unlikely(__this_cpu_read(softnet_data.xmit.recursion) > + XMIT_RECURSION_LIMIT); +} + +static inline void dev_xmit_recursion_inc(void) +{ + __this_cpu_inc(softnet_data.xmit.recursion); +} + +static inline void dev_xmit_recursion_dec(void) +{ + __this_cpu_dec(softnet_data.xmit.recursion); +} #else static inline int dev_recursion_level(void) { return current->net_xmit.recursion; } +static inline bool dev_xmit_recursion(void) +{ + return unlikely(current->net_xmit.recursion > XMIT_RECURSION_LIMIT); +} + +static inline void dev_xmit_recursion_inc(void) +{ + current->net_xmit.recursion++; +} + +static inline void dev_xmit_recursion_dec(void) +{ + current->net_xmit.recursion--; +} #endif void __netif_schedule(struct Qdisc *q); |
