summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-03-04 11:14:31 +0300
committerVasily Gorbik <gor@linux.ibm.com>2025-03-11 17:27:34 +0300
commitbb2598c0d31bca8e57662b7d203e1876cd7f455f (patch)
treea61c7304db17f34c9f7c4f7cf9f4549fe82bcd3b
parentf8c425a94bad5bef4c31792de931470ab5e4bfae (diff)
downloadlinux-bb2598c0d31bca8e57662b7d203e1876cd7f455f.tar.xz
s390/mm: Convert pgprot_val() into function
Convert pgprot_val() into a function similar to other mm primitives like e.g. pte_val(). This disallows usage as an lvalue; however there aren't any such users left, except for some architecture specific ones. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r--arch/s390/include/asm/page.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h
index 1ff145f7b52b..5a7d146e34d8 100644
--- a/arch/s390/include/asm/page.h
+++ b/arch/s390/include/asm/page.h
@@ -84,7 +84,11 @@ typedef struct { unsigned long p4d; } p4d_t;
typedef struct { unsigned long pgd; } pgd_t;
typedef pte_t *pgtable_t;
-#define pgprot_val(x) ((x).pgprot)
+static inline unsigned long pgprot_val(pgprot_t pgprot)
+{
+ return pgprot.pgprot;
+}
+
#define pgste_val(x) ((x).pgste)
static inline unsigned long pte_val(pte_t pte)
@@ -112,13 +116,13 @@ static inline unsigned long pgd_val(pgd_t pgd)
return pgd.pgd;
}
+#define __pgprot(x) ((pgprot_t) { (x) } )
#define __pgste(x) ((pgste_t) { (x) } )
#define __pte(x) ((pte_t) { (x) } )
#define __pmd(x) ((pmd_t) { (x) } )
#define __pud(x) ((pud_t) { (x) } )
#define __p4d(x) ((p4d_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
-#define __pgprot(x) ((pgprot_t) { (x) } )
static inline void page_set_storage_key(unsigned long addr,
unsigned char skey, int mapped)