diff options
author | Franck Bui-Huu <fbuihuu@gmail.com> | 2007-03-19 12:36:42 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-24 13:01:49 -0400 |
commit | c9d06962233bd0ce9bf46b007900eb88e716e948 (patch) | |
tree | 95f051515a704367604db3d814e48f9b54de3ea1 /include/asm-mips/pgtable.h | |
parent | f33bc55c472295966e520c9347822fdd8b1082cd (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.h')
-rw-r--r-- | include/asm-mips/pgtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 3fcfd7979de5..0d3295f57a95 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -75,7 +75,7 @@ extern void paging_init(void); | |||
75 | * Conversion functions: convert a page and protection to a page entry, | 75 | * Conversion functions: convert a page and protection to a page entry, |
76 | * and a page entry and page directory to the page they refer to. | 76 | * and a page entry and page directory to the page they refer to. |
77 | */ | 77 | */ |
78 | #define pmd_phys(pmd) (pmd_val(pmd) - PAGE_OFFSET) | 78 | #define pmd_phys(pmd) virt_to_phys((void *)pmd_val(pmd)) |
79 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) | 79 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) |
80 | #define pmd_page_vaddr(pmd) pmd_val(pmd) | 80 | #define pmd_page_vaddr(pmd) pmd_val(pmd) |
81 | 81 | ||