Attention is currently required from: Arthur Heymans, Julius Werner, Paul Menzel, Yu-Ping Wu.
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78800?usp=email )
Change subject: arch/arm64/arch_timer: Fix possible overflow in multiplication ......................................................................
Patch Set 3:
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/78800/comment/7db06ffe_abd141fc : PS2, Line 9: The value from raw_read_cntfrq_el0() could be large enough to cause : overflow when multiplied by 1000000. To prevent this, both 1000000 and : tfreq can be reduced by dividing them by their GCD.
I think it's worth adding this as a comment to the code.
Done
File src/arch/arm64/arch_timer.c:
https://review.coreboot.org/c/coreboot/+/78800/comment/8d01b460_535d41a3 : PS2, Line 16: assert(tfreq > 0)
Missing semicolon (also, this is probably not necessary, you'll get a pretty obvious division-by-zer […]
Removed.
https://review.coreboot.org/c/coreboot/+/78800/comment/aaec0543_7ad7b56d : PS2, Line 18: div = gcd(mult, tfreq);
nit: depending on the GCD implementation you'll probably want to write it as `gcd(tfreq, mult)` to h […]
Done