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: 132201 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1920612ljb; Wed, 21 Mar 2018 02:45:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELsCvHhgCbOXg5Pn2XOISNQixwhCioOAjwsLmLF0pVjaEPhTMc2JmODZgYvB7Xg0SHzmtq3O X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr14656562pld.149.1521625532893; Wed, 21 Mar 2018 02:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521625532; cv=none; d=google.com; s=arc-20160816; b=yvljq0L0MLINYkYB2xSJVe4817IC0Kuku9Nnlu154u9nk7pGin0GNm61temMPYXxLg nYg2i1dFuu+yte0R59HvNXBrLx4H+ZL3MfwYRmsPZy2FaKrcBdaCKsf1lTtZouldoe+E D/26RcS/vrM6EeiLD/UGSBQBW62yOitz1D2D6lWgjMOryC+Ubb3XnZ0bV3h+ohQ+wugo nzwSDhhwY9nZ7T4iZ8jPZzhPwi3j00QJZtoudVCnzxl/8e7p5rl3zFaKjmbuJG2IBLJs z0UJV2Bt8Xb3g4l7RXQGCkADIugxzDSm5XWjt6jEv3yr/9MNOqZqFnxEvVW8wwGaoc+m fM/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=7OUzj7C/e7B7nSM9klELu7OaC4V/nSshk3AfiGMMu5g=; b=BrSYiapYxsD/yeYA3bLiuIP5SGxHNzuygBq9oUZWescZmPc57Gnj0jIxn91mTNQYjP qaJx+JAPkuuhvPhzcU9OExpTdSGP4YhzmXm9KNQ8a5mqHofbjOQKCf+VuKaP/gAS7HnH c89l8Zyx1uAxpnW2Se0QYQi4nw32QCxnL0unnrNIxzsuMTiLSeqqlRZqMExjFuU396+C DdwbhK2Umoequsgu9157CZSO/F96OWedVqjNxohf45t/VKb58WDNeSTCaQe+YQXtY0hO yd86Ugpx1Zn4J0J4Z7ZtLojk42jaBq+t7HFD++DGR2MyfSZXR4AHhztYSFCUskoPMm6U +HpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=KI0ewaNk; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t65si2579611pgc.343.2018.03.21.02.45.32; Wed, 21 Mar 2018 02:45:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=KI0ewaNk; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbeCUJpc (ORCPT + 3 others); Wed, 21 Mar 2018 05:45:32 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50157 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeCUJpa (ORCPT ); Wed, 21 Mar 2018 05:45:30 -0400 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 Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Daniel Lezcano , "Rafael J . Wysocki" , Marc Zyngier , stable@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+dNcgHsUVw2Kak5mWWpRfp2CVwZP3//YytYw12xYck5 pgbGpZxdjJwcEgImEr0PJjN1MXJxCAmsYJR41HeSHcL5zCjxvOcvG0zVsvvvWSASyxglJh5Y CdXSwCTxcsVVZpAqNgFDia63XWAdIgLpEvf+LgEbxSywnEni1cwHYEXCAu4SS1b8ZwWxWQRU JX4vmsXYxcjBwStgK7H4kAfENnmJxd93soH0SghMYZOYv76FFSLhIrHmzi8WCFtY4tXxLewQ tozE5cndUPF6ib7vR5ggmnsYJfa2TGWCSFhLHD5+EWwQswCfxKRt05lBFksI8Ep0tAlBlHhI 7Jt8jRnCdpSYcW0n2EwhgViJeT8Ps09glFzAyLCKUTy1tDg3PbXYOC+1XK84Mbe4NC9dLzk/ dxMjMF5P/zv+dQfjvj9JhxgFOBiVeHgtxDZGCbEmlhVX5h5ilOBgVhLh3fYZKMSbklhZlVqU H19UmpNafIhRmoNFSZw3TqMuSkggPbEkNTs1tSC1CCbLxMEp1cB4XE1mbTKPypKHUq6uB/Y8 uy/lzux6L0WTTdolZa95jHqNZpvPneR/BgyGi8KXfuxapVhY5X71uF3eienyKx14ZErtl5W6 TGWfy37FN/uJXE5Re4d3U4ucN5OSU6P+4TPnhKRmJdtq7NPsUG9ue1Dhtm91oPmDv0rsj/am fVR25f8h9X7qDCWW4oxEQy3mouJEALBHnWPTAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjluLIzCtJLcpLzFFi42I5/e/4Vd3NmpuiDKZMl7DYOGM9q8W8z7IW 589vYLfY9Pgaq8Xn3iOMFjPO72OyWHvkLrvF3zv/2CzOnL7EarFg4yNGBy6PNfPWMHpsWtXJ 5nHn2h42j81L6j22XG1n8ejbsorR4/MmuQD2KC6blNSczLLUIn27BK6Mn7//sRWs4a7YsOQc UwPjUs4uRk4OCQETiWX337N0MXJxCAksYZR4dewIO4TTxCQxedk+ZpAqNgFDia63XWwgtohA usSfMzeYQYqYBVYySaycuYIdJCEs4C6xZMV/VhCbRUBV4veiWYxdjBwcvAK2EosPeUBsk5dY /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: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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+ --- arch/arm/mach-exynos/pm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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: