Re: How to understand the macro __init?

2012-09-03 Thread Jim Cromie
On Thu, Aug 16, 2012 at 12:39 PM, Amarnath Revanna amarnath.reva...@gmail.com wrote: Just want to add a little more for better understanding: When I spoke about .init section of the final kernel image, please note that this section is going to contain all the __init data (and functions)

Re: How to understand the macro __init?

2012-08-16 Thread stl
To be more precise, all the content of the .init section will be freed at the end of the boot. (see vmlinux.lds.S) This is done by the function free_initmem() which is an architecture specific function defined in linux-*/arch/arch/mm/init.c. This function frees the memory between the symbols

Re: How to understand the macro __init?

2012-08-16 Thread stl
sorry for the wrong manipulation (resume of the previous mail) As explained before, the symbols and functions defined with __init are only used during boot initialization. Thez will never be used again. So The entire .init section is freed, and this freed memory will become available memory pages

Re: How to understand the macro __init?

2012-08-16 Thread Vijay Chauhan
Hi, On Tue, Aug 14, 2012 at 9:34 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi.. :) On Tue, Aug 14, 2012 at 9:14 AM, 王哲 wangzhe5...@gmail.com wrote: i use the __init for function print_k. in my opinion after the fisrt invoking the print_k in the hello_init. the memory of print_k

Re: How to understand the macro __init?

2012-08-16 Thread Amarnath Revanna
Hi Ezequiel, On Thu, Aug 16, 2012 at 10:53 PM, Ezequiel Garcia elezegar...@gmail.comwrote: Hi Amar, On Thu, Aug 16, 2012 at 1:08 PM, Amarnath Revanna amarnath.reva...@gmail.com wrote: On the other hand, any other kernel module that you load using insmod or modprobe comes after this

Re: How to understand the macro __init?

2012-08-16 Thread Amarnath Revanna
Just want to add a little more for better understanding: When I spoke about .init section of the final kernel image, please note that this section is going to contain all the __init data (and functions) coming from _All_ the drivers and modules that were included as part of the kernel image.

Re: How to understand the macro __init?

2012-08-16 Thread Ezequiel Garcia
Hey Amar, On Thu, Aug 16, 2012 at 3:39 PM, Amarnath Revanna amarnath.reva...@gmail.com wrote: Just want to add a little more for better understanding: When I spoke about .init section of the final kernel image, please note that this section is going to contain all the __init data (and

Re: How to understand the macro __init?

2012-08-16 Thread Amarnath Revanna
On Fri, Aug 17, 2012 at 12:19 AM, Ezequiel Garcia elezegar...@gmail.comwrote: Hey Amar, On Thu, Aug 16, 2012 at 3:39 PM, Amarnath Revanna amarnath.reva...@gmail.com wrote: Just want to add a little more for better understanding: When I spoke about .init section of the final kernel

Re: How to understand the macro __init?

2012-08-14 Thread Ezequiel Garcia
Hey wanny, On Tue, Aug 14, 2012 at 1:04 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi.. :) On Tue, Aug 14, 2012 at 9:14 AM, 王哲 wangzhe5...@gmail.com wrote: i use the __init for function print_k. in my opinion after the fisrt invoking the print_k in the hello_init. the memory of

Re: How to understand the macro __init?

2012-08-14 Thread 王哲
2012/8/14 Ezequiel Garcia elezegar...@gmail.com Hey wanny, On Tue, Aug 14, 2012 at 1:04 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi.. :) On Tue, Aug 14, 2012 at 9:14 AM, 王哲 wangzhe5...@gmail.com wrote: i use the __init for function print_k. in my opinion after the fisrt

Re: How to understand the macro __init?

2012-08-14 Thread Ezequiel Garcia
On Tue, Aug 14, 2012 at 8:46 AM, 王哲 wangzhe5...@gmail.com wrote: 2012/8/14 Ezequiel Garcia elezegar...@gmail.com Hey wanny, On Tue, Aug 14, 2012 at 1:04 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi.. :) On Tue, Aug 14, 2012 at 9:14 AM, 王哲 wangzhe5...@gmail.com wrote: i

Re: How to understand the macro __init?

2012-08-13 Thread Mulyadi Santosa
Hi.. :) On Tue, Aug 14, 2012 at 9:14 AM, 王哲 wangzhe5...@gmail.com wrote: i use the __init for function print_k. in my opinion after the fisrt invoking the print_k in the hello_init. the memory of print_k will be freed,and the second invoking will not be executed.but the result of second