aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-02-10 15:34:48 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-02-10 15:34:48 -0800
commitf67d6b26649379f8520abe6a6c7ed335310bf01e (patch)
treec161fce6517753dcacdcea21804f6e2c90164a33 /include/linux/mm.h
parent223ec6ab265ead0b319bc2f15d0d1be05078a74b (diff)
parentce4d9a1ea35ac5429e822c4106cb2859d5c71f3e (diff)
downloadlinux-f67d6b26649379f8520abe6a6c7ed335310bf01e.tar.gz
Merge branch 'mm-hotfixes-stable' into mm-stable
To pick up depended-upon changes
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4a0695ef969a3..9454b7eb055b1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -137,7 +137,7 @@ extern int mmap_rnd_compat_bits __read_mostly;
* define their own version of this macro in <asm/pgtable.h>
*/
#if BITS_PER_LONG == 64
-/* This function must be updated when the size of struct page grows above 80
+/* This function must be updated when the size of struct page grows above 96
* or reduces below 56. The idea that compiler optimizes out switch()
* statement, and only leaves move/store instructions. Also the compiler can
* combine write statements if they are both assignments and can be reordered,
@@ -148,12 +148,18 @@ static inline void __mm_zero_struct_page(struct page *page)
{
unsigned long *_pp = (void *)page;
- /* Check that struct page is either 56, 64, 72, or 80 bytes */
+ /* Check that struct page is either 56, 64, 72, 80, 88 or 96 bytes */
BUILD_BUG_ON(sizeof(struct page) & 7);
BUILD_BUG_ON(sizeof(struct page) < 56);
- BUILD_BUG_ON(sizeof(struct page) > 80);
+ BUILD_BUG_ON(sizeof(struct page) > 96);
switch (sizeof(struct page)) {
+ case 96:
+ _pp[11] = 0;
+ fallthrough;
+ case 88:
+ _pp[10] = 0;
+ fallthrough;
case 80:
_pp[9] = 0;
fallthrough;