lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 05 May 2008 16:58:08 -0700 From: Daniel Walker <dwalker@...sta.com> To: "Carlos R. Mafra" <crmafra2@...il.com> Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, venkatesh.pallipadi@...el.com Subject: Re: x86: Clean up computation of HPET .mult variables On Mon, 2008-05-05 at 20:11 -0300, Carlos R. Mafra wrote: > - tmp = (u64)hpet_period << HPET_SHIFT; > - do_div(tmp, FSEC_PER_NSEC); > - clocksource_hpet.mult = (u32)tmp; > + clocksource_hpet.mult = div_sc(hpet_period, FSEC_PER_NSEC, HPET_SHIFT); > There's helper functions that should be used called clocksource_hz2mult and one called clocksource_khz2mult. I think they're more accurate than using div_sc. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists