summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c
index 55e822f6..2d611d48 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_common.c
+++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c
@@ -136,12 +136,12 @@ static int gk20a_ltc_alloc_phys_cbc(struct gk20a *g,
136 size_t compbit_backing_size) 136 size_t compbit_backing_size)
137{ 137{
138 struct gr_gk20a *gr = &g->gr; 138 struct gr_gk20a *gr = &g->gr;
139 int order = ffs(compbit_backing_size >> PAGE_SHIFT); 139 int order = order_base_2(compbit_backing_size >> PAGE_SHIFT);
140 struct page *pages; 140 struct page *pages;
141 struct sg_table *sgt; 141 struct sg_table *sgt;
142 int err = 0; 142 int err = 0;
143 143
144 /* allocate few pages */ 144 /* allocate pages */
145 pages = alloc_pages(GFP_KERNEL, order); 145 pages = alloc_pages(GFP_KERNEL, order);
146 if (!pages) { 146 if (!pages) {
147 gk20a_dbg(gpu_dbg_pte, "alloc_pages failed\n"); 147 gk20a_dbg(gpu_dbg_pte, "alloc_pages failed\n");