mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] clocksource: Skip to check the override clocksource if override name is empty
@ 2018-01-17  6:01 Baolin Wang
  2018-01-17  6:01 ` [PATCH 2/3] clocksource: Use DEVICE_ATTR_RW/RO/WO to define device attributes Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Baolin Wang @ 2018-01-17  6:01 UTC (permalink / raw)
  To: john.stultz, tglx, sboyd; +Cc: broonie, arnd, baolin.wang, linux-kernel

Some platforms will not set the override clocksource name to select, so we
can skip to check the override clocksource when selecting one clocksource.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 kernel/time/clocksource.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 65f9e3f..c5fdcb1 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -594,6 +594,9 @@ static void __clocksource_select(bool skipcur)
 	if (!best)
 		return;
 
+	if (!strlen(override_name))
+		goto found;
+
 	/* Check for the override clocksource. */
 	list_for_each_entry(cs, &clocksource_list, list) {
 		if (skipcur && cs == curr_clocksource)
@@ -625,6 +628,7 @@ static void __clocksource_select(bool skipcur)
 		break;
 	}
 
+found:
 	if (curr_clocksource != best && !timekeeping_notify(best)) {
 		pr_info("Switched to clocksource %s\n", best->name);
 		curr_clocksource = best;
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-28 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17  6:01 [PATCH 1/3] clocksource: Skip to check the override clocksource if override name is empty Baolin Wang
2018-01-17  6:01 ` [PATCH 2/3] clocksource: Use DEVICE_ATTR_RW/RO/WO to define device attributes Baolin Wang
2018-02-28 13:10   ` [tip:timers/core] " tip-bot for Baolin Wang
2018-01-17  6:01 ` [PATCH 3/3] clocksource: Use ATTRIBUTE_GROUPS macro Baolin Wang
2018-02-28 13:10   ` [tip:timers/core] clocksource: Use ATTRIBUTE_GROUPS tip-bot for Baolin Wang
2018-02-28 13:09 ` [tip:timers/core] clocksource: Don't walk the clocksource list for empty override tip-bot for Baolin Wang

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®