diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-06-22 16:45:04 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-06-22 16:45:04 -0400 |
commit | 99c6dc117d27d6259214812bd0b113aaf467f600 (patch) | |
tree | 0baadd0827fc39f9d2b052305f9447e4b50c5162 /arch/arm/mm/Kconfig | |
parent | 836a8051d54525e0782f156dcfa3c13d30f22840 (diff) |
[ARM] Feroceon: L2 cache support
This patch adds support for the unified Feroceon L2 cache controller
as found in e.g. the Marvell Kirkwood and Marvell Discovery Duo
families of ARM SoCs.
Note that:
- Page table walks are outer uncacheable on Kirkwood and Discovery
Duo, since the ARMv5 spec provides no way to indicate outer
cacheability of page table walks (specifying it in TTBR[4:3] is
an ARMv6+ feature).
This requires adding L2 cache clean instructions to
proc-feroceon.S (dcache_clean_area(), set_pte()) as well as to
tlbflush.h ({flush,clean}_pmd_entry()). The latter case is handled
by defining a new TLB type (TLB_FEROCEON) which is almost identical
to the v4wbi one but provides a TLB_L2CLEAN_FR flag.
- The Feroceon L2 cache controller supports L2 range (i.e. 'clean L2
range by MVA' and 'invalidate L2 range by MVA') operations, and this
patch uses those range operations for all Linux outer cache
operations, as they are faster than the regular per-line operations.
L2 range operations are not interruptible on this hardware, which
avoids potential livelock issues, but can be bad for interrupt
latency, so there is a compile-time tunable (MAX_RANGE_SIZE) which
allows you to select the maximum range size to operate on at once.
(Valid range is between one cache line and one 4KiB page, and must
be a multiple of the line size.)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mm/Kconfig')
-rw-r--r-- | arch/arm/mm/Kconfig | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 08ca264459bd..3b90051c0e05 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -373,7 +373,7 @@ config CPU_FEROCEON | |||
373 | select CPU_CACHE_VIVT | 373 | select CPU_CACHE_VIVT |
374 | select CPU_CP15_MMU | 374 | select CPU_CP15_MMU |
375 | select CPU_COPY_FEROCEON if MMU | 375 | select CPU_COPY_FEROCEON if MMU |
376 | select CPU_TLB_V4WBI if MMU | 376 | select CPU_TLB_FEROCEON if MMU |
377 | 377 | ||
378 | config CPU_FEROCEON_OLD_ID | 378 | config CPU_FEROCEON_OLD_ID |
379 | bool "Accept early Feroceon cores with an ARM926 ID" | 379 | bool "Accept early Feroceon cores with an ARM926 ID" |
@@ -551,6 +551,11 @@ config CPU_TLB_V4WBI | |||
551 | ARM Architecture Version 4 TLB with writeback cache and invalidate | 551 | ARM Architecture Version 4 TLB with writeback cache and invalidate |
552 | instruction cache entry. | 552 | instruction cache entry. |
553 | 553 | ||
554 | config CPU_TLB_FEROCEON | ||
555 | bool | ||
556 | help | ||
557 | Feroceon TLB (v4wbi with non-outer-cachable page table walks). | ||
558 | |||
554 | config CPU_TLB_V6 | 559 | config CPU_TLB_V6 |
555 | bool | 560 | bool |
556 | 561 | ||
@@ -709,6 +714,14 @@ config OUTER_CACHE | |||
709 | bool | 714 | bool |
710 | default n | 715 | default n |
711 | 716 | ||
717 | config CACHE_FEROCEON_L2 | ||
718 | bool "Enable the Feroceon L2 cache controller" | ||
719 | depends on FOOBAR | ||
720 | default y | ||
721 | select OUTER_CACHE | ||
722 | help | ||
723 | This option enables the Feroceon L2 cache controller. | ||
724 | |||
712 | config CACHE_L2X0 | 725 | config CACHE_L2X0 |
713 | bool "Enable the L2x0 outer cache controller" | 726 | bool "Enable the L2x0 outer cache controller" |
714 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 | 727 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 |