summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-06-05 11:26:02 -0700
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-06-12 13:48:59 +0800
commit7d267e27c152a4935ec5301d9fbbfd6eff8816d4 (patch)
tree481c609070194b81d017f2a248c0f6eef5993a09
parent85308ab8aaf58b6620a41621128eba0b7e1ffb44 (diff)
downloadxf86-video-intel-frc-7d267e27c152a4935ec5301d9fbbfd6eff8816d4.tar.gz
xf86-video-intel-frc-7d267e27c152a4935ec5301d9fbbfd6eff8816d4.tar.bz2
Just remove the mprotect kludge.
Besides not being #ifdef __linux__ed as requested, some linux kernels break in exciting new ways when you try to mprotect from PROT_NONE back to PROT_READ|PROT_WRITE. Yes, there are bugs in the code we're calling in a bug-exploiting bug workaround. If you want this workaround for the original bug exposed when moving to libpciaccess, it's already in libpciaccess. (cherry picked from commit 65306cdd71dad71e4ca7229764f81a0880dd70bf)
-rw-r--r--src/i830_driver.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index f1efa7bb..a237374e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -692,11 +692,6 @@ I830MapMem(ScrnInfoPtr pScrn)
(void **) &pI830->FbBase);
if (err)
return FALSE;
- /* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
-#if HAVE_MPROTECT
- mprotect (pI830->FbBase, pI830->FbMapSize, PROT_NONE);
- mprotect (pI830->FbBase, pI830->FbMapSize, PROT_READ|PROT_WRITE);
-#endif
#else
pI830->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pI830->PciTag,