From bf49bd1358630df2026288428806df447d3fcc0b Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 21 Jun 2021 15:19:39 +0000 Subject: [PATCH] Change tb_freq to uint64_t. This prevents an overflow in the riscv64 implementation of delay(9). ok deraadt@ --- sys/arch/riscv64/riscv64/clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1