[Cbe-oss-dev] [PATCH 3/3] libspe2: Clean up proxy DMA and add error checks

Daniel Brokenshire brokensh at us.ibm.com
Wed Jun 27 22:00:38 EST 2007


All,

Can someone explain why it is necessary to partition the tag IDs between 
the kernel and user?  I can not conceive of any reason why this is needed. 
  In addition, error checking the value can result in perfectly 
functioning applications no longer working.   Long ago, the Linux BE ABI 
Specification stated:

"The two largest tag ID?s (30 and 31) are reserved for runtime library or 
privileged services. The runtime service routines are responsible for 
preserving the application?s tagmask whenever the runtime must perform DMA 
synchronization. The application?s tagmask is preserved either by fetching 
the current tagmask or by shadowing the application tagmask setting.

The remaining thirty tag ID?s (0 through 29) are available for application 
use."

We abandoned tag ID partitioning because it wasn't required.  Before 
making this code change, we need to fully understand why this partitioning 
is needed, and if appropriate, open an RFC to standardize it.

Sincerely,

Dan B.
-------------------------------------------------------------------------------
Daniel A. Brokenshire
STSM / Emerging Products Development
brokensh at us.ibm.com               512-838-3373



Kazunori Asayama <asayama at sm.sony.co.jp> 
Sent by: cbe-oss-dev-bounces+brokensh=us.ibm.com at ozlabs.org
06/27/2007 05:00 AM

To
gerhard.stenzel at de.ibm.com
cc
cbe-oss-dev at ozlabs.org
Subject
Re: [Cbe-oss-dev] [PATCH 3/3] libspe2: Clean up proxy DMA and add error 
checks






Gerhard Stenzel <gerhard.stenzel at de.ibm.com> wrote:
> One thing I noticed:
> 
> > +   /* tag 16-31 are reserved by kernel */
> > +   if (tag > 0x0f || tid > 0xff || rid > 0xff) {
> > +      errno = EINVAL;
> > +      return -1;
> > +   }
> 
> I failed to find these limits in the API spec. Maybe we should add them?

The range checks of tid and rid come from the size of "MFC Class ID
Register" in the CBEA spec.

The limit of tag comes from a comment in the kernel source code, but I
could not find any other explicit explanation of it. We should add a
Linux implementation note about this limit to the libspe spec, I
think.

--
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t
_______________________________________________
cbe-oss-dev mailing list
cbe-oss-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/cbe-oss-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070627/bdcf408d/attachment.htm>


More information about the cbe-oss-dev mailing list