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

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



Hi Greg,

At Tue, 03 Aug 2004 09:57:44 +1000,
Greg Ungerer wrote:
> 
> Hi All,
> 
> Yasushi SHOJI wrote:
> > 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)
> 
> I wouldn't take any short cuts here. I would keep the code
> in a fashion that allows an MMU to be added and still use
> the existing code. If it can be added (and there is no real
> reason it cannot) then someone will probably do it one day.
> 
> The trend in 2.6 with uClinux is that we coexist in the
> architecture branch - so whether you have an MMU or not is no
> more than a CONFIG_MMU define.

thanks for the input.  I'll follow the tread.

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/