linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: cache-l2x0: Manage the errata at run time
Date: Tue, 22 Jan 2013 14:12:05 +0530	[thread overview]
Message-ID: <50FE50DD.7020009@ti.com> (raw)
In-Reply-To: <20130121160833.GQ23505@n2100.arm.linux.org.uk>

On Monday 21 January 2013 09:38 PM, Russell King - ARM Linux wrote:
> On Mon, Jan 21, 2013 at 06:44:53PM +0530, srinidhi kasagar wrote:
>> +/*
>> + * Identify ther RTL releases of l2x0 - This might help in applying
>> + * the l2x0 errata's dynamically rather compile time options
>> + */
>> +asmlinkage u32 l2x0_get_rtl_release(void)
>
> Why asmlinkage?
>
>> +{
>> +	return readl_relaxed(l2x0_base + L2X0_CACHE_ID) &
>> +			L2X0_CACHE_ID_RTL_MASK;
>> +}
>> +
>>   static inline void cache_wait_way(void __iomem *reg, unsigned long mask)
>>   {
>>   	/* wait for cache operation by line or way to complete */
>> @@ -87,46 +97,41 @@ static inline void l2x0_inv_line(unsigned long addr)
>>   	writel_relaxed(addr, base + L2X0_INV_LINE_PA);
>>   }
>>
>> -#if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
>> -static inline void debug_writel(unsigned long val)
>> +static void debug_writel(unsigned long val)
>>   {
>> -	if (outer_cache.set_debug)
>> -		outer_cache.set_debug(val);
>> +	u32 l2x0_revision = l2x0_get_rtl_release();
>> +
>> +	if (l2x0_revision == L2X0_CACHE_ID_RTL_R3P0 ||
>> +		l2x0_revision == L2X0_CACHE_ID_RTL_R2P0 ||
>> +		l2x0_revision == L2X0_CACHE_ID_RTL_R1P0 ||
>> +		l2x0_revision == L2X0_CACHE_ID_RTL_R0P0)
>> +			if (outer_cache.set_debug)
>> +				outer_cache.set_debug(val);
>
> This needs comments from the TI folk.  Also, change this around - if
> there's no setting for 'set_debug' there's no point reading the rtl
> release and checking it against a set of values.  Added Santosh.
>
Thanks Russell for looping me. 588369 is fixed in r3p0 but 727915
is present. Both has same work around so the version checks are
fine. I agree that moving the version check inside .set_debug check.

Regards
Santosh

      parent reply	other threads:[~2013-01-22  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 13:14 [PATCH 1/4] ARM: cache-l2x0: Manage the errata at run time srinidhi kasagar
2013-01-21 14:03 ` Will Deacon
2013-01-22  5:42   ` Srinidhi Kasagar
2013-01-22 17:05     ` Will Deacon
2013-01-21 16:08 ` Russell King - ARM Linux
2013-01-22  5:50   ` Srinidhi Kasagar
2013-01-22  8:42   ` Santosh Shilimkar [this message]

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=50FE50DD.7020009@ti.com \
    --to=santosh.shilimkar@ti.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).