[Skiboot] [PATCH 15/15] time: Improve time_wait_poll()

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Aug 9 16:38:19 AEST 2016


Call time_wait_nopoll() when period is smaller than remaining

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/timebase.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/timebase.c b/core/timebase.c
index 0714f25..8b1c01b 100644
--- a/core/timebase.c
+++ b/core/timebase.c
@@ -40,7 +40,8 @@ static void time_wait_poll(unsigned long duration)
 			opal_run_pollers();
 			time_wait_nopoll(period);
 			remaining -= period;
-		}
+		} else
+			time_wait_nopoll(remaining);
 
 		cpu_relax();
 	}
-- 
2.7.4



More information about the Skiboot mailing list