From patchwork Thu Jul 11 03:13:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11039235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A82A0912 for ; Thu, 11 Jul 2019 03:14:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9729028A6B for ; Thu, 11 Jul 2019 03:14:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B70A28A6A; Thu, 11 Jul 2019 03:14:51 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35C8E28A68 for ; Thu, 11 Jul 2019 03:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cdou13HUWsHiRafdeRfWIvm/kQwi9QelRSH95AyuPhs=; b=owRMYcbOXfPO6C UgKlz2kNEFIUOagskjejRyLTFUebZWslJ3meOLglhD2zJQe0X7XiZgqnBOth7JSlyMwzwiq1OS7Ie XQ4mtisWZ8iJJqW1TlbbC7PLA2X+tuWAbclo2QRy4bQkRz68OPoP2wbROjrpmVGfl+65bY/toVBvy hzqZsAPJYrbj3FMl0BlqvydXDcP9d7ztK5KeDtRcNJtioZ37sr4B3nKa7tPz98jOILgmSTp/9RqdU ndaunMks8x9KcehDdryz6ag6hbzf5jZNOBCLFeosuuhhTz3qdWrPGogQmw55/adRZOIj622oqNRo4 rbWq2dsaZl5C8SBpOOZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlPXl-0002uz-LU; Thu, 11 Jul 2019 03:14:49 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlPWe-0002AE-Hs for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2019 03:13:42 +0000 Received: by mail-lj1-x242.google.com with SMTP id h10so4197996ljg.0 for ; Wed, 10 Jul 2019 20:13:40 -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=K+NV7l4eDK/Px9X4j71WiZo60cuvvlzAtbrjPfGXJZf4yNNZf3R9QmpO+UyGWdPDph bPrmKdSuZ0WmAMAaxqeFFx5wmIxCqUk9swtuQ9fiFqZ72ED6DRO+E9hXacZCpDPISvo+ tSOW6wazenn6g2894XKoWbabckDbLf7zyi++1fDtle57rFfsUMa9cEJhhHLSGvGF3l62 v9ZWXJJZtnZYDvustTBGaz45XqzJ6aunRw/Fi4PCZvpRr5kUiKwMl5x1GTu8ibrInQxJ xkr5MhXkWh6tpWWU6AsPZg5OKuTDZodSEYr3AJ1FZVKTn7OPrJPYHd6kflYpBDt6jdHq t53A== X-Gm-Message-State: APjAAAUSUs7xMY1b4HEfgqny7ukqCd7jkdzzi5e+FPeIcC4HquFL3c1O fthCHk8HLB689W5+Nw552x4= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190710_201340_743222_A0231459 X-CRM114-Status: GOOD ( 14.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: