msm: kgsl: Fix pagefault logging of one per 4k

Fixed incorrect logic to check if the next pagefault
is in the 4k address range of previous pagefaults.

Change-Id: I76c2e13f3b1cb287af0ef9c8af2f4452df23ec54
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_mmu.c b/drivers/gpu/msm/kgsl_mmu.c
index 5abbef1..d1f58c4 100644
--- a/drivers/gpu/msm/kgsl_mmu.c
+++ b/drivers/gpu/msm/kgsl_mmu.c
@@ -359,11 +359,11 @@
 	spin_lock(&kgsl_driver.ptlock);
 	list_for_each_entry(pt, &kgsl_driver.pagetable_list, list) {
 		if (mmu->mmu_ops->mmu_pt_equal(mmu, pt, pt_base)) {
-			if ((addr & PAGE_SIZE) == pt->fault_addr) {
+			if ((addr & (PAGE_SIZE-1)) == pt->fault_addr) {
 				ret = 1;
 				break;
 			} else {
-				pt->fault_addr = (addr & PAGE_SIZE);
+				pt->fault_addr = (addr & (PAGE_SIZE-1));
 				ret = 0;
 				break;
 			}
@@ -481,6 +481,7 @@
 
 	pagetable->name = name;
 	pagetable->max_entries = KGSL_PAGETABLE_ENTRIES(ptsize);
+	pagetable->fault_addr = 0xFFFFFFFF;
 
 	/*
 	 * create a separate kgsl pool for IOMMU, global mappings can be mapped