linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 1/3] powerpc: Move the setting of rflags out of loop in __hash_page_huge
@ 2013-04-16  2:53 Li Zhong
  2013-04-16  2:53 ` [RFC PATCH v3 2/3] powerpc: Split the code trying to insert hpte repeatedly as an helper function Li Zhong
  2013-04-16  2:53 ` [RFC PATCH v3 3/3] powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page() Li Zhong
  0 siblings, 2 replies; 3+ messages in thread
From: Li Zhong @ 2013-04-16  2:53 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus, Li Zhong

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>
---
 arch/powerpc/mm/hugetlbpage-hash64.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/hugetlbpage-hash64.c
index cecad34..edb4129 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,
 
 		pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT;
 
-repeat:
-		hpte_group = ((hash & htab_hash_mask) *
-			      HPTES_PER_GROUP) & ~0x7UL;
-
 		/* clear HPTE slot informations in new PTE */
 #ifdef CONFIG_PPC_64K_PAGES
 		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0;
@@ -101,6 +97,10 @@ repeat:
 		rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE |
 				      _PAGE_COHERENT | _PAGE_GUARDED));
 
+repeat:
+		hpte_group = ((hash & htab_hash_mask) *
+			      HPTES_PER_GROUP) & ~0x7UL;
+
 		/* Insert into the hash table, primary slot */
 		slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
 					  mmu_psize, ssize);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-16  2:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16  2:53 [RFC PATCH v3 1/3] powerpc: Move the setting of rflags out of loop in __hash_page_huge Li Zhong
2013-04-16  2:53 ` [RFC PATCH v3 2/3] powerpc: Split the code trying to insert hpte repeatedly as an helper function Li Zhong
2013-04-16  2:53 ` [RFC PATCH v3 3/3] powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page() Li Zhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).