Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/miscfs/genfs XIP has no "fake" (== unitinialized)...
details: https://anonhg.NetBSD.org/src/rev/1efdcb9ed1b6
branches: uebayasi-xip
changeset: 751882:1efdcb9ed1b6
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sat Nov 20 07:47:34 2010 +0000
description:
XIP has no "fake" (== unitinialized) pages, because pages are
already initialized when mounted. Adjust getpages loop again.
diffstat:
sys/miscfs/genfs/genfs_io.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r d6b195436720 -r 1efdcb9ed1b6 sys/miscfs/genfs/genfs_io.c
--- a/sys/miscfs/genfs/genfs_io.c Sat Nov 20 05:15:59 2010 +0000
+++ b/sys/miscfs/genfs/genfs_io.c Sat Nov 20 07:47:34 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.36.2.50 2010/11/20 05:15:59 uebayasi Exp $ */
+/* $NetBSD: genfs_io.c,v 1.36.2.51 2010/11/20 07:47:34 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.50 2010/11/20 05:15:59 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.51 2010/11/20 07:47:34 uebayasi Exp $");
#include "opt_xip.h"
@@ -668,16 +668,19 @@
int pcount;
pcount = 1;
+ while ((pidx + pcount < npages) && (
#ifdef XIP
- if ((ap->a_vp->v_vflag & VV_XIP) == 0) {
+ /*
+ * in XIP case, we don't know what page to read
+ * at this point!
+ */
+ ((ap->a_vp->v_vflag & VV_XIP) != 0) ||
+#else
+ 0 ||
#endif
- while (pidx + pcount < npages &&
- pgs[pidx + pcount]->flags & PG_FAKE) {
+ (pgs[pidx + pcount]->flags & PG_FAKE))) {
pcount++;
}
-#ifdef XIP
- }
-#endif
iobytes = MIN(iobytes, (pcount << PAGE_SHIFT) -
(offset - trunc_page(offset)));
}
Home |
Main Index |
Thread Index |
Old Index