Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc In mem_regions(), deal with the cas...
details: https://anonhg.NetBSD.org/src/rev/9d303cdae59f
branches: trunk
changeset: 500092:9d303cdae59f
user: mycroft <mycroft%NetBSD.org@localhost>
date: Tue Dec 05 05:16:00 2000 +0000
description:
In mem_regions(), deal with the case of a run of consecutive holes.
Now the cube works with the memory in any order.
diffstat:
sys/arch/powerpc/powerpc/ofw_machdep.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r 2c64bdc07e56 -r 9d303cdae59f sys/arch/powerpc/powerpc/ofw_machdep.c
--- a/sys/arch/powerpc/powerpc/ofw_machdep.c Tue Dec 05 05:05:52 2000 +0000
+++ b/sys/arch/powerpc/powerpc/ofw_machdep.c Tue Dec 05 05:16:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_machdep.c,v 1.6 2000/09/24 15:57:03 tsubai Exp $ */
+/* $NetBSD: ofw_machdep.c,v 1.7 2000/12/05 05:16:00 mycroft Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -76,12 +76,13 @@
/* Remove zero sized entry in the returned data. */
cnt /= sizeof OFmem[0];
- for (i = 0; i < cnt; i++)
+ for (i = 0; i < cnt; )
if (OFmem[i].size == 0) {
bcopy(&OFmem[i + 1], &OFmem[i],
(cnt - i) * sizeof OFmem[0]);
cnt--;
- }
+ } else
+ i++;
bzero(OFavail, sizeof OFavail);
cnt = OF_getprop(phandle, "available",
@@ -90,12 +91,13 @@
goto error;
cnt /= sizeof OFavail[0];
- for (i = 0; i < cnt; i++)
+ for (i = 0; i < cnt; )
if (OFavail[i].size == 0) {
bcopy(&OFavail[i + 1], &OFavail[i],
(cnt - i) * sizeof OFavail[0]);
cnt--;
- }
+ } else
+ i++;
*memp = OFmem;
*availp = OFavail;
Home |
Main Index |
Thread Index |
Old Index