From: kettenis Date: Mon, 21 Jun 2021 15:19:39 +0000 (+0000) Subject: Change tb_freq to uint64_t. This prevents an overflow in the riscv64 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bf49bd1358630df2026288428806df447d3fcc0b;p=openbsd Change tb_freq to uint64_t. This prevents an overflow in the riscv64 implementation of delay(9). ok deraadt@ --- diff --git a/sys/arch/riscv64/riscv64/clock.c b/sys/arch/riscv64/riscv64/clock.c index 9ee3bb77876..02984bb4ed8 100644 --- a/sys/arch/riscv64/riscv64/clock.c +++ b/sys/arch/riscv64/riscv64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.1 2021/05/04 16:38:06 kettenis Exp $ */ +/* $OpenBSD: clock.c,v 1.2 2021/06/21 15:19:39 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -28,7 +28,7 @@ #include -extern uint32_t tb_freq; /* machdep.c */ +extern uint64_t tb_freq; /* machdep.c */ uint64_t tick_increment; uint64_t statmin;