From d299be791ef14495935ff62791adef26066b9441 Mon Sep 17 00:00:00 2001 From: "Hyok S. Choi" Date: Tue, 26 Sep 2006 17:37:07 +0900 Subject: [PATCH] --- yaml --- r: 36676 b: refs/heads/master c: 6a570b28b5948e7bf54ea42ec3161bded0a1c460 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/kernel/module.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fc50c6c4503e..ff54a3cec25e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e5beac371af0af47bcbd6819f4c2a0a2721a1735 +refs/heads/master: 6a570b28b5948e7bf54ea42ec3161bded0a1c460 diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c index 298363d97047..1b061583408e 100644 --- a/trunk/arch/arm/kernel/module.c +++ b/trunk/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) {