37 #include <linux/export.h>
41 static void *agp_remap(
unsigned long offset,
unsigned long size,
46 struct drm_agp_mem *agpmem;
47 struct page **page_map;
48 struct page **phys_page_map;
54 offset -= dev->hose->mem_space->start;
58 if (agpmem->bound <= offset
76 for (i = 0; i < num_pages; ++i)
77 page_map[i] = phys_page_map[i];
105 static inline void *agp_remap(
unsigned long offset,
unsigned long size,
115 if (drm_core_has_AGP(dev) &&
116 dev->agp && dev->agp->cant_use_aperture && map->type ==
_DRM_AGP)
117 map->handle = agp_remap(map->offset, map->size, dev);
119 map->handle =
ioremap(map->offset, map->size);
125 if (drm_core_has_AGP(dev) &&
126 dev->agp && dev->agp->cant_use_aperture && map->type ==
_DRM_AGP)
127 map->handle = agp_remap(map->offset, map->size, dev);
129 map->handle =
ioremap_wc(map->offset, map->size);
135 if (!map->handle || !map->size)
138 if (drm_core_has_AGP(dev) &&
139 dev->agp && dev->agp->cant_use_aperture && map->type ==
_DRM_AGP)