public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 2/2] pxa: enable L2 if present in XSC3
@ 2009-12-30  7:28 Haojian Zhuang
  2009-12-30  8:50 ` Eric Miao
  0 siblings, 1 reply; 7+ messages in thread
From: Haojian Zhuang @ 2009-12-30  7:28 UTC (permalink / raw)
  To: linux-arm-kernel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-30  7:28 [PATCH 2/2] pxa: enable L2 if present in XSC3 Haojian Zhuang
@ 2009-12-30  8:50 ` Eric Miao
  2009-12-30  9:05   ` Haojian Zhuang
  2009-12-30 18:06   ` Nicolas Pitre
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Miao @ 2009-12-30  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 30, 2009 at 3:28 PM, Haojian Zhuang
<haojian.zhuang@gmail.com> wrote:
> From 2c4a7d0e907df9a762c5c9f0ec48b3b7860e1f7c Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Wed, 30 Dec 2009 10:02:57 -0500
> Subject: [PATCH] [ARM] pxa: enable L2 if present in XSC3
>
> Check whether L2 is present or not in XSC3. If it's present, enable L2
> immediately.
>
> Disabling L2 after L2 is enabled that would result in unpredicatable behavior
> of XSC3 processor.
>

You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
at least, to allow L2 to remain disabled even if L2 is present.

> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> ---
> ?arch/arm/mm/proc-xsc3.S | ? ?5 +++++
> ?1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
> index 33515c2..8fbe21f 100644
> --- a/arch/arm/mm/proc-xsc3.S
> +++ b/arch/arm/mm/proc-xsc3.S
> @@ -406,6 +406,11 @@ __xsc3_setup:
>
> ? ? ? ?adr ? ? r5, xsc3_crval
> ? ? ? ?ldmia ? r5, {r5, r6}
> +
> + ? ? ? mrc ? ? p15, 1, r0, c0, c0, 1 ? ? ? ? ? @ get L2 present information
> + ? ? ? ands ? ?r0, r0, #0xf8
> + ? ? ? orrne ? r6, r6, #(1 << 26) ? ? ? ? ? ? ?@ enable L2 if present
> +
> ? ? ? ?mrc ? ? p15, 0, r0, c1, c0, 0 ? ? ? ? ? @ get control register
> ? ? ? ?bic ? ? r0, r0, r5 ? ? ? ? ? ? ? ? ? ? ?@ ..V. ..R. .... ..A.
> ? ? ? ?orr ? ? r0, r0, r6 ? ? ? ? ? ? ? ? ? ? ?@ ..VI Z..S .... .C.M (mmu)
> --
> 1.5.6.5
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-30  8:50 ` Eric Miao
@ 2009-12-30  9:05   ` Haojian Zhuang
  2010-01-01  7:56     ` Eric Miao
  2009-12-30 18:06   ` Nicolas Pitre
  1 sibling, 1 reply; 7+ messages in thread
From: Haojian Zhuang @ 2009-12-30  9:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 30, 2009 at 3:50 AM, Eric Miao <eric.y.miao@gmail.com> wrote:

>>
>> Check whether L2 is present or not in XSC3. If it's present, enable L2
>> immediately.
>>
>> Disabling L2 after L2 is enabled that would result in unpredicatable behavior
>> of XSC3 processor.
>>
>
> You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
> at least, to allow L2 to remain disabled even if L2 is present.
>

Updated this patch.

Thanks
Haojian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002--ARM-pxa-enable-L2-if-present-in-XSC3.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091230/eb2ab0bf/attachment.bin>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-30  8:50 ` Eric Miao
  2009-12-30  9:05   ` Haojian Zhuang
@ 2009-12-30 18:06   ` Nicolas Pitre
  2009-12-31  1:57     ` Haojian Zhuang
  1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Pitre @ 2009-12-30 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 30 Dec 2009, Eric Miao wrote:

> On Wed, Dec 30, 2009 at 3:28 PM, Haojian Zhuang
> <haojian.zhuang@gmail.com> wrote:
> > From 2c4a7d0e907df9a762c5c9f0ec48b3b7860e1f7c Mon Sep 17 00:00:00 2001
> > From: Haojian Zhuang <haojian.zhuang@marvell.com>
> > Date: Wed, 30 Dec 2009 10:02:57 -0500
> > Subject: [PATCH] [ARM] pxa: enable L2 if present in XSC3
> >
> > Check whether L2 is present or not in XSC3. If it's present, enable L2
> > immediately.
> >
> > Disabling L2 after L2 is enabled that would result in unpredicatable behavior
> > of XSC3 processor.
> >
> 
> You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
> at least, to allow L2 to remain disabled even if L2 is present.

Also... might be a good idea to invalidate L2 before enabling it.


