Patch "riscv/mm: add arch hook arch_clear_hugepage_flags" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    riscv/mm: add arch hook arch_clear_hugepage_flags

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     riscv-mm-add-arch-hook-arch_clear_hugepage_flags.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 97ea2b18f6365b71a8d5b512410f6fd3f2e98deb
Author: Tong Tiangen <tongtiangen@xxxxxxxxxx>
Date:   Mon Oct 24 09:47:25 2022 +0000

    riscv/mm: add arch hook arch_clear_hugepage_flags
    
    [ Upstream commit d8bf77a1dc3079692f54be3087a5fd16d90027b0 ]
    
    With the PG_arch_1 we keep track if the page's data cache is clean,
    architecture rely on this property to treat new pages as dirty with
    respect to the data cache and perform the flushing before mapping the pages
    into userspace.
    
    This patch adds a new architecture hook, arch_clear_hugepage_flags,so that
    architectures which rely on the page flags being in a particular state for
    fresh allocations can adjust the flags accordingly when a page is freed
    into the pool.
    
    Fixes: 9e953cda5cdf ("riscv: Introduce huge page support for 32/64bit kernel")
    Signed-off-by: Tong Tiangen <tongtiangen@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221024094725.3054311-3-tongtiangen@xxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/include/asm/hugetlb.h b/arch/riscv/include/asm/hugetlb.h
index a5c2ca1d1cd8..ec19d6afc896 100644
--- a/arch/riscv/include/asm/hugetlb.h
+++ b/arch/riscv/include/asm/hugetlb.h
@@ -5,4 +5,10 @@
 #include <asm-generic/hugetlb.h>
 #include <asm/page.h>
 
+static inline void arch_clear_hugepage_flags(struct page *page)
+{
+	clear_bit(PG_dcache_clean, &page->flags);
+}
+#define arch_clear_hugepage_flags arch_clear_hugepage_flags
+
 #endif /* _ASM_RISCV_HUGETLB_H */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux