Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264613
b: refs/heads/master
c: d7c5d0d
h: refs/heads/master
i:
  264611: 3201d55
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Oct 6, 2011
1 parent 16adc43 commit 6699e04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 442e70c0b3536e832547eed89629435462f4b515
refs/heads/master: d7c5d0dcffb3b5702d9477faceff4b8398e6fed0
2 changes: 2 additions & 0 deletions trunk/arch/arm/include/asm/pgtable-2level-hwdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@
#define PTE_SMALL_AP_URO_SRW (_AT(pteval_t, 0xaa) << 4)
#define PTE_SMALL_AP_URW_SRW (_AT(pteval_t, 0xff) << 4)

#define PHYS_MASK (~0UL)

#endif
6 changes: 3 additions & 3 deletions trunk/arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];

static inline pte_t *pmd_page_vaddr(pmd_t pmd)
{
return __va(pmd_val(pmd) & PAGE_MASK);
return __va(pmd_val(pmd) & PHYS_MASK & (s32)PAGE_MASK);
}

#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd)))
#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK))

/* we don't need complex calculations here as the pmd is folded into the pgd */
#define pmd_addr_end(addr,end) (end)
Expand All @@ -220,7 +220,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
#define pte_offset_map(pmd,addr) (__pte_map(pmd) + pte_index(addr))
#define pte_unmap(pte) __pte_unmap(pte)

#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
#define pte_pfn(pte) ((pte_val(pte) & PHYS_MASK) >> PAGE_SHIFT)
#define pfn_pte(pfn,prot) __pte(__pfn_to_phys(pfn) | pgprot_val(prot))

#define pte_page(pte) pfn_to_page(pte_pfn(pte))
Expand Down

0 comments on commit 6699e04

Please sign in to comment.