Message ID | 20190504040533.29227-1-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | cpufreq: change from abort to skip when cpufreq cannot run | expand |
On 04/05/2019 05:05, Alex Hung wrote: > Starting from SandyBridge+, intel_pstate is used and cpufreq cannot be > run by default kernel config. Therefore, changing warning messages to > info and skip cpufreq test instead of abort. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/cpu/cpufreq/cpufreq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c > index f43a5f60..60101f29 100644 > --- a/src/cpu/cpufreq/cpufreq.c > +++ b/src/cpu/cpufreq/cpufreq.c > @@ -106,7 +106,7 @@ static int cpu_set_governor(fwts_framework *fw, struct cpu *cpu, > > out: > if (rc != FWTS_OK) > - fwts_warning(fw, "Cannot set CPU %d governor to %s.", > + fwts_log_info(fw, "Cannot set CPU %d governor to %s.", > cpu->idx, governor); > return rc; > } > @@ -849,10 +849,10 @@ static int cpufreq_init(fwts_framework *fw) > rc = cpu_set_governor(fw, &cpus[i], "userspace"); > > if (rc != FWTS_OK) { > - fwts_log_warning(fw,"Failed to initialize cpufreq " > + fwts_log_info(fw, "Cannot initialize cpufreq " > "to set CPU speed for CPU %d", i); > cpufreq_settable = false; > - return FWTS_ERROR; > + return FWTS_SKIP; > } > } > > Yep. Makes a lot of sense. Acked-by: Colin Ian King <colin.king@canonical.com>
On 5/4/19 12:05 PM, Alex Hung wrote: > Starting from SandyBridge+, intel_pstate is used and cpufreq cannot be > run by default kernel config. Therefore, changing warning messages to > info and skip cpufreq test instead of abort. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/cpu/cpufreq/cpufreq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c > index f43a5f60..60101f29 100644 > --- a/src/cpu/cpufreq/cpufreq.c > +++ b/src/cpu/cpufreq/cpufreq.c > @@ -106,7 +106,7 @@ static int cpu_set_governor(fwts_framework *fw, struct cpu *cpu, > > out: > if (rc != FWTS_OK) > - fwts_warning(fw, "Cannot set CPU %d governor to %s.", > + fwts_log_info(fw, "Cannot set CPU %d governor to %s.", > cpu->idx, governor); > return rc; > } > @@ -849,10 +849,10 @@ static int cpufreq_init(fwts_framework *fw) > rc = cpu_set_governor(fw, &cpus[i], "userspace"); > > if (rc != FWTS_OK) { > - fwts_log_warning(fw,"Failed to initialize cpufreq " > + fwts_log_info(fw, "Cannot initialize cpufreq " > "to set CPU speed for CPU %d", i); > cpufreq_settable = false; > - return FWTS_ERROR; > + return FWTS_SKIP; > } > } > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c index f43a5f60..60101f29 100644 --- a/src/cpu/cpufreq/cpufreq.c +++ b/src/cpu/cpufreq/cpufreq.c @@ -106,7 +106,7 @@ static int cpu_set_governor(fwts_framework *fw, struct cpu *cpu, out: if (rc != FWTS_OK) - fwts_warning(fw, "Cannot set CPU %d governor to %s.", + fwts_log_info(fw, "Cannot set CPU %d governor to %s.", cpu->idx, governor); return rc; } @@ -849,10 +849,10 @@ static int cpufreq_init(fwts_framework *fw) rc = cpu_set_governor(fw, &cpus[i], "userspace"); if (rc != FWTS_OK) { - fwts_log_warning(fw,"Failed to initialize cpufreq " + fwts_log_info(fw, "Cannot initialize cpufreq " "to set CPU speed for CPU %d", i); cpufreq_settable = false; - return FWTS_ERROR; + return FWTS_SKIP; } }
Starting from SandyBridge+, intel_pstate is used and cpufreq cannot be run by default kernel config. Therefore, changing warning messages to info and skip cpufreq test instead of abort. Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/cpu/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)