From patchwork Wed Mar 21 09:45:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10299009 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 17D9760386 for ; Wed, 21 Mar 2018 09:45:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 039CF29173 for ; Wed, 21 Mar 2018 09:45:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAD7B29783; Wed, 21 Mar 2018 09:45:57 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 E600229173 for ; Wed, 21 Mar 2018 09:45:56 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: 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:List-Owner; bh=p/dCutGrOLBEDtNMs2lZIa9paqVM2lfBXQOJHqyB+mw=; b=bo iObpFL7KOHk8TeAiljnzcC8/HvcYcNrJaxCu3qiij8RElWPDYyaaIyic7omPcaNn9OPOBbrWxX+bC uc6kwlsXJbwDtcM1nPr9LUWnxuSvEoGABNtNb/ynSNDmPQrRhy7kQJsEVOdKGQMnXJq4UoAMTrJlZ ihNkOBBemcJASafyx9csLsa5ys93q9DlP9VJLWs2Ee2/Cxy74qwZ6RaOqRvLnfAO/YtRWF9tME4Lu nqBgSGoSnbtirG9GanmGwbQK9X9nQTrCj7OtESrerK1qelF3lhn4FuiqP0PZo8tUXlajqLMboZPpg NuxuvKIFanm9tHOrLb/s1qyPSWwBiSNA==; 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 1eyaJa-0002A5-M9; Wed, 21 Mar 2018 09:45:50 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyaJW-0001Xn-86 for linux-arm-kernel@lists.infradead.org; Wed, 21 Mar 2018 09:45:48 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180321094527euoutp014cce4e764bb25862055319af2a802be9~d5lr7scX91918919189euoutp01x; Wed, 21 Mar 2018 09:45:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180321094527euoutp014cce4e764bb25862055319af2a802be9~d5lr7scX91918919189euoutp01x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521625527; bh=5q4Ssu5AU3iaPjsFUZPdTKazy7i7q2S2l/KQulR8phY=; h=From:To:Cc:Subject:Date:References:From; b=KI0ewaNkGp/LiwiUVUmZqPv15uBdAhOSetrIXuzRjqESB+EKMjOJjtx8XXwgyPrlH r7ewjbzbteV3Wodyc+rfeDy0vqW6j2JEW70VVj+vEPF7ClEFlDWLg9O/C2yD37Tzzr MC4zs7401CPx2c5eRQaP2yOd3HWQeUCWTTYlM3nU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180321094526eucas1p23b562d7cc3ac481117476f823f310c18~d5lrHaGtk1234412344eucas1p2e; Wed, 21 Mar 2018 09:45:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 0F.D8.10409.4B922BA5; Wed, 21 Mar 2018 09:45:24 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180321094523eucas1p1a87d146d65d4191ccdb37f1723977011~d5loFu94V2460924609eucas1p1a; Wed, 21 Mar 2018 09:45:23 +0000 (GMT) X-AuditID: cbfec7f5-f95739c0000028a9-0d-5ab229b465e5 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 99.EF.04183.3B922BA5; Wed, 21 Mar 2018 09:45:23 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5X007QNPRGGS60@eusync3.samsung.com>; Wed, 21 Mar 2018 09:45:23 +0000 (GMT) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210 Date: Wed, 21 Mar 2018 10:45:05 +0100 Message-id: <20180321094505.25494-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWy7djPc7pbNDdFGaycq2ixccZ6Vot5n2Ut zp/fwG6x6fE1VovPvUcYLWac38dksfbIXXaLv3f+sVmcOX2J1WLBxkeMDlwea+atYfTYtKqT zePOtT1sHpuX1HtsudrO4tG3ZRWjx+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veiWYxdjBwcvAK2EosPeUBsk5dY /H0n2wRGrgWMDKsYRVJLi3PTc4uN9IoTc4tL89L1kvNzNzECQ2fbsZ9bdjB2vQs+xCjAwajE w2shtjFKiDWxrLgy9xCjBAezkgjvts9AId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rznDSqjhATS E0tSs1NTC1KLYLJMHJxSDYzyn8p0bTc/OXNG+JvGGqPT0d7aOYuOr0rOXyx1X1ze8YTenWNJ R1JaV1yqWe55ePp3Od2cCi7vXuPdO7JsQg5H/a4wqWqWTZf7uO5uvsKnxelhCme7BP6fnnIx QuPePw6xf6vmHVWK27qgM8VJeIfaw9M+vG6+U3Kv+fp5f7p6olUp63beBSUlluKMREMt5qLi RADxfeZ0GQIAAA== X-CMS-MailID: 20180321094523eucas1p1a87d146d65d4191ccdb37f1723977011 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180321094523eucas1p1a87d146d65d4191ccdb37f1723977011 X-RootMTR: 20180321094523eucas1p1a87d146d65d4191ccdb37f1723977011 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180321_024546_567574_77CEA3BE X-CRM114-Status: GOOD ( 15.89 ) 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: Bartlomiej Zolnierkiewicz , Marc Zyngier , Daniel Lezcano , "Rafael J . Wysocki" , Krzysztof Kozlowski , stable@vger.kernel.org, Marek Szyprowski MIME-Version: 1.0 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 Since commit 04c8b0f82c7d ("irqchip/gic: Make locking a BL_SWITCHER only feature") coupled CPU idle freezes from time to time on Exynos4210. Later commit 313c8c16ee62 ("PM / CPU: replace raw_notifier with atomic_notifier") changed the context in which the CPU idle code is executed, what results in fully reproducible freeze all the time. However, almost the same coupled CPU idle code works fine on Exynos3250 regarless of the changes made in the mentioned commits. It turned out that the IPI call used on Exynos4210 is conflicting with the change done in the first mentioned commit in GIC. Fix this by using the same code path as for Exynos3250, instead of the IPI call for synchronization with second CPU core, call dsb_sev() directly. Tested on Exynos4210-based Trats and Origen boards. Signed-off-by: Marek Szyprowski CC: stable@vger.kernel.org # v4.13+ Acked-by: Marc Zyngier Acked-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/pm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index dc4346ecf16d..a1055a2b8d54 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -271,11 +271,7 @@ static int exynos_cpu0_enter_aftr(void) goto fail; call_firmware_op(cpu_boot, 1); - - if (soc_is_exynos3250()) - dsb_sev(); - else - arch_send_wakeup_ipi_mask(cpumask_of(1)); + dsb_sev(); } } fail: