diff options
author | Will Deacon <will.deacon@arm.com> | 2011-02-15 06:42:57 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-15 09:20:23 -0500 |
commit | cae6292b653f5e3308bf2787a54b7dcd2cc7e2b3 (patch) | |
tree | b9f6847d0cf392a9519800db3b99ea1e9090617e /arch/arm/include/asm | |
parent | ad6b9c9d78b9beebef02ac7f566a08db7be3c320 (diff) |
ARM: 6672/1: LPAE: use phys_addr_t instead of unsigned long in mapping functions
The unsigned long datatype is not sufficient for mapping physical addresses
>= 4GB.
This patch ensures that the phys_addr_t datatype is used to represent physical
addresses when converting from a PFN.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index ebcb6432f45f..ca567914d303 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -351,7 +351,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) | |||
351 | #define pte_unmap(pte) __pte_unmap(pte) | 351 | #define pte_unmap(pte) __pte_unmap(pte) |
352 | 352 | ||
353 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | 353 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) |
354 | #define pfn_pte(pfn,prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 354 | #define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot)) |
355 | 355 | ||
356 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) | 356 | #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
357 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot) | 357 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page), prot) |