From c9c79d242f29dfa625c89302d975d43f88773c0b Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 25 Oct 2010 16:10:36 +0200 Subject: [PATCH] --- yaml --- r: 216767 b: refs/heads/master c: 84afdcee620b1640f2a145c07febae4ed68947f9 h: refs/heads/master i: 216765: efed3d202e702507e9a5e9a12eb19a291fcdb748 216763: c063d6091f6f608db955fb5ac1cb4b63c6a5931c 216759: bb4980ad14953a739e2d88ab1f511e8a04ab141d 216751: a5eda0ee0c464fc4dc26753a9882af50fc36014a 216735: b53b8317b46c61ed3fe94276562aba69f5f415fe 216703: 1ded685ccd2b045a213ffa245809d6d227a2750a v: v3 --- [refs] | 2 +- trunk/arch/s390/include/asm/hugetlb.h | 26 ------------------------- trunk/arch/s390/include/asm/pgtable.h | 28 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/[refs] b/[refs] index 930c60cd8d4d..200ddeb0d17f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36bf96801e3a2c4efae0bb8c1897a530fc9ca13e +refs/heads/master: 84afdcee620b1640f2a145c07febae4ed68947f9 diff --git a/trunk/arch/s390/include/asm/hugetlb.h b/trunk/arch/s390/include/asm/hugetlb.h index bb8343d157bc..b56403c2df28 100644 --- a/trunk/arch/s390/include/asm/hugetlb.h +++ b/trunk/arch/s390/include/asm/hugetlb.h @@ -37,32 +37,6 @@ static inline int prepare_hugepage_range(struct file *file, int arch_prepare_hugepage(struct page *page); void arch_release_hugepage(struct page *page); -static inline pte_t pte_mkhuge(pte_t pte) -{ - /* - * PROT_NONE needs to be remapped from the pte type to the ste type. - * The HW invalid bit is also different for pte and ste. The pte - * invalid bit happens to be the same as the ste _SEGMENT_ENTRY_LARGE - * bit, so we don't have to clear it. - */ - if (pte_val(pte) & _PAGE_INVALID) { - if (pte_val(pte) & _PAGE_SWT) - pte_val(pte) |= _HPAGE_TYPE_NONE; - pte_val(pte) |= _SEGMENT_ENTRY_INV; - } - /* - * Clear SW pte bits SWT and SWX, there are no SW bits in a segment - * table entry. - */ - pte_val(pte) &= ~(_PAGE_SWT | _PAGE_SWX); - /* - * Also set the change-override bit because we don't need dirty bit - * tracking for hugetlbfs pages. - */ - pte_val(pte) |= (_SEGMENT_ENTRY_LARGE | _SEGMENT_ENTRY_CO); - return pte; -} - static inline pte_t huge_pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_RO; diff --git a/trunk/arch/s390/include/asm/pgtable.h b/trunk/arch/s390/include/asm/pgtable.h index f79e7bb9ae1e..986dc9476c21 100644 --- a/trunk/arch/s390/include/asm/pgtable.h +++ b/trunk/arch/s390/include/asm/pgtable.h @@ -772,6 +772,34 @@ static inline pte_t pte_mkspecial(pte_t pte) return pte; } +#ifdef CONFIG_HUGETLB_PAGE +static inline pte_t pte_mkhuge(pte_t pte) +{ + /* + * PROT_NONE needs to be remapped from the pte type to the ste type. + * The HW invalid bit is also different for pte and ste. The pte + * invalid bit happens to be the same as the ste _SEGMENT_ENTRY_LARGE + * bit, so we don't have to clear it. + */ + if (pte_val(pte) & _PAGE_INVALID) { + if (pte_val(pte) & _PAGE_SWT) + pte_val(pte) |= _HPAGE_TYPE_NONE; + pte_val(pte) |= _SEGMENT_ENTRY_INV; + } + /* + * Clear SW pte bits SWT and SWX, there are no SW bits in a segment + * table entry. + */ + pte_val(pte) &= ~(_PAGE_SWT | _PAGE_SWX); + /* + * Also set the change-override bit because we don't need dirty bit + * tracking for hugetlbfs pages. + */ + pte_val(pte) |= (_SEGMENT_ENTRY_LARGE | _SEGMENT_ENTRY_CO); + return pte; +} +#endif + #ifdef CONFIG_PGSTE /* * Get (and clear) the user dirty bit for a PTE.