[PATCH] powerpc/pseries: energy driver only print message when LPAR guest
Vaidyanathan Srinivasan
svaidy at linux.vnet.ibm.com
Fri Jul 21 14:35:26 AEST 2017
* Nicholas Piggin <npiggin at gmail.com> [2017-07-21 11:16:44]:
> On Thu, 20 Jul 2017 23:03:21 +1000
> Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> > Nicholas Piggin <npiggin at gmail.com> writes:
> >
> > > This driver currently reports the H_BEST_ENERGY is unsupported even
> > > when booting in a non-LPAR environment (e.g., powernv). Prevent it.
> >
> > Just delete the printk(). Users don't know what that means, and
> > developers have other better ways to detect that the hcall is missing if
> > anyone cares.
> >
> > cheers
>
> powerpc/pseries: energy driver do not print failure message
>
> This driver currently reports the H_BEST_ENERGY is unsupported (even
> when booting in a non-LPAR environment). This is not something the
> administrator can do much with, and not significant for debugging.
>
> Remove it.
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Reviewed-by: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/pseries/pseries_energy.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/pseries_energy.c b/arch/powerpc/platforms/pseries/pseries_energy.c
> index 164a13d3998a..35c891aabef0 100644
> --- a/arch/powerpc/platforms/pseries/pseries_energy.c
> +++ b/arch/powerpc/platforms/pseries/pseries_energy.c
> @@ -229,10 +229,9 @@ static int __init pseries_energy_init(void)
> int cpu, err;
> struct device *cpu_dev;
>
> - if (!firmware_has_feature(FW_FEATURE_BEST_ENERGY)) {
> - printk(KERN_INFO "Hypercall H_BEST_ENERGY not supported\n");
> - return 0;
> - }
> + if (!firmware_has_feature(FW_FEATURE_BEST_ENERGY))
> + return 0; /* H_BEST_ENERGY hcall not supported */
> +
The first patch (!firmware_has_feature(FW_FEATURE_LPAR)) would be
ideal, but we do not have this in KVM guest case also. Hence I take
mpe's suggestion. Removing the print is fine.
--Vaidy
More information about the Linuxppc-dev
mailing list