From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix errata 751472 handling on Cortex-A9 r1p*
Date: Thu, 15 Nov 2012 09:22:42 +0000 [thread overview]
Message-ID: <20121115092242.GF3332@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20121114222159.GB6801@atomide.com>
On Wed, Nov 14, 2012 at 02:21:59PM -0800, Tony Lindgren wrote:
> No idea if assuming that zero value for the diagnostic register
> is safe.. What's the default value of the diagnostic register supposed
> to be?
No, that's not safe. What if your pre-kernel code has asked the secure
monitor to set the work-around bit already?
> #if defined(CONFIG_ARM_ERRATA_751472) && defined(CONFIG_SMP)
> ALT_SMP(cmp r6, #0x30) @ present prior to r3p0
> ALT_UP_B(1f)
> - mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register
> - orrlt r10, r10, #1 << 11 @ set bit #11
> - mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register
> + bge 1f @ not needed for r3p0 and later
> + mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
> + teq r10, #0 @ zero for secure mode?
> + beq 1f @ bail out for secure mode
This test for zero is pointless. What if some other work-around has
been enabled but not this one?
> + tst r10, #1 << 11 @ bit #11 already set?
> + orreq r10, r10, #1 << 11 @ set bit #11 if not set
> + mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register
> 1:
> #endif
>
next prev parent reply other threads:[~2012-11-15 9:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 18:53 [PATCH] ARM: Fix errata 751472 handling on Cortex-A9 r1p* Tony Lindgren
2012-11-14 19:01 ` Russell King - ARM Linux
2012-11-14 19:19 ` Tony Lindgren
2012-11-14 19:06 ` Jon Hunter
2012-11-14 19:21 ` Tony Lindgren
2012-11-14 20:22 ` Russell King - ARM Linux
2012-11-14 20:32 ` Tony Lindgren
2012-11-14 21:57 ` Rob Herring
2012-11-14 22:21 ` Tony Lindgren
2012-11-15 0:54 ` Rob Herring
2012-11-15 2:08 ` Tony Lindgren
2012-11-15 11:01 ` Catalin Marinas
2012-11-15 12:41 ` Siarhei Siamashka
2012-11-15 13:36 ` Russell King - ARM Linux
2012-11-15 13:52 ` Catalin Marinas
2012-11-15 15:14 ` Måns Rullgård
2012-11-15 14:31 ` Rob Herring
2012-11-15 14:37 ` Catalin Marinas
2012-11-15 15:37 ` Rob Herring
2012-11-15 16:06 ` Catalin Marinas
2012-11-16 10:05 ` Russell King - ARM Linux
2012-11-16 17:13 ` Tony Lindgren
2012-11-16 18:41 ` Russell King - ARM Linux
2012-11-16 9:59 ` Russell King - ARM Linux
2012-11-16 18:09 ` Catalin Marinas
2012-11-16 18:39 ` Russell King - ARM Linux
2012-11-17 10:46 ` Catalin Marinas
2012-11-15 9:22 ` Russell King - ARM Linux [this message]
2012-12-12 0:46 ` Jon Masters
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=20121115092242.GF3332@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).