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

Kazunori Asayama asayama at sm.sony.co.jp
Wed Jun 27 20:00:11 EST 2007


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



More information about the cbe-oss-dev mailing list