summaryrefslogtreecommitdiff
path: root/include/asm-mips/pgtable-64.h
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2007-03-19 17:36:42 +0100
committerRalf Baechle <ralf@linux-mips.org>2007-03-24 17:01:49 +0000
commitc9d06962233bd0ce9bf46b007900eb88e716e948 (patch)
tree95f051515a704367604db3d814e48f9b54de3ea1 /include/asm-mips/pgtable-64.h
parentf33bc55c472295966e520c9347822fdd8b1082cd (diff)
[MIPS] Always use virt_to_phys() when translating kernel addresses
This patch fixes two places where we used plain 'x - PAGE_OFFSET' to achieve virtual to physical address convertions. This type of convertion is no more allowed since commit 6f284a2ce7b8bc49cb8455b1763357897a899abb. Reported-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> [Build fixes for machines that don't use the generic dma-coherence.h] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/pgtable-64.h')
-rw-r--r--include/asm-mips/pgtable-64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h
index a5b18710b6a4..49f5a1a2dfcd 100644
--- a/include/asm-mips/pgtable-64.h
+++ b/include/asm-mips/pgtable-64.h
@@ -199,7 +199,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud)
{
return pud_val(pud);
}
-#define pud_phys(pud) (pud_val(pud) - PAGE_OFFSET)
+#define pud_phys(pud) virt_to_phys((void *)pud_val(pud))
#define pud_page(pud) (pfn_to_page(pud_phys(pud) >> PAGE_SHIFT))
/* Find an entry in the second-level page table.. */