projects
/
platform
/
upstream
/
libpciaccess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Kludge around linux bug and turn off write-through and cache-disable bits
[platform/upstream/libpciaccess.git]
/
src
/
linux_sysfs.c
diff --git
a/src/linux_sysfs.c
b/src/linux_sysfs.c
index
873dc02
..
78584d6
100644
(file)
--- a/
src/linux_sysfs.c
+++ b/
src/linux_sysfs.c
@@
-558,6
+558,9
@@
pci_device_linux_sysfs_map_range(struct pci_device *dev,
strerror(errno), errno);
/* err = errno;*/
}
+ /* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
+ mprotect (map->memory, map->size, PROT_NONE);
+ mprotect (map->memory, map->size, PROT_READ|PROT_WRITE);
}
#endif