Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1542788
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] cpufreq: Remove cpu hotplug callbacks only if they were initialized |
| Date | 2016-12-15 15:50 +0100 |
| Message-ID | <sOFw5-6Xv-1@gated-at.bofh.it> (permalink) |
| References | <sOFw5-6Xv-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Since cpu hotplug callbacks are requested for CPUHP_AP_ONLINE_DYN state,
successful callback initialization will result in cpuhp_setup_state()
returning a positive value. Therefore acpi_cpufreq_online being zero
indicates that callbacks have not been installed.
This means that acpi_cpufreq_boost_exit() should only remove them if
acpi_cpufreq_online is positive. Trying to call
cpuhp_remove_state_nocalls(0) will cause a BUG().
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
drivers/cpufreq/acpi-cpufreq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 3a98702..3a2ca0f 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -930,7 +930,7 @@ static void __init acpi_cpufreq_boost_init(void)
static void acpi_cpufreq_boost_exit(void)
{
- if (acpi_cpufreq_online >= 0)
+ if (acpi_cpufreq_online > 0)
cpuhp_remove_state_nocalls(acpi_cpufreq_online);
}
--
1.7.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/2] cpufreq: Remove cpu hotplug callbacks only if they were initialized Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-15 15:50 +0100 Re: [PATCH 2/2] cpufreq: Remove cpu hotplug callbacks only if they were initialized Thomas Gleixner <tglx@linutronix.de> - 2016-12-15 18:00 +0100
csiph-web