[PATCH] [2.6.18] U4 DART improvements

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Jun 3 10:40:38 EST 2006


On Fri, 2006-06-02 at 14:44 +0200, Segher Boessenkool wrote:
> Hi Olof,
> 
> Looks good.  One request:
> 
> > +static inline void dart_tlb_invalidate_one(unsigned long bus_rpn)
> > +{
> > +	unsigned int reg;
> > +	unsigned int l, limit;
> > +
> > +	reg = DART_CNTL_U4_ENABLE | DART_CNTL_U4_IONE |
> > +		(bus_rpn & DART_CNTL_U4_IONE_MASK);
> > +	DART_OUT(DART_CNTL, reg);
> > +	mb();
> 
> Could you please comment the memory barriers, to say exactly _why_ a
> certain barrier is needed?  I can't see why wmb() wouldn't work here,
> for example (note I'm not saying it would -- I just don't see why it
> wouldn't).
> 
> Same goes for every single memory barrier in the whole kernel source
> code, but I have to start somewhere, heh.

In fact I doubt we need a barrier at all...

Ben.





More information about the Linuxppc-dev mailing list