aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/gen_estimator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-09-12 00:54:56 +0100
committerMark Brown <broonie@kernel.org>2025-09-12 00:54:56 +0100
commit9ca01e9226dbbb523b49b4e583e1d522977b4fe6 (patch)
tree630b0bbaf8c27dfb24c42570ec6e399700a4e662 /net/core/gen_estimator.c
parentspi: dt-bindings: samsung: Drop S3C2443 (diff)
parentMAINTAINERS: Add an entry for Amlogic spifc driver (diff)
downloadlinux-9ca01e9226dbbb523b49b4e583e1d522977b4fe6.tar.gz
linux-9ca01e9226dbbb523b49b4e583e1d522977b4fe6.zip
support for Amlogic SPI Flash Controller IP
Merge series from Xianwei Zhao <xianwei.zhao@amlogic.com>: This Flash Controller is derived by adding an SPI path to the original raw NAND controller. This controller supports two modes: raw mode and SPI mode. The raw mode has already been implemented in the community (drivers/mtd/nand/raw/meson_nand.c). This submission supports the SPI mode. Add the drivers and bindings corresponding to the SPI Flash Controller.
Diffstat (limited to 'net/core/gen_estimator.c')
-rw-r--r--net/core/gen_estimator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 7d426a8e29f3..f112156db587 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -90,10 +90,12 @@ static void est_timer(struct timer_list *t)
rate = (b_packets - est->last_packets) << (10 - est->intvl_log);
rate = (rate >> est->ewma_log) - (est->avpps >> est->ewma_log);
+ preempt_disable_nested();
write_seqcount_begin(&est->seq);
est->avbps += brate;
est->avpps += rate;
write_seqcount_end(&est->seq);
+ preempt_enable_nested();
est->last_bytes = b_bytes;
est->last_packets = b_packets;