From: Simon Horman <horms@verge.net.au>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] ARM: shmobile: timer: Fix preset_lpj leading to too short delays
Date: Mon, 18 Jan 2016 01:42:11 +0000 [thread overview]
Message-ID: <20160118014210.GD1905@verge.net.au> (raw)
In-Reply-To: <1452537674-20006-2-git-send-email-geert+renesas@glider.be>
On Mon, Jan 11, 2016 at 07:41:12PM +0100, Geert Uytterhoeven wrote:
> On all shmobile ARM SoCs, loop-based delays may complete early, which
> can be after only 1/3 (Cortex A9) or 1/2 (Cortex A7 or A15) of the
> minimum required time.
>
> This is caused by calculating preset_lpj based on incorrect assumptions
> about the number of clock cycles per loop:
> - All of Cortex A7, A9, and A15 run __loop_delay() at 1 loop per
> CPU clock cycle,
> - As of commit 11d4bb1bd067f9d0 ("ARM: 7907/1: lib: delay-loop: Add
> align directive to fix BogoMIPS calculation"), Cortex A8 runs
> __loop_delay() at 1 loop per 2 instead of 3 CPU clock cycles.
>
> On SoCs with Cortex A7 and/or A15 CPU cores, this went unnoticed, as
> delays use the ARM arch timer if available. R-Car Gen2 doesn't work if
> the arch timer is disabled. However, APE6 can be used without the arch
> timer.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Backporting note: older kernels need modifications in all calls to
> shmobile_setup_delay() or shmobile_setup_delay_hz().
Thanks, I have queued this up for v4.6.
next prev parent reply other threads:[~2016-01-18 1:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 18:41 [PATCH 0/3] ARM: shmobile: Fix loop-based delays Geert Uytterhoeven
2016-01-11 18:41 ` [PATCH 1/3] ARM: shmobile: timer: Fix preset_lpj leading to too short delays Geert Uytterhoeven
2016-01-18 1:42 ` Simon Horman [this message]
2016-01-11 18:41 ` [PATCH 2/3] ARM: shmobile: timer: Drop support for Cortex A8 Geert Uytterhoeven
2016-01-18 1:45 ` Simon Horman
2016-01-11 18:41 ` [PATCH 3/3] ARM: shmobile: defconfig: Do not enable CONFIG_CPU_BPREDICT_DISABLE Geert Uytterhoeven
2016-01-18 1:48 ` Simon Horman
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=20160118014210.GD1905@verge.net.au \
--to=horms@verge.net.au \
--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;
as well as URLs for NNTP newsgroup(s).