From: claudio Date: Tue, 1 Aug 2023 07:57:55 +0000 (+0000) Subject: Don't force early wrap around for jiffies. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=06bd3d808881bd72b61a29c2e843929e1596950e;p=openbsd Don't force early wrap around for jiffies. In inteldrm the function intel_dp_wait_source_oui() can be called before last_oui_write is set and so the code requires a positive initial jiffies value. On linux this is the case for 64bit systems (but not for 32bit) and because of this idiosyncracy this bug was introduced in upstream intel code. Instead of adding another OpenBSD specific quirk to drm code alter our jiffies initalisation. Systems affected are at least "ALDERLAKE_P, gen 12" and "TIGERLAKE, gen 12" Suggested fix by kettenis@ OK jsg@ --- diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index dfe8dbe7494..89ac8a1077d 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.109 2023/07/25 18:16:19 cheloha Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.110 2023/08/01 07:57:55 claudio Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -84,7 +84,8 @@ int profhz; int profprocs; int ticks = INT_MAX - (15 * 60 * HZ); -volatile unsigned long jiffies = ULONG_MAX - (10 * 60 * HZ); +/* Don't force early wrap around, triggers bug in inteldrm */ +volatile unsigned long jiffies; /* * Initialize clock frequencies and start both clocks running.