]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
alpha: unobfuscate _PAGE_P() definition
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 7 Feb 2023 04:24:35 +0000 (23:24 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Sep 2025 01:12:05 +0000 (21:12 -0400)
Way, way back it used to be
_PAGE_NORMAL((x) | ((x & _PAGE_FOW) ? 0 : _PAGE_FOW | _PAGE_COW))
Then (in 1.3.54) _PAGE_COW had died.  Result:
_PAGE_NORMAL((x) | ((x & _PAGE_FOW) ? 0 : _PAGE_FOW))
which is somewhat... obscure.  What it does is simply
_PAGE_NORMAL((x) | _PAGE_FOW)
and IMO that's easier to follow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/alpha/include/asm/pgtable.h

index 84014e9be504cda549c43f2370899001228519e1..90e7a95391022816fbc65b1da9b03b6ee57e37b6 100644 (file)
@@ -107,7 +107,7 @@ struct vm_area_struct;
 
 #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
 
-#define _PAGE_P(x) _PAGE_NORMAL((x) | (((x) & _PAGE_FOW)?0:_PAGE_FOW))
+#define _PAGE_P(x) _PAGE_NORMAL((x) | _PAGE_FOW)
 #define _PAGE_S(x) _PAGE_NORMAL(x)
 
 /*