ARM: oxnas: Add SMP support for OX820
Subsystems (2)
v2 cover ARM: oxnas: Add SMP support for OX820
In order to support the SMP feature of the Oxford Semiconductor OX820 SoC, add the necessary code to handle the wake-up, hotplug and cpu entry.
The OX820 has an ARM11MPCORE cluster with 2 cores and has proper hardware support for secondary core booting.
Changes since v1 at http://lkml.kernel.org/r/20161017084303.20078-1-narmstrong at baylibre.com
- Remove useless holding pen loops and spinlock in boot_secondary
Neil Armstrong (2):
ARM: oxnas: Add OX820 SMP support
ARM: oxnas: Add OX820 config and makefile entry
arch/arm/Makefile | 1 + arch/arm/mach-oxnas/Kconfig | 30 ++++++++---- arch/arm/mach-oxnas/Makefile | 2 + arch/arm/mach-oxnas/headsmp.S | 28 +++++++++++ arch/arm/mach-oxnas/hotplug.c | 111 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-oxnas/platsmp.c | 104 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 267 insertions(+), 9 deletions(-) create mode 100644 arch/arm/mach-oxnas/Makefile create mode 100644 arch/arm/mach-oxnas/headsmp.S create mode 100644 arch/arm/mach-oxnas/hotplug.c create mode 100644 arch/arm/mach-oxnas/platsmp.c
Signature · 1 line
2.7.0
PATCH v2 1/2 ARM: oxnas: Add OX820 SMP support
The Oxford Semiconductor OX820 is a ARM11MPcore based SoC sharing some features with the OX810 earlier SoC.
This patch adds the core to wake up the second core.
--- arch/arm/mach-oxnas/Makefile | 2 + arch/arm/mach-oxnas/headsmp.S | 28 +++++++++++ arch/arm/mach-oxnas/hotplug.c | 111 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-oxnas/platsmp.c | 104 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 245 insertions(+) create mode 100644 arch/arm/mach-oxnas/Makefile create mode 100644 arch/arm/mach-oxnas/headsmp.S create mode 100644 arch/arm/mach-oxnas/hotplug.c create mode 100644 arch/arm/mach-oxnas/platsmp.c
arch/arm/mach-oxnas/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_SMP) += platsmp.o headsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-oxnas/headsmp.S new file +28 -0
@@ -0,0 +1,28 @@ +/* + * linux/arch/arm/mach-oxnas/headsmp.S + * + * Copyright (C) 2013 Ma Haijun <[email protected]> + * Copyright (c) 2003 ARM Limited + * All Rights Reserved + * + * This program 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. + */ +#include <linux/linkage.h> +#include <linux/init.h> + + __INIT + +/* + * OX820 specific entry point for secondary CPUs. + */ +ENTRY(ox820_secondary_startup) + mov r4, #0 + /* invalidate both caches and branch target cache */ + mcr p15, 0, r4, c7, c7, 0 + /* + * we've been released from the holding pen: secondary_stack + * should now contain the SVC stack for this core + */ + b secondary_startup
arch/arm/mach-oxnas/hotplug.c new file +111 -0
111 lines not on this page · raw message
arch/arm/mach-oxnas/platsmp.c new file +104 -0
104 lines not on this page · raw message
Signature · 1 line
2.7.0
PATCH v2 2/2 ARM: oxnas: Add OX820 config and makefile entry
In reply to Neil ArmstrongRefactor the oxnas Kconfig entries among the OX810SE and OX820 configs, and add the files to support the OX820 SMP feature.
--- arch/arm/Makefile | 1 + arch/arm/mach-oxnas/Kconfig | 30 +++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-)
arch/arm/Makefile +1 -0
@@ -191,6 +191,7 @@ machine-$(CONFIG_ARCH_MXS) += mxs machine-$(CONFIG_ARCH_NETX) += netx machine-$(CONFIG_ARCH_NOMADIK) += nomadik machine-$(CONFIG_ARCH_NSPIRE) += nspire +machine-$(CONFIG_ARCH_OXNAS) += oxnas machine-$(CONFIG_ARCH_OMAP1) += omap1 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_ORION5X) += orion5x
arch/arm/mach-oxnas/Kconfig +21 -9
@@ -1,9 +1,16 @@ menuconfig ARCH_OXNAS bool "Oxford Semiconductor OXNAS Family SoCs" select ARCH_HAS_RESET_CONTROLLER + select COMMON_CLK_OXNAS select GPIOLIB + select MFD_SYSCON + select OXNAS_RPS_TIMER + select PINCTRL_OXNAS + select RESET_CONTROLLER + select RESET_OXNAS + select VERSATILE_FPGA_IRQ select PINCTRL - depends on ARCH_MULTI_V5 + depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 help Support for OxNas SoC family developed by Oxford Semiconductor.
@@ -11,16 +18,21 @@ if ARCH_OXNAS config MACH_OX810SE bool "Support OX810SE Based Products" - select ARCH_HAS_RESET_CONTROLLER - select COMMON_CLK_OXNAS + depends on ARCH_MULTI_V5 select CPU_ARM926T - select MFD_SYSCON - select OXNAS_RPS_TIMER - select PINCTRL_OXNAS - select RESET_CONTROLLER - select RESET_OXNAS - select VERSATILE_FPGA_IRQ help Include Support for the Oxford Semiconductor OX810SE SoC Based Products. +config MACH_OX820 + bool "Support OX820 Based Products" + depends on ARCH_MULTI_V6 + select ARM_GIC + select DMA_CACHE_RWFO if SMP + select CPU_V6K + select HAVE_SMP + select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if SMP + help + Include Support for the Oxford Semiconductor OX820 SoC Based Products. + endif
Signature · 1 line
2.7.0
Quoted 9 lines · CEST Neil Armstrong
In order to support the SMP feature of the Oxford Semiconductor OX820 SoC, add the necessary code to handle the wake-up, hotplug and cpu entry.
The OX820 has an ARM11MPCORE cluster with 2 cores and has proper hardware support for secondary core booting.
Changes since v1 at http://lkml.kernel.org/r/20161017084303.20078-1-narmstrong at baylibre.com
- Remove useless holding pen loops and spinlock inboot_secondary
Thanks for the update, much nicer!