From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4 v2] ARM: L2 : Errata 588369: Clean & Invalidate do not invalidate clean lines
Date: Thu, 17 Dec 2009 13:35:08 +0000 [thread overview]
Message-ID: <20091217133508.GA5813@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1261054832-14995-1-git-send-email-santosh.shilimkar@ti.com>
On Thu, Dec 17, 2009 at 06:30:32PM +0530, Santosh Shilimkar wrote:
> +config PL310_ERRATA_588369
> + bool "Clean & Invalidate maintenance operations do not invalidate clean lines"
> + depends on CACHE_L2X0 && ARCH_OMAP4
> + default n
default n is the default anyway, so its redundant to specify it.
> +#ifdef CONFIG_PL310_ERRATA_588369
> +static void debug_writel(unsigned long val)
> +{
> + /*
> + * Texas Instrument secure monitor api to modify the PL310
> + * Debug Control Register. R0 = val
> + */
> + __asm__ __volatile__(
> + "stmfd r13!, {r4-r8}\n"
> + "ldr r12, =0x100\n"
> + "dsb\n"
> + "smc\n"
> + "ldmfd r13!, {r4-r8}");
Just tell the compiler that r4 to r8 are clobbered - then it'll save and
restore them itself. Also, you can't guarantee that r0 will contain the
value unless you explicitly pass it in. IOW:
register unsigned long r0 asm("r0") = val;
asm volatile(
__asmeq(%0, r0)
"..."
: : "r" (r0)
: "r4", "r5", "r6", "r7", "r8");
The use of asmeq will also ensure that '%0' is indeed r0 - some gcc
versions are buggy.
As I've said before, your patch is fine for the current version, but
not for the other cache-l2x0 changes.
next prev parent reply other threads:[~2009-12-17 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 13:00 [PATCH 3/4 v2] ARM: L2 : Errata 588369: Clean & Invalidate do not invalidate clean lines Santosh Shilimkar
2009-12-17 13:35 ` Russell King - ARM Linux [this message]
2009-12-17 13:52 ` Shilimkar, Santosh
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=20091217133508.GA5813@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