svn commit: r223462 - head/sys/powerpc/ps3
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Jun 23 04:06:33 UTC 2011
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,
More information about the svn-src-all
mailing list