From a32264bfb52a1f4509e852c90ff45d36d314667f Mon Sep 17 00:00:00 2001 From: Bamboo <bamboo@keg.ertos.in.nicta.com.au> Date: Tue, 28 Nov 2017 00:02:37 +0000 Subject: [PATCH] [STYLE_FIX] --- include/arch/arm/arch/machine/priv_timer.h | 3 ++- include/plat/allwinnerA20/plat/machine/timer.h | 2 +- include/plat/apq8064/plat/machine/timer.h | 3 ++- include/plat/exynos4/plat/machine/timer.h | 3 ++- src/kernel/thread.c | 4 ++-- src/plat/exynos4/machine/hardware.c | 5 +++-- src/plat/exynos5/machine/hardware.c | 3 ++- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/arch/arm/arch/machine/priv_timer.h b/include/arch/arm/arch/machine/priv_timer.h index 83cbd0220..2db99980f 100644 --- a/include/arch/arm/arch/machine/priv_timer.h +++ b/include/arch/arm/arch/machine/priv_timer.h @@ -26,7 +26,8 @@ struct timer { typedef volatile struct timer timer_t; extern timer_t *priv_timer; -static inline void resetTimer(void) { +static inline void resetTimer(void) +{ priv_timer->ints = TMR_INTS_EVENT; } diff --git a/include/plat/allwinnerA20/plat/machine/timer.h b/include/plat/allwinnerA20/plat/machine/timer.h index cd0c5e723..796f0e183 100644 --- a/include/plat/allwinnerA20/plat/machine/timer.h +++ b/include/plat/allwinnerA20/plat/machine/timer.h @@ -29,7 +29,7 @@ extern timer_t *timer; static inline void resetTimer(void) { - timer->tmr_irq_sta_reg = TMR0_IRQ_PEND_FLAG; + timer->tmr_irq_sta_reg = TMR0_IRQ_PEND_FLAG; } #endif /* !__PLAT_MACHINE_TIMER_H */ diff --git a/include/plat/apq8064/plat/machine/timer.h b/include/plat/apq8064/plat/machine/timer.h index a745ad73a..00f96a481 100644 --- a/include/plat/apq8064/plat/machine/timer.h +++ b/include/plat/apq8064/plat/machine/timer.h @@ -15,7 +15,8 @@ #define TIMER_CLOCK_HZ 7000000llu -static inline void resetTimer(void) { +static inline void resetTimer(void) +{ /* Nothing to do */ } diff --git a/include/plat/exynos4/plat/machine/timer.h b/include/plat/exynos4/plat/machine/timer.h index e53dc0a0b..d9ff73e6c 100644 --- a/include/plat/exynos4/plat/machine/timer.h +++ b/include/plat/exynos4/plat/machine/timer.h @@ -17,7 +17,8 @@ #define TIMER_CLOCK_HZ 24000000llu -static inline void resetTimer(void) { +static inline void resetTimer(void) +{ mct_reset(); } diff --git a/src/kernel/thread.c b/src/kernel/thread.c index 9ea6c8f9a..c46cccf34 100644 --- a/src/kernel/thread.c +++ b/src/kernel/thread.c @@ -298,7 +298,7 @@ schedule(void) NODE_STATE(ksCurThread) == NODE_STATE(ksIdleThread) || (candidate->tcbPriority < NODE_STATE(ksCurThread)->tcbPriority); if (fastfail && - !isHighestPrio(ksCurDomain, candidate->tcbPriority)) { + !isHighestPrio(ksCurDomain, candidate->tcbPriority)) { SCHED_ENQUEUE(candidate); /* we can't, need to reschedule */ NODE_STATE(ksSchedulerAction) = SchedulerAction_ChooseNewThread; @@ -408,7 +408,7 @@ void possibleSwitchTo(tcb_t* target) { if (ksCurDomain != target->tcbDomain - SMP_COND_STATEMENT(|| target->tcbAffinity != getCurrentCPUIndex())) { + SMP_COND_STATEMENT( || target->tcbAffinity != getCurrentCPUIndex())) { SCHED_ENQUEUE(target); } else if (NODE_STATE(ksSchedulerAction) != SchedulerAction_ResumeCurrentThread) { /* Too many threads want special treatment, use regular queues. */ diff --git a/src/plat/exynos4/machine/hardware.c b/src/plat/exynos4/machine/hardware.c index 866b755de..f37180750 100644 --- a/src/plat/exynos4/machine/hardware.c +++ b/src/plat/exynos4/machine/hardware.c @@ -19,7 +19,8 @@ timer_t *mct = (timer_t *) EXYNOS_MCT_PPTR; -BOOT_CODE void initTimer(void) { +BOOT_CODE void initTimer(void) +{ mct_clear_write_status(); @@ -27,7 +28,7 @@ BOOT_CODE void initTimer(void) { mct->global.comp0_add_inc = TIMER_RELOAD; uint64_t comparator_value = ((((uint64_t) mct->global.cnth) << 32llu) - | mct->global.cntl) + TIMER_RELOAD; + | mct->global.cntl) + TIMER_RELOAD; mct->global.comp0h = (uint32_t) (comparator_value >> 32u); mct->global.comp0l = (uint32_t) comparator_value; /* Enable interrupts */ diff --git a/src/plat/exynos5/machine/hardware.c b/src/plat/exynos5/machine/hardware.c index 0b86c6f85..8621225b5 100644 --- a/src/plat/exynos5/machine/hardware.c +++ b/src/plat/exynos5/machine/hardware.c @@ -23,7 +23,8 @@ timer_t *mct = (timer_t *) EXYNOS_MCT_PPTR; -BOOT_CODE void initTimer(void) { +BOOT_CODE void initTimer(void) +{ mct_clear_write_status(); /* use the arm generic timer, backed by the mct */ -- GitLab