svn commit: r233924 - in stable/9/sys: i386/conf x86/isa

John Baldwin jhb at FreeBSD.org
Thu Apr 5 16:05:35 UTC 2012


Author: jhb
Date: Thu Apr  5 16:05:35 2012
New Revision: 233924
URL: http://svn.freebsd.org/changeset/base/233924

Log:
  MFC 233675:
  Restore proper use of bounce buffers for ISA DMA.  When locking was
  added, the call to pmap_kextract() was moved up, and as a result the
  code never updated the physical address to use for DMA if a bounce
  buffer was used.  Restore the earlier location of pmap_kextract() so
  it takes bounce buffers into account.

Modified:
  stable/9/sys/x86/isa/isa_dma.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/x86/isa/isa_dma.c
==============================================================================
--- stable/9/sys/x86/isa/isa_dma.c	Thu Apr  5 15:16:51 2012	(r233923)
+++ stable/9/sys/x86/isa/isa_dma.c	Thu Apr  5 16:05:35 2012	(r233924)
@@ -237,8 +237,6 @@ isa_dmastart(int flags, caddr_t addr, u_
 	caddr_t newaddr;
 	int dma_range_checked;
 
-	/* translate to physical */
-	phys = pmap_extract(kernel_pmap, (vm_offset_t)addr);
 	dma_range_checked = isa_dmarangecheck(addr, nbytes, chan);
 
 #ifdef DIAGNOSTIC
@@ -281,6 +279,9 @@ isa_dmastart(int flags, caddr_t addr, u_
 		addr = newaddr;
 	}
 
+	/* translate to physical */
+	phys = pmap_extract(kernel_pmap, (vm_offset_t)addr);
+
 	if (flags & ISADMA_RAW) {
 	    dma_auto_mode |= (1 << chan);
 	} else { 


More information about the svn-src-stable-9 mailing list