summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKrishna Reddy <vdumpa@nvidia.com>2012-07-18 14:59:51 -0700
committerSimone Willett <swillett@nvidia.com>2012-07-27 18:19:04 -0700
commit1811650b54e3d988dfd6dc9ecb8c7d0e4986d8a1 (patch)
tree584c88cbccbca0adb914399d17725ec363be1b84 /drivers
parentc4a16ddeba4bd015d0d761780414800dbb013b55 (diff)
video: tegra: nvmap: Set PAGELIST_VMALLOC_MIN size correct
page list array size greater than PAGE_SIZE should use vmalloc. Change-Id: Ic03668ba7ff716bfb3cc08aaef5f86214ee0a9df Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/116875 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com> Tested-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> (cherry picked from commit ddacaacd2a9fff10187e026eaa0d898694eeb95f) Reviewed-on: http://git-master/r/118194
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_handle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c
index 05046ed8ba79..f12c058042dc 100644
--- a/drivers/video/tegra/nvmap/nvmap_handle.c
+++ b/drivers/video/tegra/nvmap/nvmap_handle.c
@@ -3,7 +3,7 @@
*
* Handle allocation and freeing routines for nvmap
*
- * Copyright (c) 2009-2012, NVIDIA Corporation.
+ * Copyright (c) 2009-2012, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -56,7 +56,7 @@
* the kernel (i.e., not a carveout handle) includes its array of pages. to
* preserve kmalloc space, if the array of pages exceeds PAGELIST_VMALLOC_MIN,
* the array is allocated using vmalloc. */
-#define PAGELIST_VMALLOC_MIN (PAGE_SIZE * 2)
+#define PAGELIST_VMALLOC_MIN (PAGE_SIZE)
#ifdef CONFIG_NVMAP_PAGE_POOLS
@@ -444,7 +444,7 @@ fail:
static inline void *altalloc(size_t len)
{
- if (len >= PAGELIST_VMALLOC_MIN)
+ if (len > PAGELIST_VMALLOC_MIN)
return vmalloc(len);
else
return kmalloc(len, GFP_KERNEL);
@@ -455,7 +455,7 @@ static inline void altfree(void *ptr, size_t len)
if (!ptr)
return;
- if (len >= PAGELIST_VMALLOC_MIN)
+ if (len > PAGELIST_VMALLOC_MIN)
vfree(ptr);
else
kfree(ptr);