Rename the "flush" macro to "sparc_flush_icache", the former is way too
generic for a macro name.
This commit is contained in:
parent
98fbbaab51
commit
48fa3befb2
@ -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 @@ SPARC64_ST_DEF64(stxa, uint64_t)
|
||||
|
||||
|
||||
|
||||
/* 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.
|
||||
|
@ -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 @@ cpu_hatch(void)
|
||||
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());
|
||||
|
@ -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 @@ pmap_mp_init(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < PAGE_SIZE; i += sizeof(long))
|
||||
flush(v + i);
|
||||
sparc_flush_icache(v + i);
|
||||
|
||||
cpu_spinup_trampoline = (vaddr_t)v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user