Commit:     6f834197a79d34d65ca44e9c77f2571edbcfb64b
Parent:     e7f3bac95e0bdfd520e065c4a29aad46190fcc99
Author:     Haavard Skinnemoen <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 15 16:12:18 2007 +0200
Committer:  Haavard Skinnemoen <[EMAIL PROTECTED]>
CommitDate: Wed Aug 15 16:36:56 2007 +0200

    [AVR32] Fix bogus pte_page() definition
    The current definition of pte_page() masks out valid bits from the
    physical address, causing vmalloc_to_page() to misbehave. This may
    lead to everything from mmap() silently accessing the wrong data to
    "invalid pte" errors dumped by the kernel.
    Also remove the now-unused definition of PTE_PHYS_MASK.
    Thanks to Matteo Vit for discovering this bug.
    Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
 include/asm-avr32/pgtable.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/include/asm-avr32/pgtable.h b/include/asm-avr32/pgtable.h
index c07bdd1..018f6e2 100644
--- a/include/asm-avr32/pgtable.h
+++ b/include/asm-avr32/pgtable.h
@@ -32,8 +32,6 @@
 #define FIRST_USER_ADDRESS     0
-#define PTE_PHYS_MASK  0x1ffff000
 #ifndef __ASSEMBLY__
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 extern void paging_init(void);
@@ -265,7 +263,7 @@ static inline pte_t pte_mkyoung(pte_t pte)
  * trivial.
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
-#define pte_page(x)    phys_to_page(pte_val(x) & PTE_PHYS_MASK)
+#define pte_page(x)    (pfn_to_page(pte_pfn(x)))
  * Mark the prot value as uncacheable and unbufferable
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to