Message ID | 20190610164400.11830-2-digetx@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | Few more cleanups for tegra-timer | expand |
On 10/06/2019 17:43, Dmitry Osipenko wrote: > The clocksource rate is initialized only for the first per-CPU clocksource > and then that rate shall be replicated for the rest of clocksource's > because they are initialized manually in the code. > > Fixes: 3be2a85a0b61 ("Support per-CPU timers on all Tegra's") > Signed-off-by: Dmitry Osipenko <digetx@gmail.com> > --- > drivers/clocksource/timer-tegra.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/clocksource/timer-tegra.c b/drivers/clocksource/timer-tegra.c > index 9406855781ff..830c66e2d927 100644 > --- a/drivers/clocksource/timer-tegra.c > +++ b/drivers/clocksource/timer-tegra.c > @@ -277,6 +277,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20, > */ > if (tegra20) > cpu_to->of_clk.rate = 1000000; > + else > + cpu_to->of_clk.rate = timer_of_rate(to); > > cpu_to = per_cpu_ptr(&tegra_to, cpu); > cpu_to->of_base.base = timer_reg_base + base; Thanks. This fixes a boot regression we are seeing on -next with Tegra210 (introduced by the commit referenced above). So ... Acked-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Cheers Jon
12.06.2019 11:30, Jon Hunter пишет: > > On 10/06/2019 17:43, Dmitry Osipenko wrote: >> The clocksource rate is initialized only for the first per-CPU clocksource >> and then that rate shall be replicated for the rest of clocksource's >> because they are initialized manually in the code. >> >> Fixes: 3be2a85a0b61 ("Support per-CPU timers on all Tegra's") >> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> >> --- >> drivers/clocksource/timer-tegra.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/clocksource/timer-tegra.c b/drivers/clocksource/timer-tegra.c >> index 9406855781ff..830c66e2d927 100644 >> --- a/drivers/clocksource/timer-tegra.c >> +++ b/drivers/clocksource/timer-tegra.c >> @@ -277,6 +277,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20, >> */ >> if (tegra20) >> cpu_to->of_clk.rate = 1000000; >> + else >> + cpu_to->of_clk.rate = timer_of_rate(to); >> >> cpu_to = per_cpu_ptr(&tegra_to, cpu); >> cpu_to->of_base.base = timer_reg_base + base; > > Thanks. This fixes a boot regression we are seeing on -next with > Tegra210 (introduced by the commit referenced above). So ... > > Acked-by: Jon Hunter <jonathanh@nvidia.com> > Tested-by: Jon Hunter <jonathanh@nvidia.com> Thanks for the testing :)
diff --git a/drivers/clocksource/timer-tegra.c b/drivers/clocksource/timer-tegra.c index 9406855781ff..830c66e2d927 100644 --- a/drivers/clocksource/timer-tegra.c +++ b/drivers/clocksource/timer-tegra.c @@ -277,6 +277,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20, */ if (tegra20) cpu_to->of_clk.rate = 1000000; + else + cpu_to->of_clk.rate = timer_of_rate(to); cpu_to = per_cpu_ptr(&tegra_to, cpu); cpu_to->of_base.base = timer_reg_base + base;
The clocksource rate is initialized only for the first per-CPU clocksource and then that rate shall be replicated for the rest of clocksource's because they are initialized manually in the code. Fixes: 3be2a85a0b61 ("Support per-CPU timers on all Tegra's") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- drivers/clocksource/timer-tegra.c | 2 ++ 1 file changed, 2 insertions(+)