diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-02-18 14:57:20 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-18 15:22:24 +1100 |
commit | 3db397ea5892a8b348cf412739996731884561b3 (patch) | |
tree | 795764a63d33a5c56d0131f4d1e4ede060725cd3 | |
parent | 772c78a598aa42862fc7a6f5cc163c12291d7ac5 (diff) | |
download | skiboot-3db397ea5892a8b348cf412739996731884561b3.zip skiboot-3db397ea5892a8b348cf412739996731884561b3.tar.gz skiboot-3db397ea5892a8b348cf412739996731884561b3.tar.bz2 |
Don't run pollers in time_wait() when a lock is held
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/timebase.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/timebase.c b/core/timebase.c index ff26689..ce2784a 100644 --- a/core/timebase.c +++ b/core/timebase.c @@ -1,3 +1,4 @@ + /* Copyright 2013-2014 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,7 +41,14 @@ static void time_wait_poll(unsigned long duration) void time_wait(unsigned long duration) { - if (this_cpu() != boot_cpu) + struct cpu_thread *c = this_cpu(); + + if (this_cpu()->lock_depth) { + time_wait_nopoll(duration); + return; + } + + if (c != boot_cpu) time_wait_nopoll(duration); else time_wait_poll(duration); |