Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys - fixes from Jean-Yves Migeon
details: https://anonhg.NetBSD.org/src/rev/8a9cb8fd5ea8
branches: trunk
changeset: 757856:8a9cb8fd5ea8
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 28 14:02:48 2010 +0000
description:
- fixes from Jean-Yves Migeon
- handle transitional paddr_t period for i386
diffstat:
sys/dev/pci/agp.c | 16 ++++++++++------
sys/sys/agpio.h | 10 ++++++++--
2 files changed, 18 insertions(+), 8 deletions(-)
diffs (66 lines):
diff -r 2b60d1a24a37 -r 8a9cb8fd5ea8 sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Tue Sep 28 12:39:50 2010 +0000
+++ b/sys/dev/pci/agp.c Tue Sep 28 14:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $ */
+/* $NetBSD: agp.c,v 1.72 2010/09/28 14:02:48 christos Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.72 2010/09/28 14:02:48 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -963,15 +963,19 @@
} agp_oallocate;
case AGPIOC_OALLOCATE: {
+ int ret;
agp_allocate aga;
agp_oallocate *oaga = data;
- aga.key = oaga->key;
+ aga.type = oaga->type;
aga.pg_count = oaga->pg_count;
- aga.type = oaga->type;
- aga.physical = oaga->physical;
- return agp_allocate_user(sc, &aga);
+ if ((ret = agp_allocate_user(sc, &aga)) == 0) {
+ oaga->key = aga->key;
+ oaga->physical = (u_long)aga->physical;
+ }
+
+ return ret;
}
}
#endif
diff -r 2b60d1a24a37 -r 8a9cb8fd5ea8 sys/sys/agpio.h
--- a/sys/sys/agpio.h Tue Sep 28 12:39:50 2010 +0000
+++ b/sys/sys/agpio.h Tue Sep 28 14:02:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agpio.h,v 1.7 2010/09/27 22:49:46 christos Exp $ */
+/* $NetBSD: agpio.h,v 1.8 2010/09/28 14:02:48 christos Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -111,7 +111,13 @@
int key; /* tag of allocation */
size_t pg_count; /* number of pages */
uint32_t type; /* 0 == normal, other devspec */
- paddr_t physical; /* device specific (some devices
+#ifdef __i386__
+ /* XXX: For transition, until paddr_t becomes 64bits for all kernels */
+ uint64_t
+#else
+ paddr_t
+#endif
+ physical; /* device specific (some devices
* need a phys address of the
* actual page behind the gatt
* table) */
Home |
Main Index |
Thread Index |
Old Index