summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2006-12-16 02:41:05 +0000
committerkmacy <kmacy@FreeBSD.org>2006-12-16 02:41:05 +0000
commitda4cb165a04fbbbbf5fb4639e4de39d45c2efe3f (patch)
treed866582f537207f141c499b27354ea88220878e5 /sys/sun4v
parent277c74ca2bc24c774db5be5c34e04dc05fdccac6 (diff)
downloadFreeBSD-src-da4cb165a04fbbbbf5fb4639e4de39d45c2efe3f.zip
FreeBSD-src-da4cb165a04fbbbbf5fb4639e4de39d45c2efe3f.tar.gz
- make intent behind skip check clearer
- protect pmap_ipi with spinlock_enter when resizing tte_hash
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/sun4v/pmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c
index 0f6847b..d8b8f4d 100644
--- a/sys/sun4v/sun4v/pmap.c
+++ b/sys/sun4v/sun4v/pmap.c
@@ -658,7 +658,8 @@ pmap_bootstrap(vm_offset_t ekva)
* Don't shuffle unless we have a full 256M page in the range
* our kernel malloc appears to be horribly brittle
*/
- if ((phys_avail[j + 1] - phys_avail[j]) < PAGE_SIZE_4M*62)
+ if ((phys_avail[j + 1] - phys_avail[j]) <
+ (PAGE_SIZE_256M - nucleus_memory))
goto skipshuffle;
for (i = j, k = 0; phys_avail[i] != 0; k++, i++)
@@ -2163,13 +2164,14 @@ static void
pmap_tte_hash_resize(pmap_t pmap)
{
tte_hash_t old_th = pmap->pm_hash;
-
+
pmap->pm_hash = tte_hash_resize(pmap->pm_hash);
-
+ spinlock_enter();
if (curthread->td_proc->p_numthreads != 1)
pmap_ipi(pmap, tl_ttehashupdate, pmap->pm_context, pmap->pm_hashscratch);
pmap->pm_hashscratch = tte_hash_set_scratchpad_user(pmap->pm_hash, pmap->pm_context);
+ spinlock_exit();
tte_hash_destroy(old_th);
}
OpenPOWER on IntegriCloud