From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: zynq: Fix system clock with multi_v7_defconfig
Date: Fri, 10 Apr 2015 15:44:30 +0200 [thread overview]
Message-ID: <26139139.4pXlnbLfh0@wuerfel> (raw)
In-Reply-To: <BY2FFO11FD0520A960F287A6B7BA6A9DAE20D0@BY2FFO11FD052.protection.gbl>
On Monday 23 March 2015 08:05:45 Michal Simek wrote:
> Hi,
>
> On 03/23/2015 02:39 AM, Ola Jeppsson wrote:
> > As mentioned in this commit:
> > arm: zynq: Don't use arm_global_timer with cpufreq
> > 61f1fc7e9258a169ac8afb5ddf657a181e60d052
> >
> > arm_global_timer depends on the CPU frequency. With cpufreq altering the
> > CPU frequency arm_global_timer will not maintain a stable time base. So
> > arm_global_timer must not be the clocksource when cpufreq is enabled.
> >
> > The above commit tries to solve this at build time by only selecting
> > CONFIG_ARM_GLOBAL_TIMER if CONFIG_CPU_FREQ is disabled. This is not
> > always sufficient because other machs can also enable
> > CONFIG_ARM_GLOBAL_TIMER.
> >
> > Therefore: If built with CONFIG_CPU_FREQ and CONFIG_ARM_GLOBAL_TIMER,
> > disable (on Zynq) the arm_global_timer devicetree node at boot before
> > clock sources are initialized. This ensures that arm_global_timer will
> > not be selected clocksource.
> >
> > Signed-off-by: Ola Jeppsson <ola@adapteva.com>
>
> Arnd: Waiting for your thoughts on this one?
> It is some sort of arch/arm/mach-mvebu/board-v7.c quirk code.
>
> I don't think it can be done via Kconfig because it will affect others.
(catching up with old email)
I think it's ok to work around the problem like this in principle.
However, I have one concern about the way this condition is detected.
At the moment, you assume that all zynq variants suffer from this
problem and no other chip has it.
How would you handle the situation if a future zynq variant fixes
the problem?
What if it turns out to be a more common problem and we actually
want to work around it in the arm global timer implementation
by dynamically adapting to CPU frequency changes? I believe some
other drivers (x86 tsc?) do this. Would we be able to detect this case
on zynq?
Arnd
next prev parent reply other threads:[~2015-04-10 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 1:39 [PATCH v2] arm: zynq: Fix system clock with multi_v7_defconfig Ola Jeppsson
2015-03-23 6:55 ` Michal Simek
2015-03-23 7:05 ` Michal Simek
2015-04-10 13:44 ` Arnd Bergmann [this message]
2015-04-10 15:09 ` Ola Jeppsson
2015-04-10 20:04 ` Arnd Bergmann
2015-04-10 20:41 ` Sören Brinkmann
2015-04-10 20:59 ` Arnd Bergmann
2015-04-10 22:15 ` Sören Brinkmann
2015-04-10 22:42 ` Arnd Bergmann
2015-04-10 16:02 ` Sören Brinkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26139139.4pXlnbLfh0@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox