summaryrefslogtreecommitdiff
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-04-05 11:37:28 +0900
committerTejun Heo <tj@kernel.org>2010-04-05 11:37:28 +0900
commit336f5899d287f06d8329e208fc14ce50f7ec9698 (patch)
tree9b762d450d5eb248a6ff8317badb7e223d93ed58 /include/drm/drmP.h
parenta4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff)
parentdb217dece3003df0841bacf9556b5c06aa097dae (diff)
Merge branch 'master' into export-slabh
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index cca2845bca55..2f3b3a00b7a3 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1546,39 +1546,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map)
{
}
-
-static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
-{
- if (size != 0 && nmemb > ULONG_MAX / size)
- return NULL;
-
- if (size * nmemb <= PAGE_SIZE)
- return kcalloc(nmemb, size, GFP_KERNEL);
-
- return __vmalloc(size * nmemb,
- GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
-}
-
-/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
-static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
-{
- if (size != 0 && nmemb > ULONG_MAX / size)
- return NULL;
-
- if (size * nmemb <= PAGE_SIZE)
- return kmalloc(nmemb * size, GFP_KERNEL);
-
- return __vmalloc(size * nmemb,
- GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
-}
-
-static __inline void drm_free_large(void *ptr)
-{
- if (!is_vmalloc_addr(ptr))
- return kfree(ptr);
-
- vfree(ptr);
-}
+#include "drm_mem_util.h"
/*@}*/
#endif /* __KERNEL__ */