Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread LF.Tan
On Tue, Jul 15, 2014 at 8:21 PM, Arnd Bergmann wrote: >> >> AFAIR this is due to relocation issues, as the FIXME comment in the >> "original" code [1] states. I don't know whether this still applies, >> though (or what would be the proper fix for this to overcome the >> relocation issues). >> >>

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:24 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: > >> +void module_arch_cleanup(struct module *mod) >> +{ >> +} > > This is not needed at all. > Okay, will remove this. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Arnd Bergmann
On Tuesday 15 July 2014 13:12:37 Tobias Klauser wrote: > On 2014-07-15 at 12:24:46 +0200, Arnd Bergmann wrote: > > On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: > > > +void *module_alloc(unsigned long size) > > > +{ > > > + if (size == 0) > > > + return NULL; > > > + return

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Tobias Klauser
On 2014-07-15 at 12:24:46 +0200, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: > > +void *module_alloc(unsigned long size) > > +{ > > + if (size == 0) > > + return NULL; > > + return kmalloc(size, GFP_KERNEL); > > +} > > + > > +/* Free memory returned

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Arnd Bergmann
On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: > +void *module_alloc(unsigned long size) > +{ > + if (size == 0) > + return NULL; > + return kmalloc(size, GFP_KERNEL); > +} > + > +/* Free memory returned from module_alloc */ > +void module_free(struct module *mod, void

[PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/module.c | 135 + 1 file changed, 135 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c

[PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/kernel/module.c | 135 + 1 file changed, 135 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Arnd Bergmann
On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: +void *module_alloc(unsigned long size) +{ + if (size == 0) + return NULL; + return kmalloc(size, GFP_KERNEL); +} + +/* Free memory returned from module_alloc */ +void module_free(struct module *mod, void

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Tobias Klauser
On 2014-07-15 at 12:24:46 +0200, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: +void *module_alloc(unsigned long size) +{ + if (size == 0) + return NULL; + return kmalloc(size, GFP_KERNEL); +} + +/* Free memory returned from

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Arnd Bergmann
On Tuesday 15 July 2014 13:12:37 Tobias Klauser wrote: On 2014-07-15 at 12:24:46 +0200, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: +void *module_alloc(unsigned long size) +{ + if (size == 0) + return NULL; + return

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:24 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: +void module_arch_cleanup(struct module *mod) +{ +} This is not needed at all. Okay, will remove this. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread LF.Tan
On Tue, Jul 15, 2014 at 8:21 PM, Arnd Bergmann a...@arndb.de wrote: AFAIR this is due to relocation issues, as the FIXME comment in the original code [1] states. I don't know whether this still applies, though (or what would be the proper fix for this to overcome the relocation issues).