Skip to content

Commit

Permalink
s390/mm: implement set_memory_rox()
Browse files Browse the repository at this point in the history
Provide the s390 specific native set_memory_rox() implementation to avoid
frequent set_memory_ro(); set_memory_x() call pairs.

This is the s390 variant of commit 6046362 ("x86/mm: Implement native
set_memory_rox()").

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>
  • Loading branch information
Heiko Carstens authored and Vasily Gorbik committed Apr 13, 2023
1 parent bac30ea commit 22e99fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/s390/include/asm/set_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ static inline int set_memory_x(unsigned long addr, int numpages)
return __set_memory(addr, numpages, SET_MEMORY_X);
}

#define set_memory_rox set_memory_rox
static inline int set_memory_rox(unsigned long addr, int numpages)
{
return __set_memory(addr, numpages, SET_MEMORY_RO | SET_MEMORY_X);
}

static inline int set_memory_4k(unsigned long addr, int numpages)
{
return __set_memory(addr, numpages, SET_MEMORY_4K);
Expand Down

0 comments on commit 22e99fa

Please sign in to comment.