ACK: [PATCH 5/6] acpi: s4: force enable /sys/power/pm_debug_messages (LP: #1772563)
Alex Hung
alex.hung at canonical.com
Fri Jun 8 01:12:42 UTC 2018
On 2018-06-07 07:05 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Some kernels may not have this set to 1 to get PM debug messages
> for the S4 cycle, so force enable it on and then restore it back
> after the test.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/s4/s4.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index cf72851a..2e458d3e 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -365,6 +365,7 @@ static int s4_test_multiple(fwts_framework *fw)
> int delta = (int)(s4_delay_delta * 1000.0);
> int tracing_buffer_size = -1;
> int ret = FWTS_OK;
> + int pm_debug;
> bool retried = false;
>
> #if FWTS_ENABLE_LOGIND
> @@ -374,6 +375,9 @@ static int s4_test_multiple(fwts_framework *fw)
> #endif
> #endif
>
> + (void)fwts_pm_debug_get(&pm_debug);
> + (void)fwts_pm_debug_set(1);
> +
> if (s4_multiple == 1)
> fwts_log_info(fw, "Defaulted to run 1 test, run --s4-multiple=N to run more S4 cycles\n");
>
> @@ -450,6 +454,10 @@ static int s4_test_multiple(fwts_framework *fw)
> }
> }
>
> + /* Restore pm debug value */
> + if (pm_debug != -1)
> + (void)fwts_pm_debug_set(pm_debug);
> +
> if (tracing_buffer_size > 0) {
> char tmp[32];
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list