Patch "mm: Add PAGE_ALIGN_DOWN macro" has been added to the 5.15-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

    mm: Add PAGE_ALIGN_DOWN macro

to the 5.15-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:
     mm-add-page_align_down-macro.patch
and it can be found in the queue-5.15 subdirectory.

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



commit edf5b793e14e480399c03adb14a7128f98590271
Author: David Gow <davidgow@xxxxxxxxxx>
Date:   Fri Jul 1 17:16:19 2022 +0800

    mm: Add PAGE_ALIGN_DOWN macro
    
    [ Upstream commit 335e52c28cf9954d65b819cb68912fd32de3c844 ]
    
    This is just the same as PAGE_ALIGN(), but rounds the address down, not
    up.
    
    Suggested-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
    Signed-off-by: David Gow <davidgow@xxxxxxxxxx>
    Acked-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Richard Weinberger <richard@xxxxxx>
    Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 5692055f202cb..f26b044024416 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -233,6 +233,9 @@ int __add_to_page_cache_locked(struct page *page, struct address_space *mapping,
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
 
+/* to align the pointer to the (prev) page boundary */
+#define PAGE_ALIGN_DOWN(addr) ALIGN_DOWN(addr, PAGE_SIZE)
+
 /* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */
 #define PAGE_ALIGNED(addr)	IS_ALIGNED((unsigned long)(addr), PAGE_SIZE)
 




[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