mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 12:52:40 -04:00
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>
This commit is contained in:
committed by
Vasily Gorbik
parent
f8c425a94b
commit
bb2598c0d3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user