All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 00/19] Consolidate and improve NVIDIA Tegra CPUIDLE driver(s)
Date: Sat, 7 Dec 2019 20:31:28 +0100	[thread overview]
Message-ID: <20191207193128.GB19924@qmqm.qmqm.pl> (raw)
In-Reply-To: <20191203004116.11771-1-digetx@gmail.com>

On Tue, Dec 03, 2019 at 03:40:57AM +0300, Dmitry Osipenko wrote:
> Hello,
> 
> This series does the following:
> 
>   1. Unifies Tegra20/30/114 drivers into a single driver and moves it out
>      into common drivers/cpuidle/ directory.
> 
>   2. Enables CPU cluster power-down idling state on Tegra30.
> 
> In the end there is a quite nice clean up of the Tegra CPUIDLE drivers
> and of the Tegra's arch code in general. Please review, thanks!
> 
> Changelog:
> 
> v8: - Rebased on recent linux-next, now making use of
>       cpuidle_driver_state_disabled(). [...]

Dear Dmitry

This rebase was not complete, at least in patch 14 direct access to
.disabled field (now removed in Linus' master) are left. The fixups
needed are below (only compile-tested for now).

Best Regards,
Michał Mirosław

diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c
index 077ff15e32fb..2d325d3aab57 100644
--- a/drivers/cpuidle/cpuidle-tegra.c
+++ b/drivers/cpuidle/cpuidle-tegra.c
@@ -306,13 +306,12 @@ static struct cpuidle_driver tegra_idle_driver = {
  */
 void tegra_cpuidle_pcie_irqs_in_use(void)
 {
-	if (tegra_idle_driver.states[TEGRA_CC6].disabled ||
+	if ((tegra_idle_driver.states[TEGRA_CC6].flags & CPUIDLE_FLAG_UNUSABLE) &&
 	    tegra_get_chip_id() != TEGRA20)
 		return;
 
 	pr_info("disabling CC6 state, since PCIe IRQs are in use\n");
 	cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_CC6, true);
-	tegra_idle_driver.states[TEGRA_CC6].disabled = true;
 }
 
 static void tegra_cpuidle_setup_tegra114_c7_state(void)
@@ -328,7 +327,7 @@ static int tegra_cpuidle_probe(struct platform_device *pdev)
 {
 	/* LP2 could be disabled in device-tree */
 	if (tegra_pmc_get_suspend_mode() < TEGRA_SUSPEND_LP2)
-		tegra_idle_driver.states[TEGRA_CC6].disabled = true;
+		cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_CC6, true);
 
 	/*
 	 * Required suspend-resume functionality, which is provided by the
@@ -337,9 +336,9 @@ static int tegra_cpuidle_probe(struct platform_device *pdev)
 	 */
 	if (!IS_ENABLED(CONFIG_PM_SLEEP)) {
 		if (!tegra_cpuidle_using_firmware())
-			tegra_idle_driver.states[TEGRA_C7].disabled = true;
+			cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_C7, true);
 
-		tegra_idle_driver.states[TEGRA_CC6].disabled = true;
+		cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_CC6, true);
 	}
 
 	/*
@@ -349,7 +348,7 @@ static int tegra_cpuidle_probe(struct platform_device *pdev)
 	switch (tegra_get_chip_id()) {
 	case TEGRA20:
 		/* Tegra20 isn't capable to power-off individual CPU cores */
-		tegra_idle_driver.states[TEGRA_C7].disabled = true;
+		cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_C7, true);
 		break;
 	case TEGRA30:
 		break;
@@ -358,7 +357,7 @@ static int tegra_cpuidle_probe(struct platform_device *pdev)
 		tegra_cpuidle_setup_tegra114_c7_state();
 
 		/* coupled CC6 (LP2) state isn't implemented yet */
-		tegra_idle_driver.states[TEGRA_CC6].disabled = true;
+		cpuidle_driver_state_disabled(&tegra_idle_driver, TEGRA_CC6, true);
 		break;
 	default:
 		return -EINVAL;

  parent reply	other threads:[~2019-12-07 19:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  0:40 [PATCH v8 00/19] Consolidate and improve NVIDIA Tegra CPUIDLE driver(s) Dmitry Osipenko
2019-12-03  0:40 ` [PATCH v8 01/19] ARM: tegra: Compile sleep-tegra20/30.S unconditionally Dmitry Osipenko
2019-12-03  0:40 ` [PATCH v8 02/19] ARM: tegra: Add tegra_pm_park_secondary_cpu() Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 03/19] ARM: tegra: Remove pen-locking from cpuidle-tegra20 Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 04/19] ARM: tegra: Change tegra_set_cpu_in_lp2() type to void Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 05/19] ARM: tegra: Propagate error from tegra_idle_lp2_last() Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 06/19] ARM: tegra: Expose PM functions required for new cpuidle driver Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 07/19] ARM: tegra: Rename some of the newly exposed PM functions Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 08/19] ARM: tegra: Make outer_disable() open-coded Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 09/19] arm: tegra20: cpuidle: Handle case where secondary CPU hangs on entering LP2 Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 10/19] arm: tegra20: cpuidle: Make abort_flag atomic Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 11/19] arm: tegra20/30: cpuidle: Remove unnecessary memory barrier Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 12/19] cpuidle: Avoid NULL dereference in cpuidle_driver_state_disabled() Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 13/19] cpuidle: Refactor and move out NVIDIA Tegra20 driver into drivers/cpuidle Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 14/19] cpuidle: tegra: Squash Tegra30 driver into the common driver Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 15/19] cpuidle: tegra: Support CPU cluster power-down state on Tegra30 Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 16/19] cpuidle: tegra: Squash Tegra114 driver into the common driver Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 17/19] cpuidle: tegra: Disable CC6 state if LP2 unavailable Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 18/19] ARM: multi_v7_defconfig: Enable Tegra cpuidle driver Dmitry Osipenko
2019-12-03  0:41 ` [PATCH v8 19/19] ARM: tegra: Enable Tegra cpuidle driver in tegra_defconfig Dmitry Osipenko
2019-12-07 19:31 ` Michał Mirosław [this message]
2019-12-07 22:56   ` [PATCH v8 00/19] Consolidate and improve NVIDIA Tegra CPUIDLE driver(s) Dmitry Osipenko
2019-12-07 21:52 ` Michał Mirosław
2019-12-07 22:56   ` Dmitry Osipenko
2019-12-09 16:04     ` Michał Mirosław
2019-12-09 21:22       ` Dmitry Osipenko
2019-12-10  2:35         ` Michał Mirosław
2019-12-10 16:02           ` Dmitry Osipenko
2019-12-10 16:21             ` Dmitry Osipenko
2019-12-18  7:10               ` Dmitry Osipenko
2019-12-11  8:51 ` Peter De Schrijver
2019-12-11  8:51   ` Peter De Schrijver
2019-12-12  1:58   ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191207193128.GB19924@qmqm.qmqm.pl \
    --to=mirq-linux@rere.qmqm.pl \
    --cc=daniel.lezcano@linaro.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=rjw@rjwysocki.net \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.