Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Rename the "flush" macro to "sparc_flush_ic...
details: https://anonhg.NetBSD.org/src/rev/e7a0201e9803
branches: trunk
changeset: 820078:e7a0201e9803
user: martin <martin%NetBSD.org@localhost>
date: Wed Dec 28 19:16:25 2016 +0000
description:
Rename the "flush" macro to "sparc_flush_icache", the former is way too
generic for a macro name.
diffstat:
sys/arch/sparc64/include/ctlreg.h | 7 ++++---
sys/arch/sparc64/sparc64/cpu.c | 7 ++++---
sys/arch/sparc64/sparc64/pmap.c | 6 +++---
3 files changed, 11 insertions(+), 9 deletions(-)
diffs (77 lines):
diff -r 3d1ad30043b0 -r e7a0201e9803 sys/arch/sparc64/include/ctlreg.h
--- a/sys/arch/sparc64/include/ctlreg.h Wed Dec 28 18:16:30 2016 +0000
+++ b/sys/arch/sparc64/include/ctlreg.h Wed Dec 28 19:16:25 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ctlreg.h,v 1.63 2016/02/03 20:33:52 palle Exp $ */
+/* $NetBSD: ctlreg.h,v 1.64 2016/12/28 19:16:25 martin Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath
@@ -865,8 +865,9 @@
-/* flush address from data cache */
-#define flush(loc) __asm volatile("flush %0" : : "r" ((__uintptr_t)(loc)))
+/* flush address from cache */
+#define sparc_flush_icache(loc) __asm \
+ volatile("flush %0" : : "r" ((__uintptr_t)(loc)))
/*
* SPARC V9 memory barrier instructions.
diff -r 3d1ad30043b0 -r e7a0201e9803 sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c Wed Dec 28 18:16:30 2016 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c Wed Dec 28 19:16:25 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.128 2016/04/17 14:32:03 martin Exp $ */
+/* $NetBSD: cpu.c,v 1.129 2016/12/28 19:16:25 martin Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.128 2016/04/17 14:32:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.129 2016/12/28 19:16:25 martin Exp $");
#include "opt_multiprocessor.h"
@@ -720,8 +720,9 @@
char *v = (char*)CPUINFO_VA;
int i;
+ /* XXX - why flush the icache here? but should be harmless */
for (i = 0; i < 4*PAGE_SIZE; i += sizeof(long))
- flush(v + i);
+ sparc_flush_icache(v + i);
cpu_pmap_init(curcpu());
CPUSET_ADD(cpus_active, cpu_number());
diff -r 3d1ad30043b0 -r e7a0201e9803 sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Wed Dec 28 18:16:30 2016 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Wed Dec 28 19:16:25 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.305 2016/12/22 14:47:59 cherry Exp $ */
+/* $NetBSD: pmap.c,v 1.306 2016/12/28 19:16:25 martin Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.305 2016/12/22 14:47:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.306 2016/12/28 19:16:25 martin Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@@ -576,7 +576,7 @@
}
for (i = 0; i < PAGE_SIZE; i += sizeof(long))
- flush(v + i);
+ sparc_flush_icache(v + i);
cpu_spinup_trampoline = (vaddr_t)v;
}
Home |
Main Index |
Thread Index |
Old Index