Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/dev Its a hack, but make sure the pages ar...
details: https://anonhg.NetBSD.org/src/rev/c9f57571cd33
branches: trunk
changeset: 319608:c9f57571cd33
user: reinoud <reinoud%NetBSD.org@localhost>
date: Mon Jun 04 20:06:52 2018 +0000
description:
Its a hack, but make sure the pages are paged in
diffstat:
sys/arch/usermode/dev/ld_thunkbus.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 8dca4ce93f46 -r c9f57571cd33 sys/arch/usermode/dev/ld_thunkbus.c
--- a/sys/arch/usermode/dev/ld_thunkbus.c Mon Jun 04 19:53:01 2018 +0000
+++ b/sys/arch/usermode/dev/ld_thunkbus.c Mon Jun 04 20:06:52 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld_thunkbus.c,v 1.32 2018/01/13 10:27:58 reinoud Exp $ */
+/* $NetBSD: ld_thunkbus.c,v 1.33 2018/06/04 20:06:52 reinoud Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_thunkbus.c,v 1.32 2018/01/13 10:27:58 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_thunkbus.c,v 1.33 2018/06/04 20:06:52 reinoud Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -271,6 +271,9 @@
// bp->b_flags & B_READ ? "read" : "write",
// (unsigned int)bp->b_bcount, (long long)offset, bp->b_data, bp->b_flags);
+ /* this is silly, but better make sure */
+ thunk_assert_presence((vaddr_t) bp->b_data, (size_t) bp->b_bcount);
+
/* read/write the request */
if (bp->b_flags & B_READ) {
ret = thunk_pread(sc->sc_fd, bp->b_data, bp->b_bcount, offset);
@@ -285,6 +288,7 @@
if ((ret >= 0) && (ret == bp->b_bcount)) {
bp->b_resid = 0;
} else {
+ // printf("ret = %d, errno %d?\n",(int) ret, thunk_geterrno());
bp->b_error = thunk_geterrno();
bp->b_resid = bp->b_bcount;
}
Home |
Main Index |
Thread Index |
Old Index