mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
video: tegra: nvmap: Remove use_numa parameter
Remove use_numa parameter from nvmap_alloc.c because its redundant. Bug 4479027 Change-Id: I611b2e606299389d5ff0880b263abe6c161c2d0d Signed-off-by: Yash Bhatt <ybhatt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158948 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Bitan Biswas <bbiswas@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
31f41ea186
commit
f2065a85cc
@@ -49,16 +49,13 @@ void nvmap_altfree(void *ptr, size_t len)
|
|||||||
kfree(ptr);
|
kfree(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct page *nvmap_alloc_pages_exact(gfp_t gfp, size_t size, bool use_numa, int numa_id)
|
static struct page *nvmap_alloc_pages_exact(gfp_t gfp, size_t size, int numa_id)
|
||||||
{
|
{
|
||||||
struct page *page, *p, *e;
|
struct page *page, *p, *e;
|
||||||
unsigned int order;
|
unsigned int order;
|
||||||
|
|
||||||
order = get_order(size);
|
order = get_order(size);
|
||||||
if (!use_numa)
|
page = alloc_pages_node(numa_id, gfp, order);
|
||||||
page = alloc_pages(gfp, order);
|
|
||||||
else
|
|
||||||
page = alloc_pages_node(numa_id, gfp, order);
|
|
||||||
|
|
||||||
if (!page)
|
if (!page)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -93,7 +90,7 @@ static int handle_page_alloc(struct nvmap_client *client,
|
|||||||
|
|
||||||
if (contiguous) {
|
if (contiguous) {
|
||||||
struct page *page;
|
struct page *page;
|
||||||
page = nvmap_alloc_pages_exact(gfp, size, true, h->numa_id);
|
page = nvmap_alloc_pages_exact(gfp, size, h->numa_id);
|
||||||
if (!page)
|
if (!page)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
@@ -121,7 +118,7 @@ static int handle_page_alloc(struct nvmap_client *client,
|
|||||||
gfp_t gfp_no_reclaim = (gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM;
|
gfp_t gfp_no_reclaim = (gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM;
|
||||||
|
|
||||||
page = nvmap_alloc_pages_exact(gfp_no_reclaim,
|
page = nvmap_alloc_pages_exact(gfp_no_reclaim,
|
||||||
pages_per_big_pg << PAGE_SHIFT, true, h->numa_id);
|
pages_per_big_pg << PAGE_SHIFT, h->numa_id);
|
||||||
if (!page)
|
if (!page)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -146,7 +143,7 @@ static int handle_page_alloc(struct nvmap_client *client,
|
|||||||
}
|
}
|
||||||
for (i = allocated; i < nr_page; i++) {
|
for (i = allocated; i < nr_page; i++) {
|
||||||
pages[i] = nvmap_alloc_pages_exact(gfp, PAGE_SIZE,
|
pages[i] = nvmap_alloc_pages_exact(gfp, PAGE_SIZE,
|
||||||
true, h->numa_id);
|
h->numa_id);
|
||||||
|
|
||||||
if (!pages[i])
|
if (!pages[i])
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
Reference in New Issue
Block a user