patch-2.4.23 linux-2.4.23/drivers/char/drm/drm_memory.h
Next file: linux-2.4.23/drivers/char/drm/drm_os_linux.h
Previous file: linux-2.4.23/drivers/char/drm/drm_lock.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
2003-11-28 10:26:20.000000000 -0800
- Orig file:
linux-2.4.22/drivers/char/drm/drm_memory.h
- Orig date:
2002-11-28 15:53:12.000000000 -0800
diff -urN linux-2.4.22/drivers/char/drm/drm_memory.h linux-2.4.23/drivers/char/drm/drm_memory.h
@@ -313,6 +313,29 @@
return pt;
}
+void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size)
+{
+ void *pt;
+
+ if (!size) {
+ DRM_MEM_ERROR(DRM_MEM_MAPPINGS,
+ "Mapping 0 bytes at 0x%08lx\n", offset);
+ return NULL;
+ }
+
+ if (!(pt = ioremap_nocache(offset, size))) {
+ spin_lock(&DRM(mem_lock));
+ ++DRM(mem_stats)[DRM_MEM_MAPPINGS].fail_count;
+ spin_unlock(&DRM(mem_lock));
+ return NULL;
+ }
+ spin_lock(&DRM(mem_lock));
+ ++DRM(mem_stats)[DRM_MEM_MAPPINGS].succeed_count;
+ DRM(mem_stats)[DRM_MEM_MAPPINGS].bytes_allocated += size;
+ spin_unlock(&DRM(mem_lock));
+ return pt;
+}
+
void DRM(ioremapfree)(void *pt, unsigned long size)
{
int alloc_count;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)