From owner-svn-src-all@FreeBSD.ORG Mon Jul 25 18:17:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68939106566B; Mon, 25 Jul 2011 18:17:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EE368FC18; Mon, 25 Jul 2011 18:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6PIHBt8069475; Mon, 25 Jul 2011 18:17:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6PIHBSn069473; Mon, 25 Jul 2011 18:17:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201107251817.p6PIHBSn069473@svn.freebsd.org> From: Marius Strobl Date: Mon, 25 Jul 2011 18:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224356 - stable/8/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 18:17:11 -0000 Author: marius Date: Mon Jul 25 18:17:11 2011 New Revision: 224356 URL: http://svn.freebsd.org/changeset/base/224356 Log: MFC: r223126 (partial) Don't include curcpu in the mask which is used as the IPI cookie as we have to ignore it when sending the IPI anyway. Actually I can't think of a good reason why this ever was done that way in the first place as it's not even usefull for debugging. Modified: stable/8/sys/sparc64/include/smp.h Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Mon Jul 25 17:56:06 2011 (r224355) +++ stable/8/sys/sparc64/include/smp.h Mon Jul 25 18:17:11 2011 (r224356) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Jake Burkholder. + * Copyright (c) 2007 - 2011 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -164,9 +165,9 @@ ipi_dcache_page_inval(void *func, vm_pad sched_pin(); ica = &ipi_cache_args; mtx_lock_spin(&ipi_mtx); - ica->ica_mask = all_cpus; + ica->ica_mask = PCPU_GET(other_cpus); ica->ica_pa = pa; - cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)func, (u_long)ica); + cpu_ipi_selected(ica->ica_mask, 0, (u_long)func, (u_long)ica); return (&ica->ica_mask); } @@ -180,9 +181,9 @@ ipi_icache_page_inval(void *func, vm_pad sched_pin(); ica = &ipi_cache_args; mtx_lock_spin(&ipi_mtx); - ica->ica_mask = all_cpus; + ica->ica_mask = PCPU_GET(other_cpus); ica->ica_pa = pa; - cpu_ipi_selected(PCPU_GET(other_cpus), 0, (u_long)func, (u_long)ica); + cpu_ipi_selected(ica->ica_mask, 0, (u_long)func, (u_long)ica); return (&ica->ica_mask); } @@ -196,7 +197,7 @@ ipi_rd(u_int cpu, void *func, u_long *va sched_pin(); ira = &ipi_rd_args; mtx_lock_spin(&ipi_mtx); - ira->ira_mask = 1 << cpu | PCPU_GET(cpumask); + ira->ira_mask = 1 << cpu; ira->ira_val = val; cpu_ipi_single(cpu, 0, (u_long)func, (u_long)ira); return (&ira->ira_mask); @@ -217,7 +218,7 @@ ipi_tlb_context_demap(struct pmap *pm) } ita = &ipi_tlb_args; mtx_lock_spin(&ipi_mtx); - ita->ita_mask = cpus | PCPU_GET(cpumask); + ita->ita_mask = cpus; ita->ita_pmap = pm; cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_context_demap, (u_long)ita); @@ -239,7 +240,7 @@ ipi_tlb_page_demap(struct pmap *pm, vm_o } ita = &ipi_tlb_args; mtx_lock_spin(&ipi_mtx); - ita->ita_mask = cpus | PCPU_GET(cpumask); + ita->ita_mask = cpus; ita->ita_pmap = pm; ita->ita_va = va; cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_tlb_page_demap, (u_long)ita); @@ -261,7 +262,7 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ } ita = &ipi_tlb_args; mtx_lock_spin(&ipi_mtx); - ita->ita_mask = cpus | PCPU_GET(cpumask); + ita->ita_mask = cpus; ita->ita_pmap = pm; ita->ita_start = start; ita->ita_end = end; @@ -276,7 +277,6 @@ ipi_wait(void *cookie) volatile cpumask_t *mask; if ((mask = cookie) != NULL) { - atomic_clear_int(mask, PCPU_GET(cpumask)); while (*mask != 0) ; mtx_unlock_spin(&ipi_mtx);