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

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

 



Franck Bui-Huu wrote:
> Atsushi Nemoto wrote:
> > On Wed, 11 Oct 2006 18:01:43 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
> >>> __pa() is used in many place indirectly via virt_to_page().
> >> what about make virt_to_page() use virt_to_phys() instead ?
> > 
> > No objection for virt_to_phys(), but I found other __pa() usages in
> > kernel.
> > 
> > drivers/char/mem.c:       && addr >= __pa(high_memory);
> > drivers/char/mem.c:     return addr >= __pa(high_memory);
> > drivers/char/mem.c:     if (addr + count > __pa(high_memory))
> > drivers/char/mem.c:     pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
> > 
> > So __pa() should handle >512MB address unless we change all __pa() usages.
> 
> weird, I really thought that __pa() shouldn't be used by drivers...
> Let see what people on lkml think about this usage, you'll be CC'ed
> if you want to.

I guess /dev/mem is allowed to as an exception.


Thiemo


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

  Powered by Linux