diff options
| author | 2006-09-28 22:20:39 +0100 | |
|---|---|---|
| committer | 2006-09-28 22:20:39 +0100 | |
| commit | 250d375d1da45a5e08ab8baf5eaa7eb258afd82b (patch) | |
| tree | fb5dc6df00065f11578f837835c6d5a99530b223 /arch/arm/kernel/module.c | |
| parent | [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms (diff) | |
| parent | [ARM] nommu: confirms the CR_V bit in nommu mode (diff) | |
| download | wireguard-linux-250d375d1da45a5e08ab8baf5eaa7eb258afd82b.tar.xz wireguard-linux-250d375d1da45a5e08ab8baf5eaa7eb258afd82b.zip | |
Merge nommu branch
Diffstat (limited to 'arch/arm/kernel/module.c')
| -rw-r--r-- | arch/arm/kernel/module.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 298363d97047..1b061583408e 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -2,6 +2,7 @@ * linux/arch/arm/kernel/module.c * * Copyright (C) 2002 Russell King. + * Modified for nommu by Hyok S. Choi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -32,6 +33,7 @@ extern void _etext; #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) #endif +#ifdef CONFIG_MMU void *module_alloc(unsigned long size) { struct vm_struct *area; @@ -46,6 +48,12 @@ void *module_alloc(unsigned long size) return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); } +#else /* CONFIG_MMU */ +void *module_alloc(unsigned long size) +{ + return size == 0 ? NULL : vmalloc(size); +} +#endif /* !CONFIG_MMU */ void module_free(struct module *module, void *region) { |
