Re: Query on do_initcalls() function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
From: "Vijaymahantesh Kalakoti" <vijayck@sasken.com>
To: <kernelnewbies@nl.linux.org>
Sent: Tuesday, June 15, 2004 6:30 PM
Subject: Query on do_initcalls() function.


>
> Hi all,
>
> I am going through the kernel bootup sequence.
> When the function do_initcalls() is called
>
> The definition of the function is;
>
> static void __init do_initcalls(void)
> {
>         initcall_t *call;
>
>         call = &__initcall_start;
>         do {
>                 (*call)();
>                 call++;
>         } while (call < &__initcall_end);
>
>        /* Make sure there is no pending stuff from the initcall
> sequence */
>        flush_scheduled_tasks();
> }
>
> 1. Here __initcall_start variable is being used. But I couldn't understand
> what it is? Where it is being initialized ??
This variable represents  a section in executable and is initialized by
linker. Read your linker script to get more information about this variable.
Or in your source, you can find gcc __attribute__ which puts function calls
in __initcall_start section.

>
> 2. What is role of these *.S files like the arch/sh/boot/compressed/head.S
> files in the linux kernel.??
These are architecture dependent kernel startup files written in assembly.
Basic initialization and such kind of stuff goes here.

Regards
Mohanlal

> Could u pls help me out in this regard?
>
> --
> -----------------------------------
> Thanks & Regards
> vijay kalkoti
> -----------------------------------
>
>


----------------------------------------------------------------------------
----


> ***********************************************************************
>
> ********************************************************************
>
> SASKEN BUSINESS DISCLAIMER
>
> This message may contain confidential, proprietary or legally Privileged
information. In case you are not the original intended Recipient of the
message, you must not, directly or indirectly, use, Disclose, distribute,
print, or copy any part of this message and you are requested to delete it
and inform the sender. Any views expressed in this message are those of the
individual sender unless otherwise stated. Nothing contained in this message
shall be construed as an offer or acceptance of any offer by Sasken
Communication Technologies Limited ("Sasken") unless sent with that express
intent and with due authority of Sasken. Sasken has taken enough precautions
to prevent the spread of viruses. However the company accepts no liability
for any damage caused by any virus transmitted by this email.
>
> ***********************************************************************
>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux