*/
#define __NO_VERSION__
+#include <linux/vmalloc.h>
#include "drmP.h"
#ifndef __HAVE_PCI_DMA
return -EINVAL;
}
#endif
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if ( map->type == _DRM_FRAME_BUFFER ||
(map->flags & _DRM_WRITE_COMBINING) ) {
map->mtrr = mtrr_add( map->offset, map->size,
* isn't in use.
*/
-int DRM(rmmap)(struct inode *inode, struct file *filp,
+int DRM(rmmap)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
drm_file_t *priv = filp->private_data;
drm_map_t request;
int found_maps = 0;
- if (copy_from_user(&request, (drm_map_t *)arg,
+ if (copy_from_user(&request, (drm_map_t *)arg,
sizeof(request))) {
return -EFAULT;
}
switch (map->type) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if (map->mtrr >= 0) {
int retcode;
retcode = mtrr_del(map->mtrr,
}
}
/* We were the only map that was found */
- if(found_maps == 1 &&
+ if(found_maps == 1 &&
map->flags & _DRM_REMOVABLE) {
/* Check to see if we are in the maplist, if we are not, then
* we delete this mappings information.
switch (map->type) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if (map->mtrr >= 0) {
int retcode;
retcode = mtrr_del(map->mtrr,
*/
#define __NO_VERSION__
+#include <linux/vmalloc.h>
#include "drmP.h"
#ifndef __HAVE_PCI_DMA
return -EINVAL;
}
#endif
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if ( map->type == _DRM_FRAME_BUFFER ||
(map->flags & _DRM_WRITE_COMBINING) ) {
map->mtrr = mtrr_add( map->offset, map->size,
* isn't in use.
*/
-int DRM(rmmap)(struct inode *inode, struct file *filp,
+int DRM(rmmap)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
drm_file_t *priv = filp->private_data;
drm_map_t request;
int found_maps = 0;
- if (copy_from_user(&request, (drm_map_t *)arg,
+ if (copy_from_user(&request, (drm_map_t *)arg,
sizeof(request))) {
return -EFAULT;
}
switch (map->type) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if (map->mtrr >= 0) {
int retcode;
retcode = mtrr_del(map->mtrr,
}
}
/* We were the only map that was found */
- if(found_maps == 1 &&
+ if(found_maps == 1 &&
map->flags & _DRM_REMOVABLE) {
/* Check to see if we are in the maplist, if we are not, then
* we delete this mappings information.
switch (map->type) {
case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER:
-#ifdef __REALLY_HAVE_MTRR
+#if __REALLY_HAVE_MTRR
if (map->mtrr >= 0) {
int retcode;
retcode = mtrr_del(map->mtrr,