Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Sep 2010 08:20:39 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r212817 - in stable/7/sys: sparc64/sparc64 sun4v/sun4v
Message-ID:  <201009180820.o8I8KdfV057406@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sat Sep 18 08:20:39 2010
New Revision: 212817
URL: http://svn.freebsd.org/changeset/base/212817

Log:
  MFC: r212620
  
  Remove a KASSERT which will also trigger for perfectly valid combinations
  of small maxsize and "large" (including BUS_SPACE_UNRESTRICTED) nsegments
  parameters. Generally using a presz of 0 (which indeed might indicate the
  use of bogus parameters for DMA tag creation) is not fatal, it just means
  that no additional DVMA space will be preallocated.

Modified:
  stable/7/sys/sparc64/sparc64/iommu.c
  stable/7/sys/sun4v/sun4v/hviommu.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sparc64/sparc64/iommu.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/iommu.c	Sat Sep 18 08:20:36 2010	(r212816)
+++ stable/7/sys/sparc64/sparc64/iommu.c	Sat Sep 18 08:20:39 2010	(r212817)
@@ -874,9 +874,6 @@ iommu_dvmamap_create(bus_dma_tag_t dt, i
 	 */
 	maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG);
 	presz = dt->dt_maxsize / maxpre;
-	KASSERT(presz != 0, ("%s: bogus preallocation size , nsegments = %d, "
-	    "maxpre = %d, maxsize = %lu", __func__, dt->dt_nsegments, maxpre,
-	    dt->dt_maxsize));
 	for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) {
 		currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz));
 		error = iommu_dvma_valloc(dt, is, *mapp, currsz);

Modified: stable/7/sys/sun4v/sun4v/hviommu.c
==============================================================================
--- stable/7/sys/sun4v/sun4v/hviommu.c	Sat Sep 18 08:20:36 2010	(r212816)
+++ stable/7/sys/sun4v/sun4v/hviommu.c	Sat Sep 18 08:20:39 2010	(r212817)
@@ -513,9 +513,6 @@ hviommu_dvmamap_create(bus_dma_tag_t dt,
 	 */
 	maxpre = imin(dt->dt_nsegments, IOMMU_MAX_PRE_SEG);
 	presz = dt->dt_maxsize / maxpre;
-	KASSERT(presz != 0, ("hviommu_dvmamap_create: bogus preallocation size "
-	    ", nsegments = %d, maxpre = %d, maxsize = %lu", dt->dt_nsegments,
-	    maxpre, dt->dt_maxsize));
 	for (i = 1; i < maxpre && totsz < IOMMU_MAX_PRE; i++) {
 		currsz = round_io_page(ulmin(presz, IOMMU_MAX_PRE - totsz));
 		error = hviommu_dvma_valloc(dt, him, *mapp, currsz);



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