mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
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: 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:
parent
0ae241f4d7
commit
17c51b1ba9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user