Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Revert christos@ fix for the i386 paddr_t change and agp...



details:   https://anonhg.NetBSD.org/src/rev/a90a0e72763f
branches:  trunk
changeset: 757905:a90a0e72763f
user:      jym <jym%NetBSD.org@localhost>
date:      Sat Oct 02 21:52:14 2010 +0000

description:
Revert christos@ fix for the i386 paddr_t change and agp_allocate.

Make 'physical' element of the struct agp_allocate an uint32_t. This
is similar to what other kernels do (at least Solaris and Linux).

This patch should make xserver work again within an i386 userland in a
64 bits paddr_t world.

Thanks to Iain Hibbert for reporting the break, and providing initial hints.

See http://mail-index.netbsd.org/current-users/2010/09/27/msg014418.html

diffstat:

 sys/dev/pci/agp.c |  39 ++-------------------------------------
 sys/sys/agpio.h   |  10 ++--------
 2 files changed, 4 insertions(+), 45 deletions(-)

diffs (84 lines):

diff -r 52a42e78ed1b -r a90a0e72763f sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Sat Oct 02 20:07:39 2010 +0000
+++ b/sys/dev/pci/agp.c Sat Oct 02 21:52:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp.c,v 1.73 2010/09/28 20:14:11 christos Exp $        */
+/*     $NetBSD: agp.c,v 1.74 2010/10/02 21:52:15 jym Exp $     */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.73 2010/09/28 20:14:11 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.74 2010/10/02 21:52:15 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -944,41 +944,6 @@
        case AGPIOC_SETUP:
                return agp_setup_user(sc, (agp_setup *)data);
 
-#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: {
-               int ret;
-               agp_allocate aga;
-               agp_oallocate *oaga = data;
-
-               aga.type = oaga->type;
-               aga.pg_count = oaga->pg_count;
-
-               if ((ret = agp_allocate_user(sc, &aga)) == 0) {
-                       oaga->key = aga.key;
-                       oaga->physical = (u_long)aga.physical;
-               }
-
-               return ret;
-       }
-}
-#endif
        case AGPIOC_ALLOCATE:
                return agp_allocate_user(sc, (agp_allocate *)data);
 
diff -r 52a42e78ed1b -r a90a0e72763f sys/sys/agpio.h
--- a/sys/sys/agpio.h   Sat Oct 02 20:07:39 2010 +0000
+++ b/sys/sys/agpio.h   Sat Oct 02 21:52:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agpio.h,v 1.8 2010/09/28 14:02:48 christos Exp $       */
+/*     $NetBSD: agpio.h,v 1.9 2010/10/02 21:52:14 jym Exp $    */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -111,13 +111,7 @@
        int key;                /* tag of allocation            */
        size_t pg_count;        /* number of pages              */
        uint32_t type;          /* 0 == normal, other devspec   */
-#ifdef __i386__
-       /* XXX: For transition, until paddr_t becomes 64bits for all kernels */
-       uint64_t
-#else
-       paddr_t
-#endif
-               physical;       /* device specific (some devices
+       uint32_t physical;      /* device specific (some devices
                                 * need a phys address of the
                                 * actual page behind the gatt
                                 * table)                        */



Home | Main Index | Thread Index | Old Index