lkml.org 
[lkml]   [2011]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [patch 13/36] Hexagon: Support dynamic module loading.
    Date
    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


    \
     
     \ /
      Last update: 2011-08-17 22:45    [W:4.614 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site