From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8C34C74A41 for ; Thu, 11 Jul 2019 03:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF47821019 for ; Thu, 11 Jul 2019 03:13:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ERMyB1Q4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728009AbfGKDNp (ORCPT ); Wed, 10 Jul 2019 23:13:45 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37210 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727906AbfGKDNl (ORCPT ); Wed, 10 Jul 2019 23:13:41 -0400 Received: by mail-lj1-f196.google.com with SMTP id z28so4197378ljn.4; Wed, 10 Jul 2019 20:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sFkiOd23q9EvJCGM6pGQ1kpqTDNZadVb1n2KsuaSyUw=; b=ERMyB1Q4XqTA31kKW7Ssb16HrXJwGgQYJJ1xQihR4GHlPleyQIWmHIM1Qv3bWwupRz DGYO3yW9gpM2MVQ3Cf2iPqz541oS6QJnT9J3xqsGwCeO24NdOSmIoLGUYam4y8UahI2L SSA3aGPxdelFefk/URt+/aSAuTfZLXclmsLV03H93weH1A9wo7H/77hEtDGSloYp728v K8yeNPZnTpL1nFjdAkW1ucQcCJtioDqCXc0xv53qRWC6eQxu7I2yEaCbD0QY7JSQd2Zh 2CfxM7OJdr2L5Smb2jnn7B1hvCwY9MxIfSKeqoH5URdSZlpAboeLMEGA0kXF7DnC4AM2 npuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sFkiOd23q9EvJCGM6pGQ1kpqTDNZadVb1n2KsuaSyUw=; b=o4EeCwZbSo5UU3UFkh0lPMCnb0SQSkfGjIGdVLqNGSmnqiFGGpfM7bqGsYvCHjRWir llOg95ku5uacVlcexXKuAVEve49kFJ/23uhboPsK4WsviPVsfkwU9C+7sirsvkkp4+CZ jTCATttUShQZXfRayLqUyaoFI4GgU5E6ell80gGZziiWy4q0seXNp17zn8/8FnO6JxW7 YzmSIy1rEFMQty3j5Sv1dlYfyxjGq7aD8ih3fDK0gv1I+54nWrGxMQcG/wNqFd+qJiWU kBxB77Tgm6CMD7PQzs5byffYbOCzLpFr1dabjbUbHi/dZliogZ4Aty2Z+vjSEkbuNpJr E45w== X-Gm-Message-State: APjAAAX4pDIb7o0OEdVsG43MoVtUgANqh7SsBHpsalFB8hA1wuAsKd17 AL2RJGKQ/otvCUnPqyC3+ZU= X-Google-Smtp-Source: APXvYqwERzyTA76rDln2OycEkk/XL9J2Jaz9orJC5T4/Jq0hdYJ4zYFK6CeGVmyNyRvHS/qKBJpPgw== X-Received: by 2002:a2e:86cc:: with SMTP id n12mr852397ljj.146.1562814819236; Wed, 10 Jul 2019 20:13:39 -0700 (PDT) Received: from localhost.localdomain (ppp79-139-233-208.pppoe.spdop.ru. [79.139.233.208]) by smtp.gmail.com with ESMTPSA id h84sm753915ljf.42.2019.07.10.20.13.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2019 20:13:38 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , "Rafael J. Wysocki" , Daniel Lezcano Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] cpuidle: tegra: Support CPU cluster power-down on Tegra30 Date: Thu, 11 Jul 2019 06:13:10 +0300 Message-Id: <20190711031312.10038-5-digetx@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190711031312.10038-1-digetx@gmail.com> References: <20190711031312.10038-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new CPU Idle driver has all necessary features in order to allow the deepest idling state on Tegra30 SoC where the whole CPU cluster is power-gated using the coupled idle state. Note that outer_disable() now need to be invoked directly since it produces erroneous warning message about secondary CPUs being online because it doesn't know that secondaries are turned off at that point by the cpuidle driver. Signed-off-by: Dmitry Osipenko --- arch/arm/mach-tegra/pm.c | 4 ++-- drivers/cpuidle/cpuidle-tegra.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index f9c9bce9e15d..cc941b0c97e8 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -146,8 +146,8 @@ static int tegra_sleep_cpu(unsigned long v2p) * if any of secondary CPU's is online and this is the LP2-idle * code-path only for Tegra20/30. */ - if (trusted_foundations_registered()) - outer_disable(); + if (trusted_foundations_registered() && outer_cache.disable) + outer_cache.disable(); /* * Note that besides of setting up CPU reset vector this firmware diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c index 54974cd2255f..1412c4b0f6ee 100644 --- a/drivers/cpuidle/cpuidle-tegra.c +++ b/drivers/cpuidle/cpuidle-tegra.c @@ -278,7 +278,6 @@ static int tegra_cpuidle_probe(struct platform_device *pdev) tegra_idle_driver.states[TEGRA_C7].disabled = true; break; case TEGRA30: - tegra_idle_driver.states[TEGRA_CC6].disabled = true; break; case TEGRA114: case TEGRA124: -- 2.22.0