archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <>
To: Linux PM <>
Cc: LKML <>, Kees Cook <>
Subject: [PATCH] cpuidle: governor: Add new governors to cpuidle_governors again
Date: Tue, 12 Mar 2019 19:13:13 +0100	[thread overview]
Message-ID: <5539737.TtKXfUnNfs@aspire.rjw.lan> (raw)

From: Rafael J. Wysocki <>

After commit 61cb5758d3c4 ("cpuidle: Add cpuidle.governor= command
line parameter") new cpuidle governors are not added to the list
of available governors, so governor selection via sysfs doesn't
work as expected (even though it is rarely used anyway).

Fix that by making cpuidle_register_governor() add new governors to
cpuidle_governors again.

Fixes: 61cb5758d3c4 ("cpuidle: Add cpuidle.governor= command line parameter")
Reported-by: Kees Cook <>
Cc: 5.0+ <> # 5.0+
Signed-off-by: Rafael J. Wysocki <>
 drivers/cpuidle/governor.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-pm/drivers/cpuidle/governor.c
--- linux-pm.orig/drivers/cpuidle/governor.c
+++ linux-pm/drivers/cpuidle/governor.c
@@ -89,6 +89,7 @@ int cpuidle_register_governor(struct cpu
 	if (__cpuidle_find_governor(gov->name) == NULL) {
 		ret = 0;
+		list_add_tail(&gov->governor_list, &cpuidle_governors);
 		if (!cpuidle_curr_governor ||
 		    !strncasecmp(param_governor, gov->name, CPUIDLE_NAME_LEN) ||
 		    (cpuidle_curr_governor->rating < gov->rating &&

                 reply	other threads:[~2019-03-12 18:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \
    --in-reply-to=5539737.TtKXfUnNfs@aspire.rjw.lan \ \ \ \ \
    --subject='Re: [PATCH] cpuidle: governor: Add new governors to cpuidle_governors again' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox