Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2011 18:17:12 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r224357 - stable/7/sys/sparc64/include
Message-ID:  <201107251817.p6PIHCug069507@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Mon Jul 25 18:17:12 2011
New Revision: 224357
URL: http://svn.freebsd.org/changeset/base/224357

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/7/sys/sparc64/include/smp.h

Modified: stable/7/sys/sparc64/include/smp.h
==============================================================================
--- stable/7/sys/sparc64/include/smp.h	Mon Jul 25 18:17:11 2011	(r224356)
+++ stable/7/sys/sparc64/include/smp.h	Mon Jul 25 18:17:12 2011	(r224357)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2001 Jake Burkholder.
+ * Copyright (c) 2007 - 2011 Marius Strobl <marius@FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -156,9 +157,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);
 }
 
@@ -172,9 +173,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);
 }
 
@@ -188,7 +189,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);
@@ -209,7 +210,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);
@@ -231,7 +232,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);
@@ -253,7 +254,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;
@@ -268,7 +269,6 @@ ipi_wait(void *cookie)
 	volatile u_int *mask;
 
 	if ((mask = cookie) != NULL) {
-		atomic_clear_int(mask, PCPU_GET(cpumask));
 		while (*mask != 0)
 			;
 		mtx_unlock_spin(&ipi_mtx);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107251817.p6PIHCug069507>