public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cache-l2x0: fix wrong print of AUX_CTRL register
Date: Wed, 27 Apr 2011 18:31:25 +0530	[thread overview]
Message-ID: <4DB813A5.8020200@ti.com> (raw)
In-Reply-To: <BANLkTi=HLjA0=dxyekxhaBibx2K4rHrsYQ@mail.gmail.com>

On 4/27/2011 6:22 PM, Catalin Marinas wrote:
> On 27 April 2011 13:42, Santosh Shilimkar<santosh.shilimkar@ti.com>  wrote:
>> On 4/27/2011 5:56 PM, srinidhi kasagar wrote:
>>>
>>> On platforms where l2x0 is already enabled and configured
>>> by the secure code, printing the masked value of the
>>> AUX_CTRL register seems to be wrong and differ from the
>>> programmed value.
>>>
>>> Fix it by reading the AUX_CTRL register again.
>>>
>>> Signed-off-by: srinidhi kasagar<srinidhi.kasagar@stericsson.com>
>>> Signed-off-by: Vijaya Kumar Kilari<vijay.kilari@stericsson.com>
>>> ---
>>>   arch/arm/mm/cache-l2x0.c |    2 ++
>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
>>> index ef59099..d07f8cb 100644
>>> --- a/arch/arm/mm/cache-l2x0.c
>>> +++ b/arch/arm/mm/cache-l2x0.c
>>> @@ -340,6 +340,8 @@ void __init l2x0_init(void __iomem *base, __u32
>>> aux_val, __u32 aux_mask)
>>>         outer_cache.disable = l2x0_disable;
>>>         outer_cache.set_debug = l2x0_set_debug;
>>>
>>> +       aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
>>> +
>>
>> Can you not read this register in your machine code and pass
>> the right 'aux_val' as part of l2x0_init() ?
>
> We already read this register in l2x0_init().
>
Right..

> In theory, the Linux kernel shouldn't even touch this register but
> leave it to the boot loader or other firmware (or just some sane reset
> values that the hardware people should put). But no-one seems to be
> doing this.
>
At times the firmware value is not most optimal. Boot-loaders
can never be trusted.
On OMAP on later silicon versions, we could enable some of the
enhancement but the secure code was same and was not settings
those.

Regards
Santosh

  reply	other threads:[~2011-04-27 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 12:26 [PATCH] ARM: cache-l2x0: fix wrong print of AUX_CTRL register srinidhi kasagar
2011-04-27 12:42 ` Santosh Shilimkar
2011-04-27 12:52   ` Catalin Marinas
2011-04-27 13:01     ` Santosh Shilimkar [this message]
2011-04-27 12:49 ` Catalin Marinas
2011-04-27 12:54 ` Santosh Shilimkar

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=4DB813A5.8020200@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