revert (most of) previous
This commit is contained in:
parent
87d5eedbbb
commit
141297688f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cache.c,v 1.71 2003/01/07 05:57:37 mrg Exp $ */
|
||||
/* $NetBSD: cache.c,v 1.72 2003/01/07 10:31:56 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -998,26 +998,12 @@ viking_pcache_flush_page(pa, invalidate_only)
|
|||
* are distinct).
|
||||
*/
|
||||
|
||||
#if defined(SUN4D)
|
||||
static struct simplelock sun4d_cache_lock = SIMPLELOCK_INITIALIZER;
|
||||
#define LOCK_4DCACHE() simple_lock(&sun4d_cache_lock);
|
||||
#define UNLOCK_4DCACHE() simple_unlock(&sun4d_cache_lock);
|
||||
#else
|
||||
#define LOCK_4DCACHE() /* nothing */
|
||||
#define UNLOCK_4DCACHE() /* nothing */
|
||||
#endif
|
||||
|
||||
void
|
||||
smp_vcache_flush_page(va, ctx)
|
||||
int va;
|
||||
int ctx;
|
||||
{
|
||||
if (CPU_ISSUN4D) {
|
||||
LOCK_4DCACHE();
|
||||
(*cpuinfo.sp_vcache_flush_page)(va, ctx);
|
||||
UNLOCK_4DCACHE();
|
||||
} else
|
||||
XCALL2(cpuinfo.sp_vcache_flush_page, va, ctx, CPUSET_ALL);
|
||||
XCALL2(cpuinfo.sp_vcache_flush_page, va, ctx, CPUSET_ALL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1025,12 +1011,7 @@ smp_vcache_flush_segment(vr, vs, ctx)
|
|||
int vr, vs;
|
||||
int ctx;
|
||||
{
|
||||
if (CPU_ISSUN4D) {
|
||||
LOCK_4DCACHE();
|
||||
(*cpuinfo.sp_vcache_flush_segment)(vr, vs, ctx);
|
||||
UNLOCK_4DCACHE();
|
||||
} else
|
||||
XCALL3(cpuinfo.sp_vcache_flush_segment, vr, vs, ctx, CPUSET_ALL);
|
||||
XCALL3(cpuinfo.sp_vcache_flush_segment, vr, vs, ctx, CPUSET_ALL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1038,24 +1019,14 @@ smp_vcache_flush_region(vr, ctx)
|
|||
int vr;
|
||||
int ctx;
|
||||
{
|
||||
if (CPU_ISSUN4D) {
|
||||
LOCK_4DCACHE();
|
||||
(*cpuinfo.sp_vcache_flush_region)(vr, ctx);
|
||||
UNLOCK_4DCACHE();
|
||||
} else
|
||||
XCALL2(cpuinfo.sp_vcache_flush_region, vr, ctx, CPUSET_ALL);
|
||||
XCALL2(cpuinfo.sp_vcache_flush_region, vr, ctx, CPUSET_ALL);
|
||||
}
|
||||
|
||||
void
|
||||
smp_vcache_flush_context(ctx)
|
||||
int ctx;
|
||||
{
|
||||
if (CPU_ISSUN4D) {
|
||||
LOCK_4DCACHE();
|
||||
(*cpuinfo.sp_vcache_flush_context)(ctx);
|
||||
UNLOCK_4DCACHE();
|
||||
} else
|
||||
XCALL1(cpuinfo.sp_vcache_flush_context, ctx, CPUSET_ALL);
|
||||
XCALL1(cpuinfo.sp_vcache_flush_context, ctx, CPUSET_ALL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1064,11 +1035,6 @@ smp_cache_flush(va, size, ctx)
|
|||
u_int size;
|
||||
int ctx;
|
||||
{
|
||||
if (CPU_ISSUN4D) {
|
||||
LOCK_4DCACHE();
|
||||
(*cpuinfo.sp_cache_flush)(va, size, ctx);
|
||||
UNLOCK_4DCACHE();
|
||||
} else
|
||||
XCALL3(cpuinfo.sp_cache_flush, va, size, ctx, CPUSET_ALL);
|
||||
XCALL3(cpuinfo.sp_cache_flush, va, size, ctx, CPUSET_ALL);
|
||||
}
|
||||
#endif /* MULTIPROCESSOR */
|
||||
|
|
Loading…
Reference in New Issue