Thread (9 messages) 9 messages, 3 authors, 2011-06-25

Re: [PATCH 14/19] OpenRISC: Module support

From: Jonas Bonn <jonas@southpole.se>
Date: 2011-06-24 08:52:15
Also in: lkml

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help