Re: [PATCH] defined a macro for lemote 2e box IO base

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

 



On Fri, Oct 24, 2008 at 09:24:05PM +0100, Maciej W. Rozycki wrote:

> > Thanks for the comment.
> > I have checked how other platforms handle this problem.
> > Many have used CKSEG1ADDR.
> 
>  Please note long-term we want CKSEG1ADDR() to go away from board/platform 
> code and possibly only keep it for some generic use if at all.  Have you 
> considered using ioremap()?  With a literal physical address it should get 
> optimised to the same code as the use of CKSEG1ADDR() produces, yet keep 
> the source portable and in line with the rest of the kernel.  I try to 
> remove references to CKSEG1ADDR() as I come across them myself too.

We should probably start removing them all over the source so people have
less bad examples to copy from.  The reason why KSEG0ADDR() and all the
other macros exist is that all the other UNIX operating systems before were
using something like it also.  But in Linux it has two disadvantages -
it duplicates the functionality of a generic interface in arch code which
is making for example the live of kernel janitors who don't know about
MIPSisms harder.  And it's not a terribly nice interface for dealing with
32-bit vs. 64-bit addresses.

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux