From 720696eeb73e0d3d31b76d1c7462b74d0e722deb Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 3 Apr 2008 23:10:26 +0000 Subject: Use atomic operations to invalidate TSB entries. --- sys/arch/sparc64/sparc64/pmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 1a518b7e8d5..b4ebb568355 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.58 2008/04/02 20:23:22 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.59 2008/04/03 23:10:25 kettenis Exp $ */ /* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */ #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ /* @@ -310,9 +310,11 @@ tsb_invalidate(int ctx, vaddr_t va) i = ptelookup_va(va); tag = TSB_TAG(0, ctx, va); if (tsb_dmmu[i].tag == tag) - tsb_dmmu[i].tag = TSB_TAG_INVALID; + sparc64_casx((volatile unsigned long *)&tsb_dmmu[i].tag, + tag, TSB_TAG_INVALID); if (tsb_immu[i].tag == tag) - tsb_immu[i].tag = TSB_TAG_INVALID; + sparc64_casx((volatile unsigned long *)&tsb_immu[i].tag, + tag, TSB_TAG_INVALID); } #if notyet -- cgit v1.2.3