From owner-p4-projects@FreeBSD.ORG Mon May 29 21:57:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ED69216A43B; Mon, 29 May 2006 21:57:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95C0916B2F5 for ; Mon, 29 May 2006 21:57:31 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01BD843D72 for ; Mon, 29 May 2006 21:57:31 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4TLuGI1026924 for ; Mon, 29 May 2006 21:56:16 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4TLuGWd026921 for perforce@freebsd.org; Mon, 29 May 2006 21:56:16 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 29 May 2006 21:56:16 GMT Message-Id: <200605292156.k4TLuGWd026921@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 98101 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 21:57:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=98101 Change 98101 by kmacy@kmacy_storage:sun4v_work on 2006/05/29 21:56:06 don't send shootdowns to cpus we don't own Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#60 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#60 (text+ko) ==== @@ -1144,7 +1144,7 @@ int i, cpu_count; u_int cpus; - cpumask_t cpumask, active; + cpumask_t cpumask, active, curactive; cpumask_t active_total, ackmask; uint16_t *cpulist; @@ -1154,7 +1154,8 @@ cpumask = PCPU_GET(cpumask); cpulist = PCPU_GET(cpulist); - + curactive = 0; + if (rdpr(pil) != 14) panic("pil %ld != 14", rdpr(pil)); @@ -1175,14 +1176,16 @@ #endif active_total = active = PCPU_GET(other_cpus); - if (active_total == 0) + if (active == 0) goto done; + retry: - for (cpu_count = 0, i = 0, cpus = active; i < 32 && cpus; i++, cpus = (cpus>>1)) { + for (i = curactive = cpu_count = 0, cpus = active; i < mp_ncpus && cpus; i++, cpus = (cpus>>1)) { if ((cpus & 0x1) == 0) continue; - + + curactive |= (1 << i); cpulist[cpu_count] = (uint16_t)i; cpu_count++; } @@ -1191,15 +1194,15 @@ cpu_ipi_selected(cpu_count, cpulist, (uint64_t)func, (uint64_t)arg1, (uint64_t)arg2, (uint64_t *)&ackmask); - while (ackmask != active) { + while (ackmask != curactive) { DELAY(1); i++; - if (i > 1000000) - panic(" ackmask=0x%x active=0x%x\n", ackmask, active); + if (i > 100000000) + panic(" ackmask=0x%x active=0x%x\n", ackmask, curactive); } - active_total |= active; + active_total |= curactive; if ((active = (pmap->pm_tlbactive & ~(active_total|cpumask))) != 0) goto retry;