From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: save/restore diagnostic register on Cortex-A9 suspend/resume
Date: Tue, 24 Jun 2014 19:17:45 +0100 [thread overview]
Message-ID: <20140624181745.GD4067@arm.com> (raw)
In-Reply-To: <53A9B80B.7020608@samsung.com>
On Tue, Jun 24, 2014 at 06:40:27PM +0100, Tomasz Figa wrote:
> Hi Will,
Hello,
> On 24.06.2014 18:33, Will Deacon wrote:
> > On Tue, Jun 24, 2014 at 05:28:54PM +0100, Tomasz Figa wrote:
> >> Hi Shawn,
> >>
> >> On 22.06.2014 12:15, Shawn Guo wrote:
> >>> The CP15 diagnostic register holds ARM errata bits on Cortex-A9, so it
> >>> needs to be saved/restored on suspend/resume. Otherwise, the
> >>> effectiveness of errata workaround gets lost together with diagnostic
> >>> register bit across suspend/resume cycle.
> >>>
> >>> The patch adds a couple of Cortex-A9 specific suspend and resume
> >>> functions to handle the diagnostic register across suspend/resume cycle.
> >>
> >> [snip]
> >>
> >>> +ENTRY(cpu_ca9mp_do_resume)
> >>> + ldmia r0!, {r4}
> >>> + mcr p15, 0, r4, c15, c0, 1 @ Diagnostic register
> >>
> >> What about platforms running in non-secure mode in which the register is
> >> read-only?
> >
> > On A9, it should be write-ignore. Are you seeing problems on a real SoC?
>
> I'm observing a complete system hang on Exynos4412-based Trats2 board if
> I try to write this register in resume from system-wide sleep.
That's certainly unexpected; I just double-checked that non-secure accesses
are treated as read-only/write-ignore.
> Note that the board is running under secure firmware, but there is no
> support for suspend/resume of such boards in mainline yet, so I'm
> testing on a work in progress (but mostly finished) series that is yet
> to be sent.
Maybe it could be unrelated to this register. What happens if you change
the code to read/write a different (architected) cp15 register?
Will
next prev parent reply other threads:[~2014-06-24 18:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 10:15 [PATCH v2] ARM: save/restore diagnostic register on Cortex-A9 suspend/resume Shawn Guo
2014-06-24 16:28 ` Tomasz Figa
2014-06-24 16:33 ` Will Deacon
2014-06-24 17:40 ` Tomasz Figa
2014-06-24 18:17 ` Will Deacon [this message]
2014-07-01 14:44 ` Russell King - ARM Linux
2014-07-01 16:26 ` Tomasz Figa
2014-07-02 12:34 ` Will Deacon
2014-07-02 14:01 ` Lorenzo Pieralisi
2014-07-02 14:26 ` Russell King - ARM Linux
2014-07-04 3:31 ` Shawn Guo
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=20140624181745.GD4067@arm.com \
--to=will.deacon@arm.com \
--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).