Commit 17c51b1b authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/mm: use BIT macro to generate SET_MEMORY bit masks

Use BIT macro to generate SET_MEMORY bit masks, which is easier to
maintain if bits get added, or removed.
Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 0ae241f4
......@@ -6,11 +6,19 @@
extern struct mutex cpa_mutex;
#define SET_MEMORY_RO 1UL
#define SET_MEMORY_RW 2UL
#define SET_MEMORY_NX 4UL
#define SET_MEMORY_X 8UL
#define SET_MEMORY_4K 16UL
enum {
_SET_MEMORY_RO_BIT,
_SET_MEMORY_RW_BIT,
_SET_MEMORY_NX_BIT,
_SET_MEMORY_X_BIT,
_SET_MEMORY_4K_BIT,
};
#define SET_MEMORY_RO BIT(_SET_MEMORY_RO_BIT)
#define SET_MEMORY_RW BIT(_SET_MEMORY_RW_BIT)
#define SET_MEMORY_NX BIT(_SET_MEMORY_NX_BIT)
#define SET_MEMORY_X BIT(_SET_MEMORY_X_BIT)
#define SET_MEMORY_4K BIT(_SET_MEMORY_4K_BIT)
int __set_memory(unsigned long addr, int numpages, unsigned long flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment