* [PATCH] Revert "cpuidle: Make drivers initialize polling state"
@ 2018-01-22 16:27 Ville Syrjala
2018-02-04 9:12 ` Rafael J. Wysocki
0 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2018-01-22 16:27 UTC (permalink / raw)
To: linux-pm
Cc: linux-kernel, Rafael J . Wysocki, Sudeep Holla, Daniel Lezcano,
Ville Syrjälä
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
Makes my P3 machine oops somewhere in cpuidle. I suspect
CONFIG_ACPI=n may have something to do with this.
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/acpi/processor_idle.c | 9 +--------
drivers/cpuidle/driver.c | 2 ++
drivers/cpuidle/poll_state.c | 3 +--
drivers/idle/intel_idle.c | 1 -
include/linux/cpuidle.h | 4 ++--
5 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index d50a7b6ccddd..cb1c7634e2ca 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -842,7 +842,7 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
static int acpi_processor_setup_cstates(struct acpi_processor *pr)
{
- int i, count;
+ int i, count = ACPI_IDLE_STATE_START;
struct acpi_processor_cx *cx;
struct cpuidle_state *state;
struct cpuidle_driver *drv = &acpi_idle_driver;
@@ -850,13 +850,6 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)
if (max_cstate == 0)
max_cstate = 1;
- if (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX)) {
- cpuidle_poll_state_init(drv);
- count = 1;
- } else {
- count = 0;
- }
-
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
cx = &pr->power.states[i];
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index dc32f34e68d9..6f694c86f3fa 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -216,6 +216,8 @@ static int __cpuidle_register_driver(struct cpuidle_driver *drv)
on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer,
(void *)1, 1);
+ poll_idle_init(drv);
+
return 0;
}
diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
index 7416b16287de..0db4f7273952 100644
--- a/drivers/cpuidle/poll_state.c
+++ b/drivers/cpuidle/poll_state.c
@@ -21,7 +21,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev,
return index;
}
-void cpuidle_poll_state_init(struct cpuidle_driver *drv)
+void poll_idle_init(struct cpuidle_driver *drv)
{
struct cpuidle_state *state = &drv->states[0];
@@ -34,4 +34,3 @@ void cpuidle_poll_state_init(struct cpuidle_driver *drv)
state->disabled = false;
state->flags = CPUIDLE_FLAG_POLLING;
}
-EXPORT_SYMBOL_GPL(cpuidle_poll_state_init);
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index b2ccce5fb071..6d8a4b87e4d5 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1342,7 +1342,6 @@ static void __init intel_idle_cpuidle_driver_init(void)
intel_idle_state_table_update();
- cpuidle_poll_state_init(drv);
drv->state_count = 1;
for (cstate = 0; cstate < CPUIDLE_STATE_MAX; ++cstate) {
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 8f7788d23b57..bc9f2603fe10 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -226,9 +226,9 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev,
#endif
#ifdef CONFIG_ARCH_HAS_CPU_RELAX
-void cpuidle_poll_state_init(struct cpuidle_driver *drv);
+void poll_idle_init(struct cpuidle_driver *drv);
#else
-static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
+static void poll_idle_init(struct cpuidle_driver *drv) {}
#endif
/******************************
--
2.13.6
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-01-22 16:27 [PATCH] Revert "cpuidle: Make drivers initialize polling state" Ville Syrjala
@ 2018-02-04 9:12 ` Rafael J. Wysocki
2018-02-04 9:18 ` Rafael J. Wysocki
0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-04 9:12 UTC (permalink / raw)
To: Ville Syrjala
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki,
Sudeep Holla, Daniel Lezcano
On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
<ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
>
> Makes my P3 machine oops somewhere in cpuidle. I suspect
> CONFIG_ACPI=n may have something to do with this.
And if you don't do CONFIG_ACPI=n, does it still oops?
Anyway, there are later changes depending on this one, so reverting it
won't work in general.
Let me look deeper at this.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-02-04 9:12 ` Rafael J. Wysocki
@ 2018-02-04 9:18 ` Rafael J. Wysocki
2018-02-05 14:04 ` Ville Syrjälä
0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-04 9:18 UTC (permalink / raw)
To: Ville Syrjala
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki,
Sudeep Holla, Daniel Lezcano
On Sun, Feb 4, 2018 at 10:12 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
> <ville.syrjala@linux.intel.com> wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
>>
>> Makes my P3 machine oops somewhere in cpuidle. I suspect
>> CONFIG_ACPI=n may have something to do with this.
>
> And if you don't do CONFIG_ACPI=n, does it still oops?
>
> Anyway, there are later changes depending on this one, so reverting it
> won't work in general.
>
> Let me look deeper at this.
What's there in /sys/devices/system/cpu/cpuidle/current_driver on your
system with the problematic commit reverted?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-02-04 9:18 ` Rafael J. Wysocki
@ 2018-02-05 14:04 ` Ville Syrjälä
2018-02-05 17:56 ` Rafael J. Wysocki
0 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjälä @ 2018-02-05 14:04 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki,
Sudeep Holla, Daniel Lezcano
On Sun, Feb 04, 2018 at 10:18:07AM +0100, Rafael J. Wysocki wrote:
> On Sun, Feb 4, 2018 at 10:12 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
> > <ville.syrjala@linux.intel.com> wrote:
> >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>
> >> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
> >>
> >> Makes my P3 machine oops somewhere in cpuidle. I suspect
> >> CONFIG_ACPI=n may have something to do with this.
> >
> > And if you don't do CONFIG_ACPI=n, does it still oops?
Don't think I actually tried that. I can give it a whirl tonight.
I think this machine should actually have ACPI, but it inherited
the .config from a P2 machine that did not. Apparently I was too
lazy to change .config when I swapped in the "new" machine.
> >
> > Anyway, there are later changes depending on this one, so reverting it
> > won't work in general.
> >
> > Let me look deeper at this.
>
> What's there in /sys/devices/system/cpu/cpuidle/current_driver on your
> system with the problematic commit reverted?
# cat /sys/devices/system/cpu/cpuidle/current_driver
apm_idle
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-02-05 14:04 ` Ville Syrjälä
@ 2018-02-05 17:56 ` Rafael J. Wysocki
2018-02-06 16:31 ` Ville Syrjälä
0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-05 17:56 UTC (permalink / raw)
To: Ville Syrjälä, Linux PM
Cc: Linux Kernel Mailing List, Rafael J . Wysocki, Sudeep Holla,
Daniel Lezcano
On Monday, February 5, 2018 3:04:45 PM CET Ville Syrjälä wrote:
> On Sun, Feb 04, 2018 at 10:18:07AM +0100, Rafael J. Wysocki wrote:
> > On Sun, Feb 4, 2018 at 10:12 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
> > > <ville.syrjala@linux.intel.com> wrote:
> > >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >>
> > >> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
> > >>
> > >> Makes my P3 machine oops somewhere in cpuidle. I suspect
> > >> CONFIG_ACPI=n may have something to do with this.
> > >
> > > And if you don't do CONFIG_ACPI=n, does it still oops?
>
> Don't think I actually tried that. I can give it a whirl tonight.
>
> I think this machine should actually have ACPI, but it inherited
> the .config from a P2 machine that did not. Apparently I was too
> lazy to change .config when I swapped in the "new" machine.
I guess it would work, but never mind.
> > >
> > > Anyway, there are later changes depending on this one, so reverting it
> > > won't work in general.
> > >
> > > Let me look deeper at this.
> >
> > What's there in /sys/devices/system/cpu/cpuidle/current_driver on your
> > system with the problematic commit reverted?
>
> # cat /sys/devices/system/cpu/cpuidle/current_driver
> apm_idle
That is the key bit: I overlooked this little fellow.
Does the below (untested here) help?
---
arch/x86/kernel/apm_32.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-pm/arch/x86/kernel/apm_32.c
===================================================================
--- linux-pm.orig/arch/x86/kernel/apm_32.c
+++ linux-pm/arch/x86/kernel/apm_32.c
@@ -2389,6 +2389,7 @@ static int __init apm_init(void)
if (HZ != 100)
idle_period = (idle_period * HZ) / 100;
if (idle_threshold < 100) {
+ cpuidle_poll_state_init(&apm_idle_driver);
if (!cpuidle_register_driver(&apm_idle_driver))
if (cpuidle_register_device(&apm_cpuidle_device))
cpuidle_unregister_driver(&apm_idle_driver);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-02-05 17:56 ` Rafael J. Wysocki
@ 2018-02-06 16:31 ` Ville Syrjälä
2018-02-06 18:00 ` Rafael J. Wysocki
2018-02-06 18:02 ` [PATCH] x86: PM: Make APM idle driver initialize polling state Rafael J. Wysocki
0 siblings, 2 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-02-06 16:31 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki,
Sudeep Holla, Daniel Lezcano
On Mon, Feb 05, 2018 at 06:56:31PM +0100, Rafael J. Wysocki wrote:
> On Monday, February 5, 2018 3:04:45 PM CET Ville Syrjälä wrote:
> > On Sun, Feb 04, 2018 at 10:18:07AM +0100, Rafael J. Wysocki wrote:
> > > On Sun, Feb 4, 2018 at 10:12 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > > On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
> > > > <ville.syrjala@linux.intel.com> wrote:
> > > >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >>
> > > >> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
> > > >>
> > > >> Makes my P3 machine oops somewhere in cpuidle. I suspect
> > > >> CONFIG_ACPI=n may have something to do with this.
> > > >
> > > > And if you don't do CONFIG_ACPI=n, does it still oops?
> >
> > Don't think I actually tried that. I can give it a whirl tonight.
> >
> > I think this machine should actually have ACPI, but it inherited
> > the .config from a P2 machine that did not. Apparently I was too
> > lazy to change .config when I swapped in the "new" machine.
>
> I guess it would work, but never mind.
>
> > > >
> > > > Anyway, there are later changes depending on this one, so reverting it
> > > > won't work in general.
> > > >
> > > > Let me look deeper at this.
> > >
> > > What's there in /sys/devices/system/cpu/cpuidle/current_driver on your
> > > system with the problematic commit reverted?
> >
> > # cat /sys/devices/system/cpu/cpuidle/current_driver
> > apm_idle
>
> That is the key bit: I overlooked this little fellow.
>
> Does the below (untested here) help?
>
> ---
> arch/x86/kernel/apm_32.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux-pm/arch/x86/kernel/apm_32.c
> ===================================================================
> --- linux-pm.orig/arch/x86/kernel/apm_32.c
> +++ linux-pm/arch/x86/kernel/apm_32.c
> @@ -2389,6 +2389,7 @@ static int __init apm_init(void)
> if (HZ != 100)
> idle_period = (idle_period * HZ) / 100;
> if (idle_threshold < 100) {
> + cpuidle_poll_state_init(&apm_idle_driver);
> if (!cpuidle_register_driver(&apm_idle_driver))
> if (cpuidle_register_device(&apm_cpuidle_device))
> cpuidle_unregister_driver(&apm_idle_driver);
Yep, this works. Thanks.
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] Revert "cpuidle: Make drivers initialize polling state"
2018-02-06 16:31 ` Ville Syrjälä
@ 2018-02-06 18:00 ` Rafael J. Wysocki
2018-02-06 18:02 ` [PATCH] x86: PM: Make APM idle driver initialize polling state Rafael J. Wysocki
1 sibling, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-06 18:00 UTC (permalink / raw)
To: Ville Syrjälä
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki,
Sudeep Holla, Daniel Lezcano
On Tuesday, February 6, 2018 5:31:34 PM CET Ville Syrjälä wrote:
> On Mon, Feb 05, 2018 at 06:56:31PM +0100, Rafael J. Wysocki wrote:
> > On Monday, February 5, 2018 3:04:45 PM CET Ville Syrjälä wrote:
> > > On Sun, Feb 04, 2018 at 10:18:07AM +0100, Rafael J. Wysocki wrote:
> > > > On Sun, Feb 4, 2018 at 10:12 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > > > On Mon, Jan 22, 2018 at 5:27 PM, Ville Syrjala
> > > > > <ville.syrjala@linux.intel.com> wrote:
> > > > >> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > >>
> > > > >> This reverts commit 1b39e3f813b4685c7a30ae964d5529a1b0e3a286.
> > > > >>
> > > > >> Makes my P3 machine oops somewhere in cpuidle. I suspect
> > > > >> CONFIG_ACPI=n may have something to do with this.
> > > > >
> > > > > And if you don't do CONFIG_ACPI=n, does it still oops?
> > >
> > > Don't think I actually tried that. I can give it a whirl tonight.
> > >
> > > I think this machine should actually have ACPI, but it inherited
> > > the .config from a P2 machine that did not. Apparently I was too
> > > lazy to change .config when I swapped in the "new" machine.
> >
> > I guess it would work, but never mind.
> >
> > > > >
> > > > > Anyway, there are later changes depending on this one, so reverting it
> > > > > won't work in general.
> > > > >
> > > > > Let me look deeper at this.
> > > >
> > > > What's there in /sys/devices/system/cpu/cpuidle/current_driver on your
> > > > system with the problematic commit reverted?
> > >
> > > # cat /sys/devices/system/cpu/cpuidle/current_driver
> > > apm_idle
> >
> > That is the key bit: I overlooked this little fellow.
> >
> > Does the below (untested here) help?
> >
> > ---
> > arch/x86/kernel/apm_32.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > Index: linux-pm/arch/x86/kernel/apm_32.c
> > ===================================================================
> > --- linux-pm.orig/arch/x86/kernel/apm_32.c
> > +++ linux-pm/arch/x86/kernel/apm_32.c
> > @@ -2389,6 +2389,7 @@ static int __init apm_init(void)
> > if (HZ != 100)
> > idle_period = (idle_period * HZ) / 100;
> > if (idle_threshold < 100) {
> > + cpuidle_poll_state_init(&apm_idle_driver);
> > if (!cpuidle_register_driver(&apm_idle_driver))
> > if (cpuidle_register_device(&apm_cpuidle_device))
> > cpuidle_unregister_driver(&apm_idle_driver);
>
> Yep, this works. Thanks.
>
> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks!
Let me respin it with a changelog/tags etc
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] x86: PM: Make APM idle driver initialize polling state
2018-02-06 16:31 ` Ville Syrjälä
2018-02-06 18:00 ` Rafael J. Wysocki
@ 2018-02-06 18:02 ` Rafael J. Wysocki
2018-02-06 18:26 ` Ville Syrjälä
2018-02-12 9:21 ` [PATCH] PM: cpuidle: Fix cpuidle_poll_state_init() prototype Rafael J. Wysocki
1 sibling, 2 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-06 18:02 UTC (permalink / raw)
To: Linux PM
Cc: Ville Syrjälä, Linux Kernel Mailing List,
Rafael J . Wysocki, x86, Jiri Koshina
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Update the APM driver overlooked by commit 1b39e3f813b4 (cpuidle: Make
drivers initialize polling state) to initialize the polling state like
the other cpuidle drivers modified by that commit to prevent cpuidle
from crashing.
Fixes: 1b39e3f813b4 (cpuidle: Make drivers initialize polling state)
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
arch/x86/kernel/apm_32.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-pm/arch/x86/kernel/apm_32.c
===================================================================
--- linux-pm.orig/arch/x86/kernel/apm_32.c
+++ linux-pm/arch/x86/kernel/apm_32.c
@@ -2389,6 +2389,7 @@ static int __init apm_init(void)
if (HZ != 100)
idle_period = (idle_period * HZ) / 100;
if (idle_threshold < 100) {
+ cpuidle_poll_state_init(&apm_idle_driver);
if (!cpuidle_register_driver(&apm_idle_driver))
if (cpuidle_register_device(&apm_cpuidle_device))
cpuidle_unregister_driver(&apm_idle_driver);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86: PM: Make APM idle driver initialize polling state
2018-02-06 18:02 ` [PATCH] x86: PM: Make APM idle driver initialize polling state Rafael J. Wysocki
@ 2018-02-06 18:26 ` Ville Syrjälä
2018-02-07 9:20 ` Rafael J. Wysocki
2018-02-12 9:21 ` [PATCH] PM: cpuidle: Fix cpuidle_poll_state_init() prototype Rafael J. Wysocki
1 sibling, 1 reply; 12+ messages in thread
From: Ville Syrjälä @ 2018-02-06 18:26 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki, x86,
Jiri Koshina
On Tue, Feb 06, 2018 at 07:02:58PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Update the APM driver overlooked by commit 1b39e3f813b4 (cpuidle: Make
> drivers initialize polling state) to initialize the polling state like
> the other cpuidle drivers modified by that commit to prevent cpuidle
> from crashing.
>
> Fixes: 1b39e3f813b4 (cpuidle: Make drivers initialize polling state)
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
And maybe?
Cc: <stable@vger.kernel.org> # v4.14+
> ---
> arch/x86/kernel/apm_32.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux-pm/arch/x86/kernel/apm_32.c
> ===================================================================
> --- linux-pm.orig/arch/x86/kernel/apm_32.c
> +++ linux-pm/arch/x86/kernel/apm_32.c
> @@ -2389,6 +2389,7 @@ static int __init apm_init(void)
> if (HZ != 100)
> idle_period = (idle_period * HZ) / 100;
> if (idle_threshold < 100) {
> + cpuidle_poll_state_init(&apm_idle_driver);
> if (!cpuidle_register_driver(&apm_idle_driver))
> if (cpuidle_register_device(&apm_cpuidle_device))
> cpuidle_unregister_driver(&apm_idle_driver);
>
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86: PM: Make APM idle driver initialize polling state
2018-02-06 18:26 ` Ville Syrjälä
@ 2018-02-07 9:20 ` Rafael J. Wysocki
2018-02-07 14:00 ` Ville Syrjälä
0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-07 9:20 UTC (permalink / raw)
To: Ville Syrjälä
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki, x86,
Jiri Koshina
On Tuesday, February 6, 2018 7:26:17 PM CET Ville Syrjälä wrote:
> On Tue, Feb 06, 2018 at 07:02:58PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Update the APM driver overlooked by commit 1b39e3f813b4 (cpuidle: Make
> > drivers initialize polling state) to initialize the polling state like
> > the other cpuidle drivers modified by that commit to prevent cpuidle
> > from crashing.
> >
> > Fixes: 1b39e3f813b4 (cpuidle: Make drivers initialize polling state)
> > Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> And maybe?
>
> Cc: <stable@vger.kernel.org> # v4.14+
I add these when applying patches.
Actually, I've queued up the patch with this tag already.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] x86: PM: Make APM idle driver initialize polling state
2018-02-07 9:20 ` Rafael J. Wysocki
@ 2018-02-07 14:00 ` Ville Syrjälä
0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-02-07 14:00 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, Linux Kernel Mailing List, Rafael J . Wysocki, x86,
Jiri Koshina
On Wed, Feb 07, 2018 at 10:20:58AM +0100, Rafael J. Wysocki wrote:
> On Tuesday, February 6, 2018 7:26:17 PM CET Ville Syrjälä wrote:
> > On Tue, Feb 06, 2018 at 07:02:58PM +0100, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > Update the APM driver overlooked by commit 1b39e3f813b4 (cpuidle: Make
> > > drivers initialize polling state) to initialize the polling state like
> > > the other cpuidle drivers modified by that commit to prevent cpuidle
> > > from crashing.
> > >
> > > Fixes: 1b39e3f813b4 (cpuidle: Make drivers initialize polling state)
> > > Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > And maybe?
> >
> > Cc: <stable@vger.kernel.org> # v4.14+
>
> I add these when applying patches.
>
> Actually, I've queued up the patch with this tag already.
Cool. Thanks.
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] PM: cpuidle: Fix cpuidle_poll_state_init() prototype
2018-02-06 18:02 ` [PATCH] x86: PM: Make APM idle driver initialize polling state Rafael J. Wysocki
2018-02-06 18:26 ` Ville Syrjälä
@ 2018-02-12 9:21 ` Rafael J. Wysocki
1 sibling, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-02-12 9:21 UTC (permalink / raw)
To: Linux PM
Cc: Ville Syrjälä, Linux Kernel Mailing List,
Rafael J . Wysocki, x86, Jiri Koshina
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Commit f85942207516 (x86: PM: Make APM idle driver initialize polling
state) made apm_init() call cpuidle_poll_state_init(), but that only
is defined for CONFIG_CPU_IDLE set, so make the empty stub of it
available for CONFIG_CPU_IDLE unset too to fix the resulting build
issue.
Fixes: f85942207516 (x86: PM: Make APM idle driver initialize polling state)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
include/linux/cpuidle.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-pm/include/linux/cpuidle.h
===================================================================
--- linux-pm.orig/include/linux/cpuidle.h
+++ linux-pm/include/linux/cpuidle.h
@@ -225,7 +225,7 @@ static inline void cpuidle_coupled_paral
}
#endif
-#ifdef CONFIG_ARCH_HAS_CPU_RELAX
+#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX)
void cpuidle_poll_state_init(struct cpuidle_driver *drv);
#else
static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-02-12 9:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 16:27 [PATCH] Revert "cpuidle: Make drivers initialize polling state" Ville Syrjala
2018-02-04 9:12 ` Rafael J. Wysocki
2018-02-04 9:18 ` Rafael J. Wysocki
2018-02-05 14:04 ` Ville Syrjälä
2018-02-05 17:56 ` Rafael J. Wysocki
2018-02-06 16:31 ` Ville Syrjälä
2018-02-06 18:00 ` Rafael J. Wysocki
2018-02-06 18:02 ` [PATCH] x86: PM: Make APM idle driver initialize polling state Rafael J. Wysocki
2018-02-06 18:26 ` Ville Syrjälä
2018-02-07 9:20 ` Rafael J. Wysocki
2018-02-07 14:00 ` Ville Syrjälä
2018-02-12 9:21 ` [PATCH] PM: cpuidle: Fix cpuidle_poll_state_init() prototype Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).