ARM: cns3xxx: Add support for SMP
Subsystems (2)
PATCH 2/2 ARM: cns3xxx: Add support for SMP
Thanks to the previous refactorings, nothing fancy needs to be done, just use generic SCU routines.
Signed-off-by Anton Vorontsov <[email protected]>
--- arch/arm/Kconfig | 2 +- arch/arm/mach-cns3xxx/Kconfig | 1 + arch/arm/mach-cns3xxx/Makefile | 1 + arch/arm/mach-cns3xxx/include/mach/smp.h | 31 +++++++++++++++++ arch/arm/mach-cns3xxx/platsmp.c | 54 ++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-cns3xxx/include/mach/smp.h create mode 100644 arch/arm/mach-cns3xxx/platsmp.c
arch/arm/Kconfig +1 -1
@@ -1100,7 +1100,7 @@ config SMP bool "Symmetric Multi-Processing (EXPERIMENTAL)" depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\ MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\ - ARCH_U8500 || ARCH_VEXPRESS_CA9X4) + ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_CNS3XXX) depends on GENERIC_CLOCKEVENTS select USE_GENERIC_SMP_HELPERS select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
arch/arm/mach-cns3xxx/Kconfig +1 -0
@@ -3,6 +3,7 @@ menu "CNS3XXX platform type" config MACH_CNS3420VB bool "Support for CNS3420 Validation Board" + select HAVE_ARM_SCU help Include support for the Cavium Networks CNS3420 MPCore Platform Baseboard.
arch/arm/mach-cns3xxx/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o devices.o +obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_PCI) += pcie.o obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
arch/arm/mach-cns3xxx/include/mach/smp.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright 2002 ARM Ltd. +* Copyright 2008 Cavium Networks +* +* This file is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License, Version 2, as +* published by the Free Software Foundation. +*/ + +#ifndef __MACH_SMP_H +#define __MACH_SMP_H + +#include <asm/hardware/gic.h> + +#define hard_smp_processor_id () \ + ({ \ + unsigned int cpunum; \ + __asm__("mrc p15, 0, %0, c0, c0, 5" \ + : "=r" (cpunum)); \ + cpunum &= 0x0F; \ + }) + +/* +* We use IRQ1 as the IPI +*/ +static inline void smp_cross_call (const struct cpumask *mask) +{ +gic_raise_softirq (mask,1 ); +} + +#endif /* __MACH_SMP_H */
arch/arm/mach-cns3xxx/platsmp.c new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.7.0.5