linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch/powerpc/mm: Enable compound page check for both THP and HugeTLB
@ 2020-03-20 10:32 Aneesh Kumar K.V
  2020-03-24  6:38 ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K.V @ 2020-03-20 10:32 UTC (permalink / raw)
  To: linuxppc-dev, mpe, paulus; +Cc: Aneesh Kumar K.V

THP config can result in compound pages. Make sure kernel enables the
PageCompound() check when only THP is enabled.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/mm/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 9b4f5fb719e0..b03cbddf9054 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -485,7 +485,7 @@ EXPORT_SYMBOL(flush_dcache_page);
 
 void flush_dcache_icache_page(struct page *page)
 {
-#ifdef CONFIG_HUGETLB_PAGE
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE)
 	if (PageCompound(page)) {
 		flush_dcache_icache_hugepage(page);
 		return;
-- 
2.25.1


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

end of thread, other threads:[~2020-03-24  6:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20 10:32 [PATCH] arch/powerpc/mm: Enable compound page check for both THP and HugeTLB Aneesh Kumar K.V
2020-03-24  6:38 ` Michael Ellerman
2020-03-24  6:46   ` Aneesh Kumar K.V

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).