diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-09-28 17:20:39 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-28 17:20:39 -0400 |
commit | 250d375d1da45a5e08ab8baf5eaa7eb258afd82b (patch) | |
tree | fb5dc6df00065f11578f837835c6d5a99530b223 /arch/arm/kernel/module.c | |
parent | 84904d0ead0a8c419abd45c7b2ac8d76d50a0d48 (diff) | |
parent | 6afd6fae1d5f7e7129a10c4f3e32018966eeac1c (diff) |
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 @@ | |||
2 | * linux/arch/arm/kernel/module.c | 2 | * linux/arch/arm/kernel/module.c |
3 | * | 3 | * |
4 | * Copyright (C) 2002 Russell King. | 4 | * Copyright (C) 2002 Russell King. |
5 | * Modified for nommu by Hyok S. Choi | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
@@ -32,6 +33,7 @@ extern void _etext; | |||
32 | #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) | 33 | #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) |
33 | #endif | 34 | #endif |
34 | 35 | ||
36 | #ifdef CONFIG_MMU | ||
35 | void *module_alloc(unsigned long size) | 37 | void *module_alloc(unsigned long size) |
36 | { | 38 | { |
37 | struct vm_struct *area; | 39 | struct vm_struct *area; |
@@ -46,6 +48,12 @@ void *module_alloc(unsigned long size) | |||
46 | 48 | ||
47 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); | 49 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); |
48 | } | 50 | } |
51 | #else /* CONFIG_MMU */ | ||
52 | void *module_alloc(unsigned long size) | ||
53 | { | ||
54 | return size == 0 ? NULL : vmalloc(size); | ||
55 | } | ||
56 | #endif /* !CONFIG_MMU */ | ||
49 | 57 | ||
50 | void module_free(struct module *module, void *region) | 58 | void module_free(struct module *module, void *region) |
51 | { | 59 | { |