diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-06-12 04:26:33 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-06-12 04:27:33 -0400 |
commit | 239a64255fae8933d95273b5b92545949ca4e743 (patch) | |
tree | fae1b39e23ac3244abbd200c89b1f0c7b72ca044 /arch/s390/mm | |
parent | dab4079d5b5ac421208499d5e554a07f9beb16e4 (diff) |
[S390] vmalloc: add vmalloc kernel parameter support
With the kernel parameter 'vmalloc=<size>' 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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/pgtable.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index be6c1cf4ad5a..4ca8e826bf30 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -1,7 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/mm/pgtable.c | 2 | * Copyright IBM Corp. 2007,2009 |
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com> | 3 | * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com> |
6 | */ | 4 | */ |
7 | 5 | ||
@@ -53,6 +51,18 @@ void clear_table_pgstes(unsigned long *table) | |||
53 | 51 | ||
54 | #endif | 52 | #endif |
55 | 53 | ||
54 | unsigned long VMALLOC_START = VMALLOC_END - VMALLOC_SIZE; | ||
55 | EXPORT_SYMBOL(VMALLOC_START); | ||
56 | |||
57 | static int __init parse_vmalloc(char *arg) | ||
58 | { | ||
59 | if (!arg) | ||
60 | return -EINVAL; | ||
61 | VMALLOC_START = (VMALLOC_END - memparse(arg, &arg)) & PAGE_MASK; | ||
62 | return 0; | ||
63 | } | ||
64 | early_param("vmalloc", parse_vmalloc); | ||
65 | |||
56 | unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) | 66 | unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) |
57 | { | 67 | { |
58 | struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER); | 68 | struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER); |