svn commit: r295508 - head/sys/riscv/htif

Ruslan Bukin br at FreeBSD.org
Thu Feb 11 11:21:47 UTC 2016


Author: br
Date: Thu Feb 11 11:21:45 2016
New Revision: 295508
URL: https://svnweb.freebsd.org/changeset/base/295508

Log:
  Stop device enumeration when we see first empty slot.
  This fixes operation in QEMU and saves some booting time as well.
  
  Pointed out by:	Sagar Karandikar <skarandikar at berkeley.edu>
  Sponsored by:	DARPA, AFRL
  Sponsored by:	HEIF5

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

Modified: head/sys/riscv/htif/htif.c
==============================================================================
--- head/sys/riscv/htif/htif.c	Thu Feb 11 10:48:15 2016	(r295507)
+++ head/sys/riscv/htif/htif.c	Thu Feb 11 11:21:45 2016	(r295508)
@@ -183,9 +183,8 @@ htif_enumerate(struct htif_softc *sc)
 		}
 
 		len = strnlen(id, sizeof(id));
-		if (len <= 0) {
-			continue;
-		}
+		if (len <= 0)
+			break;
 
 		if (bootverbose)
 			printf(" %d %s\n", i, id);


More information about the svn-src-head mailing list