Re: [PATCH 1/5] Make __pa() uses CPHYSADDR() if really needed

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

 



On 10/11/06, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
Atsushi Nemoto wrote:
> Here's my understanding.
>
> CPHYSADDR --- used to convert a CKSEG0 or CKSEG1 to a physical
> address.  Be carefull when use it in 64-bit kernel.
>
> __pa() --- inverse of __va(), of course :-) used to convert a kernel
> linear logical address to a physycal address.
>
> virt_to_phys() --- synonym of __pa() ?

Well in my understanding __pa() is used during bootmem init. It deals with
initialisation issues and ugliness and that's what CPHYSADDR() actually
does. virt_to_phys() is used once everything is correctly setup.

> __pa() is used in many place indirectly via virt_to_page().
>

what about make virt_to_page() use virt_to_phys() instead ?


Actually that would make sense. virt_to_page() returns a page which
means that all kernel allocation machinery is setup. It should be safe
to use phys_to_virt() at that time.

--
              Franck


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

  Powered by Linux