mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 09:56:55 +07:00
23352fc252
These are some trivial fixes for the x86-64 subarch module support. The only potential problem is that I have to modify arch/x86_64/kernel/module.c, to avoid copying the whole of it. I can't use it verbatim because it depends on a special vmalloc-like area for modules, which for now (maybe that's to fix, I guess not) UML/x86-64 has not. I went the easy way and reused the i386 vmalloc()-based allocator. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
20 lines
435 B
C
20 lines
435 B
C
#include <linux/vmalloc.h>
|
|
#include <linux/moduleloader.h>
|
|
|
|
/*Copied from i386 arch/i386/kernel/module.c */
|
|
void *module_alloc(unsigned long size)
|
|
{
|
|
if (size == 0)
|
|
return NULL;
|
|
return vmalloc_exec(size);
|
|
}
|
|
|
|
/* Free memory returned from module_alloc */
|
|
void module_free(struct module *mod, void *module_region)
|
|
{
|
|
vfree(module_region);
|
|
/* FIXME: If module_region == mod->init_region, trim exception
|
|
table entries. */
|
|
}
|
|
|