Re: svn commit: r192026 - head/share/man/man9

2009-05-13 Thread John Baldwin
On Tuesday 12 May 2009 5:28:13 pm Marius Strobl wrote:
> On Tue, May 12, 2009 at 04:13:06PM -0500, Robert Noland wrote:
> > On Tue, 2009-05-12 at 20:56 +, Marius Strobl wrote:
> > > Author: marius
> > > Date: Tue May 12 20:56:34 2009
> > > New Revision: 192026
> > > URL: http://svn.freebsd.org/changeset/base/192026
> > > 
> > > Log:
> > >   Correct r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
> > >   actually is only valid for bus_dmamap_load().
> > 
> > Ok, this is getting very confusing...  This means that code has to set
> > this flag on both alloc and load to allow for somethine resembling
> > consistent behavior.
> > 
> 
> Personally I don't understand why amd64 and i386 where decided to
> implement BUS_DMA_NOCACHE for bus_dmamem_alloc(9) only as this
> is less flexible than using it with bus_dmamap_load(9) (which also
> is the older existing implementation). Anyway, 
> documents BUS_DMA_NOCACHE and BUS_DMA_NOWRITE as "non-standard or
> specific to only certain architectures" so I think it's okay for
> the usage of these flags to differ across them.

Hmm, it might be possible to move it to bus_dmamap_load() instead.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r192026 - head/share/man/man9

2009-05-12 Thread Robert Noland
On Tue, 2009-05-12 at 20:56 +, Marius Strobl wrote:
> Author: marius
> Date: Tue May 12 20:56:34 2009
> New Revision: 192026
> URL: http://svn.freebsd.org/changeset/base/192026
> 
> Log:
>   Correct r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
>   actually is only valid for bus_dmamap_load().

Ok, this is getting very confusing...  This means that code has to set
this flag on both alloc and load to allow for somethine resembling
consistent behavior.

robert.

>   MFC after:  3 days
> 
> Modified:
>   head/share/man/man9/bus_dma.9
> 
> Modified: head/share/man/man9/bus_dma.9
> ==
> --- head/share/man/man9/bus_dma.9 Tue May 12 20:42:12 2009
> (r192025)
> +++ head/share/man/man9/bus_dma.9 Tue May 12 20:56:34 2009
> (r192026)
> @@ -60,7 +60,7 @@
>  .\" $FreeBSD$
>  .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $
>  .\"
> -.Dd November 16, 2008
> +.Dd May 12, 2009
>  .Dt BUS_DMA 9
>  .Os
>  .Sh NAME
> @@ -561,6 +561,13 @@ Are as follows:
>  .It Dv BUS_DMA_NOWAIT
>  The load should not be deferred in case of insufficient mapping resources,
>  and instead should return immediately with an appropriate error.
> +.It Dv BUS_DMA_NOCACHE
> +The generated transactions to and from the virtual page are non-cacheable.
> +For
> +.Fn bus_dmamap_load ,
> +the
> +.Dv BUS_DMA_NOCACHE
> +flag is currently implemented on sparc64.
>  .El
>  .El
>  .Pp
> @@ -780,11 +787,12 @@ Causes the allocated memory to be set to
>  The allocated memory will not be cached in the processor caches.
>  All memory accesses appear on the bus and are executed
>  without reordering.
> -On the amd64 and i386 architectures this flag results in the
> -Strong Uncacheable PAT to be set for the allocated virtual address range.
> -The
> +For
> +.Fn bus_dmamem_alloc ,
> +the
>  .Dv BUS_DMA_NOCACHE
> -flag is currently implemented on amd64, i386 and sparc64.
> +flag is currently implemented on amd64 and i386 where it results in the
> +Strong Uncacheable PAT to be set for the allocated virtual address range.
>  .El
>  .It Fa mapp
>  Pointer to a
-- 
Robert Noland 
FreeBSD


signature.asc
Description: This is a digitally signed message part


Re: svn commit: r192026 - head/share/man/man9

2009-05-12 Thread Marius Strobl
On Tue, May 12, 2009 at 04:13:06PM -0500, Robert Noland wrote:
> On Tue, 2009-05-12 at 20:56 +, Marius Strobl wrote:
> > Author: marius
> > Date: Tue May 12 20:56:34 2009
> > New Revision: 192026
> > URL: http://svn.freebsd.org/changeset/base/192026
> > 
> > Log:
> >   Correct r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
> >   actually is only valid for bus_dmamap_load().
> 
> Ok, this is getting very confusing...  This means that code has to set
> this flag on both alloc and load to allow for somethine resembling
> consistent behavior.
> 

Personally I don't understand why amd64 and i386 where decided to
implement BUS_DMA_NOCACHE for bus_dmamem_alloc(9) only as this
is less flexible than using it with bus_dmamap_load(9) (which also
is the older existing implementation). Anyway, 
documents BUS_DMA_NOCACHE and BUS_DMA_NOWRITE as "non-standard or
specific to only certain architectures" so I think it's okay for
the usage of these flags to differ across them.

Marius

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192026 - head/share/man/man9

2009-05-12 Thread Marius Strobl
Author: marius
Date: Tue May 12 20:56:34 2009
New Revision: 192026
URL: http://svn.freebsd.org/changeset/base/192026

Log:
  Correct r190283 (partially reverting it) as on sparc64 BUS_DMA_NOCACHE
  actually is only valid for bus_dmamap_load().
  
  MFC after:3 days

Modified:
  head/share/man/man9/bus_dma.9

Modified: head/share/man/man9/bus_dma.9
==
--- head/share/man/man9/bus_dma.9   Tue May 12 20:42:12 2009
(r192025)
+++ head/share/man/man9/bus_dma.9   Tue May 12 20:56:34 2009
(r192026)
@@ -60,7 +60,7 @@
 .\" $FreeBSD$
 .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $
 .\"
-.Dd November 16, 2008
+.Dd May 12, 2009
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -561,6 +561,13 @@ Are as follows:
 .It Dv BUS_DMA_NOWAIT
 The load should not be deferred in case of insufficient mapping resources,
 and instead should return immediately with an appropriate error.
+.It Dv BUS_DMA_NOCACHE
+The generated transactions to and from the virtual page are non-cacheable.
+For
+.Fn bus_dmamap_load ,
+the
+.Dv BUS_DMA_NOCACHE
+flag is currently implemented on sparc64.
 .El
 .El
 .Pp
@@ -780,11 +787,12 @@ Causes the allocated memory to be set to
 The allocated memory will not be cached in the processor caches.
 All memory accesses appear on the bus and are executed
 without reordering.
-On the amd64 and i386 architectures this flag results in the
-Strong Uncacheable PAT to be set for the allocated virtual address range.
-The
+For
+.Fn bus_dmamem_alloc ,
+the
 .Dv BUS_DMA_NOCACHE
-flag is currently implemented on amd64, i386 and sparc64.
+flag is currently implemented on amd64 and i386 where it results in the
+Strong Uncacheable PAT to be set for the allocated virtual address range.
 .El
 .It Fa mapp
 Pointer to a
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"