linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/timer-ti-dm: Drop unnecessary restore
@ 2021-05-18  7:53 Tony Lindgren
  2021-06-18 16:03 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2021-05-18  7:53 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Keerthy, linux-kernel, linux-omap, linux-arm-kernel, Lokesh Vutla

The device is not losing context on CPU_CLUSTER_PM_ERROR. As we are only
saving and restoring context with cpu_pm, there is no need to restore the
context in case of an error.

Note that the unnecessary restoring of context does not cause issues, it's
just not needed.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clocksource/timer-ti-dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -122,7 +122,8 @@ static int omap_timer_context_notifier(struct notifier_block *nb,
 			break;
 		omap_timer_save_context(timer);
 		break;
-	case CPU_CLUSTER_PM_ENTER_FAILED:
+	case CPU_CLUSTER_PM_ENTER_FAILED:	/* No need to restore context */
+		break;
 	case CPU_CLUSTER_PM_EXIT:
 		if ((timer->capability & OMAP_TIMER_ALWON) ||
 		    !atomic_read(&timer->enabled))
-- 
2.31.1

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

* [tip: timers/core] clocksource/drivers/timer-ti-dm: Drop unnecessary restore
  2021-05-18  7:53 [PATCH] clocksource/drivers/timer-ti-dm: Drop unnecessary restore Tony Lindgren
@ 2021-06-18 16:03 ` tip-bot2 for Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Tony Lindgren @ 2021-06-18 16:03 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Lokesh Vutla, Tony Lindgren, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     3d41fff3ae3980c055f3c7861264c46c924f3e4c
Gitweb:        https://git.kernel.org/tip/3d41fff3ae3980c055f3c7861264c46c924f3e4c
Author:        Tony Lindgren <tony@atomide.com>
AuthorDate:    Tue, 18 May 2021 10:53:06 +03:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 16 Jun 2021 17:33:04 +02:00

clocksource/drivers/timer-ti-dm: Drop unnecessary restore

The device is not losing context on CPU_CLUSTER_PM_ERROR. As we are only
saving and restoring context with cpu_pm, there is no need to restore the
context in case of an error.

Note that the unnecessary restoring of context does not cause issues, it's
just not needed.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210518075306.35532-1-tony@atomide.com
---
 drivers/clocksource/timer-ti-dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index e5c631f..3e52c52 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -128,7 +128,8 @@ static int omap_timer_context_notifier(struct notifier_block *nb,
 			break;
 		omap_timer_save_context(timer);
 		break;
-	case CPU_CLUSTER_PM_ENTER_FAILED:
+	case CPU_CLUSTER_PM_ENTER_FAILED:	/* No need to restore context */
+		break;
 	case CPU_CLUSTER_PM_EXIT:
 		if ((timer->capability & OMAP_TIMER_ALWON) ||
 		    !atomic_read(&timer->enabled))

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

end of thread, other threads:[~2021-06-18 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  7:53 [PATCH] clocksource/drivers/timer-ti-dm: Drop unnecessary restore Tony Lindgren
2021-06-18 16:03 ` [tip: timers/core] " tip-bot2 for Tony Lindgren

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).