From 239a64255fae8933d95273b5b92545949ca4e743 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 12 Jun 2009 10:26:33 +0200 Subject: [S390] vmalloc: add vmalloc kernel parameter support With the kernel parameter 'vmalloc=' the size of the vmalloc area can be specified. This can be used to increase or decrease the size of the area. Works in the same way as on some other architectures. This can be useful for features which make excessive use of vmalloc and wouldn't work otherwise. The default sizes remain unchanged: 96MB for 31 bit kernels and 1GB for 64 bit kernels. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/mm/pgtable.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'arch/s390/mm/pgtable.c') diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index be6c1cf4ad5..4ca8e826bf3 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -1,7 +1,5 @@ /* - * arch/s390/mm/pgtable.c - * - * Copyright IBM Corp. 2007 + * Copyright IBM Corp. 2007,2009 * Author(s): Martin Schwidefsky */ @@ -53,6 +51,18 @@ void clear_table_pgstes(unsigned long *table) #endif +unsigned long VMALLOC_START = VMALLOC_END - VMALLOC_SIZE; +EXPORT_SYMBOL(VMALLOC_START); + +static int __init parse_vmalloc(char *arg) +{ + if (!arg) + return -EINVAL; + VMALLOC_START = (VMALLOC_END - memparse(arg, &arg)) & PAGE_MASK; + return 0; +} +early_param("vmalloc", parse_vmalloc); + unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) { struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER); -- cgit v1.2.3