diff mbox series

nx: Don't abort on missing NX when using a QEMU machine

Message ID ea4c2aa5242ad1a68b05588d898748f799adac13.camel@kernel.crashing.org
State Accepted
Headers show
Series nx: Don't abort on missing NX when using a QEMU machine | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/make_check success Test make_check on branch master

Commit Message

Benjamin Herrenschmidt Nov. 1, 2018, 4:12 a.m. UTC
These don't have an NX node (and probably never will) as they
don't provide any coprocessor. However, the DARN instruction
works so this abort is unnecessary.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/nx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stewart Smith Nov. 2, 2018, 8:01 a.m. UTC | #1
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> These don't have an NX node (and probably never will) as they
> don't provide any coprocessor. However, the DARN instruction
> works so this abort is unnecessary.

Looks reasonable enough, merged to master as of 95f7b3b9698bf59766294ac9705d929723ffe574
diff mbox series

Patch

diff --git a/hw/nx.c b/hw/nx.c
index 1fedee77..d3746aea 100644
--- a/hw/nx.c
+++ b/hw/nx.c
@@ -45,7 +45,8 @@  static void p9_darn_init(void)
 	dt_for_each_compatible(dt_root, nx, "ibm,power9-nx")
 		break;
 	if (!nx) {
-		assert(nx);
+		if (!dt_node_is_compatible(dt_root, "qemu,powernv"))
+			assert(nx);
 		return;
 	}