* [PATCH] ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs
@ 2022-04-28 9:54 Yajun Deng
2022-05-06 18:47 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Yajun Deng @ 2022-04-28 9:54 UTC (permalink / raw)
To: rafael, lenb; +Cc: linux-acpi, linux-kernel, Yajun Deng
This patch exposes max_cstate/nocst/bm_check_disable in read-only sysfs.
This will allow super users to verify them when changed in grub.
The parameters "nocst/bm_check_disable" is only used to be enable/disable.
So change them from integer to bool.
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
drivers/acpi/processor_idle.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e9c84d0ac55b..6a5572a1a80c 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -38,11 +38,11 @@
#define ACPI_IDLE_STATE_START (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0)
static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
-module_param(max_cstate, uint, 0000);
-static unsigned int nocst __read_mostly;
-module_param(nocst, uint, 0000);
-static int bm_check_disable __read_mostly;
-module_param(bm_check_disable, uint, 0000);
+module_param(max_cstate, uint, 0400);
+static bool nocst __read_mostly;
+module_param(nocst, bool, 0400);
+static bool bm_check_disable __read_mostly;
+module_param(bm_check_disable, bool, 0400);
static unsigned int latency_factor __read_mostly = 2;
module_param(latency_factor, uint, 0644);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs
2022-04-28 9:54 [PATCH] ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs Yajun Deng
@ 2022-05-06 18:47 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-05-06 18:47 UTC (permalink / raw)
To: Yajun Deng
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List
On Thu, Apr 28, 2022 at 11:54 AM Yajun Deng <yajun.deng@linux.dev> wrote:
>
> This patch exposes max_cstate/nocst/bm_check_disable in read-only sysfs.
> This will allow super users to verify them when changed in grub.
>
> The parameters "nocst/bm_check_disable" is only used to be enable/disable.
> So change them from integer to bool.
>
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
> drivers/acpi/processor_idle.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index e9c84d0ac55b..6a5572a1a80c 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -38,11 +38,11 @@
> #define ACPI_IDLE_STATE_START (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0)
>
> static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
> -module_param(max_cstate, uint, 0000);
> -static unsigned int nocst __read_mostly;
> -module_param(nocst, uint, 0000);
> -static int bm_check_disable __read_mostly;
> -module_param(bm_check_disable, uint, 0000);
> +module_param(max_cstate, uint, 0400);
> +static bool nocst __read_mostly;
> +module_param(nocst, bool, 0400);
> +static bool bm_check_disable __read_mostly;
> +module_param(bm_check_disable, bool, 0400);
>
> static unsigned int latency_factor __read_mostly = 2;
> module_param(latency_factor, uint, 0644);
> --
Applied as 5.19 material with some edits in the changelog, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-06 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 9:54 [PATCH] ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs Yajun Deng
2022-05-06 18:47 ` Rafael J. Wysocki
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.