diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-10-27 14:12:38 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-11-05 22:34:58 +0100 |
commit | 65d37f163add1c6ead3a63788acb2f9590159f94 (patch) | |
tree | fedf1a8cf371c73420b574b80918edb48d779f34 /arch/s390/include | |
parent | a3e89e20fe00209779eb3e419621070b9158acdb (diff) | |
download | linux-65d37f163add1c6ead3a63788acb2f9590159f94.tar.gz linux-65d37f163add1c6ead3a63788acb2f9590159f94.tar.bz2 linux-65d37f163add1c6ead3a63788acb2f9590159f94.zip |
s390/cmma: move arch_set_page_dat() to header file
In order to be usable for early boot code move the simple
arch_set_page_dat() function to header file, and add its counter-part
arch_set_page_nodat(). Also change the parameters, and the function name
slightly.
This is required since there aren't any struct pages available in early
boot code, and renaming of functions is done to make sure that all users
are converted to the new API.
Instead of a pointer to a struct page a virtual address is passed, and
instead of an order the number of pages for which the page state needs be
set.
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/page-states.h | 17 | ||||
-rw-r--r-- | arch/s390/include/asm/page.h | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/s390/include/asm/page-states.h b/arch/s390/include/asm/page-states.h index 1eae4046c07d..08fcbd628120 100644 --- a/arch/s390/include/asm/page-states.h +++ b/arch/s390/include/asm/page-states.h @@ -60,4 +60,21 @@ static inline void __set_page_stable_nodat(void *addr, unsigned long num_pages) __set_page_state(addr, num_pages, ESSA_SET_STABLE_NODAT); } +static inline void __arch_set_page_nodat(void *addr, unsigned long num_pages) +{ + if (!cmma_flag) + return; + if (cmma_flag < 2) + __set_page_stable_dat(addr, num_pages); + else + __set_page_stable_nodat(addr, num_pages); +} + +static inline void __arch_set_page_dat(void *addr, unsigned long num_pages) +{ + if (!cmma_flag) + return; + __set_page_stable_dat(addr, num_pages); +} + #endif diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index cfec0743314e..73b9c3bf377f 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -164,7 +164,6 @@ static inline int page_reset_referenced(unsigned long addr) struct page; void arch_free_page(struct page *page, int order); void arch_alloc_page(struct page *page, int order); -void arch_set_page_dat(struct page *page, int order); static inline int devmem_is_allowed(unsigned long pfn) { |