Skip to contentSkip to conversation

ia64 bugfix: nptcg breaks cpu-hotadd

PATCH New Hidetoshi Seto 1 participant 1 message Apr 25, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64 bugfix: nptcg breaks cpu-hotadd

If "max_purges" from PAL is 0, it actually means 1.

However it was not handled later when a hot-added cpu pass the max_purges from PAL. This makes systems easy to go BUG_ON().

---
 arch/ia64/mm/tlb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/ia64/mm/tlb.c +4 -1
index d52ec4e..8caf424 100644
@@ -168,7 +168,10 @@ setup_ptcg_sem(int max_purges, int nptcg_from)
 	static int firstcpu = 1;
 
 	if (toolatetochangeptcgsem) {
-		BUG_ON(max_purges < nptcg);
+		if (nptcg_from = NPTCG_FROM_PAL && max_purges = 0)
+			BUG_ON(1 < nptcg);
+		else
+			BUG_ON(max_purges < nptcg);
 		return;
 	}