xserver: Branch 'master'

Matthieu Herrb herrb at kemper.freedesktop.org
Sat Aug 9 14:59:59 PDT 2008


 hw/xfree86/os-support/bsd/i386_video.c |   66 ---------------------------------
 1 file changed, 66 deletions(-)

New commits:
commit be2210b69defa225d8bc4bb90d94bfd740ef8b1f
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sat Aug 9 23:43:50 2008 +0200

    remove OpenBSD/amd64 specific mtrr API.
    
    The old code never worked anyways and was removed from OpenBSD.
    OpenBSD/amd64 4.4 and later support mtrr with the same API as
    OpenBSD/i386.

diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 505659e..9a28611 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -55,11 +55,6 @@
 #endif
 #endif
 
-#if defined(__OpenBSD__) && defined(__amd64__)
-#include <machine/mtrr.h>
-#include <machine/sysarch.h>
-#endif
-
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
@@ -108,11 +103,6 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
 			   MessageType);
 static void NetBSDundoWC(int, pointer);
 #endif
-#if defined(__OpenBSD__) && defined(__amd64__)
-static pointer amd64setWC(int, unsigned long, unsigned long, Bool, 
-    MessageType);
-static void amd64undoWC(int, pointer);
-#endif
 
 /*
  * Check if /dev/mem can be mmap'd.  If it can't print a warning when
@@ -229,10 +219,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	pVidMem->setWC = NetBSDsetWC;
 	pVidMem->undoWC = NetBSDundoWC;
 #endif
-#if defined(__OpenBSD__) && defined(__amd64__)
-	pVidMem->setWC = amd64setWC;
-	pVidMem->undoWC = amd64undoWC;
-#endif
 	pVidMem->initialised = TRUE;
 }
 
@@ -952,55 +938,3 @@ NetBSDundoWC(int screenNum, pointer list)
 	xfree(mtrrp);
 }
 #endif
-
-#if defined(__OpenBSD__) && defined(__amd64__)
-static pointer
-amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
-	    MessageType from)
-{
-	struct mtrr *mtrrp;
-	int n;
-
-	xf86DrvMsg(screenNum, X_WARNING,
-		   "%s MTRR %lx - %lx\n", enable ? "set" : "remove",
-		   base, (base + size));
-
-	mtrrp = xnfalloc(sizeof (struct mtrr));
-	mtrrp->base = base;
-	mtrrp->len = size;
-	mtrrp->type = MTRR_TYPE_WC;
-
-	/*
-	 * MTRR_PRIVATE will make this MTRR get reset automatically
-	 * if this process exits, so we have no need for an explicit
-	 * cleanup operation when starting a new server.
-	 */
-
-	if (enable)
-		mtrrp->flags = MTRR_VALID | MTRR_PRIVATE;
-	else
-		mtrrp->flags = 0;
-	n = 1;
-
-	if (amd64_set_mtrr(mtrrp, &n) < 0) {
-		xfree(mtrrp);
-		return NULL;
-	}
-	return mtrrp;
-}
-
-static void
-amd64undoWC(int screenNum, pointer list)
-{
-	struct mtrr *mtrrp = (struct mtrr *)list;
-	int n;
-
-	if (mtrrp == NULL)
-		return;
-	n = 1;
-	mtrrp->flags &= ~MTRR_VALID;
-	amd64_set_mtrr(mtrrp, &n);
-	xfree(mtrrp);
-}
-#endif /* OpenBSD/amd64 */
-


More information about the xorg-commit mailing list