CVS commit: [netbsd-5] src/sys/arch/arm/arm32

2013-01-20 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jan 20 12:13:28 UTC 2013

Modified Files:
src/sys/arch/arm/arm32 [netbsd-5]: cpu.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1841):
sys/arch/arm/arm32/cpu.c: revision 1.89
S/,/;/


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.4.1 src/sys/arch/arm/arm32/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/cpu.c
diff -u src/sys/arch/arm/arm32/cpu.c:1.71 src/sys/arch/arm/arm32/cpu.c:1.71.4.1
--- src/sys/arch/arm/arm32/cpu.c:1.71	Sat Oct 25 18:15:19 2008
+++ src/sys/arch/arm/arm32/cpu.c	Sun Jan 20 12:13:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.71.4.1 2013/01/20 12:13:28 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.71.4.1 2013/01/20 12:13:28 bouyer Exp $);
 
 #include sys/systm.h
 #include sys/malloc.h
@@ -486,7 +486,7 @@ identify_arm_cpu(struct device *dv, stru
 		if (cpuids[i].cpuid == (cpuid  CPU_ID_CPU_MASK)) {
 			cpu_class = cpuids[i].cpu_class;
 			steppingstr = cpuids[i].cpu_steppings[cpuid 
-			CPU_ID_REVISION_MASK],
+			CPU_ID_REVISION_MASK];
 			sprintf(cpu_model, %s%s%s (%s core),
 			cpuids[i].cpu_name,
 			steppingstr[0] == '*' ?  :  ,



CVS commit: [netbsd-5] src/sys/arch/arm/arm32

2009-12-03 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Dec  3 09:27:00 UTC 2009

Modified Files:
src/sys/arch/arm/arm32 [netbsd-5]: pmap.c

Log Message:
Pull up the following revisions(s) (requested by scw in ticket #1168):
sys/arch/arm/arm32/pmap.c:  revision 1.203

Work-around a possible process exit corner case which can leave stale
data in the cache after a context-switch. Addresses kern/41058.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.187.4.1 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.187 src/sys/arch/arm/arm32/pmap.c:1.187.4.1
--- src/sys/arch/arm/arm32/pmap.c:1.187	Sun Sep 28 21:27:11 2008
+++ src/sys/arch/arm/arm32/pmap.c	Thu Dec  3 09:26:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.187.4.1 2009/12/03 09:26:59 sborrill Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -212,7 +212,7 @@
 #include machine/param.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.187.4.1 2009/12/03 09:26:59 sborrill Exp $);
 
 #ifdef PMAP_DEBUG
 
@@ -3645,7 +3645,6 @@
 	pg, VM_PAGE_TO_PHYS(pg), prot));
 
 	switch(prot) {
-		return;
 	case VM_PROT_READ|VM_PROT_WRITE:
 #if defined(PMAP_CHECK_VIPT)  defined(PMAP_APX)
 		pmap_clearbit(pg, PVF_EXEC);
@@ -4076,6 +4075,15 @@
 	 * entire cache.
 	 */
 	rpm = pmap_recent_user;
+
+/*
+ * XXXSCW: There's a corner case here which can leave turds in the cache as
+ * reported in kern/41058. They're probably left over during tear-down and
+ * switching away from an exiting process. Until the root cause is identified
+ * and fixed, zap the cache when switching pmaps. This will result in a few
+ * unnecessary cache flushes, but that's better than silently corrupting data.
+ */
+#if 0
 	if (npm != pmap_kernel()  rpm  npm != rpm 
 	rpm-pm_cstate.cs_cache) {
 		rpm-pm_cstate.cs_cache = 0;
@@ -4083,6 +4091,16 @@
 		cpu_idcache_wbinv_all();
 #endif
 	}
+#else
+	if (rpm) {
+		rpm-pm_cstate.cs_cache = 0;
+		if (npm == pmap_kernel())
+			pmap_recent_user = NULL;
+#ifdef PMAP_CACHE_VIVT
+		cpu_idcache_wbinv_all();
+#endif
+	}
+#endif
 
 	/* No interrupts while we frob the TTB/DACR */
 	oldirqstate = disable_interrupts(IF32_bits);