From 7391e259a1d29672de29364be76ef26ca6e48494 Mon Sep 17 00:00:00 2001
From: Tony Liu <Bo.Liu@windriver.com>
Date: Wed, 18 Aug 2010 15:16:56 +0800
Subject: [PATCH] cramfs xip: pass virtual address to do flush tlb

The parameter addr of flush_tlb_page() should be user virtual address of
address space 'vma->vm_mm'. But here, obviously the address for it is
physical address of NOR flash partition shipping CRAMFS XIP rootfs.
Correct it to it's mapping virtual address.

Signed-off-by: Tonyliu <Bo.Liu@windriver.com>
---
 fs/cramfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 1ec482d..bfe6b49 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -118,7 +118,7 @@ static int cramfs_mmap(struct file *file, struct vm_area_struct *vma)
 	 */
 	vma->vm_flags |= VM_IO;
 	vma->is_xip = 1;
-	flush_tlb_page(vma, address);
+	flush_tlb_page(vma, vma->vm_start);
 	if (remap_pfn_range(vma, vma->vm_start, address >> PAGE_SHIFT, length,
 			     vma->vm_page_prot))
 		return -EAGAIN;
-- 
1.6.5.2

