Skip to content

Commit aa073d8

Browse files
committed
Merge tag 'timers-v5.16-rc4' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull timer fixes from Daniel Lezcano: - Fix build error with clang and some kernel configuration on the arm64 architected timer by inlining the erratum_set_next_event_generic() function (Marc Zyngier) - Fix probe error on the dw_apb_timer_of driver by fixing the incorrect condition previously introduced (Alexey Sheplyakov) Link: https://lore.kernel.org/r/[email protected]
2 parents 0fcfb00 + 1edb7e7 commit aa073d8

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)