Re: [patch 13/36] Hexagon: Support dynamic module loading.

From: Arnd Bergmann
Date: Wed Aug 17 2011 - 16:42:24 EST


On Wednesday 17 August 2011 11:35:10 Richard Kuo wrote:
> + * module_alloc - wrapper around vmalloc
> + * @size - memory size to vmalloc
> + */
> +void *module_alloc(unsigned long size)
> +{
> + if (size == 0)
> + return NULL;
> + return vmalloc_exec(size);
> +}
> +
> +/*
> + * module_free - free memory returned from module_alloc
> + * @mod - pointer to module?
> + * @module_region - pointer to module region?
> + */
> +void module_free(struct module *mod, void *module_region)
> +{
> + vfree(module_region);
> +}
> +
> +/*
> + * module_finalize - perform platform-dependent fixups.
> + */
> +int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
> + struct module *me)
> +{
> + return 0;
> +}
> +
> +/*
> + * module_arch_cleanup - Any cleanup needed with module
> + * @mod - pointer to module
> + * @module_region - pointer to module region
> + */
> +void module_arch_cleanup(struct module *mod)
> +{
> +}

These are the default implementations that are now (as of 3.1) provided
by common code, so you can just omit your own definitions.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/