diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2023-12-02 10:57:15 +0100 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2024-04-17 13:38:00 +0200 |
commit | 236f324b747370b97030c9582591f459353e3589 (patch) | |
tree | c1cad8fed47b484f890cf1be63de25c229c05ef3 /arch/s390/include | |
parent | bbe72f39022270c40dc1e991b4dadf6f32eed86a (diff) |
s390/mm: Create virtual memory layout structure
This is a preparatory rework to allow uncoupling virtual
and physical addresses spaces.
Put virtual memory layout information into a structure
to improve code generation when accessing the structure
members, which are currently only ident_map_size and
__kaslr_offset.
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/page.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 602e8056b7cc..f13a4527bf2d 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -178,7 +178,16 @@ int arch_make_page_accessible(struct page *page); #define HAVE_ARCH_MAKE_PAGE_ACCESSIBLE #endif -extern unsigned long __kaslr_offset; +struct vm_layout { + unsigned long kaslr_offset; + unsigned long identity_size; +}; + +extern struct vm_layout vm_layout; + +#define __kaslr_offset vm_layout.kaslr_offset +#define ident_map_size vm_layout.identity_size + static inline unsigned long kaslr_offset(void) { return __kaslr_offset; |