Skip to content

Commit a6371f8

Browse files
Suresh SiddhaKAGA-KOKO
authored andcommitted
tick: Fix the spurious broadcast timer ticks after resume
During resume, tick_resume_broadcast() programs the broadcast timer in oneshot mode unconditionally. On the platforms where broadcast timer is not really required, this will generate spurious broadcast timer ticks upon resume. For example, on the always running apic timer platforms with HPET, I see spurious hpet tick once every ~5minutes (which is the 32-bit hpet counter wraparound time). Similar to boot time, during resume make the oneshot mode setting of the broadcast clock event device conditional on the state of active broadcast users. Signed-off-by: Suresh Siddha <[email protected]> Tested-by: Santosh Shilimkar <[email protected]> Tested-by: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent b9a6a23 commit a6371f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/time/tick-broadcast.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ int tick_resume_broadcast(void)
346346
tick_get_broadcast_mask());
347347
break;
348348
case TICKDEV_MODE_ONESHOT:
349-
broadcast = tick_resume_broadcast_oneshot(bc);
349+
if (!cpumask_empty(tick_get_broadcast_mask()))
350+
broadcast = tick_resume_broadcast_oneshot(bc);
350351
break;
351352
}
352353
}

0 commit comments

Comments
 (0)