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: 132202 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1921731ljb; Wed, 21 Mar 2018 02:46:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELuocMxjZXD5k6lygiMa8dfs31b6u78GSqSji0rw4RRt7KGeDCl3NK9Q2p104oPKd3W7y8Je X-Received: by 2002:a17:902:51ce:: with SMTP id y72-v6mr19753957plh.157.1521625616879; Wed, 21 Mar 2018 02:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521625616; cv=none; d=google.com; s=arc-20160816; b=dqf/yXLppR9++A8aqjOU/fXgi4mFrhPz2Qf1VLQace2HxNs9w9kPXDUcQdzeAyGJf+ mUvB1kn3k4+XaX3tM4O6kuYI02COYvZSfSKV5CfvjGPdgKw5/qpPMV91aAa69kZjOGFO MGCZw53LhsM7Dp8sIv3x5DsEGpzy/vluVkaL22IKY3TcTLm+8e1mEEAKUGa+UsIZ21M/ M+9Wo7WM9FSi+StBZaLJW7+LUAr718gkT4/Kg1NjbX1/JuHQsnT0w5Fs25a6nMMxvzwo b3u0y6XSculhGC1woQjcdDCCe0hniLnt285CUVb2p6kdXyIQtmm1gYK+fE551qRR5Ge8 Xv0Q== 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=zwM+N52pvYTrOVazhaSP4C/ItFYytVsNZ4r/8gZ4V0Y=; b=mLfSFvEVYR7ibhFr07dIa8+qTAyJrstRvEbErYkvH+6IHYFM2OPcjs/YdptHzni4Hp Rw0Xz7HKEOQNofr8LZUvwPA6Ctgjl12dh8oM5uZ5UOgOWmC4jxhor1y6CKNuVNQETYOx izm6ZI18vWF3FOX8OLzIBvtRw7KlqbsqRLTy/my8/pCp79ukEjodDn9pC4gDepv2dJg/ xFB8XzAVIrm5ITYctlGWlic7eTAE9Y7z8+iS5Xwa2+uHABLF0FFnz2fA28x0RpXHPfhd 0MmHIX+7+akZYRN0HDYv5PbvD0hT3hXz0C/fEJ4K8o3agJl7nnLiBpvEqDmfbjfO1PYm TazA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=jnRdwNfB; 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 o33-v6si3590967plb.369.2018.03.21.02.46.56; Wed, 21 Mar 2018 02:46:56 -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=jnRdwNfB; 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 S1751594AbeCUJq4 (ORCPT + 3 others); 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 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 --- arch/arm/mach-exynos/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 Acked-by: Bartlomiej Zolnierkiewicz 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);