lkml.org 
[lkml]   [2021]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver exists
Hi Rafael,

On Mon, May 24, 2021 at 7:47 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Sat, May 22, 2021 at 12:19 AM Kyle Meyer <kyle.meyer@hpe.com> wrote:

> > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> > index 7e7450453714..e79a945369d1 100644
> > --- a/drivers/cpufreq/acpi-cpufreq.c
> > +++ b/drivers/cpufreq/acpi-cpufreq.c
> > @@ -1003,7 +1003,7 @@ static int __init acpi_cpufreq_init(void)
> >
> > /* don't keep reloading if cpufreq_driver exists */
> > if (cpufreq_get_current_driver())
> > - return -EEXIST;
> > + return 0;
> >
> > pr_debug("%s\n", __func__);
> >
> > --
>
> Applied as 5.14 material with some edits in the subject and changelog, thanks!

I am not sure how this is supposed to work. If we return 0 from
acpi_cpufreq_init(),
then the driver will never be used, since it's acpi_cpufreq_init()
will never get
called again later.

cpufreq drivers don't follow the generic device/driver model where a driver gets
probed again if a device appears and so this is broken.

Please revert this patch.

\
 
 \ /
  Last update: 2021-06-07 09:27    [W:0.068 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site