Nicolas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-30 18:06   ` Nicolas Pitre
@ 2009-12-31  1:57     ` Haojian Zhuang
  2009-12-31  2:19       ` Nicolas Pitre
  0 siblings, 1 reply; 7+ messages in thread
From: Haojian Zhuang @ 2009-12-31  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 30, 2009 at 1:06 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> On Wed, 30 Dec 2009, Eric Miao wrote:
>
>> On Wed, Dec 30, 2009 at 3:28 PM, Haojian Zhuang
>> <haojian.zhuang@gmail.com> wrote:
>> > From 2c4a7d0e907df9a762c5c9f0ec48b3b7860e1f7c Mon Sep 17 00:00:00 2001
>> > From: Haojian Zhuang <haojian.zhuang@marvell.com>
>> > Date: Wed, 30 Dec 2009 10:02:57 -0500
>> > Subject: [PATCH] [ARM] pxa: enable L2 if present in XSC3
>> >
>> > Check whether L2 is present or not in XSC3. If it's present, enable L2
>> > immediately.
>> >
>> > Disabling L2 after L2 is enabled that would result in unpredicatable behavior
>> > of XSC3 processor.
>> >
>>
>> You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
>> at least, to allow L2 to remain disabled even if L2 is present.
>
> Also... might be a good idea to invalidate L2 before enabling it.
>

XSC3 supports these L2 operations in below.
1) invalidate L2 cache line (parameter is MVA)
2) clean L2 cache line (parameter is MVA)
3) clean L2 cache line (parameter is set/way)
4) clean and invalidate L2 cache line (parameter is set/way)

The most important thing is we couldn't call these L2 operations while
L2 is disabled.

"The behavior of these operations is unpredictable if the L2 cache is
disabled. If the L2 is not present, these operations performs no-ops."

I copied above words from XSC3 core spec at here. My opinion is that
not perform any L2 operations if L2 is disabled.

Thanks
Haojian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-31  1:57     ` Haojian Zhuang
@ 2009-12-31  2:19       ` Nicolas Pitre
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Pitre @ 2009-12-31  2:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 30 Dec 2009, Haojian Zhuang wrote:

> On Wed, Dec 30, 2009 at 1:06 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> > On Wed, 30 Dec 2009, Eric Miao wrote:
> >
> >> On Wed, Dec 30, 2009 at 3:28 PM, Haojian Zhuang
> >> <haojian.zhuang@gmail.com> wrote:
> >> > From 2c4a7d0e907df9a762c5c9f0ec48b3b7860e1f7c Mon Sep 17 00:00:00 2001
> >> > From: Haojian Zhuang <haojian.zhuang@marvell.com>
> >> > Date: Wed, 30 Dec 2009 10:02:57 -0500
> >> > Subject: [PATCH] [ARM] pxa: enable L2 if present in XSC3
> >> >
> >> > Check whether L2 is present or not in XSC3. If it's present, enable L2
> >> > immediately.
> >> >
> >> > Disabling L2 after L2 is enabled that would result in unpredicatable behavior
> >> > of XSC3 processor.
> >> >
> >>
> >> You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
> >> at least, to allow L2 to remain disabled even if L2 is present.
> >
> > Also... might be a good idea to invalidate L2 before enabling it.
> >
> 
> XSC3 supports these L2 operations in below.
> 1) invalidate L2 cache line (parameter is MVA)
> 2) clean L2 cache line (parameter is MVA)
> 3) clean L2 cache line (parameter is set/way)
> 4) clean and invalidate L2 cache line (parameter is set/way)
> 
> The most important thing is we couldn't call these L2 operations while
> L2 is disabled.

Well... The idea behind invalidating L2 before enabling it is to make 
sure it doesn't contain random stuff.  But if this is impossible to 
perform while L2 is disabled then we can only assume it is always going 
to be in a coherent state when it is enabled.  Furthermore there is no 
way to only invalidate the entire L2.


Nicolas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pxa: enable L2 if present in XSC3
  2009-12-30  9:05   ` Haojian Zhuang
@ 2010-01-01  7:56     ` Eric Miao
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Miao @ 2010-01-01  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 30, 2009 at 5:05 PM, Haojian Zhuang
<haojian.zhuang@gmail.com> wrote:
> On Wed, Dec 30, 2009 at 3:50 AM, Eric Miao <eric.y.miao@gmail.com> wrote:
>
>>>
>>> Check whether L2 is present or not in XSC3. If it's present, enable L2
>>> immediately.
>>>
>>> Disabling L2 after L2 is enabled that would result in unpredicatable behavior
>>> of XSC3 processor.
>>>
>>
>> You may want to enclose this with #ifdef CONFIG_CACHE_XSC3L2 .. #endif
>> at least, to allow L2 to remain disabled even if L2 is present.
>>
>
> Updated this patch.

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-01  7:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30  7:28 [PATCH 2/2] pxa: enable L2 if present in XSC3 Haojian Zhuang
2009-12-30  8:50 ` Eric Miao
2009-12-30  9:05   ` Haojian Zhuang
2010-01-01  7:56     ` Eric Miao
2009-12-30 18:06   ` Nicolas Pitre
2009-12-31  1:57     ` Haojian Zhuang
2009-12-31  2:19       ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox