Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2011 04:06:33 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223462 - head/sys/powerpc/ps3
Message-ID:  <201106230406.p5N46XFC082194@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Thu Jun 23 04:06:33 2011
New Revision: 223462
URL: http://svn.freebsd.org/changeset/base/223462

Log:
  Use 4 KB pages for storage bus devices, which seems to be what the HV uses
  internally.

Modified:
  head/sys/powerpc/ps3/ps3bus.c

Modified: head/sys/powerpc/ps3/ps3bus.c
==============================================================================
--- head/sys/powerpc/ps3/ps3bus.c	Thu Jun 23 03:37:25 2011	(r223461)
+++ head/sys/powerpc/ps3/ps3bus.c	Thu Jun 23 04:06:33 2011	(r223462)
@@ -629,7 +629,7 @@ ps3bus_get_dma_tag(device_t dev, device_
 {
 	struct ps3bus_devinfo *dinfo = device_get_ivars(child);
 	struct ps3bus_softc *sc = device_get_softc(dev);
-	int i, err, flags;
+	int i, err, flags, pagesize;
 
 	if (dinfo->bustype != PS3_BUSTYPE_SYSBUS &&
 	    dinfo->bustype != PS3_BUSTYPE_STORAGE)
@@ -646,9 +646,13 @@ ps3bus_get_dma_tag(device_t dev, device_
 	    dinfo->devtype == PS3_DEVTYPE_USB)
 		flags = 2; /* 8-bit mode */
 
+	pagesize = 24; /* log_2(16 MB) */
+	if (dinfo->bustype == PS3_BUSTYPE_STORAGE)
+		pagesize = 12; /* 4 KB */
+
 	for (i = 0; i < sc->rcount; i++) {
 		err = lv1_allocate_device_dma_region(dinfo->bus, dinfo->dev,
-		    sc->regions[i].mr_size, 24 /* log_2(16 MB) */, flags,
+		    sc->regions[i].mr_size, pagesize, flags,
 		    &dinfo->dma_base[i]);
 		if (err != 0) {
 			device_printf(child,



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