From patchwork Tue Apr 17 02:15:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10344223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D0F496039A for ; Tue, 17 Apr 2018 02:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC183289DF for ; Tue, 17 Apr 2018 02:17:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFC0D289E2; Tue, 17 Apr 2018 02:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ED46D289DF for ; Tue, 17 Apr 2018 02:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nXUZV2HlWN38pVjMOL4dIwvrDtNdxZjyspY+cFJWn6c=; b=eKbE3YKzPEjG4A C9ur/x4bZZSdTIZQ59mzPe20hT7X1UbIaYjf3jCq0RRQflVsM9OjoAzXnUmOYcI1q+DLN5SoHlZJy k0g3bkxw6Idx0oBaU86YVH10hGv49nUt175LwaDlupw78KHENYL9VMfTY7yD9WTwo25COP4kC/+qP fHB8LGmZeiXQZqSAe/8kHiSX6ZKEGuftik0uZsiL7nMPAQkfEYyqFLy6s7m8qHMeCa8iKgI13gr6D 2aWEnUV8iXzjTDvTcmda6ad8ZVQ3Q2LNxCkq0qDeVkXH251dVmdeub6ulnriGFjfIWV1puIiF8BwB 3J/nNHoh4BIgfT+hwJjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8G9t-00043q-8z; Tue, 17 Apr 2018 02:15:49 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8G9q-00043h-J7 for linux-arm-kernel@bombadil.infradead.org; Tue, 17 Apr 2018 02:15:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tHvd20TcYW/4MuTFfQiKFTNzQD/0X4wYwotYeOVZTrM=; b=rRoKO6sXgo2zql3v3LH4wIt8+t TVhtG2izKermKCimWgXQIobihDuONwmb7r4xSzilORE9pEjvVxwiGdr6QatEf/7VqqcERDr2i70kI 5QN0SyacS72/Byf1suk5QWLPDJCSk6L4LKm637iYRDTOxsvgn2ASEjHo2yuGZxrS8KT4YbwTgHrHD HZMWgeL1nvm1QYb3ZKssy40ObGwt35i48UceWhkePryDsVTNOiY8qiP7JYS4oPy0os9+YckmLYidk CjzWsrHYGjaj9IsaeTy8Dutm00/Vpr6AjrzV7iW+zSiaV/+0O1MPIPtn0je3DL0IP/vwPa5xyUqbw CzXH4rmw==; Received: from vps.xff.cz ([195.181.215.36]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8G9n-0002Jy-2T for linux-arm-kernel@lists.infradead.org; Tue, 17 Apr 2018 02:15:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1523931301; bh=gfKjteiihAi9vM9t+m/BTw9oTZG+YIFHwaKP/8JyQe8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hP+clE1vcX62UGxbrKPqr0oquOVIWC7hRDPHn+Ogl0PXxbj6qTMIj2g9IMYl/hbyt qY/33dZYncm0LHrNPUeliDvqOsk+pveyz8dIyoRZCLgm5nnPSYoQ+qoONPnk456PMC KY+sPAzJHCOqGgeBQ/EoaF0GJAwgCAWOniancv3w= Date: Tue, 17 Apr 2018 04:15:00 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: =?utf-8?Q?Myl=C3=A8ne?= Josserand Subject: Re: [PATCH v6 00/11] Sunxi: Add SMP support on A83T Message-ID: <20180417021500.ufcp3fhlcpcu7vmt@core> Mail-Followup-To: =?utf-8?Q?Myl=C3=A8ne?= Josserand , linux@armlinux.org.uk, maxime.ripard@bootlin.com, wens@csie.org, marc.zyngier@arm.com, mark.rutland@arm.com, robh+dt@kernel.org, horms@verge.net.au, geert@linux-m68k.org, magnus.damm@gmail.com, devicetree@vger.kernel.org, quentin.schulz@bootlin.com, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, clabbe.montjoie@gmail.com, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org References: <20180416215032.5023-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180416215032.5023-1-mylene.josserand@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180417_031543_225464_759B9D53 X-CRM114-Status: GOOD ( 51.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, quentin.schulz@bootlin.com, horms@verge.net.au, maxime.ripard@bootlin.com, magnus.damm@gmail.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, marc.zyngier@arm.com, wens@csie.org, robh+dt@kernel.org, geert@linux-m68k.org, thomas.petazzoni@bootlin.com, clabbe.montjoie@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello Mylène, Please also add this: Because otherwise when I'm building kernel just for sun8i and I don't have sun9i enabled, this new SMP code for A83T (which is sun8i) will not be built. thank you, Ondrej On Mon, Apr 16, 2018 at 11:50:21PM +0200, Mylène Josserand wrote: > Hello everyone, > > This is a V6 of my series that adds SMP support for Allwinner sun8i-a83t. > Based on sunxi's tree, sunxi/for-next branch. > Depends on a patch from Doug Berger that allows to include the "cpu-type" > header on assembly files: > 6c7dd080ba4b ("ARM: Allow this header to be included by assembly files") > > This new series refactors the shmobile code to use the function introduced > in this series: "secure_cntvoff_init". > Geert Uytterhoeven and Simon Horman, could you review and test this series > on Renesas boards? Thank you very much! > > If you have any remarks/questions, let me know. > Thank you in advance, > Mylène > > Changes since v5: > - Remove my patch 01 and use the patch of Doug Berger to be able to > include the cpu-type header on assembly files. > - Rename smp_init_cntvoff function into secure_cntvoff_init according > to Marc Zyngier's review. > - According to Chen-Yu and Maxime's reviews, remove the patch that was > moving structures. Instead of using an index to retrieve which > architecture we are having, use a global variable. > - Merge the 2 patches that move assembly code from C to assembly file. > - Use a sun8i field instead of sun9i to know on which architecture we > are using because many modifications/additions of the code are for > sun8i-a83t. > - Rework the patch "add is_sun8i field" to add only this field in this > patch. The part of the patch that was starting to handle the differences > between sun8i-a83t and sun9i-a80 is merged in the patch that adds the > support of sun8i-a83t. > - Add a new patch that refactor the shmobile code to use the new function > secure_cntvoff_init introduced in this series. > > Changes since v4: > - Rebased my series according to new Chen-Yu series: > "ARM: sunxi: Clean and improvements for multi-cluster SMP" > https://lkml.org/lkml/2018/3/8/886 > - Updated my series according to Marc Zyngier's reviews to add CNTVOFF > initialization's function into ARM's common part. Thanks to that, other > platforms such as Renesa can use this function. > - For boot CPU, create a new machine to handle the CNTVOFF initialization > using "init_early" callback. > Changes since v3: > - Take into account Maxime's reviews: > - split the first patch into 4 new patches: add sun9i device tree > parsing, rename some variables, add a83t support and finally, > add hotplug support. > - Move the code of previous patch 07 (to disable CPU0 disabling) > into hotplug support patch (see patch 04) > - Remove the patch that added PRCM register because it is already > available. Because of that, update the device tree parsing to use > "sun8i-a83t-r-ccu". > - Use a variable to know which SoC we currently have > - Take into account Chen-Yu's reviews: create two iounmap functions > to release the resources of the device tree parsing. > - Take into account Marc's review: Update the code to initialize CNTVOFF > register. As there is already assembly code in the driver, I decided > to create an assembly file not to mix assembly and C code. > For that, I create 3 new patches: move the current assembly code that > handles the cluster cache enabling into a file, move the cpu_resume entry > in this file and finally, add a new assembly entry to initialize the timer > offset for boot CPU and secondary CPUs. > > Changes since v2: > - Rebased my modifications according to new Chen Yu's patch series > that adds SMP support for sun9i-a80 (without MCPM). > - Split the device-tree patches into 3 patches for CPUCFG, R_CPUCFG > and PRCM registers for more visibility. > - The hotplug of CPU0 is currently not working (even after trying what > Allwinner's code is doing) so remove the possibility of disabling > this CPU. Created a new patch for it. > > Changes since v1: > - Add Chen Yu's patch in my series (see path 01) > - Add new compatibles for prcm and cpucfg registers for sun8i-a83t. > Create two functions to separate the DT parsing of sun9i-a80 and > sun8i-a83t. > - Thanks to Maxime's review: order device tree's nodes according > to physical addresses, remove unused label and fix registers' sizes. > Update the commit log and commit title of my last patch (see > patch 05). > > Mylène Josserand (11): > ARM: sunxi: smp: Move assembly code into a file > ARM: dts: sun8i: Add CPUCFG device node for A83T dtsi > ARM: dts: sun8i: Add R_CPUCFG device node for the A83T dtsi > ARM: dts: sun8i: a83t: Add CCI-400 node > ARM: smp: Add initialization of CNTVOFF > ARM: sunxi: Add initialization of CNTVOFF > ARM: sun9i: smp: Rename clusters's power-off > ARM: sun9i: smp: Add is_sun8i field > ARM: sun8i: smp: Add support for A83T > ARM: dts: sun8i: Add enable-method for SMP support for the A83T SoC > ARM: shmobile: Convert file to use cntvoff > > arch/arm/boot/dts/sun8i-a83t.dtsi | 59 ++++++++ > arch/arm/common/Makefile | 1 + > arch/arm/common/secure_cntvoff.S | 31 ++++ > arch/arm/include/asm/secure_cntvoff.h | 8 ++ > arch/arm/mach-shmobile/common.h | 1 - > arch/arm/mach-shmobile/headsmp-apmu.S | 22 +-- > arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 +- > arch/arm/mach-sunxi/Makefile | 4 +- > arch/arm/mach-sunxi/headsmp.S | 81 +++++++++++ > arch/arm/mach-sunxi/mc_smp.c | 240 +++++++++++++++++++------------ > arch/arm/mach-sunxi/sunxi.c | 20 ++- > 11 files changed, 349 insertions(+), 121 deletions(-) > create mode 100644 arch/arm/common/secure_cntvoff.S > create mode 100644 arch/arm/include/asm/secure_cntvoff.h > create mode 100644 arch/arm/mach-sunxi/headsmp.S > > -- > 2.11.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index ce53ceaf4cc5..d9c8ecf88ec6 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -51,7 +51,7 @@ config MACH_SUN9I config ARCH_SUNXI_MC_SMP bool depends on SMP - default MACH_SUN9I + default MACH_SUN9I || MACH_SUN8I select ARM_CCI400_PORT_CTRL select ARM_CPU_SUSPEND