Skip to contentSkip to conversation

ARM: Cavium CNS3xxx updates for 3.1

GIT PULL Anton Vorontsov 2 participants 2 messages Jul 14, 2011 – Jul 15, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Arnd,

Please pull linux-cns3xxx.git tree to receive updates for CNS3xxx. There are just two patches: the first patch corrects CPU type, and the second adds L2 cache controller support, which doubles the performance.

For the second patch, I fixed all the comments, plus added some notes regarding why we don't want to select CACHE_PL310 for CNS3xxx.

For convenience' sake I inline the patches here, they're pretty small.

Thanks!

The following changes since commit fe0d42203cb5616eeff68b14576a0f7e2dd56625:

Linux 3.0-rc6 (2011-07-04 15:56:24 -0700)

are available in the git repository at:
git://git.infradead.org/users/cbou/linux-cns3xxx.git master

Anton Vorontsov (1):
ARM: cns3xxx: Add support for L2 Cache Controller

Imre Kaloz (1):
ARM: cns3xxx: Should select CPU_V6K

 arch/arm/Kconfig                  |    2 +-
 arch/arm/mach-cns3xxx/cns3420vb.c |    2 +
 arch/arm/mach-cns3xxx/core.c      |   43 +++++++++++++++++++++++++++++++++++++
 arch/arm/mach-cns3xxx/core.h      |    6 +++++
 arch/arm/mm/Kconfig               |    2 +-
 5 files changed, 53 insertions(+), 2 deletions(-)

commit 93e85d8e902e1a4468c6ade5c6ec3dd3055a489f

Author: Anton Vorontsov <[email protected]>
Date:   Wed Jul 6 16:45:09 2011 +0400

ARM: cns3xxx: Add support for L2 Cache Controller

CNS3xxx SOCs have L310-compatible cache controller, so let's use it.

With this patch benchmarking with 'gzip' shows that performance is doubled, and I'm still able to boot full-fledged userland over NFS (using PCIe NIC), so the support should be pretty robust.

p.s. While CNS3xxx reports that it has PL310, it still needs to wait on cache line operations, so we should not select 'CACHE_PL310', which is a micro-optimization that removes these waits for v7 CPUs. Someday we'd better rename CACHE_PL310 Kconfig option into NO_CACHE_WAIT or something less ambiguous.

arch/arm/mach-cns3xxx/cns3420vb.c +2 -0
index 08e5c87..4b804ba 100644
@@ -170,6 +170,8 @@ static struct platform_device *cns3420_pdevs[] __initdata = {
 
 static void __init cns3420_init(void)
 {
+	cns3xxx_l2x0_init();
+
 	platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs));
 
 	cns3xxx_ahci_init();
arch/arm/mach-cns3xxx/core.c +43 -0

52 lines not on this page · raw message

arch/arm/mach-cns3xxx/core.h +6 -0
index ffeb3a8..fcd2253 100644
@@ -13,6 +13,12 @@
 
 extern struct sys_timer cns3xxx_timer;
 
+#ifdef CONFIG_CACHE_L2X0
+void __init cns3xxx_l2x0_init(void);
+#else
+static inline void cns3xxx_l2x0_init(void) {}
+#endif /* CONFIG_CACHE_L2X0 */
+
 void __init cns3xxx_map_io(void);
 void __init cns3xxx_init_irq(void);
 void cns3xxx_power_off(void);
arch/arm/mm/Kconfig +1 -1
index 0074b8d..cb26d49 100644
@@ -821,7 +821,7 @@ config CACHE_L2X0
 	depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \
 		   REALVIEW_EB_A9MP || SOC_IMX35 || SOC_IMX31 || MACH_REALVIEW_PBX || \
 		   ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \
-		   ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE
+		   ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || ARCH_CNS3XXX
 	default y
 	select OUTER_CACHE
 	select OUTER_CACHE_SYNC

commit 00d2711d700ae77b5bb66ea7c73eaa2cf155fa97

Author: Imre Kaloz <[email protected]>
Date:   Thu Jul 7 12:19:09 2011 +0200

ARM: cns3xxx: Should select CPU_V6K

CNS3XXX is based on MPCore, so select the right CPU option for it.

arch/arm/Kconfig +1 -1
index 9adc278..c2e5f3d 100644
@@ -321,7 +321,7 @@ config ARCH_CLPS711X
 
 config ARCH_CNS3XXX
 	bool "Cavium Networks CNS3XXX family"
-	select CPU_V6
+	select CPU_V6K
 	select GENERIC_CLOCKEVENTS
 	select ARM_GIC
 	select MIGHT_HAVE_PCI
#1 lore raw
Quoted 10 lines · Anton Vorontsov

Please pull linux-cns3xxx.git tree to receive updates for CNS3xxx. There are just two patches: the first patch corrects CPU type, and the second adds L2 cache controller support, which doubles the performance.

For the second patch, I fixed all the comments, plus added some notes regarding why we don't want to select CACHE_PL310 for CNS3xxx.

For convenience' sake I inline the patches here, they're pretty small.

Pulled, thanks!

Arnd