Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c3c0693 authored by Li Zhong's avatar Li Zhong Committed by Michael Ellerman
Browse files

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: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
parent c2e1d845
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -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;
		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 */
		/* clear HPTE slot informations in new PTE */
#ifdef CONFIG_PPC_64K_PAGES
#ifdef CONFIG_PPC_64K_PAGES
		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0;
		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HPTE_SUB0;
@@ -101,6 +97,10 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
		rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE |
		rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE |
				      _PAGE_COHERENT | _PAGE_GUARDED));
				      _PAGE_COHERENT | _PAGE_GUARDED));


repeat:
		hpte_group = ((hash & htab_hash_mask) *
			      HPTES_PER_GROUP) & ~0x7UL;

		/* Insert into the hash table, primary slot */
		/* Insert into the hash table, primary slot */
		slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
		slot = ppc_md.hpte_insert(hpte_group, vpn, pa, rflags, 0,
					  mmu_psize, ssize);
					  mmu_psize, ssize);