On Wed, 2011-06-22 at 16:26 +0200, Arnd Bergmann wrote: > I think that an easy way to do that would be to add to kernel/module.c > code like: > > #ifndef module_alloc > void *module_alloc(unsigned long size) > { > return vmalloc(size); > } > #endif > I noticed that kernel/module.c already has this: unsigned int __weak arch_mod_section_prepend(struct module *mod, unsigned int section) Is using a __weak attribute on the default (generic) implementations a better approach? > Then each architecture that needs a special version can do > #define module_alloc(size) module_alloc(size) > in their respective asm/module.h With the __weak variant this wouldn't be necessary... /Jonas
Attachment:
signature.asc
Description: This is a digitally signed message part