ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs
PATCH 1/1 ACPI: processor: idle: expose max_cstate/nocst/bm_check_disable read-only in sysfs
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 <[email protected]>
--- drivers/acpi/processor_idle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/acpi/processor_idle.c +5 -5
@@ -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 );
Signature · 1 line
2.25.1
Quoted 24 lines · 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 <[email protected]>--- drivers/acpi/processor_idle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/acpi/processor_idle.c +0
-4@@ -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 ;
drivers/acpi/processor_idle.c
Quoted 10 lines
drivers/acpi/processor_idle.c +5
-2-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!