From patchwork Wed Mar 21 09:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10299017 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 6577C600F6 for ; Wed, 21 Mar 2018 09:46:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54FA429783 for ; Wed, 21 Mar 2018 09:46:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49AFE297A0; Wed, 21 Mar 2018 09:46: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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5A6C29173 for ; Wed, 21 Mar 2018 09:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbeCUJq4 (ORCPT ); Wed, 21 Mar 2018 05:46:56 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:34409 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbeCUJqy (ORCPT ); Wed, 21 Mar 2018 05:46:54 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180321094652euoutp02471643d54c12a46702852077ea968288~d5m7QPJRw1032310323euoutp02W; Wed, 21 Mar 2018 09:46:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180321094652euoutp02471643d54c12a46702852077ea968288~d5m7QPJRw1032310323euoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521625612; bh=ZxICYYbjaHD2qxV/yg11sLt0niojgz9UCS1rgn8naos=; h=From:To:Cc:Subject:Date:References:From; b=jnRdwNfBQI7+KHwgX5MI8oc33dnSUR2e1oMHAN4ajrrvybADGuEnuOBdTEdecjJZl bAMU4/iw2++QEEcu70VuPulGHjR3N73HACzRVzxppot8CkQ8DiYIX5Jse2b88xc+Xc CIRIfKRLLX2etjSHkfIKTf0RwZR2WnXHbWQdxi08= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180321094652eucas1p1a3e937e996e36075457f1875782828c3~d5m6o0qy62432524325eucas1p1f; Wed, 21 Mar 2018 09:46:52 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 98.A2.05700.B0A22BA5; Wed, 21 Mar 2018 09:46:51 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180321094651eucas1p21fd3df07a02f015eee413ab77c637fe9~d5m5ySJGZ0354903549eucas1p2E; Wed, 21 Mar 2018 09:46:51 +0000 (GMT) X-AuditID: cbfec7f2-5ffe19c000011644-27-5ab22a0b8124 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 2D.10.04183.B0A22BA5; Wed, 21 Mar 2018 09:46:51 +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 <0P5X007TAPTYGS60@eusync3.samsung.com>; Wed, 21 Mar 2018 09:46:51 +0000 (GMT) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Daniel Lezcano , "Rafael J . Wysocki" Subject: [PATCH] ARM: EXYNOS: Simplify code in coupled CPU idle hot path Date: Wed, 21 Mar 2018 10:46:39 +0100 Message-id: <20180321094639.25565-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWy7djP87rcWpuiDPYu1bbYOGM9q8W8z7IW 589vYLf43HuE0WLG+X1MFmuP3GW3OHP6EqsDu8emVZ1sHneu7WHz2HK1ncWjb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mjbf/cBSMIejYu+VXywNjF/Yuhg5OSQETCRmbJ8JZHNxCAmsYJR4 dvsLO4TzmVFi2fSp7DBVSy5MZIZILGOUmDp9GhOE08AksfLYa0aQKjYBQ4mut11gc0UE7CXm bpsMVsQs8IJR4s4tEIeTQ1jAQ+LY6h0sIDaLgKrEnEWnwBp4BWwlVp/8wgixTl5i8fedYEdJ CLxklZj9qpcJIuEicXtRJ9RNwhKvjm+BsmUkLk/uZoGw6yX6vh9hgmjuYZTY2zIVqtla4vDx i6wgNrMAn8SkbdOBHuIAivNKdLQJQZR4SPx4cZQZwnaUmPl0Ddh8IYFYiel3fjJNYJRcwMiw ilE8tbQ4Nz212DAvtVyvODG3uDQvXS85P3cTIzACT/87/mkH49dLSYcYBTgYlXh4LcQ2Rgmx JpYVV+YeYpTgYFYS4d32GSjEm5JYWZValB9fVJqTWnyIUZqDRUmcN06jLkpIID2xJDU7NbUg tQgmy8TBKdXAGBmuv108/Fsw4+ksm+ilrgVOx//Z6u7uPC7itu74KYXEnsb6+b1TG02l5u06 KNimpCBcHBwSVPry9MuEOrHWKTsdyuetUmX6VCN78KR8xZl/PKd/vZRb8qXPdP9LyfmeIn+K X+hUddjJd248t/WhQ2f03cZqP8XXs+4G+J+b59nh8O3Oi1+rlFiKMxINtZiLihMBGJtQurwC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPJMWRmVeSWpSXmKPExsVy+t/xq7rcWpuiDM68ZbXYOGM9q8W8z7IW 589vYLf43HuE0WLG+X1MFmuP3GW3OHP6EqsDu8emVZ1sHneu7WHz2HK1ncWjb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mjbf/cBSMIejYu+VXywNjF/Yuhg5OSQETCSWXJjI3MXIxSEksIRR 4veBPhYIp4lJYsf5JywgVWwChhJdb7vAOkQE7CXmbpvMBFLELPCKUeLGnW+MIAlhAQ+JY6t3 gDWwCKhKzFl0CqyBV8BWYvXJL4wQ6+QlFn/fyTaBkWsBI8MqRpHU0uLc9NxiI73ixNzi0rx0 veT83E2MwGDYduznlh2MXe+CDzEKcDAq8fBaiG2MEmJNLCuuzD3EKMHBrCTCu+0zUIg3JbGy KrUoP76oNCe1+BCjNAeLkjjveYPKKCGB9MSS1OzU1ILUIpgsEwenVANjvaEJ257bzfyR689P s3n/NW6J3o5H+29n52TG82v9mMBeZrB8vrXJltdfWJbEZ8V4/7PQ7JIzceRNPxB3c6f161Om C3X5Nct413sknrmhdXfr6RXf5W9F71v8xn/ppUWCU0+w2oo8/SHl9uXHh5jcw4ezLvNGcUz/ kbz972nbGQznBcWiVnBxKLEUZyQaajEXFScCAGOzYnsCAgAA X-CMS-MailID: 20180321094651eucas1p21fd3df07a02f015eee413ab77c637fe9 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180321094651eucas1p21fd3df07a02f015eee413ab77c637fe9 X-RootMTR: 20180321094651eucas1p21fd3df07a02f015eee413ab77c637fe9 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP exynos_enter_aftr() is called by coupled CPU idle code every time CPU enters idle state, what can be considered as a hot path. Replace of_machine_is_compatible() call with a simple SoC revision check. of_machine_is_compatible() function performs a dozen of string comparisons during the full device tree walk, while soc_is_exynos4412() is a simple integer check on SoC revision variable. Signed-off-by: Marek Szyprowski Acked-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index a1055a2b8d54..a822c5073715 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -163,7 +163,7 @@ void exynos_enter_aftr(void) exynos_pm_central_suspend(); - if (of_machine_is_compatible("samsung,exynos4412")) { + if (soc_is_exynos4412()) { /* Setting SEQ_OPTION register */ pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0, S5P_CENTRAL_SEQ_OPTION);