Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2472537pxj; Mon, 10 May 2021 03:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp4letfibXcsFcIilnm6paiaq89/16/kaA4zhorLGk6wWhnf4z6cQ3kd1Z0CDF2E/eda1M X-Received: by 2002:a05:6e02:156c:: with SMTP id k12mr20708764ilu.49.1620644254400; Mon, 10 May 2021 03:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644254; cv=none; d=google.com; s=arc-20160816; b=02E7HR+lptZdWBdUoRgmWg4LKid4McOMAL9dAMFG0M0Z6qvekhdE26JkoMXZf9PGGR pakTb2jMV2rLmn9m/2tqIqwzh5d/NVD1bfiCtQyGlEv5hew8u8oouZ5+/qwKj7Pkak/1 3FIoeXcbSfcIkXM+lV0fq0HhFPtWzpzX/mdvKZPfPXh2mdfPo0busV1ACrsazPgXkynl BTF4qCDIgTuQKV/HEGVlbdZAj91ajCa7XWNestyJf+57tUYtPNkE7imgU0DTd7VnB4Fv nVT8dP8rXeb98CZJgtcksRCp6pg2LtWHjLBDUdEeGksFAKQlZDT+8havlR4vixA6R7Cy L4Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rEwRp9gP+4DP+PmH+VFzq0M9l5Dd+iF3P5wUvzD+W+E=; b=t7VPYcB0Rj8KtnBOmGPQvYGIOaYr/DxMmXz2AxNTtOHm197FQd0u4vZS3umnx38GCp q8gX43VURHUlKPQY+5iMEKZUrzMRUptse4IHJcpKIMn+ohjsKZ4aojIbUUHLxOfBMR08 AoBRw8XWNp9yHLwKeY9xcIk5Og3zp9pirOY7VPeVIRCUAzOJ24M1XoZBWKRa1pq/XRA1 d4A/xJHQzBupBdQq8L9LWstrroNfVcAexDD96ABHFGWWGgzvj4G+cuy9T+L+L9FIF5Ei GrI43Wr8nn72UdKTpDJai0SmTbPuB+XASBK1LGk+za9Oo44r3+kNwN1o8E8qlpWrtM9r jslg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ks4qUtQQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si17281740ils.49.2021.05.10.03.57.22; Mon, 10 May 2021 03:57:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ks4qUtQQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234322AbhEJK4N (ORCPT + 99 others); Mon, 10 May 2021 06:56:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:59618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232984AbhEJKo4 (ORCPT ); Mon, 10 May 2021 06:44:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4EBFC610C9; Mon, 10 May 2021 10:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642867; bh=thT2zXXSLEyJO8vrhb/pHhr0VBGcHpreWczWqA3O9VA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ks4qUtQQoq7FTTmqtxA5oG6ZrI9vTk+R+l8BNXn6bTLvohdw3ocfwHHFIyh+hxHyM cVFQlkUITcHm3YK8DmxEzX+B48M59SZGLZAMTGowZU4pIKyCYP+kWp3t7phEo8xJ/O Vqc/iCZGaVYvEX4eTsJ4Mgw6xEig4u2Zp2ITEUvI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Daniel Lezcano , Anton Bambura , Matt Merhar , Peter Geis Subject: [PATCH 5.10 050/299] cpuidle: tegra: Fix C7 idling state on Tegra114 Date: Mon, 10 May 2021 12:17:27 +0200 Message-Id: <20210510102006.525907959@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko commit 32c8c34d8132b5fe8497c2538597445a0d65c29d upstream. Trusted Foundation firmware doesn't implement the do_idle call and in this case suspending should fall back to the common suspend path. In order to fix this issue we will unconditionally set the NOFLUSH_L2 mode via firmware call, which is a NO-OP on Tegra30/124, and then proceed to the C7 idling, like it was done by the older Tegra114 cpuidle driver. Fixes: 14e086baca50 ("cpuidle: tegra: Squash Tegra114 driver into the common driver") Cc: stable@vger.kernel.org # 5.7+ Reported-by: Anton Bambura # TF701 T114 Tested-by: Anton Bambura # TF701 T114 Tested-by: Matt Merhar # Ouya T30 Tested-by: Peter Geis # Ouya T30 Signed-off-by: Dmitry Osipenko Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210302095405.28453-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/cpuidle/cpuidle-tegra.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/cpuidle/cpuidle-tegra.c +++ b/drivers/cpuidle/cpuidle-tegra.c @@ -135,13 +135,13 @@ static int tegra_cpuidle_c7_enter(void) { int err; - if (tegra_cpuidle_using_firmware()) { - err = call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2); - if (err) - return err; + err = call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2); + if (err && err != -ENOSYS) + return err; - return call_firmware_op(do_idle, 0); - } + err = call_firmware_op(do_idle, 0); + if (err != -ENOSYS) + return err; return cpu_suspend(0, tegra30_pm_secondary_cpu_suspend); }