Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 sun4v: hv_mach_desc() needs a buffe...
details: https://anonhg.NetBSD.org/src/rev/c38a64135c98
branches: trunk
changeset: 805656:c38a64135c98
user: palle <palle%NetBSD.org@localhost>
date: Sun Jan 11 13:40:22 2015 +0000
description:
sun4v: hv_mach_desc() needs a buffer length of zero to return the actual length - this also fixes the failing sparc GENERIC_SUN4U build
diffstat:
sys/arch/sparc64/sparc64/mdesc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 950a198e66d5 -r c38a64135c98 sys/arch/sparc64/sparc64/mdesc.c
--- a/sys/arch/sparc64/sparc64/mdesc.c Sun Jan 11 10:00:53 2015 +0000
+++ b/sys/arch/sparc64/sparc64/mdesc.c Sun Jan 11 13:40:22 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mdesc.c,v 1.1 2015/01/10 22:19:26 palle Exp $ */
+/* $NetBSD: mdesc.c,v 1.2 2015/01/11 13:40:22 palle Exp $ */
/* $OpenBSD: mdesc.c,v 1.7 2014/11/30 22:26:15 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
@@ -42,7 +42,9 @@
vaddr_t va;
int err;
- hv_mach_desc((paddr_t)NULL, &len);
+ pa = 0;
+ len = 0; /* trick to determine actual buffer size */
+ hv_mach_desc(pa, &len);
KASSERT(len != 0);
again:
Home |
Main Index |
Thread Index |
Old Index