From: Len Brown <lenb@kernel.org>
To: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Richard Cochran <rcochran@linutronix.de>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 08/13] intel_idle: Setup the timer broadcast only on successful driver load.
Date: Wed, 6 Apr 2016 17:00:54 -0400 [thread overview]
Message-ID: <93e7663285d2b319dcd051b2b337e0c00d6e0127.1459975717.git.len.brown@intel.com> (raw)
In-Reply-To: <1459976459-2532-1-git-send-email-lenb@kernel.org>
In-Reply-To: <6513da0f2332d2333848af18e374b99f77c124aa.1459975717.git.len.brown@intel.com>
From: Richard Cochran <rcochran@linutronix.de>
This driver sets the broadcast tick quite early on during probe and does
not clean up again in cast of failure. This patch moves the setup call
after the registration, placing the on_each_cpu() calls within the global
CPU lock region.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/idle/intel_idle.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 04fe4df..b5e92dd 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1054,16 +1054,9 @@ static int __init intel_idle_probe(void)
icpu = (const struct idle_cpu *)id->driver_data;
cpuidle_state_table = icpu->state_table;
- if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */
- lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
- else
- on_each_cpu(__setup_broadcast_timer, (void *)true, 1);
-
pr_debug(PREFIX "v" INTEL_IDLE_VERSION
" model 0x%X\n", boot_cpu_data.x86_model);
- pr_debug(PREFIX "lapic_timer_reliable_states 0x%x\n",
- lapic_timer_reliable_states);
return 0;
}
@@ -1371,8 +1364,16 @@ static int __init intel_idle_init(void)
}
__register_cpu_notifier(&cpu_hotplug_notifier);
+ if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */
+ lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
+ else
+ on_each_cpu(__setup_broadcast_timer, (void *)true, 1);
+
cpu_notifier_register_done();
+ pr_debug(PREFIX "lapic_timer_reliable_states 0x%x\n",
+ lapic_timer_reliable_states);
+
return 0;
}
--
2.8.0.rc4.16.g56331f8
next prev parent reply other threads:[~2016-04-06 21:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 21:00 [PATCH 0/13] intel_idle patches ready for upstream Len Brown
2016-04-06 21:00 ` [PATCH 01/13] intel_idle: add BXT support Len Brown
2016-04-06 21:00 ` [PATCH 02/13] intel_idle: remove useless return from void function Len Brown
2016-04-06 21:00 ` [PATCH 03/13] intel_idle: Fix a helper function's return value Len Brown
2016-04-06 21:00 ` [PATCH 04/13] intel_idle: Remove redundant initialization calls Len Brown
2016-04-06 21:00 ` [PATCH 05/13] intel_idle: Fix deallocation order on the driver exit path Len Brown
2016-04-06 21:00 ` [PATCH 06/13] intel_idle: Fix dangling registration on error path Len Brown
2016-04-06 21:00 ` [PATCH 07/13] intel_idle: Avoid a double free of the per-CPU data Len Brown
2016-04-06 21:00 ` Len Brown [this message]
2016-04-06 21:00 ` [PATCH 09/13] intel_idle: Don't overreact to a cpuidle registration failure Len Brown
2016-04-06 21:00 ` [PATCH 10/13] intel_idle: Propagate hot plug errors Len Brown
2016-04-06 21:00 ` [PATCH 11/13] intel_idle: Clean up all registered devices on exit Len Brown
2016-04-06 21:00 ` [PATCH 12/13] intel_idle: Add SKX support Len Brown
2016-04-06 21:00 ` [PATCH 13/13] intel_idle: Add KBL support Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=93e7663285d2b319dcd051b2b337e0c00d6e0127.1459975717.git.len.brown@intel.com \
--to=lenb@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rcochran@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®