From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni) Date: Fri, 28 Mar 2014 19:19:41 +0100 Subject: [PATCH 07/10] ARM: mvebu: add SMP support for Armada 375 and Armada 38x In-Reply-To: <5335BBC1.6090804@codeaurora.org> References: <1396012026-5997-1-git-send-email-thomas.petazzoni@free-electrons.com> <1396012026-5997-8-git-send-email-thomas.petazzoni@free-electrons.com> <5335BBC1.6090804@codeaurora.org> Message-ID: <20140328191941.4c92ff62@skate> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Dear Stephen Boyd, On Fri, 28 Mar 2014 11:13:21 -0700, Stephen Boyd wrote: > On 03/28/14 06:07, Thomas Petazzoni wrote: > > diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig > > index 8634222..e88d951 100644 > > --- a/arch/arm/mach-mvebu/Kconfig > > +++ b/arch/arm/mach-mvebu/Kconfig > > @@ -45,6 +45,8 @@ config MACH_ARMADA_375 > > select ARMADA_375_CLK > > select CPU_V7 > > select HAVE_ARM_SCU > > + select HAVE_ARM_TWD > > This should have "if SMP" appended to it (same for HAVE_ARM_SCU). Thanks, will do. The HAVE_ARM_SCU addition is part of a separate series, the Armada 375/38x coherency series, so I'll fix it in there. > > diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c > > index 6260cb8..9ded4b9 100644 > > --- a/arch/arm/mach-mvebu/board-v7.c > > +++ b/arch/arm/mach-mvebu/board-v7.c > > @@ -146,6 +146,7 @@ static const char * const armada_375_dt_compat[] = { > > }; > > > > DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") > > + .smp = smp_ops(mvebu_cortex_a9_smp_ops), > > .init_time = mvebu_timer_and_clk_init, > > .restart = mvebu_restart, > > .dt_compat = armada_375_dt_compat, > > @@ -158,6 +159,7 @@ static const char * const armada_38x_dt_compat[] = { > > }; > > > > DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") > > + .smp = smp_ops(mvebu_cortex_a9_smp_ops), > > .init_time = mvebu_timer_and_clk_init, > > .restart = mvebu_restart, > > .dt_compat = armada_38x_dt_compat, > > You may want to look into using the enable-method property in devicetree > so that you don't have to set the smp ops here. The patch to support > that is sitting in -next as 6c3ff8b11a16 (ARM: Introduce > CPU_METHOD_OF_DECLARE() for cpu hotplug/smp, 2013-10-30). Hm, ok, I'll have a look into that. > > diff --git a/arch/arm/mach-mvebu/headsmp-a9.S b/arch/arm/mach-mvebu/headsmp-a9.S > > new file mode 100644 > > index 0000000..78e66c9 > > --- /dev/null > > +++ b/arch/arm/mach-mvebu/headsmp-a9.S > > @@ -0,0 +1,22 @@ > > +/* > > + * SMP support: Entry point for secondary CPUs of Marvell EBU > > + * Cortex-A9 based SOCs (Armada 375 and Armada 38x). > > + * > > + * Copyright (C) 2014 Marvell > > + * > > + * Gregory CLEMENT > > + * Thomas Petazzoni > > + * > > + * This file is licensed under the terms of the GNU General Public > > + * License version 2. This program is licensed "as is" without any > > + * warranty of any kind, whether express or implied. > > + */ > > + > > +#include > > +#include > > + > > + __CPUINIT > > __CPUINIT is dead. Don't use it. Sure, will fix, thanks. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com