[Cbe-oss-dev] [RFC 2/5] spufs: add kalloc_spu_context()

Christoph Hellwig hch at lst.de
Sun Jun 24 23:14:02 EST 2007


On Wed, Jun 13, 2007 at 09:10:22AM +0200, Arnd Bergmann wrote:
> On Wednesday 13 June 2007, Sebastian Siewior wrote:
> > 
> > > I just noticed that this function is almost the same as your
> > > new alloc_spu_context() function. I think you should try to
> > > keep more of the code common, by passing the mm_struct and
> > > the task_struct down to the __alloc_spu_context()
> > > function.
> > 
> > Okey. This will work for prio but not for mm because init_task.mm is null.
> > 
> 
> That's why I wrote 'mm_struct and task_struct'. You either call
> __alloc_spu_context(gang, current, get_task_mm(current)), or
> __alloc_spu_context(NULL, &init_task, &init_mm).

Exactly, the would be my prefered way aswell.



More information about the cbe-oss-dev mailing list