Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2019 03:40:49 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348146 - head/sys/powerpc/booke
Message-ID:  <201905230340.x4N3entC096134@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Thu May 23 03:40:48 2019
New Revision: 348146
URL: https://svnweb.freebsd.org/changeset/base/348146

Log:
  powerpc/booke: It helps to set variables before using them
  
  Actually set the source and destination VA's before using them.  Fixes a
  bizarre panic on 32-bit Book-E.  Not sure why this wasn't caught by the
  compiler.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Thu May 23 02:12:00 2019	(r348145)
+++ head/sys/powerpc/booke/pmap.c	Thu May 23 03:40:48 2019	(r348146)
@@ -3043,11 +3043,12 @@ mmu_booke_copy_page(mmu_t mmu, vm_page_t sm, vm_page_t
 	dva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dm));
 	memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE);
 #else
+	sva = copy_page_src_va;
+	dva = copy_page_dst_va;
+
 	mtx_lock(&copy_page_mutex);
 	mmu_booke_kenter(mmu, sva, VM_PAGE_TO_PHYS(sm));
 	mmu_booke_kenter(mmu, dva, VM_PAGE_TO_PHYS(dm));
-	sva = copy_page_src_va;
-	dva = copy_page_dst_va;
 
 	memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905230340.x4N3entC096134>