From c972cc60c23f5a6309292bfcc91a441743ba027e Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 5 Oct 2012 16:52:18 +0200 Subject: s390/vmalloc: have separate modules area Add a special module area on top of the vmalloc area, which may be only used for modules and bpf jit generated code. This makes sure that inter module branches will always happen without a trampoline and in addition having all the code within a 2GB frame is branch prediction unit friendly. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/mm/dump_pagetables.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'arch/s390/mm') diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index cd1c62d160ed..cbc6668acb85 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -18,6 +18,9 @@ enum address_markers_idx { KERNEL_END_NR, VMEMMAP_NR, VMALLOC_NR, +#ifdef CONFIG_64BIT + MODULES_NR, +#endif }; static struct addr_marker address_markers[] = { @@ -26,6 +29,9 @@ static struct addr_marker address_markers[] = { [KERNEL_END_NR] = {(unsigned long)&_end, "Kernel Image End"}, [VMEMMAP_NR] = {0, "vmemmap Area"}, [VMALLOC_NR] = {0, "vmalloc Area"}, +#ifdef CONFIG_64BIT + [MODULES_NR] = {0, "Modules Area"}, +#endif { -1, NULL } }; @@ -205,11 +211,12 @@ static int pt_dump_init(void) * kernel ASCE. We need this to keep the page table walker functions * from accessing non-existent entries. */ -#ifdef CONFIG_64BIT +#ifdef CONFIG_32BIT + max_addr = 1UL << 31; +#else max_addr = (S390_lowcore.kernel_asce & _REGION_ENTRY_TYPE_MASK) >> 2; max_addr = 1UL << (max_addr * 11 + 31); -#else - max_addr = 1UL << 31; + address_markers[MODULES_NR].start_address = MODULES_VADDR; #endif address_markers[VMEMMAP_NR].start_address = (unsigned long) vmemmap; address_markers[VMALLOC_NR].start_address = VMALLOC_START; -- cgit v1.2.1