Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH v3 1/2] ARM: Introduce ARM_L1_CACHE_SHIFT to define cache line size

44 views
Skip to first unread message

Kirill A. Shutemov

unread,
Sep 12, 2009, 4:49:25 PM9/12/09
to linux-ar...@lists.infradead.org, Russell King, linux-...@vger.kernel.org, Bityutskiy Artem, Siarhei Siamashka, Kirill A. Shutemov
Currently kernel believes that all ARM CPUs have L1_CACHE_SHIFT == 5.
It's not true at least for CPUs based on Cortex-A8.

List of CPUs with cache line size != 32 should be expanded later.

V2:
- remove unnecessary parens

Signed-off-by: Kirill A. Shutemov <kir...@shutemov.name>
---
arch/arm/include/asm/cache.h | 2 +-
arch/arm/mm/Kconfig | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index feaa75f..66c160b 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -4,7 +4,7 @@
#ifndef __ASMARM_CACHE_H
#define __ASMARM_CACHE_H

-#define L1_CACHE_SHIFT 5
+#define L1_CACHE_SHIFT CONFIG_ARM_L1_CACHE_SHIFT
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)

/*
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 83c025e..3c37d4c 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -771,3 +771,8 @@ config CACHE_XSC3L2
select OUTER_CACHE
help
This option enables the L2 cache on XScale3.
+
+config ARM_L1_CACHE_SHIFT
+ int
+ default 6 if ARCH_OMAP3
+ default 5
--
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Russell King - ARM Linux

unread,
Sep 21, 2009, 4:37:52 AM9/21/09
to Kirill A. Shutemov, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Bityutskiy Artem, Siarhei Siamashka
On Sat, Sep 12, 2009 at 11:48:30PM +0300, Kirill A. Shutemov wrote:
> Currently kernel believes that all ARM CPUs have L1_CACHE_SHIFT == 5.
> It's not true at least for CPUs based on Cortex-A8.

Please send this to the patch system. There's no need to add the "V2"
comments to it when you do.

Russell King - ARM Linux

unread,
Sep 21, 2009, 11:38:25 AM9/21/09
to Kirill A. Shutemov, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Bityutskiy Artem, Siarhei Siamashka
On Mon, Sep 21, 2009 at 02:19:57PM +0300, Kirill A. Shutemov wrote:

> On Mon, Sep 21, 2009 at 11:37 AM, Russell King - ARM Linux
> <li...@arm.linux.org.uk> wrote:
> > On Sat, Sep 12, 2009 at 11:48:30PM +0300, Kirill A. Shutemov wrote:
> >> Currently kernel believes that all ARM CPUs have L1_CACHE_SHIFT == 5.
> >> It's not true at least for CPUs based on Cortex-A8.
> >
> > Please send this to the patch system. �There's no need to add the "V2"
> > comments to it when you do.
> >
>
> #5716, #5717
>
> BTW, I ,my pathes without change log in your git tree. Commits 910a17e
> and dca230f. What is wrong with it?

No need to resend them - sorry, I'd forgotten I'd merged them.

0 new messages