Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2019 10:53:03 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356221 - head/sys/riscv/riscv
Message-ID:  <201912311053.xBVAr3Yh059021@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Tue Dec 31 10:53:03 2019
New Revision: 356221
URL: https://svnweb.freebsd.org/changeset/base/356221

Log:
  riscv: Remove pointless loop
  
  There's no point in checking for absent CPUs if we're not going to do anything
  about either the present or absent case. This loop can just be removed.
  
  Reviewed by:	philip
  Sponsored by:	Axiado

Modified:
  head/sys/riscv/riscv/mp_machdep.c

Modified: head/sys/riscv/riscv/mp_machdep.c
==============================================================================
--- head/sys/riscv/riscv/mp_machdep.c	Tue Dec 31 05:41:47 2019	(r356220)
+++ head/sys/riscv/riscv/mp_machdep.c	Tue Dec 31 10:53:03 2019	(r356221)
@@ -204,13 +204,8 @@ release_aps(void *dummy __unused)
 	sbi_send_ipi(mask.__bits);
 
 	for (i = 0; i < 2000; i++) {
-		if (smp_started) {
-			for (cpu = 0; cpu <= mp_maxid; cpu++) {
-				if (CPU_ABSENT(cpu))
-					continue;
-			}
+		if (smp_started)
 			return;
-		}
 		DELAY(1000);
 	}
 



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