亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 1859 | 回復(fù): 4
打印 上一主題 下一主題

[內(nèi)核模塊] 內(nèi)核 initcall疑問(wèn) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2014-05-18 11:04 |只看該作者 |倒序?yàn)g覽
initcall有7個(gè)level,分別是core,postcore,arch,subsys,fs,device,late
我認(rèn)為這7個(gè)都是外設(shè)相關(guān)的,另外fs感覺(jué)是文件系統(tǒng)的意思,但調(diào)用這個(gè)宏都是外設(shè)的,

有大神能解釋著7個(gè)level分別對(duì)應(yīng)那些部分的工作嗎?

論壇徽章:
9
辰龍
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辭舊歲徽章
日期:2015-03-03 16:54:1515-16賽季CBA聯(lián)賽之青島
日期:2016-03-13 23:37:1915-16賽季CBA聯(lián)賽之深圳
日期:2016-03-29 18:52:38
2 [報(bào)告]
發(fā)表于 2014-05-18 13:23 |只看該作者
Documentation: Kernel Initialization Mechanisms
From:                 Matthew Gilbert <mgilbert@mvista.com>
To:                 linux-kernel@vger.kernel.org
Subject:                 [PATCH] Documentation: Kernel Initialization Mechanisms
Date:                 Mon, 27 Jun 2005 10:45:57 -0700
Archive-link:                 Article, Thread

Below is documentation I've started on the kernel initialization
mechanisms. Other than reading the source, I haven't been able to find
much discussion on the topic.

My explanations of the different init levels is lacking. I haven't been
able to find any documentation on them. Existing usage seems to vary
quite a bit so its hard to tell their intended functionality. I was
hoping to get some help defining what the intended usage was. Especially
regarding what services are available at each level.

Feedback is appreciated. Thanks _matt

Signed-off-by: Matthew Gilbert <mgilbert@mvista.com>

--- linux-2.6.12.1/Documentation/initcalls.txt.orig        1969-12-31 17:00:00.000000000 -0700
+++ linux-2.6.12.1/Documentation/initcalls.txt        2005-06-24 16:58:45.232683368 -0700
@@ -0,0 +1,120 @@
+===============================
+Linux Initialization Mechanisms
+===============================
+
+__initcall
+----------
+
+2.4 has a single mechanism for adding a function to kernel
+initialization, mark the function with the __initcall macro. This macro
+places a *reference* to the function in a special section of the kernel
+(.initcall.init). __initcall does not change the linkage of the
+specified function, only a reference to the function is placed in
+.initcall.init. On bootup, this section is then iterated over, calling
+each function in link order.
+
+2.6 Improvements
+----------------
+
+2.6 improves the initialization process by adding a coarse order to the
+initialization sequence. 2.6 defines 7 levels of initialization plus
+application specific initialization sections (e.g. console and
+security).  The definition of these levels of initialization can be
+found in include/linux/init.h. The 2.4 macro __initcall still exists but
+is re-mapped to the device initialization level. Function calls within a
+level are still relegated to link order.
+
+   * core_initcall
+   * postcore_initcall
+   * arch_initcall
+   * subsys_initcall
+   * fs_initcall
+   * device_initcall
+   * late_initcall
+
+Each named initialization section is transformed into a numbered .text
+section.  These sections are then linked into the kernel in numeric
+order as can be seen below in the snippet from the ARM linker script.
+
+      __initcall_start = .;
+         *(.initcall1.init)
+         *(.initcall2.init)
+         *(.initcall3.init)
+         *(.initcall4.init)
+         *(.initcall5.init)
+         *(.initcall6.init)
+         *(.initcall7.init)
+      __initcall_end = .;
+
+The same 2.4 mechanism to call initialization functions is used in 2.6,
+the initcall section is iterated over calling each function in link
+order. However, the linker script now adds some amount of control over
+how the initialization functions are placed in the initcall section.
+
+__init
+------
+
+The initcall mechanism is used to add a function to kernel
+initialization and to add some amount of order to those calls. __init is
+also commonly used within the kernel. This function (or __initdata for
+data) attribute specifies section placement. __init relocates the
+function (not a reference like above) to the .init.text section. The
+kernel frees the .init.text section after boot.
+
+The __init and initcall mechanisms can be used together. However, care
+must be taken to ensure a function used with initcall is not called by
+any other means (e.g. timer initialization structure). This also applied
+in 2.4 when using __initcall.
+
+Initialization Levels
+---------------------
+
+core -- Level 1
+```````````````
+
+        Used for core kernel services and for some early arch/driver
+        specific initialization that do not depend on any kernel core
+        initialization.
+
+postcore -- Level 2
+```````````````````
+
+        Initialization of functions that depend on core initialization and
+        that do not fall into the other categories.
+
+arch -- Level 3
+```````````````
+
+        Used for architecture specific initialization (i386, ARM, Mips,
+        etc.).
+
+subsys -- Level 4
+`````````````````
+
+        Used to initialize kernel subsystems.
+
+fs -- Level 5
+`````````````
+
+        describe level
+
+device -- Level 6
+`````````````````
+
+        Device initialization.
+
+late -- Level 7
+```````````````
+
+        describe level
+
+console
+```````
+
+        Console specific initialization.
+
+security
+````````
+
+        Security specific initialization.
+

論壇徽章:
9
辰龍
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辭舊歲徽章
日期:2015-03-03 16:54:1515-16賽季CBA聯(lián)賽之青島
日期:2016-03-13 23:37:1915-16賽季CBA聯(lián)賽之深圳
日期:2016-03-29 18:52:38
3 [報(bào)告]
發(fā)表于 2014-05-18 13:25 |只看該作者
這是當(dāng)時(shí)引入這個(gè)機(jī)制的patch, 作者寫得很清楚了。

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2014-05-18 14:30 |只看該作者
感謝哈,沒(méi)怎么看文檔。。回復(fù) 3# Tinnal


   

論壇徽章:
9
辰龍
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辭舊歲徽章
日期:2015-03-03 16:54:1515-16賽季CBA聯(lián)賽之青島
日期:2016-03-13 23:37:1915-16賽季CBA聯(lián)賽之深圳
日期:2016-03-29 18:52:38
5 [報(bào)告]
發(fā)表于 2014-05-19 21:40 |只看該作者
回復(fù) 4# f22jay

學(xué)Linux,最重學(xué)的是學(xué)習(xí)的能力,因?yàn)長(zhǎng)inux代碼天天在變。不能這么懶,多google。


   
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP