summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2008-06-09 22:55:11 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2008-06-09 22:55:11 +0000
commitda3080031345b8701c9b9597d2fba4805dac9615 (patch)
treed096a7300f4739d9229e00114461a227f18e3974 /xserver/hw/xfree86
parent152935c84dff17ac161bd2c0d65da8298a17b48d (diff)
Remove the special case for amd64 using MTRR. Wasn't compiled in in the
first place, and didn't work anyways. ok deraadt, oga, matthieu
Diffstat (limited to 'xserver/hw/xfree86')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/i386_video.c69
1 files changed, 4 insertions, 65 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/i386_video.c b/xserver/hw/xfree86/os-support/bsd/i386_video.c
index 303cea449..1f8482aef 100644
--- a/xserver/hw/xfree86/os-support/bsd/i386_video.c
+++ b/xserver/hw/xfree86/os-support/bsd/i386_video.c
@@ -54,11 +54,6 @@
#endif
#endif
-#if defined(__OpenBSD__) && defined(__amd64__)
-#include <machine/mtrr.h>
-#include <machine/sysarch.h>
-#endif
-
#include "xf86_OSlib.h"
#include "xf86OSpriv.h"
@@ -107,11 +102,6 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
MessageType);
static void NetBSDundoWC(int, pointer);
#endif
-#if defined(__amd64__) && defined(__OpenBSD__)
-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
@@ -209,10 +199,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->setWC = NetBSDsetWC;
pVidMem->undoWC = NetBSDundoWC;
#endif
-#if defined(__amd64__) && defined(__OpenBSD__)
- pVidMem->setWC = amd64setWC;
- pVidMem->undoWC = amd64undoWC;
-#endif
pVidMem->initialised = TRUE;
}
@@ -831,6 +817,10 @@ static pointer
setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
MessageType from)
{
+ xf86DrvMsg(screenNum, X_WARNING,
+ "%s MTRR %lx - %lx\n", enable ? "set" : "remove",
+ base, (base + size));
+
if (enable)
return addWC(screenNum, base, size, from);
else
@@ -935,57 +925,6 @@ NetBSDundoWC(int screenNum, pointer list)
}
#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 */
-
#ifdef X_PRIVSEP
/*
* Do all things that need root privileges early