a question about __nocache_pa macro

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

 



Hi,
can someony explain this macro to me? It's in arch/sparc/include/asm/pgtsrmmu.h (linux 3.3)
#define __nocache_pa(VADDR) (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))
it looks like converting virtual address VADDR to physical address for which no cache is used.
so I can see SRMMU_NOCACHE_VADDR is the virtual address start value from which no cache is used(in our case it's 0xc8000000),
and VADDR is relative to this start location (thus the minus).
But why do we add the last srmmu_nocache_pool term? we are adding the offset to physical nocache pool address. 
So it seems like it is converting a virtual address to a physcal address relative to nocache pool..
Why is it done this way?
Thanks in advance.
Chan
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux