mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Malcolm Rowe <malcolm-linux@farside.org.uk>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] disable built-in modules V2
Date: Wed, 06 Apr 2005 15:28:38 +0100	[thread overview]
Message-ID: <courier.4253F216.00001A20@mail.farside.org.uk> (raw)
In-Reply-To: <aec7e5c305040606104c86712c@mail.gmail.com>

Magnus Damm writes:
>> 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);

Yes, that looks more sensible. It hides the fact that the initcall ever 
existed, rather than explicitly telling you that it's been skipped, but I 
don't imagine that that's ever going to cause a problem in practice (i.e., I 
don't think anyone would ever enable "force_ohci1394=off" by mistake and 
also without noticing). 


> 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.

I think so, though I don't really know a great deal about this area. 


An IA64 descriptor is of the form { &code, &data_context }, and a function 
pointer is a pointer to such a descriptor. Presumably, setting a function 
pointer to NULL will either end up setting the pointer-to-descriptor to NULL 
or the code pointer to NULL, but either way, I would expect the 'if 
(!*call)' comparison to work as intended. 


Best thing would be to get someone on IA64 and/or PPC64 to check this for 
you. Also might be worth checking that the patch works as intended with 
CONFIG_MODULES=n (assuming you haven't already). 


Regards,
Malcolm

  reply	other threads:[~2005-04-06 14:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-05 23:29 Magnus Damm
2005-04-06 10:32 ` Malcolm Rowe
2005-04-06 13:10   ` Magnus Damm
2005-04-06 14:28     ` Malcolm Rowe [this message]
2005-04-06 22:14       ` Magnus Damm
2005-04-07  7:47         ` Zwane Mwaikambo
2005-04-07  1:32 ` AsterixTheGaul
2005-04-07  2:23   ` Roland Dreier
2005-04-07  8:23     ` Magnus Damm
2005-04-07 17:01       ` Randy.Dunlap
2005-04-07 17:22         ` Richard B. Johnson
2005-04-07 17:29           ` Randy.Dunlap
2005-04-07 18:53             ` Magnus Damm
2005-04-09  1:42               ` Herbert Xu
2005-04-09  9:43                 ` Magnus Damm
2005-04-09  9:48                   ` Herbert Xu
2005-04-09 10:03                     ` Magnus Damm
2005-04-09 10:07                       ` Herbert Xu
2005-04-09 10:14                         ` Magnus Damm
2005-04-07 17:37           ` Dave Jones
2005-04-07  2:38   ` Horst von Brand
2005-04-07 21:33     ` Magnus Damm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=courier.4253F216.00001A20@mail.farside.org.uk \
    --to=malcolm-linux@farside.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®