lkml.org 
[lkml]   [2005]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH][RFC] disable built-in modules V2
On Apr 6, 2005 12:32 PM, Malcolm Rowe <malcolm-linux@farside.org.uk> wrote:
> Magnus Damm writes:
> > Here comes version 2 of the disable built-in patch.
>
> > +void __init disable_initcall(void *fn)
> > +{
> > + initcall_t *call;
> > +
> > + for (call = __initcall_start; call < __initcall_end; call++) {
> > +
> > + if (*call == fn)
> > + *call = NULL;
> > + }
> > +}
>
> Regardless of anything else, won't this break booting with initcall_debug on
> PPC64/IA64 machines? (see the definition of print_fn_descriptor_symbol() in
> kallsyms.h)

Correct, thanks for pointing that out. The code below is probably better:

static void __init do_initcalls(void)
{
initcall_t *call;
@@ -547,6 +558,9 @@ static void __init do_initcalls(void)
for (call = __initcall_start; call < __initcall_end; call++) {
char *msg;

+ if (!*call)
+ continue;
+
if (initcall_debug) {
printk(KERN_DEBUG "Calling initcall 0x%p", *call);
print_fn_descriptor_symbol(": %s()", (unsigned
long) *call);
And I guess the idea of replacing the initcall pointer with NULL will
work both with and without function descriptors, right? So we should
be safe on IA64 and PPC64.

Regards,

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

\
 
 \ /
  Last update: 2005-04-06 15:14    [W:0.084 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site