diff mbox series

ARM: EXYNOS: Simplify code in coupled CPU idle hot path

Message ID 20180321094639.25565-1-m.szyprowski@samsung.com
State New
Headers show
Series ARM: EXYNOS: Simplify code in coupled CPU idle hot path | expand

Commit Message

Marek Szyprowski March 21, 2018, 9:46 a.m. UTC
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 <m.szyprowski@samsung.com>

---
 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

Comments

Bartlomiej Zolnierkiewicz March 21, 2018, 11:39 a.m. UTC | #1
On Wednesday, March 21, 2018 10:46:39 AM Marek Szyprowski wrote:
> 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 <m.szyprowski@samsung.com>


Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
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
Krzysztof Kozlowski March 21, 2018, 5:54 p.m. UTC | #2
On Wed, Mar 21, 2018 at 10:46:39AM +0100, Marek Szyprowski wrote:
> 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 <m.szyprowski@samsung.com>

> ---

>  arch/arm/mach-exynos/pm.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 


Thanks, applied.

Best regards,
Krzysztof

--
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 mbox series

Patch

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);