Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2019 16:16:54 +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: r352218 - head/sys/riscv/riscv
Message-ID:  <201909111616.x8BGGsrd066821@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Wed Sep 11 16:16:53 2019
New Revision: 352218
URL: https://svnweb.freebsd.org/changeset/base/352218

Log:
  riscv: Small fix to CPU compatibility identification
  
  fdt_is_compatible_strict() inspects the first compatible property.
  We need to inspect the following properties for 'riscv'.
  ofw_bus_node_is_compatible() does a recursive search.
  
  This patch fixes "Can't find CPU" error message when bootverbose = true.
  
  Submitted by:	Nicholas O'Brien (nickisobrien_gmail.com)
  Reviewed by:	philip, kp
  Sponsored by:	Axiado
  Differential Revision:	https://reviews.freebsd.org/D21576

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

Modified: head/sys/riscv/riscv/identcpu.c
==============================================================================
--- head/sys/riscv/riscv/identcpu.c	Wed Sep 11 16:06:05 2019	(r352217)
+++ head/sys/riscv/riscv/identcpu.c	Wed Sep 11 16:16:53 2019	(r352218)
@@ -141,7 +141,7 @@ fill_elf_hwcap(void *dummy __unused)
 	 * ISAs, keep only the extension bits that are common to all harts.
 	 */
 	for (node = OF_child(node); node > 0; node = OF_peer(node)) {
-		if (!fdt_is_compatible_strict(node, "riscv")) {
+		if (!ofw_bus_node_is_compatible(node, "riscv")) {
 			if (bootverbose)
 				printf("fill_elf_hwcap: Can't find cpu\n");
 			return;



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