Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/stand/ofwboot Fix fallout from libsa change; ...
details: https://anonhg.NetBSD.org/src/rev/15dc02ddda9c
branches: trunk
changeset: 365864:15dc02ddda9c
user: rin <rin%NetBSD.org@localhost>
date: Fri Apr 29 20:24:02 2022 +0000
description:
Fix fallout from libsa change; stand.h includes <sys/param.h> now.
- Stop redefining roundup2().
- Compare kvamap->start (uint64_t) with 0 instead of NULL.
- Include <sys/param.h> explicitly.
Thanks gson@ for notification.
diffstat:
sys/arch/sparc/stand/ofwboot/loadfile_machdep.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 798d9bd1e9c4 -r 15dc02ddda9c sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
--- a/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Fri Apr 29 19:37:00 2022 +0000
+++ b/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Fri Apr 29 20:24:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_machdep.c,v 1.16 2016/11/04 20:04:11 macallan Exp $ */
+/* $NetBSD: loadfile_machdep.c,v 1.17 2022/04/29 20:24:02 rin Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -29,6 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/param.h>
+
#include <lib/libsa/stand.h>
#include <lib/libkern/libkern.h>
@@ -47,8 +49,6 @@
#define hi(val) ((uint32_t)(((val) >> 32) & (uint32_t)-1))
#define lo(val) ((uint32_t)((val) & (uint32_t)-1))
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1)))
-
typedef int phandle_t;
@@ -133,7 +133,7 @@
*new_va = va;
for (i = 0; (len > 0) && (i < MAXSEGNUM); i++) {
- if (kvamap[i].start == NULL)
+ if (kvamap[i].start == 0)
break;
if ((kvamap[i].start <= va) && (va < kvamap[i].end)) {
uint64_t va_len = kvamap[i].end - va;
@@ -155,7 +155,7 @@
DPRINTF(("kvamap_enter: %d@%p\n", (int)len, (void*)(u_long)va));
for (i = 0; (len > 0) && (i < MAXSEGNUM); i++) {
- if (kvamap[i].start == NULL) {
+ if (kvamap[i].start == 0) {
kvamap[i].start = va;
kvamap[i].end = va + len;
break;
Home |
Main Index |
Thread Index |
Old Index