From patchwork Sun May 29 18:13:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 12864227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03039C433F5 for ; Sun, 29 May 2022 18:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7VtJ1Wxyy/YY3oujXQ495PBO2d/WlrOt8hGEY93z3kk=; b=Jiey2mGESHUnjB rMS7pi6cu8bblrMNKWj6du/5B7mSjpVA3jm6u0c5u+ApNzrygjqM/I6nFCmd7/faWvntPCSGeyRHA hamU/nvfdiDvDqZ7SoGSLvyjG+aXPyZ7pLtg0bqQPKReuJdb5K2Im45XkLDM71x1ETpUcqpV3wUmn Ks5Yk9x9Q1yAlRi5z0e3VAeyq25igVOLZyDyyUR34QqddZmMqmpkDt/H0Fj4V4bpwOSfeujobzFRD eIZN7VuZTWlbEMkyUzzdyFdOdIiZBYMrGo2zsZLxC1455ynDDfC8RY3tRiXTT4JRD6rK0UqlYAoxl zgHEAWOVr3vdZt3YF2Zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvNQV-004RDO-DR; Sun, 29 May 2022 18:14:07 +0000 Received: from ssl.serverraum.org ([176.9.125.105]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvNQC-004R97-0W for linux-arm-kernel@lists.infradead.org; Sun, 29 May 2022 18:13:49 +0000 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 5CDAF22248; Sun, 29 May 2022 20:13:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1653848021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f9XNTGn+HU9ifTLspVWfrUfTbd+mZ0O2Sv288leiWk4=; b=sP6C0XFykNmOAD2lXUG8aZHDbHlXLfsqCIcpAyV7TPf4CO+CuMgRCQxD2yNKP19f7MlDfv VBn/rxsqlkKqS61UuSqs5iHxH+BpQnPPH9/H5ftQi7uFBe4feoxjZ2NHr+dMyg2zNTxLIE PMiG7LAc5OCbPoRQR7Ra3qoL5HBlm2Q= From: Michael Walle To: Catalin Marinas , Sudeep Holla , Lorenzo Pieralisi , Daniel Lezcano , "Rafael J . Wysocki" , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Michael Walle Subject: [PATCH 1/2] cpuidle: cpuidle-arm: remove arm64 support Date: Sun, 29 May 2022 20:13:28 +0200 Message-Id: <20220529181329.2345722-2-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220529181329.2345722-1-michael@walle.cc> References: <20220529181329.2345722-1-michael@walle.cc> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220529_111348_244333_9BAE4F85 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit 788961462f34 ("ARM: psci: cpuidle: Enable PSCI CPUidle driver") the generic ARM cpuidle driver doesn't probe anymore because arm_cpuidle_init() will always return -EOPNOTSUPP. That is, because the mentioned commit removes the only .cpu_suspend and .cpu_init_idle provider. Signed-off-by: Michael Walle Reviewed-by: Sudeep Holla --- drivers/cpuidle/Kconfig.arm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm index be7f512109f7..747aa537389b 100644 --- a/drivers/cpuidle/Kconfig.arm +++ b/drivers/cpuidle/Kconfig.arm @@ -3,7 +3,8 @@ # ARM CPU Idle drivers # config ARM_CPUIDLE - bool "Generic ARM/ARM64 CPU idle Driver" + bool "Generic ARM CPU idle Driver" + depends on ARM select DT_IDLE_STATES select CPU_IDLE_MULTIPLE_DRIVERS help From patchwork Sun May 29 18:13:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 12864228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56CABC433EF for ; Sun, 29 May 2022 18:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ok5KyK5pWJl/qFop/MDr0uEzsQbkRmtmtRl6hA3S6eU=; b=rR9omB4MQWNVKF qfGwXr+AyNmkriI8v06OJ8gwa30MOvnJmv3RmYvVIYzVryUe0z/2IPGrxmV1xd19ws9dJNms6/uS4 YhDqvGjOxrTdOi8uoP4Ubh+id+tSh1Ujma4kqFNFfHMtayra2AaopYnuaM5/3qLPmPBFC+HIJNnzM cZILB5D9rvreb0k0QpVk06aFQJEOJ6qiFSfvDib3CxpZ7bEWt+CLVKtarBBC41lT1ez1fBPLb/Gl8 6VPvjT47ZXK+/D47bcCgGNaJcmA35KkGAXCS8Lb5hOW5S2aFJS1tjqA5emdt5D2tgqBlEELfBktfE rF+t7JRcgafdbQvpL9pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvNQM-004RBa-Je; Sun, 29 May 2022 18:13:58 +0000 Received: from ssl.serverraum.org ([176.9.125.105]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvNQB-004R90-8p for linux-arm-kernel@lists.infradead.org; Sun, 29 May 2022 18:13:48 +0000 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id DD05722249; Sun, 29 May 2022 20:13:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1653848022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EysWfF5qeT/K60N+isMImxlnThFx/sfgBlMy+ORwwxM=; b=hMFaKIjr+amijehDh8+e3iiiUcT+64o3AWh6bUUMHCsy7hmNrVceUQtadCNY18+KlxVRDO Eyu+EBG5ik/SUjaDQJSiEECotnP7YX6qEGY2Qm/8NDcrKSaGI8c5bn62AlD5zImuUMChud DTcf/Vgo/r8uxyFOIqBlVH1f2RIAook= From: Michael Walle To: Catalin Marinas , Sudeep Holla , Lorenzo Pieralisi , Daniel Lezcano , "Rafael J . Wysocki" , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Michael Walle Subject: [PATCH 2/2] arm64: cpuidle: remove generic cpuidle support Date: Sun, 29 May 2022 20:13:29 +0200 Message-Id: <20220529181329.2345722-3-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220529181329.2345722-1-michael@walle.cc> References: <20220529181329.2345722-1-michael@walle.cc> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220529_111347_495075_7DAFF965 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The arm64 support of the generic ARM cpuidle driver was removed. This let us remove all support code for it. Signed-off-by: Michael Walle Reviewed-by: Sudeep Holla --- arch/arm64/include/asm/cpu_ops.h | 9 --------- arch/arm64/include/asm/cpuidle.h | 15 --------------- arch/arm64/kernel/cpuidle.c | 29 ----------------------------- 3 files changed, 53 deletions(-) diff --git a/arch/arm64/include/asm/cpu_ops.h b/arch/arm64/include/asm/cpu_ops.h index e95c4df83911..a444c8915e88 100644 --- a/arch/arm64/include/asm/cpu_ops.h +++ b/arch/arm64/include/asm/cpu_ops.h @@ -31,11 +31,6 @@ * @cpu_die: Makes a cpu leave the kernel. Must not fail. Called from the * cpu being killed. * @cpu_kill: Ensures a cpu has left the kernel. Called from another cpu. - * @cpu_init_idle: Reads any data necessary to initialize CPU idle states for - * a proposed logical id. - * @cpu_suspend: Suspends a cpu and saves the required context. May fail owing - * to wrong parameters or error conditions. Called from the - * CPU being suspended. Must be called with IRQs disabled. */ struct cpu_operations { const char *name; @@ -49,10 +44,6 @@ struct cpu_operations { void (*cpu_die)(unsigned int cpu); int (*cpu_kill)(unsigned int cpu); #endif -#ifdef CONFIG_CPU_IDLE - int (*cpu_init_idle)(unsigned int); - int (*cpu_suspend)(unsigned long); -#endif }; int __init init_cpu_ops(int cpu); diff --git a/arch/arm64/include/asm/cpuidle.h b/arch/arm64/include/asm/cpuidle.h index 14a19d1141bd..2047713e097d 100644 --- a/arch/arm64/include/asm/cpuidle.h +++ b/arch/arm64/include/asm/cpuidle.h @@ -4,21 +4,6 @@ #include -#ifdef CONFIG_CPU_IDLE -extern int arm_cpuidle_init(unsigned int cpu); -extern int arm_cpuidle_suspend(int index); -#else -static inline int arm_cpuidle_init(unsigned int cpu) -{ - return -EOPNOTSUPP; -} - -static inline int arm_cpuidle_suspend(int index) -{ - return -EOPNOTSUPP; -} -#endif - #ifdef CONFIG_ARM64_PSEUDO_NMI #include diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c index 3006f4324808..4150e308e99c 100644 --- a/arch/arm64/kernel/cpuidle.c +++ b/arch/arm64/kernel/cpuidle.c @@ -13,35 +13,6 @@ #include #include -#include -#include - -int arm_cpuidle_init(unsigned int cpu) -{ - const struct cpu_operations *ops = get_cpu_ops(cpu); - int ret = -EOPNOTSUPP; - - if (ops && ops->cpu_suspend && ops->cpu_init_idle) - ret = ops->cpu_init_idle(cpu); - - return ret; -} - -/** - * arm_cpuidle_suspend() - function to enter a low-power idle state - * @index: argument to pass to CPU suspend operations - * - * Return: 0 on success, -EOPNOTSUPP if CPU suspend hook not initialized, CPU - * operations back-end error code otherwise. - */ -int arm_cpuidle_suspend(int index) -{ - int cpu = smp_processor_id(); - const struct cpu_operations *ops = get_cpu_ops(cpu); - - return ops->cpu_suspend(index); -} - #ifdef CONFIG_ACPI #include