aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2013-04-15 12:53:18 -0400
committerMichael Ellerman <michael@ellerman.id.au>2013-04-18 01:59:59 -0400
commit2c3c0693d9cf06d7baf99cfdc10f9c4d40198c6b (patch)
tree3d15965337addebb81456192f972bf596a9f0e01
parentc2e1d84523ad2a19e5be08c1f01999cc9e82652e (diff)
powerpc: Move the setting of rflags out of loop in __hash_page_huge
It seems that new_pte and rflags don't get changed in the repeating loop, so move their assignment out of the loop. Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
-rw-r--r--arch/powerpc/mm/hugetlbpage-hash64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c
index cecad348f604..edb4129b182a 100644
--- a/arch/powerpc/mm/hugetlbpage-hash64.c
+++ b/arch/powerpc/mm/hugetlbpage-hash64.c
@@ -87,10 +87,6 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
87 87
88 pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT; 88 pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT;
89 89
90repeat:
91 hpte_group = ((hash & htab_hash_mask) *
92 HPTES_PER_GROUP) & ~0x7UL;
93
94 /* clear HPTE slot informations in new PTE */ 90 /* clear HPTE slot informations in new PTE */
95#ifdef CONFIG_PPC_64K_PAGES 91#ifdef CONFIG_PPC_64K_PAGES
96 new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0; 92 new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0;
@@ -101,6 +97,10 @@ repeat:
101 rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE | 97 rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE |
102 _PAGE_COHERENT | _PAGE_GUARDED)); 98 _PAGE_COHERENT | _PAGE_GUARDED));
103 99
100repeat:
101 hpte_group = ((hash & htab_hash_mask) *
102 HPTES_PER_GROUP) & ~0x7UL;
103
104 /* Insert into the hash table, primary slot */ 104 /* Insert into the hash table, primary slot */
105 slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0, 105 slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
106 mmu_psize, ssize); 106 mmu_psize, ssize);