[2.5 PATCH] flush_tlb_range cleanup (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




---------- Forwarded message ----------
Date: Mon, 26 Aug 2002 21:55:47 +0200 (CEST)
From: Vivien Chappelier <glaurung@melkor.maisel.enst-bretagne.fr>
To: Ralf Baechle <ralf@oss.sgi.com>
Cc: linux-mips@oss.sgi.com
Subject: [2.5 PATCH] flush_tlb_range cleanup

Hi,

	The following patch cleans up the mess regarding the first
argument of flush_tlb_range. It's a vm_area_struct, not an mm_struct.
Looks like some places were missed when the API changed (if it
did)...

	Diff against CVS HEAD, for both mips and mips64.

Vivien.

--- linux/arch/mips/kernel/smp.c	2002-08-20 13:30:40.000000000 +0200
+++ linux.patch/arch/mips/kernel/smp.c	2002-08-22 22:32:09.000000000 +0200
@@ -300,12 +300,14 @@
 	local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2);
 }
 
-void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end)
+void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
 {
+	struct mm_struct *mm = vma->vm_mm;
+
 	if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
 		struct flush_tlb_data fd;
 
-		fd.mm = mm;
+		fd.vma = vma;
 		fd.addr1 = start;
 		fd.addr2 = end;
 		smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1, 1);
@@ -315,7 +317,7 @@
 			if (smp_processor_id() != i)
 				CPU_CONTEXT(i, mm) = 0;
 	}
-	local_flush_tlb_range(mm, start, end);
+	local_flush_tlb_range(vma, start, end);
 }
 
 static void flush_tlb_page_ipi(void *info)
--- linux/arch/mips64/mm/tlb-r4k.c	2002-08-20 01:23:56.000000000 +0200
+++ linux.patch/arch/mips64/mm/tlb-r4k.c	2002-08-22 22:24:23.000000000 +0200
@@ -92,9 +92,11 @@
 	}
 }
 
-void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
+void local_flush_tlb_range(struct vma_struct *vma, unsigned long start,
 				unsigned long end)
 {
+	struct mm_struct *mm = vma->vm_mm;
+
 	if (CPU_CONTEXT(smp_processor_id(), mm) != 0) {
 		unsigned long flags;
 		int size;
--- linux/arch/mips64/kernel/smp.c	2002-08-20 13:30:40.000000000 +0200
+++ linux.patch/arch/mips64/kernel/smp.c	2002-08-24 14:22:28.000000000 +0200
@@ -300,12 +300,14 @@
 	local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2);
 }
 
-void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end)
+void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
 {
+	struct mm_struct *mm = vma->vm_mm;
+
 	if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
 		struct flush_tlb_data fd;
 
-		fd.mm = mm;
+		fd.vma = vma;
 		fd.addr1 = start;
 		fd.addr2 = end;
 		smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1, 1);
@@ -315,7 +317,7 @@
 			if (smp_processor_id() != i)
 				CPU_CONTEXT(i, mm) = 0;
 	}
-	local_flush_tlb_range(mm, start, end);
+	local_flush_tlb_range(vma, start, end);
 }
 
 static void flush_tlb_page_ipi(void *info)
--- linux/arch/mips64/mm/andes.c	2002-08-20 01:23:54.000000000 +0200
+++ linux.patch/arch/mips64/mm/andes.c	2002-08-24 19:23:55.000000000 +0200
@@ -237,7 +237,7 @@
 	size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
 	size = (size + 1) >> 1;
 	if (size <= NTLB_ENTRIES_HALF) {
-		int old = get_entryhi();
+		int pid = get_entryhi();
 
 		start &= (PAGE_MASK << 1);
 		end += ((PAGE_SIZE << 1) - 1);




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux