Re: [PATCH] MIPS: ASID conflict after CPU hotplug

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

 



Hello.

On 30-11-2010 22:49, Maksim Rayskiy wrote:

From 9a03661a40407e14ee75295f5541f371f0a7cdda Mon Sep 17 00:00:00 2001
From: Maksim Rayskiy<maksim.rayskiy@xxxxxxxxx>
Date: Tue, 30 Nov 2010 11:34:31 -0800
Subject: [PATCH] MIPS: Added local_flush_tlb_all_mm to clear all mm
contexts on calling cpu

When hotplug removing a cpu, all mm context TLB entries must be cleared
to avoid ASID conflict when cpu is restarted.
New functions local_flush_tlb_all_mm() and all-cpu version
flush_tlb_all_mm() are added.
To function properly, local_flush_tlb_all_mm() must be called when
mm_cpumask for all
mm context on given cpu is cleared.

Signed-off-by: Maksim Rayskiy<maksim.rayskiy@xxxxxxxxx>
[...]

diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index c618eed..5c03218 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -66,6 +66,18 @@ extern void build_tlb_refill_handler(void);

  #endif

+/* This function will clear all mm contexts on calling cpu
+ * To produce desired effect it must be called
+ * when mm_cpumask for all mm contexts is cleared
+ */
+void local_flush_tlb_all_mm(void)
+{
+	struct task_struct *p;

   An empty line wouldn't hurt here...

+	for_each_process(p)
+		if (p->mm)
+			local_flush_tlb_mm(p->mm);
+}
+

WBR, Sergei



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

  Powered by Linux