Received: by 10.223.185.116 with SMTP id b49csp715927wrg; Fri, 23 Feb 2018 05:46:59 -0800 (PST) X-Google-Smtp-Source: AH8x226CZpdzz+oAQKauqIaBogImeb3HgTMzuiDW4pjfNyGaPdxLDmFlv9yQ4OTwxwZmzGibW4L/ X-Received: by 10.99.120.199 with SMTP id t190mr1486545pgc.72.1519393619198; Fri, 23 Feb 2018 05:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519393619; cv=none; d=google.com; s=arc-20160816; b=k+HJAoe3ZDCQRtxlF9YouNaz6HG9sQ51yhQe6jROUJLaTl9QnkZt/agHBEdYB9brAm N4umBst7G67ha3a9OMT7H6qUOYEUPwVcrWsX81LS7D/+NKr7E4BeG73Hwux2TzO4wOjf zdR4eS/MGqGefd25pawRzNW4YZgoZjOEpSOST12/QIBsbaPqJtDHMrGVBIB71AaSKNYV WuUC2eVNRqfYPgcTbp2D7tzHrItxsWcXAFKPhga4zVs5VkfwOvjmbgFDEGmwCXRWM81g 6lUlODwqi0YrCSpPOg67Wb7RosKTdfWLSf5bhvY9uCNK6cEJZHaY1Osa8mRH8Xv2LOrF 8Jlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=VlIXdJK6Fhy0KJXYZnlWUZluM5l/PEwBHEIWxN73T6o=; b=vPn4zJKgltqAMrFi/gO5nM2jlabYgIZAjvxdU1YRNV4NPKXbcSJvTsRiqmgU/pozfW KUBm6t7Idg5HFTTuuuDw9rzWTzi0lqLSpp2OgOPxLkadCF9STi0GjbM8FhHrVlyrHBp1 52I2njw/5RelvEfHMN9BD/Qrxa7d9QG84gvZeKb5aGecBlOyri5Tjgm/dYaj8NYNz7Bj //KcME5//ZN4DXJnWApEit4h3s+G0u7sIorM49XTelqIXnU9RPdrYiS+IML+zPIMrXCb 8bnJ+K27qgKIQjBsUZ22fXfbfVBG4U6dX9KSZLhNLUa3YhXfolwisMFGffR3FW1VOLvV G7VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si1534083pgr.172.2018.02.23.05.46.44; Fri, 23 Feb 2018 05:46:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751851AbeBWNpm (ORCPT + 99 others); Fri, 23 Feb 2018 08:45:42 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:48921 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbeBWNig (ORCPT ); Fri, 23 Feb 2018 08:38:36 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 6B1B82087B; Fri, 23 Feb 2018 14:38:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.lan (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 07A3E20379; Fri, 23 Feb 2018 14:38:33 +0100 (CET) From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: maxime.ripard@bootlin.com, linux@armlinux.org.uk, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clabbe.montjoie@gmail.com, thomas.petazzoni@bootlin.com, mylene.josserand@bootlin.com, quentin.schulz@bootlin.com Subject: [PATCH v4 04/10] ARM: sun8i: smp: Add hotplug support for sun8i-a83t Date: Fri, 23 Feb 2018 14:37:36 +0100 Message-Id: <20180223133742.26044-5-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223133742.26044-1-mylene.josserand@bootlin.com> References: <20180223133742.26044-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add hotplug support for sun8i-a83t. Hotplug CPU for CPU0 is currently not working. Remove the possibility to disable CPU0 only for sun8i-a83t. Signed-off-by: Mylène Josserand --- arch/arm/mach-sunxi/mc_smp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c index 3bd9066a1422..f2c2cfca28cd 100644 --- a/arch/arm/mach-sunxi/mc_smp.c +++ b/arch/arm/mach-sunxi/mc_smp.c @@ -579,6 +579,8 @@ static int sunxi_cluster_powerdown(unsigned int cluster) reg = readl(prcm_base + PRCM_PWROFF_GATING_REG(cluster)); if (is_sun9i) reg |= PRCM_PWROFF_GATING_REG_CLUSTER_SUN9I; + else + reg |= PRCM_PWROFF_GATING_REG_CLUSTER_SUN8I; writel(reg, prcm_base + PRCM_PWROFF_GATING_REG(cluster)); udelay(20); @@ -660,8 +662,12 @@ static int sunxi_mc_smp_cpu_kill(unsigned int l_cpu) return !ret; } -static bool sunxi_mc_smp_cpu_can_disable(unsigned int __unused) +static bool sunxi_mc_smp_cpu_can_disable(unsigned int cpu) { + /* CPU0 hotplug handled only for sun9i */ + if (!is_sun9i) + if (cpu == 0) + return false; return true; } #endif -- 2.11.0