diff options
author | Olof Johansson <olof@lixom.net> | 2019-04-11 03:41:52 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-04-24 07:19:46 +0300 |
commit | 10baa64c02f6746fd506136e0693aa2d592574fb (patch) | |
tree | da00e48f0cb5d1434cbc7c31bb6ca15efa7d4564 /lib/sbi_timer.c | |
parent | fbf986ac2a0b926ae97e6796b87e366610d7589e (diff) | |
download | opensbi-10baa64c02f6746fd506136e0693aa2d592574fb.tar.xz |
all: run clang-format and update checked-in files
Noisy commit, no functional changes.
Generated with an current upstream clang-format and:
clang-format -i $(find . -name \*.[ch])
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'lib/sbi_timer.c')
-rw-r--r-- | lib/sbi_timer.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/sbi_timer.c b/lib/sbi_timer.c index a2fb1a7..c58441d 100644 --- a/lib/sbi_timer.c +++ b/lib/sbi_timer.c @@ -16,13 +16,12 @@ u64 get_ticks(void) { u32 lo, hi, tmp; - __asm__ __volatile__ ( - "1:\n" - "rdtimeh %0\n" - "rdtime %1\n" - "rdtimeh %2\n" - "bne %0, %2, 1b" - : "=&r" (hi), "=&r" (lo), "=&r" (tmp)); + __asm__ __volatile__("1:\n" + "rdtimeh %0\n" + "rdtime %1\n" + "rdtimeh %2\n" + "bne %0, %2, 1b" + : "=&r"(hi), "=&r"(lo), "=&r"(tmp)); return ((u64)hi << 32) | lo; } #else @@ -30,9 +29,7 @@ u64 get_ticks(void) { unsigned long n; - __asm__ __volatile__ ( - "rdtime %0" - : "=r" (n)); + __asm__ __volatile__("rdtime %0" : "=r"(n)); return n; } #endif @@ -54,8 +51,7 @@ void sbi_timer_event_stop(struct sbi_scratch *scratch) void sbi_timer_event_start(struct sbi_scratch *scratch, u64 next_event) { - sbi_platform_timer_event_start(sbi_platform_ptr(scratch), - next_event); + sbi_platform_timer_event_start(sbi_platform_ptr(scratch), next_event); csr_clear(CSR_MIP, MIP_STIP); csr_set(CSR_MIE, MIP_MTIP); } @@ -68,6 +64,5 @@ void sbi_timer_process(struct sbi_scratch *scratch) int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot) { - return sbi_platform_timer_init(sbi_platform_ptr(scratch), - cold_boot); + return sbi_platform_timer_init(sbi_platform_ptr(scratch), cold_boot); } |