From 7116ac803736345cc7c7b73ac435efa50c4cd2b0 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Tue, 8 Jul 2014 01:53:24 +1000 Subject: src: Make use of 'CEIL_DIV(a, b)' macro across tree The objective here is to tighten coreboot up a bit by not repeating common helpers. This makes the code base more consistent and unified/tight. Change-Id: Ia163eae68b4a84a00ed118125e70308fab1cea0c Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/6215 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- src/cpu/x86/tsc/delay_tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/x86/tsc') diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c index b8f250394f..07a4053f41 100644 --- a/src/cpu/x86/tsc/delay_tsc.c +++ b/src/cpu/x86/tsc/delay_tsc.c @@ -78,7 +78,7 @@ static unsigned long long calibrate_tsc(void) if (end.lo <= CALIBRATE_DIVISOR) goto bad_ctc; - return (end.lo + CALIBRATE_DIVISOR -1)/CALIBRATE_DIVISOR; + return CEIL_DIV(end.lo, CALIBRATE_DIVISOR); } /* -- cgit v1.2.3