[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] [patch] memory management initialisation cleanup



At Mon, 02 Aug 2004 15:28:12 +1000,
John Williams wrote:
> 
> Yasushi SHOJI wrote:
> 
> > John Williams wrote:
> > 
> >>Not quite sure what you mean here - __pa() and __va() macros are already 
> >>defined for microblaze in asm-microblaze/page.h  They just reduce to 
> >>identity functions of course since physical == virtual for nommu system.
> > 
> > oops that was bad example.  I just wanted to say that, because we only
> > have physical address in microblaze right now, we don't need to use
> > __phys_to_virt() and friends in arch/microblaze/*.
> 
> I tend to feel that these things should stay in, even if they #define 
> down to nothing.  It's like using copyfromuser() in uClinux device 
> drivers.  You don't need to use it, and it translates to simple 
> memcpy(), but it's still good practice.

Yes, it is good practice to have copy_from_user() in _device driver_,
eventhough the device driver is only for mmu-less.  you never know
when the driver will be ported to other arch.

however, because arch/microblaze/* depend to mmu-less cpu, we should
have as clean code as we can.  (well we need to define what _clean_
means; i guess i'm a minimalis)

> > # if we get mmu, we'll call it macroblaze so no need to worry, right? ;p
> 
> Hehe - well to be honest I think the chances of seeing microblaze with a 
> full MMU are very slim - it really wouldn't make a lot of sense.
> 
> What would be more sensible, and probably more interesting, would be a 
> limited approach, sort of memory protection unit.  We don't really need 
> virtual memory/paging, but basic memory protection would be very nice, 
> and more easily implemented in FPGA fabric than a full MMU.

that'd be nice.

> >>Anyway I'll apply the first patch now - it should be ready for cvs 
> >>updates shortly.
> > 
> > 
> > I just sync'ed with cvs and compiling...
> 
> ok.
> 
> I'm just fiddling with DISCONTIGMEM now, it BUG()s in page_alloc(), so 
> there's clearly some more to be done.  I'll send a trial patch in the 
> next couple of days if you want to have a go at it.

I don't have time to play with discon mem till coming weekend, so no
harry from me.  it'd certainly be nice to have it for weekend toy. :)

best,
--
           yashi
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/