Skip to content

Commit 715d2d9

Browse files
committed
Merge tag 'timers_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Borislav Petkov: - Return the proper timer register width (31 bits) for a 32-bit signed register in order to avoid a timer interrupt storm on ARM XGene-1 hardware running in NO_HZ mode * tag 'timers_urgent_for_v6.1_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/arm_arch_timer: Fix XGene-1 TVAL register math error
2 parents b465cf1 + 839a973 commit 715d2d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/clocksource/arm_arch_timer.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,15 +806,18 @@ static u64 __arch_timer_check_delta(void)
806806
/*
807807
* XGene-1 implements CVAL in terms of TVAL, meaning
808808
* that the maximum timer range is 32bit. Shame on them.
809+
*
810+
* Note that TVAL is signed, thus has only 31 of its
811+
* 32 bits to express magnitude.
809812
*/
810813
MIDR_ALL_VERSIONS(MIDR_CPU_MODEL(ARM_CPU_IMP_APM,
811814
APM_CPU_PART_POTENZA)),
812815
{},
813816
};
814817

815818
if (is_midr_in_range_list(read_cpuid_id(), broken_cval_midrs)) {
816-
pr_warn_once("Broken CNTx_CVAL_EL1, limiting width to 32bits");
817-
return CLOCKSOURCE_MASK(32);
819+
pr_warn_once("Broken CNTx_CVAL_EL1, using 31 bit TVAL instead.\n");
820+
return CLOCKSOURCE_MASK(31);
818821
}
819822
#endif
820823
return CLOCKSOURCE_MASK(arch_counter_get_width());

0 commit comments

Comments
 (0)