diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2015-03-30 01:11:04 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-16 21:23:40 -0400 |
commit | 7d6e7f7ffaba4e013c7a0589140431799bc17985 (patch) | |
tree | e562ffe3cd9799537221f9277e36787412ef2f40 /arch/powerpc/include/asm/kvm_book3s_64.h | |
parent | 691e95fd7396905a38d98919e9c150dbc3ea21a3 (diff) |
powerpc/mm/thp: Return pte address if we find trans_splitting.
For THP that is marked trans splitting, we return the pte.
This require the callers to handle the pmd_trans_splitting scenario,
if they care. All the current callers are either looking at pfn or
write_ok, hence we don't need to update them.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s_64.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_64.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index 23b724c746e9..ce5610aa124c 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h | |||
@@ -281,11 +281,9 @@ static inline int hpte_cache_flags_ok(unsigned long ptel, unsigned long io_type) | |||
281 | 281 | ||
282 | /* | 282 | /* |
283 | * If it's present and writable, atomically set dirty and referenced bits and | 283 | * If it's present and writable, atomically set dirty and referenced bits and |
284 | * return the PTE, otherwise return 0. If we find a transparent hugepage | 284 | * return the PTE, otherwise return 0. |
285 | * and if it is marked splitting we return 0; | ||
286 | */ | 285 | */ |
287 | static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing, | 286 | static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing) |
288 | unsigned int hugepage) | ||
289 | { | 287 | { |
290 | pte_t old_pte, new_pte = __pte(0); | 288 | pte_t old_pte, new_pte = __pte(0); |
291 | 289 | ||
@@ -301,12 +299,6 @@ static inline pte_t kvmppc_read_update_linux_pte(pte_t *ptep, int writing, | |||
301 | cpu_relax(); | 299 | cpu_relax(); |
302 | continue; | 300 | continue; |
303 | } | 301 | } |
304 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
305 | /* If hugepage and is trans splitting return None */ | ||
306 | if (unlikely(hugepage && | ||
307 | pmd_trans_splitting(pte_pmd(old_pte)))) | ||
308 | return __pte(0); | ||
309 | #endif | ||
310 | /* If pte is not present return None */ | 302 | /* If pte is not present return None */ |
311 | if (unlikely(!(pte_val(old_pte) & _PAGE_PRESENT))) | 303 | if (unlikely(!(pte_val(old_pte) & _PAGE_PRESENT))) |
312 | return __pte(0); | 304 | return __pte(0); |