Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Apr 2019 02:29:31 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346172 - head/sys/powerpc/powerpc
Message-ID:  <201904130229.x3D2TVGN068967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sat Apr 13 02:29:30 2019
New Revision: 346172
URL: https://svnweb.freebsd.org/changeset/base/346172

Log:
  powerpc: Add file forgotten in r346144
  
  Forgot to add the changes for DELAY(), which lowers priority during the
  delay period.  Also, mark the timebase read as volatile so newer GCC does
  not optimize it away, as it reportedly does currently.
  
  MFC after:	2 weeks
  MFC with:	r346144

Modified:
  head/sys/powerpc/powerpc/clock.c

Modified: head/sys/powerpc/powerpc/clock.c
==============================================================================
--- head/sys/powerpc/powerpc/clock.c	Sat Apr 13 00:54:56 2019	(r346171)
+++ head/sys/powerpc/powerpc/clock.c	Sat Apr 13 02:29:30 2019	(r346172)
@@ -303,13 +303,16 @@ decr_get_timecount(struct timecounter *tc)
 void
 DELAY(int n)
 {
-	u_quad_t	tb, ttb;
+	volatile u_quad_t	tb;
+	u_quad_t		ttb;
 
 	TSENTER();
 	tb = mftb();
 	ttb = tb + howmany((uint64_t)n * 1000000, ps_per_tick);
+	nop_prio_vlow();
 	while (tb < ttb)
 		tb = mftb();
+	nop_prio_medium();
 	TSEXIT();
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904130229.x3D2TVGN068967>