diff options
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index a02266dad215..0d12fba31bc5 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -458,8 +458,7 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
458 | old_pte = pte_val(*ptep); | 458 | old_pte = pte_val(*ptep); |
459 | if (old_pte & _PAGE_BUSY) | 459 | if (old_pte & _PAGE_BUSY) |
460 | goto out; | 460 | goto out; |
461 | new_pte = old_pte | _PAGE_BUSY | | 461 | new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED; |
462 | _PAGE_ACCESSED | _PAGE_HASHPTE; | ||
463 | } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, | 462 | } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, |
464 | old_pte, new_pte)); | 463 | old_pte, new_pte)); |
465 | 464 | ||
@@ -499,12 +498,14 @@ repeat: | |||
499 | HPTES_PER_GROUP) & ~0x7UL; | 498 | HPTES_PER_GROUP) & ~0x7UL; |
500 | 499 | ||
501 | /* clear HPTE slot informations in new PTE */ | 500 | /* clear HPTE slot informations in new PTE */ |
501 | #ifdef CONFIG_PPC_64K_PAGES | ||
502 | new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0; | ||
503 | #else | ||
502 | new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE; | 504 | new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE; |
503 | 505 | #endif | |
504 | /* Add in WIMG bits */ | 506 | /* Add in WIMG bits */ |
505 | /* XXX We should store these in the pte */ | 507 | rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE | |
506 | /* --BenH: I think they are ... */ | 508 | _PAGE_COHERENT | _PAGE_GUARDED)); |
507 | rflags |= _PAGE_COHERENT; | ||
508 | 509 | ||
509 | /* Insert into the hash table, primary slot */ | 510 | /* Insert into the hash table, primary slot */ |
510 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, | 511 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, |