Commit 21c2358c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: hugepage cleanup

From: David Gibson <david@gibson.dropbear.id.au>

This is a small cleanup to the PPC64 hugepage code.  It removes an
unhelpful function, removing some studlyCaps in the process.  It was
originally this way to match the normal page path, but that has all been
rewritten since.
parent 8886bdb0
......@@ -609,15 +609,6 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
}
}
static inline unsigned long computeHugeHptePP(unsigned int hugepte)
{
unsigned long flags = 0x2;
if (! (hugepte & _HUGEPAGE_RW))
flags |= 0x1;
return flags;
}
int hash_huge_page(struct mm_struct *mm, unsigned long access,
unsigned long ea, unsigned long vsid, int local)
{
......@@ -671,7 +662,7 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
old_pte = *ptep;
new_pte = old_pte;
hpteflags = computeHugeHptePP(hugepte_val(new_pte));
hpteflags = 0x2 | (! (hugepte_val(new_pte) & _HUGEPAGE_RW));
/* Check if pte already has an hpte (case 2) */
if (unlikely(hugepte_val(old_pte) & _HUGEPAGE_HASHPTE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment