Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 239a6425 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent dab4079d
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -112,12 +112,15 @@ extern char empty_zero_page[PAGE_SIZE];
 * effect, this also makes sure that 64 bit module code cannot be used
 * effect, this also makes sure that 64 bit module code cannot be used
 * as system call address.
 * as system call address.
 */
 */

extern unsigned long VMALLOC_START;

#ifndef __s390x__
#ifndef __s390x__
#define VMALLOC_START	0x78000000UL
#define VMALLOC_SIZE	(96UL << 20)
#define VMALLOC_END	0x7e000000UL
#define VMALLOC_END	0x7e000000UL
#define VMEM_MAP_END	0x80000000UL
#define VMEM_MAP_END	0x80000000UL
#else /* __s390x__ */
#else /* __s390x__ */
#define VMALLOC_START	0x3e000000000UL
#define VMALLOC_SIZE	(1UL << 30)
#define VMALLOC_END	0x3e040000000UL
#define VMALLOC_END	0x3e040000000UL
#define VMEM_MAP_END	0x40000000000UL
#define VMEM_MAP_END	0x40000000000UL
#endif /* __s390x__ */
#endif /* __s390x__ */
+13 −3
Original line number Original line Diff line number Diff line
/*
/*
 *  arch/s390/mm/pgtable.c
 *    Copyright IBM Corp. 2007,2009
 *
 *    Copyright IBM Corp. 2007
 *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
 *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
 */
 */


@@ -53,6 +51,18 @@ void clear_table_pgstes(unsigned long *table)


#endif
#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)
unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec)
{
{
	struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER);
	struct page *page = alloc_pages(GFP_KERNEL, ALLOC_ORDER);