Re: [PATCH 0/2] FLATMEM: allow memory to start at pfn != 0 [take #2]

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

 



On 3/12/07, peter fuerst <post@xxxxxxxx> wrote:
On Mon, 12 Mar 2007, Franck Bui-Huu wrote:
> Can you explain why the current use of pa() failed to handle all
> kernel address with a real example ?

Simply, when you convert between cached (kseg0, ckseg0, several xkphys-
regions) and uncached (kseg1, ckseg1, several xkphys-regions) addresses
and the other way round, you need the physical address as an intermediate
value and __pa() or virt_to_phys() can support only one direction.


I was asking for _real_ uses. Can you point out some code where these
convertion are needed ?

I'm asking that because your uses of __pa()/virt_to_phys() to convert
cached address into uncached address and vice versa is weird. You
talked about drivers but I would think that drivers have physical
addresses of the device they control. And they get a virtual address
by using ioremap() and Co. And using __pa() on such addresses is
simply buggy whatever the implementation of __pa().
--
              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