Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci move all the compat code here, and #ifdef __i386...
details: https://anonhg.NetBSD.org/src/rev/8cc1d2d409aa
branches: trunk
changeset: 757851:8cc1d2d409aa
user: christos <christos%NetBSD.org@localhost>
date: Mon Sep 27 22:53:46 2010 +0000
description:
move all the compat code here, and #ifdef __i386__ from mrg.
diffstat:
sys/dev/pci/agp.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r 19a146885f85 -r 8cc1d2d409aa sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Mon Sep 27 22:49:46 2010 +0000
+++ b/sys/dev/pci/agp.c Mon Sep 27 22:53:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $ */
+/* $NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -944,7 +944,24 @@
case AGPIOC_SETUP:
return agp_setup_user(sc, (agp_setup *)data);
-#ifndef __LP64__ /* Wish ifdef knew about sizeof */
+#ifdef __i386__
+{
+ /*
+ * Handle paddr_t change from 32 bit for non PAE kernels
+ * to 64 bit.
+ */
+#define AGPIOC_OALLOCATE _IOWR(AGPIOC_BASE, 6, agp_oallocate)
+
+ typedef struct _agp_oallocate {
+ int key; /* tag of allocation */
+ size_t pg_count; /* number of pages */
+ uint32_t type; /* 0 == normal, other devspec */
+ u_long physical; /* device specific (some devices
+ * need a phys address of the
+ * actual page behind the gatt
+ * table) */
+ } agp_oallocate;
+
case AGPIOC_OALLOCATE: {
agp_allocate aga;
agp_oallocate *oaga = data;
@@ -956,8 +973,8 @@
return agp_allocate_user(sc, &aga);
}
+}
#endif
-
case AGPIOC_ALLOCATE:
return agp_allocate_user(sc, (agp_allocate *)data);
Home |
Main Index |
Thread Index |
Old Index