diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2018-04-23 12:15:31 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-30 19:04:42 -0500 |
commit | 6421fc56dc289c8d14a1ce9eddbb88d3687fbb77 (patch) | |
tree | 1e62f2f3795e0476f092107d76a68b1a432e7394 /core | |
parent | 6739c890a2f298ed382b9557840a493fb97df44b (diff) | |
download | skiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.zip skiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.tar.gz skiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.tar.bz2 |
Move P8 timer code to separate file
Lets move P8 timer support code from slw.c to sbe-p8.c (as suggested
by BenH). There is a difference between timer support in P8 and P9.
Hence I think it makes sense to name it as sbe-p8.c.
Note that this is pure code movement and renaming functions/variables.
No functionality changes.
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/interrupts.c | 5 | ||||
-rw-r--r-- | core/test/run-timer.c | 2 | ||||
-rw-r--r-- | core/timer.c | 9 |
3 files changed, 9 insertions, 7 deletions
diff --git a/core/interrupts.c b/core/interrupts.c index 50ff77a..4452511 100644 --- a/core/interrupts.c +++ b/core/interrupts.c @@ -25,6 +25,7 @@ #include <device.h> #include <ccan/str/str.h> #include <timer.h> +#include <sbe-p8.h> /* ICP registers */ #define ICP_XIRR 0x4 /* 32-bit access */ @@ -487,8 +488,8 @@ static int64_t opal_handle_interrupt(uint32_t isn, __be64 *outstanding_event_mas /* Run it */ is->ops->interrupt(is, isn); - /* Check timers if SLW timer isn't working */ - if (!slw_timer_ok()) + /* Check timers if SBE timer isn't working */ + if (!p8_sbe_timer_ok()) check_timers(true); /* Update output events */ diff --git a/core/test/run-timer.c b/core/test/run-timer.c index e45cf63..986af28 100644 --- a/core/test/run-timer.c +++ b/core/test/run-timer.c @@ -47,7 +47,7 @@ static void expiry(struct timer *t, void *data, uint64_t now) count--; } -void slw_update_timer_expiry(uint64_t new_target) +void p8_sbe_update_timer_expiry(uint64_t new_target) { (void)new_target; /* FIXME: do intersting SLW timer sim */ diff --git a/core/timer.c b/core/timer.c index b10a564..21f62a4 100644 --- a/core/timer.c +++ b/core/timer.c @@ -4,6 +4,7 @@ #include <fsp.h> #include <device.h> #include <opal.h> +#include <sbe-p8.h> #ifdef __TEST__ #define this_cpu() ((void *)-1) @@ -109,7 +110,7 @@ static void __schedule_timer_at(struct timer *t, uint64_t when) /* Pick up the next timer and upddate the SBE HW timer */ lt = list_top(&timer_list, struct timer, link); if (lt) - slw_update_timer_expiry(lt->target); + p8_sbe_update_timer_expiry(lt->target); } void schedule_timer_at(struct timer *t, uint64_t when) @@ -166,7 +167,7 @@ static void __check_poll_timers(uint64_t now) * arbitrarily 1us. */ if (t->running) { - slw_update_timer_expiry(now + usecs_to_tb(1)); + p8_sbe_update_timer_expiry(now + usecs_to_tb(1)); break; } @@ -257,7 +258,7 @@ void late_init_timers(void) * * If a platform quirk exists, use that, else use the default. * - * If we have an SLW timer facility, we run this 10 times slower, + * If we have an SBE timer facility, we run this 10 times slower, * we could possibly completely get rid of it. * * We use a value in milliseconds, we don't want this to ever be @@ -265,7 +266,7 @@ void late_init_timers(void) */ if (platform.heartbeat_time) { heartbeat = platform.heartbeat_time(); - } else if (slw_timer_ok() || fsp_present()) { + } else if (p8_sbe_timer_ok() || fsp_present()) { heartbeat = HEARTBEAT_DEFAULT_MS * 10; } |