From patchwork Wed May 29 15:42:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10967259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 388DC76 for ; Wed, 29 May 2019 15:42:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A210288E1 for ; Wed, 29 May 2019 15:42:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EA1228932; Wed, 29 May 2019 15:42:59 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 C399228780 for ; Wed, 29 May 2019 15:42:58 +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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sr1nSnfdatLGhoPlAt9C4DNLWEzJZ3EomFBEu32HMiU=; b=NMcVXYfvEBrE1i Pce3/axHcxfq2JUp8WLD5N0saNB4tNaCX68vhTXmdsnYCdWnTRtXBA5hxeOLbapnifCJ4RHQ6H9af dnOIZXDx2MY3w4v/3fDyFMzrM0h8KzvtOHPuNo4V5cGmxwZ3ifGbbgCgKC6uyj22Cp69RdBj6eHSW mMk6LmCP2X5HI144T4v8H4LuhRC9bdX3aH4crHtMfTZOljYsshXpLMLtY84wUW384HHhSZD0Bu79B oBGUpEqYOUt61Ao8lUvX4gYj5wdCN+RwBvZKfRKAH1EmGS0Qpyq+J+rfkPSsWq5JxqtKSg7hXrbnt Y+5+0/GwnzWWzGsMYSLA==; 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 1hW0j6-0005vH-TV; Wed, 29 May 2019 15:42:52 +0000 Received: from chamillionaire.breakpoint.cc ([2a01:7a0:2:106d:670::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW0j4-0005jX-1S for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2019 15:42:51 +0000 Received: from localhost ([127.0.0.1] helo=flow.W.breakpoint.cc) by Chamillionaire.breakpoint.cc with esmtp (Exim 4.89) (envelope-from ) id 1hW0io-00067Z-0T; Wed, 29 May 2019 17:42:34 +0200 From: Sebastian Andrzej Siewior To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t Date: Wed, 29 May 2019 17:42:29 +0200 Message-Id: <20190529154229.14911-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Breakpoint-Spam-Score: -1.0 X-Breakpoint-Spam-Level: - X-Breakpoint-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, HEADER_FROM_DIFFERENT_DOMAINS=0.001 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190529_084250_221161_0115EBC8 X-CRM114-Status: GOOD ( 11.78 ) 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: Shawn Guo , Sascha Hauer , NXP Linux Team , Pengutronix Kernel Team , tglx@linutronix.de, Fabio Estevam , Sebastian Andrzej Siewior 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 The idle call back is invoked with disabled interrupts and requires raw_spinlock_t locks to work. Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/cpuidle-imx6q.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 326e870d71239..d9ac80aa1eb0a 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -17,22 +17,22 @@ #include "hardware.h" static int num_idle_cpus = 0; -static DEFINE_SPINLOCK(cpuidle_lock); +static DEFINE_RAW_SPINLOCK(cpuidle_lock); static int imx6q_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - spin_lock(&cpuidle_lock); + raw_spin_lock(&cpuidle_lock); if (++num_idle_cpus == num_online_cpus()) imx6_set_lpm(WAIT_UNCLOCKED); - spin_unlock(&cpuidle_lock); + raw_spin_unlock(&cpuidle_lock); cpu_do_idle(); - spin_lock(&cpuidle_lock); + raw_spin_lock(&cpuidle_lock); if (num_idle_cpus-- == num_online_cpus()) imx6_set_lpm(WAIT_CLOCKED); - spin_unlock(&cpuidle_lock); + raw_spin_unlock(&cpuidle_lock); return index; }