diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/sfmmu/vm/hat_sfmmu.c | 11 | ||||
-rw-r--r-- | usr/src/uts/sun4v/vm/mach_sfmmu.c | 21 |
2 files changed, 28 insertions, 4 deletions
diff --git a/usr/src/uts/sfmmu/vm/hat_sfmmu.c b/usr/src/uts/sfmmu/vm/hat_sfmmu.c index 37527ae3e4..d374745fca 100644 --- a/usr/src/uts/sfmmu/vm/hat_sfmmu.c +++ b/usr/src/uts/sfmmu/vm/hat_sfmmu.c @@ -388,6 +388,9 @@ static void iment_add(struct ism_ment *, struct hat *); static void iment_sub(struct ism_ment *, struct hat *); static pgcnt_t ism_tsb_entries(sfmmu_t *, int szc); extern void sfmmu_setup_tsbinfo(sfmmu_t *); +#ifdef sun4v +extern void sfmmu_invalidate_tsbinfo(sfmmu_t *); +#endif /* sun4v */ extern void sfmmu_clear_utsbinfo(void); static void sfmmu_ctx_wrap_around(mmu_ctx_t *); @@ -1726,6 +1729,11 @@ hat_swapout(struct hat *sfmmup) tsbinfop->tsb_tte.ll = 0; } +#ifdef sun4v + if (freelist) + sfmmu_invalidate_tsbinfo(sfmmup); +#endif /* sun4v */ + /* Now we can drop the lock and free the TSB memory. */ sfmmu_hat_exit(hatlockp); for (; freelist != NULL; freelist = next) { @@ -10538,6 +10546,9 @@ sfmmu_tsb_swapin(sfmmu_t *sfmmup, hatlock_t *hatlockp) rc = sfmmu_replace_tsb(sfmmup, tsbinfop, TSB_MIN_SZCODE, hatlockp, TSB_SWAPIN | TSB_FORCEALLOC); ASSERT(rc == TSB_SUCCESS); + } else { + /* update machine specific tsbinfo */ + sfmmu_setup_tsbinfo(sfmmup); } SFMMU_FLAGS_CLEAR(sfmmup, HAT_SWAPPED|HAT_SWAPIN); diff --git a/usr/src/uts/sun4v/vm/mach_sfmmu.c b/usr/src/uts/sun4v/vm/mach_sfmmu.c index 2607e54dfd..f96ced6d4e 100644 --- a/usr/src/uts/sun4v/vm/mach_sfmmu.c +++ b/usr/src/uts/sun4v/vm/mach_sfmmu.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -322,6 +321,20 @@ sfmmu_clear_utsbinfo() } /* + * Invalidate machine specific TSB information, indicates all TSB memory + * is being freed by hat_swapout(). + */ +void +sfmmu_invalidate_tsbinfo(sfmmu_t *sfmmup) +{ + ASSERT(sfmmup->sfmmu_tsb != NULL && + sfmmup->sfmmu_tsb->tsb_flags & TSB_SWAPPED); + + sfmmup->sfmmu_hvblock.hv_tsb_info_pa = (uint64_t)-1; + sfmmup->sfmmu_hvblock.hv_tsb_info_cnt = 0; +} + +/* * Set machine specific TSB information */ void |