* What is use of apply_alternative function from alternative.c
@ 2012-03-20 13:54 Pritam Bankar
2012-03-26 4:42 ` Jim Cromie
[not found] ` <CALCg9D82YC=McjwdBHVdSVLrAojcsCuV5R7o=ScpZ8dHxi7xXQ@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Pritam Bankar @ 2012-03-20 13:54 UTC (permalink / raw)
To: kernelnewbies
Hi,
Cal anyone help me in understanding alternative.c file from Linux source
code.
I want to learn function apply_alternative. AFAIK this code applies better
replacement to instruction set used by processor.
But I am not sure what exactly it is doing ?
--
Pritam Bankar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120320/bb45c582/attachment.html
^ permalink raw reply [flat|nested] 4+ messages in thread* What is use of apply_alternative function from alternative.c 2012-03-20 13:54 What is use of apply_alternative function from alternative.c Pritam Bankar @ 2012-03-26 4:42 ` Jim Cromie [not found] ` <CALCg9D82YC=McjwdBHVdSVLrAojcsCuV5R7o=ScpZ8dHxi7xXQ@mail.gmail.com> 1 sibling, 0 replies; 4+ messages in thread From: Jim Cromie @ 2012-03-26 4:42 UTC (permalink / raw) To: kernelnewbies On Tue, Mar 20, 2012 at 7:54 AM, Pritam Bankar <pritambankar1988@gmail.com> wrote: > Hi, > Cal anyone help me in understanding alternative.c file from Linux source > code. > I want to learn function apply_alternative. AFAIK this code applies better > replacement to instruction set used by processor. > But I am not sure what exactly it is doing ? if you add "debug-alternatives" to boot args, you'll see something like this. basically it patches the kernel, inserting locks and synchronization so that the kernel can run on SMP / multi-core arches. Once this is done, the other cores can be started. There are also some helpful comments in the code :-O apply_alternatives: alt table ffffffff81d546a8 -> ffffffff81d54ccc alternatives_smp_module_add: locks ffffffff81d57000 -> ffffffff81d5a000, text ffffffff81000000 -> ffffffff8149a3d2, name core kernel lockdep: fixing up alternatives. lockdep: fixing up alternatives. lockdep: fixing up alternatives. apply_alternatives: alt table ffffffff81a0363a -> ffffffff81a03652 alternatives_smp_module_add: locks ffffffffa001115c -> ffffffffa001117c, text ffffffffa000f000 -> ffffffffa0010ac0, name video alternatives_smp_module_add: locks ffffffffa002f530 -> ffffffffa002f598, text ffffffffa002c000 -> ffffffffa002efb4, name agpgart alternatives_smp_module_add: locks ffffffffa005b1a4 -> ffffffffa005b244, text ffffffffa0039000 -> ffffffffa004e508, name drm alternatives_smp_module_add: locks ffffffffa007f634 -> ffffffffa007f638, text ffffffffa007b000 -> ffffffffa007e6fc, name drm_kms_helper alternatives_smp_module_add: locks ffffffffa0091a84 -> ffffffffa0091abc, text ffffffffa0087000 -> ffffffffa008fab4, name ttm apply_alternatives: alt table ffffffffa011ca28 -> ffffffffa011ca40 alternatives_smp_module_add: locks ffffffffa011c8f8 -> ffffffffa011c974, text ffffffffa00a1000 -> ffffffffa010c104, name nouveau alternatives_smp_module_add: locks ffffffffa006fc14 -> ffffffffa006fc68, text ffffffffa006b000 -> ffffffffa006e340, name usb_storage alternatives_smp_module_add: locks ffffffffa013d45c -> ffffffffa013d474, text ffffffffa0138000 -> ffffffffa013c044, name autofs4 alternatives_smp_module_add: locks ffffffffa0177b38 -> ffffffffa0177c84, text ffffffffa0141000 -> ffffffffa0170380, name ipv6 alternatives_smp_module_add: locks ffffffffa000d294 -> ffffffffa000d2bc, text ffffffffa000c000 -> ffffffffa000d174, name uinput apply_alternatives: alt table ffffffffa01d7b77 -> ffffffffa01d7be3 alternatives_smp_module_add: locks ffffffffa01d491c -> ffffffffa01d4a00, text ffffffffa01a2000 -> ffffffffa01ccf6c, name kvm > > -- > > Pritam Bankar > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CALCg9D82YC=McjwdBHVdSVLrAojcsCuV5R7o=ScpZ8dHxi7xXQ@mail.gmail.com>]
* What is use of apply_alternative function from alternative.c [not found] ` <CALCg9D82YC=McjwdBHVdSVLrAojcsCuV5R7o=ScpZ8dHxi7xXQ@mail.gmail.com> @ 2012-04-02 8:57 ` Pritam Bankar 2012-04-02 9:01 ` Pritam Bankar 0 siblings, 1 reply; 4+ messages in thread From: Pritam Bankar @ 2012-04-02 8:57 UTC (permalink / raw) To: kernelnewbies Thanks Andrew , Jim On Tue, Mar 20, 2012 at 8:40 PM, Andrew Case <atcuno@gmail.com> wrote: > The feature is called SMP alternatives. See if this articles helps > you: http://lwn.net/Articles/164121/ > > On Tue, Mar 20, 2012 at 8:54 AM, Pritam Bankar > <pritambankar1988@gmail.com> wrote: > > Hi, > > Cal anyone help me in understanding alternative.c file from Linux source > > code. > > I want to learn function apply_alternative. AFAIK this code applies > better > > replacement to instruction set used by processor. > > But I am not sure what exactly it is doing ? > > > > -- > > > > Pritam Bankar > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > -- Pritam Bankar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120402/e7b4dd7f/attachment.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* What is use of apply_alternative function from alternative.c 2012-04-02 8:57 ` Pritam Bankar @ 2012-04-02 9:01 ` Pritam Bankar 0 siblings, 0 replies; 4+ messages in thread From: Pritam Bankar @ 2012-04-02 9:01 UTC (permalink / raw) To: kernelnewbies Jim , Is it a boot time process ? Can I switch to smp mode in running kernel? On Mon, Apr 2, 2012 at 2:27 PM, Pritam Bankar <pritambankar1988@gmail.com>wrote: > Thanks Andrew , Jim > > > On Tue, Mar 20, 2012 at 8:40 PM, Andrew Case <atcuno@gmail.com> wrote: > >> The feature is called SMP alternatives. See if this articles helps >> you: http://lwn.net/Articles/164121/ >> >> On Tue, Mar 20, 2012 at 8:54 AM, Pritam Bankar >> <pritambankar1988@gmail.com> wrote: >> > Hi, >> > Cal anyone help me in understanding alternative.c file from Linux source >> > code. >> > I want to learn function apply_alternative. AFAIK this code applies >> better >> > replacement to instruction set used by processor. >> > But I am not sure what exactly it is doing ? >> > >> > -- >> > >> > Pritam Bankar >> > >> > _______________________________________________ >> > Kernelnewbies mailing list >> > Kernelnewbies at kernelnewbies.org >> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > >> > > > > -- > > Pritam Bankar > -- Pritam Bankar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120402/1f911f16/attachment.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-02 9:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 13:54 What is use of apply_alternative function from alternative.c Pritam Bankar
2012-03-26 4:42 ` Jim Cromie
[not found] ` <CALCg9D82YC=McjwdBHVdSVLrAojcsCuV5R7o=ScpZ8dHxi7xXQ@mail.gmail.com>
2012-04-02 8:57 ` Pritam Bankar
2012-04-02 9:01 ` Pritam Bankar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).