aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-08-09 19:47:17 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-08-21 11:46:13 +0200
commit3cd9219e5e16aa38606ea82e4fadb1e0f5f39743 (patch)
tree6f7aa5b238f4e434c7ce3dab11bee2ac002313ef /target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch
parent4291a0d58a506f4e2f32de7918c3fc72145053ce (diff)
downloadupstream-3cd9219e5e16aa38606ea82e4fadb1e0f5f39743.tar.gz
upstream-3cd9219e5e16aa38606ea82e4fadb1e0f5f39743.tar.bz2
upstream-3cd9219e5e16aa38606ea82e4fadb1e0f5f39743.zip
pistachio: Make patches and configuration apply on to of 5.4
This refreshes the patches, removes patches already applied upstream and removes the SPI NAND framework to use the upstream version. In addition it also refreshes the kernel configuration. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch')
-rw-r--r--target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch66
1 files changed, 0 insertions, 66 deletions
diff --git a/target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch b/target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch
deleted file mode 100644
index 857823b783..0000000000
--- a/target/linux/pistachio/patches-5.4/107-clockevents-Retry-programming-min-delta-up-to-10-tim.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From b46f8c74afdd30cd52bfdcc2231470a0bab04416 Mon Sep 17 00:00:00 2001
-From: James Hogan <james.hogan@imgtec.com>
-Date: Fri, 22 Apr 2016 18:22:45 +0100
-Subject: clockevents: Retry programming min delta up to 10 times
-
-Under virtualisation it is possible to get unexpected latency during a
-clockevent device's set_next_event() callback which can make it return
--ETIME even for a delta based on min_delta_ns.
-
-The clockevents_program_min_delta() implementation for
-CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n doesn't handle retries when this
-happens, nor does clockevents_program_event() or its callers when force
-is true (for example hrtimer_reprogram()). This can result in hangs
-until the clock event device does a full period.
-
-It isn't appropriate to use MIN_ADJUST in this case as occasional
-hypervisor induced high latency will cause min_delta_ns to quickly
-increase to the maximum.
-Instead, borrow the retry pattern from the MIN_ADJUST case, but without
-making adjustments. We retry up to 10 times before giving up.
-
-(picked https://patchwork.kernel.org/patch/8909491/)
-
-Signed-off-by: James Hogan <james.hogan@imgtec.com>
----
- kernel/time/clockevents.c | 26 +++++++++++++++++++-------
- 1 file changed, 19 insertions(+), 7 deletions(-)
-
---- a/kernel/time/clockevents.c
-+++ b/kernel/time/clockevents.c
-@@ -281,16 +281,28 @@ static int clockevents_program_min_delta
- {
- unsigned long long clc;
- int64_t delta;
-+ int i;
-
-- delta = dev->min_delta_ns;
-- dev->next_event = ktime_add_ns(ktime_get(), delta);
-+ for (i = 0;;) {
-+ delta = dev->min_delta_ns;
-+ dev->next_event = ktime_add_ns(ktime_get(), delta);
-
-- if (clockevent_state_shutdown(dev))
-- return 0;
-+ if (clockevent_state_shutdown(dev))
-+ return 0;
-
-- dev->retries++;
-- clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
-- return dev->set_next_event((unsigned long) clc, dev);
-+ dev->retries++;
-+ clc = ((unsigned long long) delta * dev->mult) >> dev->shift;
-+ if (dev->set_next_event((unsigned long) clc, dev) == 0)
-+ return 0;
-+
-+ if (++i > 9) {
-+ /*
-+ * We tried 10 times to program the device with the
-+ * given min_delta_ns. Get out of here.
-+ */
-+ return -ETIME;
-+ }
-+ }
- }
-
- #endif /* CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST */