Skip to content

Commit c7fc512

Browse files
committed
Merge tag 'timers-urgent-2021-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "Two fixes for clock chip drivers: - A regression fix for the Designware APB timer. A recent change to the error checking code transformed the error condition wrongly so it turned into a fail if good condition. - Fix a clang build fail of the ARM architected timer driver" * tag 'timers-urgent-2021-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/arm_arch_timer: Force inlining of erratum_set_next_event_generic() clocksource/drivers/dw_apb_timer_of: Fix probe failure
2 parents 82d2ef4 + aa073d8 commit c7fc512

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

drivers/clocksource/arm_arch_timer.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,13 @@ EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround);
394394

395395
static atomic_t timer_unstable_counter_workaround_in_use = ATOMIC_INIT(0);
396396

397-
static void erratum_set_next_event_generic(const int access, unsigned long evt,
398-
struct clock_event_device *clk)
397+
/*
398+
* Force the inlining of this function so that the register accesses
399+
* can be themselves correctly inlined.
400+
*/
401+
static __always_inline
402+
void erratum_set_next_event_generic(const int access, unsigned long evt,
403+
struct clock_event_device *clk)
399404
{
400405
unsigned long ctrl;
401406
u64 cval;

drivers/clocksource/dw_apb_timer_of.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int __init timer_get_base_and_rate(struct device_node *np,
4747
pr_warn("pclk for %pOFn is present, but could not be activated\n",
4848
np);
4949

50-
if (!of_property_read_u32(np, "clock-freq", rate) &&
50+
if (!of_property_read_u32(np, "clock-freq", rate) ||
5151
!of_property_read_u32(np, "clock-frequency", rate))
5252
return 0;
5353

0 commit comments

Comments
 (0)