From d5ed97e8e2d9e7a906c9917fff94e50adb8c2f19 Mon Sep 17 00:00:00 2001 From: kartamonov Date: Mon, 14 Feb 2011 14:22:46 +0200 Subject: [PATCH] video: tegra: nvmap: Fix broken optimization An attempt had been made to reduce the number of pte operations while patching relocs. The optimization was incorrectly coded and was not providing the expected speedup. Credit for the find goes to Peter Pipkorn. Change-Id: Ic83b20ee470e54d5053f747dbcbdf7b038b7c7c4 Signed-off-by: Rebecca Schultz Zavin --- drivers/video/tegra/nvmap/nvmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c index 262f1b9b357d..1a70f43d79f5 100644 --- a/drivers/video/tegra/nvmap/nvmap.c +++ b/drivers/video/tegra/nvmap/nvmap.c @@ -377,6 +377,7 @@ static int nvmap_reloc_pin_array(struct nvmap_client *client, unsigned long kaddr = (unsigned long)addr; set_pte_at(&init_mm, kaddr, *pte, pfn_pte(pfn, prot)); flush_tlb_kernel_page(kaddr); + last_pfn = pfn; } reloc_addr = handle_phys(pin) + arr[i].pin_offset; -- 2.34.1