diff options
author | rink <rink@FreeBSD.org> | 2006-06-17 20:10:32 +0000 |
---|---|---|
committer | rink <rink@FreeBSD.org> | 2006-06-17 20:10:32 +0000 |
commit | d9c30e05f502dcfd004e5fb113481e298cca349a (patch) | |
tree | 08535601f79a1fa9d0b500ebaf674d1b953255ed | |
parent | 6efe5a2dfd48918dd78ee5aec0db3e6c378cee2b (diff) | |
download | FreeBSD-src-d9c30e05f502dcfd004e5fb113481e298cca349a.zip FreeBSD-src-d9c30e05f502dcfd004e5fb113481e298cca349a.tar.gz |
Prevent 'mutex not owned' panic on boot if INVARIANTS is in the kernel. This
makes the GENERIC kernel boot on ppc.
Reviewed by: grehan
Approved by: imp (mentor)
MFC after: 1 week
dCVS: ----------------------------------------------------------------------
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/mmu_oea.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 6a9af00..8cd8c2e 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -832,9 +832,11 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) struct vm_page m; m.phys_addr = translations[i].om_pa + off; + PMAP_LOCK(&ofw_pmap); moea_enter_locked(&ofw_pmap, translations[i].om_va + off, &m, VM_PROT_ALL, 1); + PMAP_UNLOCK(&ofw_pmap); ofw_mappings++; } } diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c index 6a9af00..8cd8c2e 100644 --- a/sys/powerpc/powerpc/mmu_oea.c +++ b/sys/powerpc/powerpc/mmu_oea.c @@ -832,9 +832,11 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) struct vm_page m; m.phys_addr = translations[i].om_pa + off; + PMAP_LOCK(&ofw_pmap); moea_enter_locked(&ofw_pmap, translations[i].om_va + off, &m, VM_PROT_ALL, 1); + PMAP_UNLOCK(&ofw_pmap); ofw_mappings++; } } |