aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-12 15:46:55 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-12 16:41:25 +1100
commitb54d1a8cfc24b06a7649cc5e33aa704662716a28 (patch)
treeaca79bd1ebb2297a654a12c2bb83564f15cf86e4 /core
parent0859f799583daa5fac57ab3f9a1175aae4de3252 (diff)
downloadskiboot-b54d1a8cfc24b06a7649cc5e33aa704662716a28.zip
skiboot-b54d1a8cfc24b06a7649cc5e33aa704662716a28.tar.gz
skiboot-b54d1a8cfc24b06a7649cc5e33aa704662716a28.tar.bz2
timer: Only check "poll" timers on actual poll, not any interrupt
Due to the lack of SLW timed interrupt support, we take the opportunity to check out timers on any incoming interrupt. However we really don't want to do that for the background pollers. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core')
-rw-r--r--core/interrupts.c2
-rw-r--r--core/opal.c2
-rw-r--r--core/timer.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/core/interrupts.c b/core/interrupts.c
index dfccb32..70614a0 100644
--- a/core/interrupts.c
+++ b/core/interrupts.c
@@ -293,7 +293,7 @@ static int64_t opal_handle_interrupt(uint32_t isn, uint64_t *outstanding_event_m
int64_t rc = OPAL_SUCCESS;
/* We run the timers first */
- check_timers();
+ check_timers(true);
/* No source ? return */
if (!is || !is->ops->interrupt) {
diff --git a/core/opal.c b/core/opal.c
index 0dab3f7..5e1c742 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -280,7 +280,7 @@ void opal_run_pollers(void)
struct opal_poll_entry *poll_ent;
/* We run the timers first */
- check_timers();
+ check_timers(false);
/* The pollers are run lokelessly, see comment in opal_del_poller */
list_for_each(&opal_pollers, poll_ent, link)
diff --git a/core/timer.c b/core/timer.c
index a4fa8b8..40526ee 100644
--- a/core/timer.c
+++ b/core/timer.c
@@ -198,7 +198,7 @@ static void __check_timers(uint64_t now)
}
}
-void check_timers(void)
+void check_timers(bool from_interrupt)
{
struct timer *t;
uint64_t now = mftb();
@@ -215,7 +215,8 @@ void check_timers(void)
/* Take lock and try again */
lock(&timer_lock);
- __check_poll_timers();
+ if (!from_interrupt)
+ __check_poll_timers();
__check_timers(now);
unlock(&timer_lock);
}