diff options
Diffstat (limited to 'Documentation')
20 files changed, 456 insertions, 158 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss index 4f29e5f1ebf..f5bb0a3bb8c 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss +++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-cciss | |||
@@ -59,3 +59,15 @@ Kernel Version: 2.6.31 | |||
59 | Contact: iss_storagedev@hp.com | 59 | Contact: iss_storagedev@hp.com |
60 | Description: Displays the usage count (number of opens) of logical drive Y | 60 | Description: Displays the usage count (number of opens) of logical drive Y |
61 | of controller X. | 61 | of controller X. |
62 | |||
63 | Where: /sys/bus/pci/devices/<dev>/ccissX/resettable | ||
64 | Date: February 2011 | ||
65 | Kernel Version: 2.6.38 | ||
66 | Contact: iss_storagedev@hp.com | ||
67 | Description: Value of 1 indicates the controller can honor the reset_devices | ||
68 | kernel parameter. Value of 0 indicates reset_devices cannot be | ||
69 | honored. This is to allow, for example, kexec tools to be able | ||
70 | to warn the user if they designate an unresettable device as | ||
71 | a dump device, as kdump requires resetting the device in order | ||
72 | to work reliably. | ||
73 | |||
diff --git a/Documentation/ABI/testing/sysfs-fs-ext4 b/Documentation/ABI/testing/sysfs-fs-ext4 index 5fb709997d9..f22ac0872ae 100644 --- a/Documentation/ABI/testing/sysfs-fs-ext4 +++ b/Documentation/ABI/testing/sysfs-fs-ext4 | |||
@@ -48,7 +48,7 @@ Description: | |||
48 | will have its blocks allocated out of its own unique | 48 | will have its blocks allocated out of its own unique |
49 | preallocation pool. | 49 | preallocation pool. |
50 | 50 | ||
51 | What: /sys/fs/ext4/<disk>/inode_readahead | 51 | What: /sys/fs/ext4/<disk>/inode_readahead_blks |
52 | Date: March 2008 | 52 | Date: March 2008 |
53 | Contact: "Theodore Ts'o" <tytso@mit.edu> | 53 | Contact: "Theodore Ts'o" <tytso@mit.edu> |
54 | Description: | 54 | Description: |
@@ -85,7 +85,14 @@ Date: June 2008 | |||
85 | Contact: "Theodore Ts'o" <tytso@mit.edu> | 85 | Contact: "Theodore Ts'o" <tytso@mit.edu> |
86 | Description: | 86 | Description: |
87 | Tuning parameter which (if non-zero) controls the goal | 87 | Tuning parameter which (if non-zero) controls the goal |
88 | inode used by the inode allocator in p0reference to | 88 | inode used by the inode allocator in preference to |
89 | all other allocation hueristics. This is intended for | 89 | all other allocation heuristics. This is intended for |
90 | debugging use only, and should be 0 on production | 90 | debugging use only, and should be 0 on production |
91 | systems. | 91 | systems. |
92 | |||
93 | What: /sys/fs/ext4/<disk>/max_writeback_mb_bump | ||
94 | Date: September 2009 | ||
95 | Contact: "Theodore Ts'o" <tytso@mit.edu> | ||
96 | Description: | ||
97 | The maximum number of megabytes the writeback code will | ||
98 | try to write out before move on to another inode. | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 2deb069aedf..8436b018c28 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -55,7 +55,6 @@ mandocs: $(MAN) | |||
55 | build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ | 55 | build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ |
56 | cp $(srctree)/Documentation/DocBook/dvb/*.png \ | 56 | cp $(srctree)/Documentation/DocBook/dvb/*.png \ |
57 | $(srctree)/Documentation/DocBook/v4l/*.gif \ | 57 | $(srctree)/Documentation/DocBook/v4l/*.gif \ |
58 | $(srctree)/Documentation/DocBook/v4l/*.png \ | ||
59 | $(objtree)/Documentation/DocBook/media/ | 58 | $(objtree)/Documentation/DocBook/media/ |
60 | 59 | ||
61 | xmldoclinks: | 60 | xmldoclinks: |
diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl index 54eb26b5737..50479360d84 100644 --- a/Documentation/DocBook/rapidio.tmpl +++ b/Documentation/DocBook/rapidio.tmpl | |||
@@ -133,7 +133,6 @@ | |||
133 | !Idrivers/rapidio/rio-sysfs.c | 133 | !Idrivers/rapidio/rio-sysfs.c |
134 | </sect1> | 134 | </sect1> |
135 | <sect1 id="PPC32_support"><title>PPC32 support</title> | 135 | <sect1 id="PPC32_support"><title>PPC32 support</title> |
136 | !Earch/powerpc/sysdev/fsl_rio.c | ||
137 | !Iarch/powerpc/sysdev/fsl_rio.c | 136 | !Iarch/powerpc/sysdev/fsl_rio.c |
138 | </sect1> | 137 | </sect1> |
139 | </chapter> | 138 | </chapter> |
diff --git a/Documentation/development-process/1.Intro b/Documentation/development-process/1.Intro index 8cc2cba2b10..9b614480aa8 100644 --- a/Documentation/development-process/1.Intro +++ b/Documentation/development-process/1.Intro | |||
@@ -56,13 +56,13 @@ information on kernel development. | |||
56 | 56 | ||
57 | 1.2: WHAT THIS DOCUMENT IS ABOUT | 57 | 1.2: WHAT THIS DOCUMENT IS ABOUT |
58 | 58 | ||
59 | The Linux kernel, at over 6 million lines of code and well over 1000 active | 59 | The Linux kernel, at over 8 million lines of code and well over 1000 |
60 | contributors, is one of the largest and most active free software projects | 60 | contributors to each release, is one of the largest and most active free |
61 | in existence. Since its humble beginning in 1991, this kernel has evolved | 61 | software projects in existence. Since its humble beginning in 1991, this |
62 | into a best-of-breed operating system component which runs on pocket-sized | 62 | kernel has evolved into a best-of-breed operating system component which |
63 | digital music players, desktop PCs, the largest supercomputers in | 63 | runs on pocket-sized digital music players, desktop PCs, the largest |
64 | existence, and all types of systems in between. It is a robust, efficient, | 64 | supercomputers in existence, and all types of systems in between. It is a |
65 | and scalable solution for almost any situation. | 65 | robust, efficient, and scalable solution for almost any situation. |
66 | 66 | ||
67 | With the growth of Linux has come an increase in the number of developers | 67 | With the growth of Linux has come an increase in the number of developers |
68 | (and companies) wishing to participate in its development. Hardware | 68 | (and companies) wishing to participate in its development. Hardware |
@@ -115,7 +115,7 @@ This document was written by Jonathan Corbet, corbet@lwn.net. It has been | |||
115 | improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland | 115 | improved by comments from Johannes Berg, James Berry, Alex Chiang, Roland |
116 | Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh, | 116 | Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur Marsh, |
117 | Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and | 117 | Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata, and |
118 | Jochen Voß. | 118 | Jochen Voß. |
119 | 119 | ||
120 | This work was supported by the Linux Foundation; thanks especially to | 120 | This work was supported by the Linux Foundation; thanks especially to |
121 | Amanda McPherson, who saw the value of this effort and made it all happen. | 121 | Amanda McPherson, who saw the value of this effort and made it all happen. |
@@ -221,7 +221,7 @@ include: | |||
221 | - Everything that was said above about code review applies doubly to | 221 | - Everything that was said above about code review applies doubly to |
222 | closed-source code. Since this code is not available at all, it cannot | 222 | closed-source code. Since this code is not available at all, it cannot |
223 | have been reviewed by the community and will, beyond doubt, have serious | 223 | have been reviewed by the community and will, beyond doubt, have serious |
224 | problems. | 224 | problems. |
225 | 225 | ||
226 | Makers of embedded systems, in particular, may be tempted to disregard much | 226 | Makers of embedded systems, in particular, may be tempted to disregard much |
227 | of what has been said in this section in the belief that they are shipping | 227 | of what has been said in this section in the belief that they are shipping |
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process index 911a4518634..4823577c650 100644 --- a/Documentation/development-process/2.Process +++ b/Documentation/development-process/2.Process | |||
@@ -14,16 +14,15 @@ The kernel developers use a loosely time-based release process, with a new | |||
14 | major kernel release happening every two or three months. The recent | 14 | major kernel release happening every two or three months. The recent |
15 | release history looks like this: | 15 | release history looks like this: |
16 | 16 | ||
17 | 2.6.26 July 13, 2008 | 17 | 2.6.38 March 14, 2011 |
18 | 2.6.25 April 16, 2008 | 18 | 2.6.37 January 4, 2011 |
19 | 2.6.24 January 24, 2008 | 19 | 2.6.36 October 20, 2010 |
20 | 2.6.23 October 9, 2007 | 20 | 2.6.35 August 1, 2010 |
21 | 2.6.22 July 8, 2007 | 21 | 2.6.34 May 15, 2010 |
22 | 2.6.21 April 25, 2007 | 22 | 2.6.33 February 24, 2010 |
23 | 2.6.20 February 4, 2007 | ||
24 | 23 | ||
25 | Every 2.6.x release is a major kernel release with new features, internal | 24 | Every 2.6.x release is a major kernel release with new features, internal |
26 | API changes, and more. A typical 2.6 release can contain over 10,000 | 25 | API changes, and more. A typical 2.6 release can contain nearly 10,000 |
27 | changesets with changes to several hundred thousand lines of code. 2.6 is | 26 | changesets with changes to several hundred thousand lines of code. 2.6 is |
28 | thus the leading edge of Linux kernel development; the kernel uses a | 27 | thus the leading edge of Linux kernel development; the kernel uses a |
29 | rolling development model which is continually integrating major changes. | 28 | rolling development model which is continually integrating major changes. |
@@ -42,13 +41,13 @@ merge window do not come out of thin air; they have been collected, tested, | |||
42 | and staged ahead of time. How that process works will be described in | 41 | and staged ahead of time. How that process works will be described in |
43 | detail later on). | 42 | detail later on). |
44 | 43 | ||
45 | The merge window lasts for two weeks. At the end of this time, Linus | 44 | The merge window lasts for approximately two weeks. At the end of this |
46 | Torvalds will declare that the window is closed and release the first of | 45 | time, Linus Torvalds will declare that the window is closed and release the |
47 | the "rc" kernels. For the kernel which is destined to be 2.6.26, for | 46 | first of the "rc" kernels. For the kernel which is destined to be 2.6.40, |
48 | example, the release which happens at the end of the merge window will be | 47 | for example, the release which happens at the end of the merge window will |
49 | called 2.6.26-rc1. The -rc1 release is the signal that the time to merge | 48 | be called 2.6.40-rc1. The -rc1 release is the signal that the time to |
50 | new features has passed, and that the time to stabilize the next kernel has | 49 | merge new features has passed, and that the time to stabilize the next |
51 | begun. | 50 | kernel has begun. |
52 | 51 | ||
53 | Over the next six to ten weeks, only patches which fix problems should be | 52 | Over the next six to ten weeks, only patches which fix problems should be |
54 | submitted to the mainline. On occasion a more significant change will be | 53 | submitted to the mainline. On occasion a more significant change will be |
@@ -66,20 +65,19 @@ will get up to somewhere between -rc6 and -rc9 before the kernel is | |||
66 | considered to be sufficiently stable and the final 2.6.x release is made. | 65 | considered to be sufficiently stable and the final 2.6.x release is made. |
67 | At that point the whole process starts over again. | 66 | At that point the whole process starts over again. |
68 | 67 | ||
69 | As an example, here is how the 2.6.25 development cycle went (all dates in | 68 | As an example, here is how the 2.6.38 development cycle went (all dates in |
70 | 2008): | 69 | 2011): |
71 | 70 | ||
72 | January 24 2.6.24 stable release | 71 | January 4 2.6.37 stable release |
73 | February 10 2.6.25-rc1, merge window closes | 72 | January 18 2.6.38-rc1, merge window closes |
74 | February 15 2.6.25-rc2 | 73 | January 21 2.6.38-rc2 |
75 | February 24 2.6.25-rc3 | 74 | February 1 2.6.38-rc3 |
76 | March 4 2.6.25-rc4 | 75 | February 7 2.6.38-rc4 |
77 | March 9 2.6.25-rc5 | 76 | February 15 2.6.38-rc5 |
78 | March 16 2.6.25-rc6 | 77 | February 21 2.6.38-rc6 |
79 | March 25 2.6.25-rc7 | 78 | March 1 2.6.38-rc7 |
80 | April 1 2.6.25-rc8 | 79 | March 7 2.6.38-rc8 |
81 | April 11 2.6.25-rc9 | 80 | March 14 2.6.38 stable release |
82 | April 16 2.6.25 stable release | ||
83 | 81 | ||
84 | How do the developers decide when to close the development cycle and create | 82 | How do the developers decide when to close the development cycle and create |
85 | the stable release? The most significant metric used is the list of | 83 | the stable release? The most significant metric used is the list of |
@@ -87,7 +85,7 @@ regressions from previous releases. No bugs are welcome, but those which | |||
87 | break systems which worked in the past are considered to be especially | 85 | break systems which worked in the past are considered to be especially |
88 | serious. For this reason, patches which cause regressions are looked upon | 86 | serious. For this reason, patches which cause regressions are looked upon |
89 | unfavorably and are quite likely to be reverted during the stabilization | 87 | unfavorably and are quite likely to be reverted during the stabilization |
90 | period. | 88 | period. |
91 | 89 | ||
92 | The developers' goal is to fix all known regressions before the stable | 90 | The developers' goal is to fix all known regressions before the stable |
93 | release is made. In the real world, this kind of perfection is hard to | 91 | release is made. In the real world, this kind of perfection is hard to |
@@ -99,26 +97,34 @@ kernels go out with a handful of known regressions though, hopefully, none | |||
99 | of them are serious. | 97 | of them are serious. |
100 | 98 | ||
101 | Once a stable release is made, its ongoing maintenance is passed off to the | 99 | Once a stable release is made, its ongoing maintenance is passed off to the |
102 | "stable team," currently comprised of Greg Kroah-Hartman and Chris Wright. | 100 | "stable team," currently consisting of Greg Kroah-Hartman. The stable team |
103 | The stable team will release occasional updates to the stable release using | 101 | will release occasional updates to the stable release using the 2.6.x.y |
104 | the 2.6.x.y numbering scheme. To be considered for an update release, a | 102 | numbering scheme. To be considered for an update release, a patch must (1) |
105 | patch must (1) fix a significant bug, and (2) already be merged into the | 103 | fix a significant bug, and (2) already be merged into the mainline for the |
106 | mainline for the next development kernel. Continuing our 2.6.25 example, | 104 | next development kernel. Kernels will typically receive stable updates for |
107 | the history (as of this writing) is: | 105 | a little more than one development cycle past their initial release. So, |
108 | 106 | for example, the 2.6.36 kernel's history looked like: | |
109 | May 1 2.6.25.1 | 107 | |
110 | May 6 2.6.25.2 | 108 | October 10 2.6.36 stable release |
111 | May 9 2.6.25.3 | 109 | November 22 2.6.36.1 |
112 | May 15 2.6.25.4 | 110 | December 9 2.6.36.2 |
113 | June 7 2.6.25.5 | 111 | January 7 2.6.36.3 |
114 | June 9 2.6.25.6 | 112 | February 17 2.6.36.4 |
115 | June 16 2.6.25.7 | 113 | |
116 | June 21 2.6.25.8 | 114 | 2.6.36.4 was the final stable update for the 2.6.36 release. |
117 | June 24 2.6.25.9 | 115 | |
118 | 116 | Some kernels are designated "long term" kernels; they will receive support | |
119 | Stable updates for a given kernel are made for approximately six months; | 117 | for a longer period. As of this writing, the current long term kernels |
120 | after that, the maintenance of stable releases is solely the responsibility | 118 | and their maintainers are: |
121 | of the distributors which have shipped that particular kernel. | 119 | |
120 | 2.6.27 Willy Tarreau (Deep-frozen stable kernel) | ||
121 | 2.6.32 Greg Kroah-Hartman | ||
122 | 2.6.35 Andi Kleen (Embedded flag kernel) | ||
123 | |||
124 | The selection of a kernel for long-term support is purely a matter of a | ||
125 | maintainer having the need and the time to maintain that release. There | ||
126 | are no known plans for long-term support for any specific upcoming | ||
127 | release. | ||
122 | 128 | ||
123 | 129 | ||
124 | 2.2: THE LIFECYCLE OF A PATCH | 130 | 2.2: THE LIFECYCLE OF A PATCH |
@@ -130,7 +136,7 @@ each patch implements a change which is desirable to have in the mainline. | |||
130 | This process can happen quickly for minor fixes, or, in the case of large | 136 | This process can happen quickly for minor fixes, or, in the case of large |
131 | and controversial changes, go on for years. Much developer frustration | 137 | and controversial changes, go on for years. Much developer frustration |
132 | comes from a lack of understanding of this process or from attempts to | 138 | comes from a lack of understanding of this process or from attempts to |
133 | circumvent it. | 139 | circumvent it. |
134 | 140 | ||
135 | In the hopes of reducing that frustration, this document will describe how | 141 | In the hopes of reducing that frustration, this document will describe how |
136 | a patch gets into the kernel. What follows below is an introduction which | 142 | a patch gets into the kernel. What follows below is an introduction which |
@@ -193,8 +199,8 @@ involved. | |||
193 | 2.3: HOW PATCHES GET INTO THE KERNEL | 199 | 2.3: HOW PATCHES GET INTO THE KERNEL |
194 | 200 | ||
195 | There is exactly one person who can merge patches into the mainline kernel | 201 | There is exactly one person who can merge patches into the mainline kernel |
196 | repository: Linus Torvalds. But, of the over 12,000 patches which went | 202 | repository: Linus Torvalds. But, of the over 9,500 patches which went |
197 | into the 2.6.25 kernel, only 250 (around 2%) were directly chosen by Linus | 203 | into the 2.6.38 kernel, only 112 (around 1.3%) were directly chosen by Linus |
198 | himself. The kernel project has long since grown to a size where no single | 204 | himself. The kernel project has long since grown to a size where no single |
199 | developer could possibly inspect and select every patch unassisted. The | 205 | developer could possibly inspect and select every patch unassisted. The |
200 | way the kernel developers have addressed this growth is through the use of | 206 | way the kernel developers have addressed this growth is through the use of |
@@ -229,7 +235,7 @@ first in trees dedicated to network device drivers, wireless networking, | |||
229 | etc. This chain of repositories can be arbitrarily long, though it rarely | 235 | etc. This chain of repositories can be arbitrarily long, though it rarely |
230 | exceeds two or three links. Since each maintainer in the chain trusts | 236 | exceeds two or three links. Since each maintainer in the chain trusts |
231 | those managing lower-level trees, this process is known as the "chain of | 237 | those managing lower-level trees, this process is known as the "chain of |
232 | trust." | 238 | trust." |
233 | 239 | ||
234 | Clearly, in a system like this, getting patches into the kernel depends on | 240 | Clearly, in a system like this, getting patches into the kernel depends on |
235 | finding the right maintainer. Sending patches directly to Linus is not | 241 | finding the right maintainer. Sending patches directly to Linus is not |
@@ -254,7 +260,7 @@ The answer comes in the form of -next trees, where subsystem trees are | |||
254 | collected for testing and review. The older of these trees, maintained by | 260 | collected for testing and review. The older of these trees, maintained by |
255 | Andrew Morton, is called "-mm" (for memory management, which is how it got | 261 | Andrew Morton, is called "-mm" (for memory management, which is how it got |
256 | started). The -mm tree integrates patches from a long list of subsystem | 262 | started). The -mm tree integrates patches from a long list of subsystem |
257 | trees; it also has some patches aimed at helping with debugging. | 263 | trees; it also has some patches aimed at helping with debugging. |
258 | 264 | ||
259 | Beyond that, -mm contains a significant collection of patches which have | 265 | Beyond that, -mm contains a significant collection of patches which have |
260 | been selected by Andrew directly. These patches may have been posted on a | 266 | been selected by Andrew directly. These patches may have been posted on a |
@@ -264,8 +270,8 @@ subsystem tree of last resort; if there is no other obvious path for a | |||
264 | patch into the mainline, it is likely to end up in -mm. Miscellaneous | 270 | patch into the mainline, it is likely to end up in -mm. Miscellaneous |
265 | patches which accumulate in -mm will eventually either be forwarded on to | 271 | patches which accumulate in -mm will eventually either be forwarded on to |
266 | an appropriate subsystem tree or be sent directly to Linus. In a typical | 272 | an appropriate subsystem tree or be sent directly to Linus. In a typical |
267 | development cycle, approximately 10% of the patches going into the mainline | 273 | development cycle, approximately 5-10% of the patches going into the |
268 | get there via -mm. | 274 | mainline get there via -mm. |
269 | 275 | ||
270 | The current -mm patch is available in the "mmotm" (-mm of the moment) | 276 | The current -mm patch is available in the "mmotm" (-mm of the moment) |
271 | directory at: | 277 | directory at: |
@@ -275,7 +281,7 @@ directory at: | |||
275 | Use of the MMOTM tree is likely to be a frustrating experience, though; | 281 | Use of the MMOTM tree is likely to be a frustrating experience, though; |
276 | there is a definite chance that it will not even compile. | 282 | there is a definite chance that it will not even compile. |
277 | 283 | ||
278 | The other -next tree, started more recently, is linux-next, maintained by | 284 | The primary tree for next-cycle patch merging is linux-next, maintained by |
279 | Stephen Rothwell. The linux-next tree is, by design, a snapshot of what | 285 | Stephen Rothwell. The linux-next tree is, by design, a snapshot of what |
280 | the mainline is expected to look like after the next merge window closes. | 286 | the mainline is expected to look like after the next merge window closes. |
281 | Linux-next trees are announced on the linux-kernel and linux-next mailing | 287 | Linux-next trees are announced on the linux-kernel and linux-next mailing |
@@ -287,25 +293,14 @@ Some information about linux-next has been gathered at: | |||
287 | 293 | ||
288 | http://linux.f-seidel.de/linux-next/pmwiki/ | 294 | http://linux.f-seidel.de/linux-next/pmwiki/ |
289 | 295 | ||
290 | How the linux-next tree will fit into the development process is still | 296 | Linux-next has become an integral part of the kernel development process; |
291 | changing. As of this writing, the first full development cycle involving | 297 | all patches merged during a given merge window should really have found |
292 | linux-next (2.6.26) is coming to an end; thus far, it has proved to be a | 298 | their way into linux-next some time before the merge window opens. |
293 | valuable resource for finding and fixing integration problems before the | 299 | |
294 | beginning of the merge window. See http://lwn.net/Articles/287155/ for | ||
295 | more information on how linux-next has worked to set up the 2.6.27 merge | ||
296 | window. | ||
297 | |||
298 | Some developers have begun to suggest that linux-next should be used as the | ||
299 | target for future development as well. The linux-next tree does tend to be | ||
300 | far ahead of the mainline and is more representative of the tree into which | ||
301 | any new work will be merged. The downside to this idea is that the | ||
302 | volatility of linux-next tends to make it a difficult development target. | ||
303 | See http://lwn.net/Articles/289013/ for more information on this topic, and | ||
304 | stay tuned; much is still in flux where linux-next is involved. | ||
305 | 300 | ||
306 | 2.4.1: STAGING TREES | 301 | 2.4.1: STAGING TREES |
307 | 302 | ||
308 | The kernel source tree now contains the drivers/staging/ directory, where | 303 | The kernel source tree contains the drivers/staging/ directory, where |
309 | many sub-directories for drivers or filesystems that are on their way to | 304 | many sub-directories for drivers or filesystems that are on their way to |
310 | being added to the kernel tree live. They remain in drivers/staging while | 305 | being added to the kernel tree live. They remain in drivers/staging while |
311 | they still need more work; once complete, they can be moved into the | 306 | they still need more work; once complete, they can be moved into the |
@@ -313,15 +308,23 @@ kernel proper. This is a way to keep track of drivers that aren't | |||
313 | up to Linux kernel coding or quality standards, but people may want to use | 308 | up to Linux kernel coding or quality standards, but people may want to use |
314 | them and track development. | 309 | them and track development. |
315 | 310 | ||
316 | Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree. | 311 | Greg Kroah-Hartman currently maintains the staging tree. Drivers that |
317 | Drivers that still need work are sent to him, with each driver having | 312 | still need work are sent to him, with each driver having its own |
318 | its own subdirectory in drivers/staging/. Along with the driver source | 313 | subdirectory in drivers/staging/. Along with the driver source files, a |
319 | files, a TODO file should be present in the directory as well. The TODO | 314 | TODO file should be present in the directory as well. The TODO file lists |
320 | file lists the pending work that the driver needs for acceptance into | 315 | the pending work that the driver needs for acceptance into the kernel |
321 | the kernel proper, as well as a list of people that should be Cc'd for any | 316 | proper, as well as a list of people that should be Cc'd for any patches to |
322 | patches to the driver. Staging drivers that don't currently build should | 317 | the driver. Current rules require that drivers contributed to staging |
323 | have their config entries depend upon CONFIG_BROKEN. Once they can | 318 | must, at a minimum, compile properly. |
324 | be successfully built without outside patches, CONFIG_BROKEN can be removed. | 319 | |
320 | Staging can be a relatively easy way to get new drivers into the mainline | ||
321 | where, with luck, they will come to the attention of other developers and | ||
322 | improve quickly. Entry into staging is not the end of the story, though; | ||
323 | code in staging which is not seeing regular progress will eventually be | ||
324 | removed. Distributors also tend to be relatively reluctant to enable | ||
325 | staging drivers. So staging is, at best, a stop on the way toward becoming | ||
326 | a proper mainline driver. | ||
327 | |||
325 | 328 | ||
326 | 2.5: TOOLS | 329 | 2.5: TOOLS |
327 | 330 | ||
@@ -347,11 +350,7 @@ page at: | |||
347 | 350 | ||
348 | http://git-scm.com/ | 351 | http://git-scm.com/ |
349 | 352 | ||
350 | That page has pointers to documentation and tutorials. One should be | 353 | That page has pointers to documentation and tutorials. |
351 | aware, in particular, of the Kernel Hacker's Guide to git, which has | ||
352 | information specific to kernel development: | ||
353 | |||
354 | http://linux.yyz.us/git-howto.html | ||
355 | 354 | ||
356 | Among the kernel developers who do not use git, the most popular choice is | 355 | Among the kernel developers who do not use git, the most popular choice is |
357 | almost certainly Mercurial: | 356 | almost certainly Mercurial: |
@@ -408,7 +407,7 @@ There are a few hints which can help with linux-kernel survival: | |||
408 | important to filter on both the topic of interest (though note that | 407 | important to filter on both the topic of interest (though note that |
409 | long-running conversations can drift away from the original subject | 408 | long-running conversations can drift away from the original subject |
410 | without changing the email subject line) and the people who are | 409 | without changing the email subject line) and the people who are |
411 | participating. | 410 | participating. |
412 | 411 | ||
413 | - Do not feed the trolls. If somebody is trying to stir up an angry | 412 | - Do not feed the trolls. If somebody is trying to stir up an angry |
414 | response, ignore them. | 413 | response, ignore them. |
diff --git a/Documentation/development-process/3.Early-stage b/Documentation/development-process/3.Early-stage index 307a159a70c..f87ba7b3fba 100644 --- a/Documentation/development-process/3.Early-stage +++ b/Documentation/development-process/3.Early-stage | |||
@@ -110,8 +110,8 @@ the kernel community's standards. Some examples include: | |||
110 | 110 | ||
111 | - The AppArmor security module made use of internal virtual filesystem | 111 | - The AppArmor security module made use of internal virtual filesystem |
112 | data structures in ways which were considered to be unsafe and | 112 | data structures in ways which were considered to be unsafe and |
113 | unreliable. This code has since been significantly reworked, but | 113 | unreliable. This concern (among others) kept AppArmor out of the |
114 | remains outside of the mainline. | 114 | mainline for years. |
115 | 115 | ||
116 | In each of these cases, a great deal of pain and extra work could have been | 116 | In each of these cases, a great deal of pain and extra work could have been |
117 | avoided with some early discussion with the kernel developers. | 117 | avoided with some early discussion with the kernel developers. |
@@ -138,6 +138,19 @@ patches, and who, if anybody, is attaching Signed-off-by lines to those | |||
138 | patches. Those are the people who will be best placed to help with a new | 138 | patches. Those are the people who will be best placed to help with a new |
139 | development project. | 139 | development project. |
140 | 140 | ||
141 | The task of finding the right maintainer is sometimes challenging enough | ||
142 | that the kernel developers have added a script to ease the process: | ||
143 | |||
144 | .../scripts/get_maintainer.pl | ||
145 | |||
146 | This script will return the current maintainer(s) for a given file or | ||
147 | directory when given the "-f" option. If passed a patch on the | ||
148 | command line, it will list the maintainers who should probably receive | ||
149 | copies of the patch. There are a number of options regulating how hard | ||
150 | get_maintainer.pl will search for maintainers; please be careful about | ||
151 | using the more aggressive options as you may end up including developers | ||
152 | who have no real interest in the code you are modifying. | ||
153 | |||
141 | If all else fails, talking to Andrew Morton can be an effective way to | 154 | If all else fails, talking to Andrew Morton can be an effective way to |
142 | track down a maintainer for a specific piece of code. | 155 | track down a maintainer for a specific piece of code. |
143 | 156 | ||
@@ -155,11 +168,15 @@ reaction, but, instead, little or no reaction at all. The sad truth of the | |||
155 | matter is (1) kernel developers tend to be busy, (2) there is no shortage | 168 | matter is (1) kernel developers tend to be busy, (2) there is no shortage |
156 | of people with grand plans and little code (or even prospect of code) to | 169 | of people with grand plans and little code (or even prospect of code) to |
157 | back them up, and (3) nobody is obligated to review or comment on ideas | 170 | back them up, and (3) nobody is obligated to review or comment on ideas |
158 | posted by others. If a request-for-comments posting yields little in the | 171 | posted by others. Beyond that, high-level designs often hide problems |
159 | way of comments, do not assume that it means there is no interest in the | 172 | which are only reviewed when somebody actually tries to implement those |
160 | project. Unfortunately, you also cannot assume that there are no problems | 173 | designs; for that reason, kernel developers would rather see the code. |
161 | with your idea. The best thing to do in this situation is to proceed, | 174 | |
162 | keeping the community informed as you go. | 175 | If a request-for-comments posting yields little in the way of comments, do |
176 | not assume that it means there is no interest in the project. | ||
177 | Unfortunately, you also cannot assume that there are no problems with your | ||
178 | idea. The best thing to do in this situation is to proceed, keeping the | ||
179 | community informed as you go. | ||
163 | 180 | ||
164 | 181 | ||
165 | 3.5: GETTING OFFICIAL BUY-IN | 182 | 3.5: GETTING OFFICIAL BUY-IN |
diff --git a/Documentation/development-process/4.Coding b/Documentation/development-process/4.Coding index 2278693c8ff..f3f1a469443 100644 --- a/Documentation/development-process/4.Coding +++ b/Documentation/development-process/4.Coding | |||
@@ -131,6 +131,11 @@ classic time/space tradeoff taught in beginning data structures classes | |||
131 | often does not apply to contemporary hardware. Space *is* time, in that a | 131 | often does not apply to contemporary hardware. Space *is* time, in that a |
132 | larger program will run slower than one which is more compact. | 132 | larger program will run slower than one which is more compact. |
133 | 133 | ||
134 | More recent compilers take an increasingly active role in deciding whether | ||
135 | a given function should actually be inlined or not. So the liberal | ||
136 | placement of "inline" keywords may not just be excessive; it could also be | ||
137 | irrelevant. | ||
138 | |||
134 | 139 | ||
135 | * Locking | 140 | * Locking |
136 | 141 | ||
@@ -285,6 +290,13 @@ be found at https://sparse.wiki.kernel.org/index.php/Main_Page if your | |||
285 | distributor does not package it); it can then be run on the code by adding | 290 | distributor does not package it); it can then be run on the code by adding |
286 | "C=1" to your make command. | 291 | "C=1" to your make command. |
287 | 292 | ||
293 | The "Coccinelle" tool (http://coccinelle.lip6.fr/) is able to find a wide | ||
294 | variety of potential coding problems; it can also propose fixes for those | ||
295 | problems. Quite a few "semantic patches" for the kernel have been packaged | ||
296 | under the scripts/coccinelle directory; running "make coccicheck" will run | ||
297 | through those semantic patches and report on any problems found. See | ||
298 | Documentation/coccinelle.txt for more information. | ||
299 | |||
288 | Other kinds of portability errors are best found by compiling your code for | 300 | Other kinds of portability errors are best found by compiling your code for |
289 | other architectures. If you do not happen to have an S/390 system or a | 301 | other architectures. If you do not happen to have an S/390 system or a |
290 | Blackfin development board handy, you can still perform the compilation | 302 | Blackfin development board handy, you can still perform the compilation |
@@ -308,7 +320,9 @@ The first piece of documentation for any patch is its associated | |||
308 | changelog. Log entries should describe the problem being solved, the form | 320 | changelog. Log entries should describe the problem being solved, the form |
309 | of the solution, the people who worked on the patch, any relevant | 321 | of the solution, the people who worked on the patch, any relevant |
310 | effects on performance, and anything else that might be needed to | 322 | effects on performance, and anything else that might be needed to |
311 | understand the patch. | 323 | understand the patch. Be sure that the changelog says *why* the patch is |
324 | worth applying; a surprising number of developers fail to provide that | ||
325 | information. | ||
312 | 326 | ||
313 | Any code which adds a new user-space interface - including new sysfs or | 327 | Any code which adds a new user-space interface - including new sysfs or |
314 | /proc files - should include documentation of that interface which enables | 328 | /proc files - should include documentation of that interface which enables |
@@ -321,7 +335,7 @@ boot-time parameters. Any patch which adds new parameters should add the | |||
321 | appropriate entries to this file. | 335 | appropriate entries to this file. |
322 | 336 | ||
323 | Any new configuration options must be accompanied by help text which | 337 | Any new configuration options must be accompanied by help text which |
324 | clearly explains the options and when the user might want to select them. | 338 | clearly explains the options and when the user might want to select them. |
325 | 339 | ||
326 | Internal API information for many subsystems is documented by way of | 340 | Internal API information for many subsystems is documented by way of |
327 | specially-formatted comments; these comments can be extracted and formatted | 341 | specially-formatted comments; these comments can be extracted and formatted |
@@ -372,7 +386,8 @@ which is broken by the change. For a widely-used function, this duty can | |||
372 | lead to literally hundreds or thousands of changes - many of which are | 386 | lead to literally hundreds or thousands of changes - many of which are |
373 | likely to conflict with work being done by other developers. Needless to | 387 | likely to conflict with work being done by other developers. Needless to |
374 | say, this can be a large job, so it is best to be sure that the | 388 | say, this can be a large job, so it is best to be sure that the |
375 | justification is solid. | 389 | justification is solid. Note that the Coccinelle tool can help with |
390 | wide-ranging API changes. | ||
376 | 391 | ||
377 | When making an incompatible API change, one should, whenever possible, | 392 | When making an incompatible API change, one should, whenever possible, |
378 | ensure that code which has not been updated is caught by the compiler. | 393 | ensure that code which has not been updated is caught by the compiler. |
diff --git a/Documentation/development-process/5.Posting b/Documentation/development-process/5.Posting index f622c1e9f0f..903a2546f13 100644 --- a/Documentation/development-process/5.Posting +++ b/Documentation/development-process/5.Posting | |||
@@ -60,12 +60,15 @@ even in the short term. | |||
60 | 60 | ||
61 | Patches must be prepared against a specific version of the kernel. As a | 61 | Patches must be prepared against a specific version of the kernel. As a |
62 | general rule, a patch should be based on the current mainline as found in | 62 | general rule, a patch should be based on the current mainline as found in |
63 | Linus's git tree. It may become necessary to make versions against -mm, | 63 | Linus's git tree. When basing on mainline, start with a well-known release |
64 | linux-next, or a subsystem tree, though, to facilitate wider testing and | 64 | point - a stable or -rc release - rather than branching off the mainline at |
65 | review. Depending on the area of your patch and what is going on | 65 | an arbitrary spot. |
66 | elsewhere, basing a patch against these other trees can require a | 66 | |
67 | significant amount of work resolving conflicts and dealing with API | 67 | It may become necessary to make versions against -mm, linux-next, or a |
68 | changes. | 68 | subsystem tree, though, to facilitate wider testing and review. Depending |
69 | on the area of your patch and what is going on elsewhere, basing a patch | ||
70 | against these other trees can require a significant amount of work | ||
71 | resolving conflicts and dealing with API changes. | ||
69 | 72 | ||
70 | Only the most simple changes should be formatted as a single patch; | 73 | Only the most simple changes should be formatted as a single patch; |
71 | everything else should be made as a logical series of changes. Splitting | 74 | everything else should be made as a logical series of changes. Splitting |
@@ -100,11 +103,11 @@ rules of thumb, however, which can help considerably: | |||
100 | result is a broken kernel, you will make life harder for developers and | 103 | result is a broken kernel, you will make life harder for developers and |
101 | users who are engaging in the noble work of tracking down problems. | 104 | users who are engaging in the noble work of tracking down problems. |
102 | 105 | ||
103 | - Do not overdo it, though. One developer recently posted a set of edits | 106 | - Do not overdo it, though. One developer once posted a set of edits |
104 | to a single file as 500 separate patches - an act which did not make him | 107 | to a single file as 500 separate patches - an act which did not make him |
105 | the most popular person on the kernel mailing list. A single patch can | 108 | the most popular person on the kernel mailing list. A single patch can |
106 | be reasonably large as long as it still contains a single *logical* | 109 | be reasonably large as long as it still contains a single *logical* |
107 | change. | 110 | change. |
108 | 111 | ||
109 | - It can be tempting to add a whole new infrastructure with a series of | 112 | - It can be tempting to add a whole new infrastructure with a series of |
110 | patches, but to leave that infrastructure unused until the final patch | 113 | patches, but to leave that infrastructure unused until the final patch |
@@ -162,7 +165,8 @@ To that end, the summary line should describe the effects of and motivation | |||
162 | for the change as well as possible given the one-line constraint. The | 165 | for the change as well as possible given the one-line constraint. The |
163 | detailed description can then amplify on those topics and provide any | 166 | detailed description can then amplify on those topics and provide any |
164 | needed additional information. If the patch fixes a bug, cite the commit | 167 | needed additional information. If the patch fixes a bug, cite the commit |
165 | which introduced the bug if possible. If a problem is associated with | 168 | which introduced the bug if possible (and please provide both the commit ID |
169 | and the title when citing commits). If a problem is associated with | ||
166 | specific log or compiler output, include that output to help others | 170 | specific log or compiler output, include that output to help others |
167 | searching for a solution to the same problem. If the change is meant to | 171 | searching for a solution to the same problem. If the change is meant to |
168 | support other changes coming in later patch, say so. If internal APIs are | 172 | support other changes coming in later patch, say so. If internal APIs are |
@@ -230,7 +234,7 @@ take care of: | |||
230 | which have had gratuitous white-space changes or line wrapping performed | 234 | which have had gratuitous white-space changes or line wrapping performed |
231 | by the mail client will not apply at the other end, and often will not | 235 | by the mail client will not apply at the other end, and often will not |
232 | be examined in any detail. If there is any doubt at all, mail the patch | 236 | be examined in any detail. If there is any doubt at all, mail the patch |
233 | to yourself and convince yourself that it shows up intact. | 237 | to yourself and convince yourself that it shows up intact. |
234 | 238 | ||
235 | Documentation/email-clients.txt has some helpful hints on making | 239 | Documentation/email-clients.txt has some helpful hints on making |
236 | specific mail clients work for sending patches. | 240 | specific mail clients work for sending patches. |
@@ -287,7 +291,7 @@ something like: | |||
287 | 291 | ||
288 | where "nn" is the ordinal number of the patch, "mm" is the total number of | 292 | where "nn" is the ordinal number of the patch, "mm" is the total number of |
289 | patches in the series, and "subsys" is the name of the affected subsystem. | 293 | patches in the series, and "subsys" is the name of the affected subsystem. |
290 | Clearly, nn/mm can be omitted for a single, standalone patch. | 294 | Clearly, nn/mm can be omitted for a single, standalone patch. |
291 | 295 | ||
292 | If you have a significant series of patches, it is customary to send an | 296 | If you have a significant series of patches, it is customary to send an |
293 | introductory description as part zero. This convention is not universally | 297 | introductory description as part zero. This convention is not universally |
@@ -299,5 +303,5 @@ In general, the second and following parts of a multi-part patch should be | |||
299 | sent as a reply to the first part so that they all thread together at the | 303 | sent as a reply to the first part so that they all thread together at the |
300 | receiving end. Tools like git and quilt have commands to mail out a set of | 304 | receiving end. Tools like git and quilt have commands to mail out a set of |
301 | patches with the proper threading. If you have a long series, though, and | 305 | patches with the proper threading. If you have a long series, though, and |
302 | are using git, please provide the --no-chain-reply-to option to avoid | 306 | are using git, please stay away from the --chain-reply-to option to avoid |
303 | creating exceptionally deep nesting. | 307 | creating exceptionally deep nesting. |
diff --git a/Documentation/development-process/6.Followthrough b/Documentation/development-process/6.Followthrough index a8fba3d83a8..41d324a9420 100644 --- a/Documentation/development-process/6.Followthrough +++ b/Documentation/development-process/6.Followthrough | |||
@@ -66,6 +66,11 @@ be easy to become blinded by your own solution to a problem to the point | |||
66 | that you don't realize that something is fundamentally wrong or, perhaps, | 66 | that you don't realize that something is fundamentally wrong or, perhaps, |
67 | you're not even solving the right problem. | 67 | you're not even solving the right problem. |
68 | 68 | ||
69 | Andrew Morton has suggested that every review comment which does not result | ||
70 | in a code change should result in an additional code comment instead; that | ||
71 | can help future reviewers avoid the questions which came up the first time | ||
72 | around. | ||
73 | |||
69 | One fatal mistake is to ignore review comments in the hope that they will | 74 | One fatal mistake is to ignore review comments in the hope that they will |
70 | go away. They will not go away. If you repost code without having | 75 | go away. They will not go away. If you repost code without having |
71 | responded to the comments you got the time before, you're likely to find | 76 | responded to the comments you got the time before, you're likely to find |
@@ -100,7 +105,7 @@ entry into a subsystem maintainer's tree. How that works varies from one | |||
100 | subsystem to the next; each maintainer has his or her own way of doing | 105 | subsystem to the next; each maintainer has his or her own way of doing |
101 | things. In particular, there may be more than one tree - one, perhaps, | 106 | things. In particular, there may be more than one tree - one, perhaps, |
102 | dedicated to patches planned for the next merge window, and another for | 107 | dedicated to patches planned for the next merge window, and another for |
103 | longer-term work. | 108 | longer-term work. |
104 | 109 | ||
105 | For patches applying to areas for which there is no obvious subsystem tree | 110 | For patches applying to areas for which there is no obvious subsystem tree |
106 | (memory management patches, for example), the default tree often ends up | 111 | (memory management patches, for example), the default tree often ends up |
@@ -109,11 +114,10 @@ through the -mm tree. | |||
109 | 114 | ||
110 | Inclusion into a subsystem tree can bring a higher level of visibility to a | 115 | Inclusion into a subsystem tree can bring a higher level of visibility to a |
111 | patch. Now other developers working with that tree will get the patch by | 116 | patch. Now other developers working with that tree will get the patch by |
112 | default. Subsystem trees typically feed into -mm and linux-next as well, | 117 | default. Subsystem trees typically feed linux-next as well, making their |
113 | making their contents visible to the development community as a whole. At | 118 | contents visible to the development community as a whole. At this point, |
114 | this point, there's a good chance that you will get more comments from a | 119 | there's a good chance that you will get more comments from a new set of |
115 | new set of reviewers; these comments need to be answered as in the previous | 120 | reviewers; these comments need to be answered as in the previous round. |
116 | round. | ||
117 | 121 | ||
118 | What may also happen at this point, depending on the nature of your patch, | 122 | What may also happen at this point, depending on the nature of your patch, |
119 | is that conflicts with work being done by others turn up. In the worst | 123 | is that conflicts with work being done by others turn up. In the worst |
diff --git a/Documentation/development-process/7.AdvancedTopics b/Documentation/development-process/7.AdvancedTopics index 837179447e1..26dc3fa196e 100644 --- a/Documentation/development-process/7.AdvancedTopics +++ b/Documentation/development-process/7.AdvancedTopics | |||
@@ -119,7 +119,7 @@ can affect your ability to get trees pulled in the future. Quoting Linus: | |||
119 | to trust things *without* then having to go and check every | 119 | to trust things *without* then having to go and check every |
120 | individual change by hand. | 120 | individual change by hand. |
121 | 121 | ||
122 | (http://lwn.net/Articles/224135/). | 122 | (http://lwn.net/Articles/224135/). |
123 | 123 | ||
124 | To avoid this kind of situation, ensure that all patches within a given | 124 | To avoid this kind of situation, ensure that all patches within a given |
125 | branch stick closely to the associated topic; a "driver fixes" branch | 125 | branch stick closely to the associated topic; a "driver fixes" branch |
@@ -138,7 +138,7 @@ When requesting a pull, be sure to give all the relevant information: where | |||
138 | your tree is, what branch to pull, and what changes will result from the | 138 | your tree is, what branch to pull, and what changes will result from the |
139 | pull. The git request-pull command can be helpful in this regard; it will | 139 | pull. The git request-pull command can be helpful in this regard; it will |
140 | format the request as other developers expect, and will also check to be | 140 | format the request as other developers expect, and will also check to be |
141 | sure that you have remembered to push those changes to the public server. | 141 | sure that you have remembered to push those changes to the public server. |
142 | 142 | ||
143 | 143 | ||
144 | 7.2: REVIEWING PATCHES | 144 | 7.2: REVIEWING PATCHES |
diff --git a/Documentation/device-mapper/dm-flakey.txt b/Documentation/device-mapper/dm-flakey.txt new file mode 100644 index 00000000000..c8efdfd19a6 --- /dev/null +++ b/Documentation/device-mapper/dm-flakey.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | dm-flakey | ||
2 | ========= | ||
3 | |||
4 | This target is the same as the linear target except that it returns I/O | ||
5 | errors periodically. It's been found useful in simulating failing | ||
6 | devices for testing purposes. | ||
7 | |||
8 | Starting from the time the table is loaded, the device is available for | ||
9 | <up interval> seconds, then returns errors for <down interval> seconds, | ||
10 | and then this cycle repeats. | ||
11 | |||
12 | Parameters: <dev path> <offset> <up interval> <down interval> | ||
13 | <dev path>: Full pathname to the underlying block-device, or a | ||
14 | "major:minor" device-number. | ||
15 | <offset>: Starting sector within the device. | ||
16 | <up interval>: Number of seconds device is available. | ||
17 | <down interval>: Number of seconds device returns errors. | ||
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index e6c4b757025..f959909d715 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -6,7 +6,7 @@ This document describes how to use the dynamic debug (ddebug) feature. | |||
6 | 6 | ||
7 | Dynamic debug is designed to allow you to dynamically enable/disable kernel | 7 | Dynamic debug is designed to allow you to dynamically enable/disable kernel |
8 | code to obtain additional kernel information. Currently, if | 8 | code to obtain additional kernel information. Currently, if |
9 | CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be | 9 | CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_dbg() calls can be |
10 | dynamically enabled per-callsite. | 10 | dynamically enabled per-callsite. |
11 | 11 | ||
12 | Dynamic debug has even more useful features: | 12 | Dynamic debug has even more useful features: |
@@ -26,7 +26,7 @@ Dynamic debug has even more useful features: | |||
26 | Controlling dynamic debug Behaviour | 26 | Controlling dynamic debug Behaviour |
27 | =================================== | 27 | =================================== |
28 | 28 | ||
29 | The behaviour of pr_debug()/dev_debug()s are controlled via writing to a | 29 | The behaviour of pr_debug()/dev_dbg()s are controlled via writing to a |
30 | control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs | 30 | control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs |
31 | filesystem, in order to make use of this feature. Subsequently, we refer to the | 31 | filesystem, in order to make use of this feature. Subsequently, we refer to the |
32 | control file as: <debugfs>/dynamic_debug/control. For example, if you want to | 32 | control file as: <debugfs>/dynamic_debug/control. For example, if you want to |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 2e994efe12c..61b31acb917 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -128,7 +128,7 @@ alloc_inode: | |||
128 | destroy_inode: | 128 | destroy_inode: |
129 | dirty_inode: (must not sleep) | 129 | dirty_inode: (must not sleep) |
130 | write_inode: | 130 | write_inode: |
131 | drop_inode: !!!inode_lock!!! | 131 | drop_inode: !!!inode->i_lock!!! |
132 | evict_inode: | 132 | evict_inode: |
133 | put_super: write | 133 | put_super: write |
134 | write_super: read | 134 | write_super: read |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 6ab9442d7ee..6b050464a90 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -367,12 +367,47 @@ init_itable=n The lazy itable init code will wait n times the | |||
367 | minimizes the impact on the systme performance | 367 | minimizes the impact on the systme performance |
368 | while file system's inode table is being initialized. | 368 | while file system's inode table is being initialized. |
369 | 369 | ||
370 | discard Controls whether ext4 should issue discard/TRIM | 370 | discard Controls whether ext4 should issue discard/TRIM |
371 | nodiscard(*) commands to the underlying block device when | 371 | nodiscard(*) commands to the underlying block device when |
372 | blocks are freed. This is useful for SSD devices | 372 | blocks are freed. This is useful for SSD devices |
373 | and sparse/thinly-provisioned LUNs, but it is off | 373 | and sparse/thinly-provisioned LUNs, but it is off |
374 | by default until sufficient testing has been done. | 374 | by default until sufficient testing has been done. |
375 | 375 | ||
376 | nouid32 Disables 32-bit UIDs and GIDs. This is for | ||
377 | interoperability with older kernels which only | ||
378 | store and expect 16-bit values. | ||
379 | |||
380 | resize Allows to resize filesystem to the end of the last | ||
381 | existing block group, further resize has to be done | ||
382 | with resize2fs either online, or offline. It can be | ||
383 | used only with conjunction with remount. | ||
384 | |||
385 | block_validity This options allows to enables/disables the in-kernel | ||
386 | noblock_validity facility for tracking filesystem metadata blocks | ||
387 | within internal data structures. This allows multi- | ||
388 | block allocator and other routines to quickly locate | ||
389 | extents which might overlap with filesystem metadata | ||
390 | blocks. This option is intended for debugging | ||
391 | purposes and since it negatively affects the | ||
392 | performance, it is off by default. | ||
393 | |||
394 | dioread_lock Controls whether or not ext4 should use the DIO read | ||
395 | dioread_nolock locking. If the dioread_nolock option is specified | ||
396 | ext4 will allocate uninitialized extent before buffer | ||
397 | write and convert the extent to initialized after IO | ||
398 | completes. This approach allows ext4 code to avoid | ||
399 | using inode mutex, which improves scalability on high | ||
400 | speed storages. However this does not work with nobh | ||
401 | option and the mount will fail. Nor does it work with | ||
402 | data journaling and dioread_nolock option will be | ||
403 | ignored with kernel warning. Note that dioread_nolock | ||
404 | code path is only used for extent-based files. | ||
405 | Because of the restrictions this options comprises | ||
406 | it is off by default (e.g. dioread_lock). | ||
407 | |||
408 | i_version Enable 64-bit inode version support. This option is | ||
409 | off by default. | ||
410 | |||
376 | Data Mode | 411 | Data Mode |
377 | ========= | 412 | ========= |
378 | There are 3 different data modes: | 413 | There are 3 different data modes: |
@@ -400,6 +435,176 @@ needs to be read from and written to disk at the same time where it | |||
400 | outperforms all others modes. Currently ext4 does not have delayed | 435 | outperforms all others modes. Currently ext4 does not have delayed |
401 | allocation support if this data journalling mode is selected. | 436 | allocation support if this data journalling mode is selected. |
402 | 437 | ||
438 | /proc entries | ||
439 | ============= | ||
440 | |||
441 | Information about mounted ext4 file systems can be found in | ||
442 | /proc/fs/ext4. Each mounted filesystem will have a directory in | ||
443 | /proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or | ||
444 | /proc/fs/ext4/dm-0). The files in each per-device directory are shown | ||
445 | in table below. | ||
446 | |||
447 | Files in /proc/fs/ext4/<devname> | ||
448 | .............................................................................. | ||
449 | File Content | ||
450 | mb_groups details of multiblock allocator buddy cache of free blocks | ||
451 | .............................................................................. | ||
452 | |||
453 | /sys entries | ||
454 | ============ | ||
455 | |||
456 | Information about mounted ext4 file systems can be found in | ||
457 | /sys/fs/ext4. Each mounted filesystem will have a directory in | ||
458 | /sys/fs/ext4 based on its device name (i.e., /sys/fs/ext4/hdc or | ||
459 | /sys/fs/ext4/dm-0). The files in each per-device directory are shown | ||
460 | in table below. | ||
461 | |||
462 | Files in /sys/fs/ext4/<devname> | ||
463 | (see also Documentation/ABI/testing/sysfs-fs-ext4) | ||
464 | .............................................................................. | ||
465 | File Content | ||
466 | |||
467 | delayed_allocation_blocks This file is read-only and shows the number of | ||
468 | blocks that are dirty in the page cache, but | ||
469 | which do not have their location in the | ||
470 | filesystem allocated yet. | ||
471 | |||
472 | inode_goal Tuning parameter which (if non-zero) controls | ||
473 | the goal inode used by the inode allocator in | ||
474 | preference to all other allocation heuristics. | ||
475 | This is intended for debugging use only, and | ||
476 | should be 0 on production systems. | ||
477 | |||
478 | inode_readahead_blks Tuning parameter which controls the maximum | ||
479 | number of inode table blocks that ext4's inode | ||
480 | table readahead algorithm will pre-read into | ||
481 | the buffer cache | ||
482 | |||
483 | lifetime_write_kbytes This file is read-only and shows the number of | ||
484 | kilobytes of data that have been written to this | ||
485 | filesystem since it was created. | ||
486 | |||
487 | max_writeback_mb_bump The maximum number of megabytes the writeback | ||
488 | code will try to write out before move on to | ||
489 | another inode. | ||
490 | |||
491 | mb_group_prealloc The multiblock allocator will round up allocation | ||
492 | requests to a multiple of this tuning parameter if | ||
493 | the stripe size is not set in the ext4 superblock | ||
494 | |||
495 | mb_max_to_scan The maximum number of extents the multiblock | ||
496 | allocator will search to find the best extent | ||
497 | |||
498 | mb_min_to_scan The minimum number of extents the multiblock | ||
499 | allocator will search to find the best extent | ||
500 | |||
501 | mb_order2_req Tuning parameter which controls the minimum size | ||
502 | for requests (as a power of 2) where the buddy | ||
503 | cache is used | ||
504 | |||
505 | mb_stats Controls whether the multiblock allocator should | ||
506 | collect statistics, which are shown during the | ||
507 | unmount. 1 means to collect statistics, 0 means | ||
508 | not to collect statistics | ||
509 | |||
510 | mb_stream_req Files which have fewer blocks than this tunable | ||
511 | parameter will have their blocks allocated out | ||
512 | of a block group specific preallocation pool, so | ||
513 | that small files are packed closely together. | ||
514 | Each large file will have its blocks allocated | ||
515 | out of its own unique preallocation pool. | ||
516 | |||
517 | session_write_kbytes This file is read-only and shows the number of | ||
518 | kilobytes of data that have been written to this | ||
519 | filesystem since it was mounted. | ||
520 | .............................................................................. | ||
521 | |||
522 | Ioctls | ||
523 | ====== | ||
524 | |||
525 | There is some Ext4 specific functionality which can be accessed by applications | ||
526 | through the system call interfaces. The list of all Ext4 specific ioctls are | ||
527 | shown in the table below. | ||
528 | |||
529 | Table of Ext4 specific ioctls | ||
530 | .............................................................................. | ||
531 | Ioctl Description | ||
532 | EXT4_IOC_GETFLAGS Get additional attributes associated with inode. | ||
533 | The ioctl argument is an integer bitfield, with | ||
534 | bit values described in ext4.h. This ioctl is an | ||
535 | alias for FS_IOC_GETFLAGS. | ||
536 | |||
537 | EXT4_IOC_SETFLAGS Set additional attributes associated with inode. | ||
538 | The ioctl argument is an integer bitfield, with | ||
539 | bit values described in ext4.h. This ioctl is an | ||
540 | alias for FS_IOC_SETFLAGS. | ||
541 | |||
542 | EXT4_IOC_GETVERSION | ||
543 | EXT4_IOC_GETVERSION_OLD | ||
544 | Get the inode i_generation number stored for | ||
545 | each inode. The i_generation number is normally | ||
546 | changed only when new inode is created and it is | ||
547 | particularly useful for network filesystems. The | ||
548 | '_OLD' version of this ioctl is an alias for | ||
549 | FS_IOC_GETVERSION. | ||
550 | |||
551 | EXT4_IOC_SETVERSION | ||
552 | EXT4_IOC_SETVERSION_OLD | ||
553 | Set the inode i_generation number stored for | ||
554 | each inode. The '_OLD' version of this ioctl | ||
555 | is an alias for FS_IOC_SETVERSION. | ||
556 | |||
557 | EXT4_IOC_GROUP_EXTEND This ioctl has the same purpose as the resize | ||
558 | mount option. It allows to resize filesystem | ||
559 | to the end of the last existing block group, | ||
560 | further resize has to be done with resize2fs, | ||
561 | either online, or offline. The argument points | ||
562 | to the unsigned logn number representing the | ||
563 | filesystem new block count. | ||
564 | |||
565 | EXT4_IOC_MOVE_EXT Move the block extents from orig_fd (the one | ||
566 | this ioctl is pointing to) to the donor_fd (the | ||
567 | one specified in move_extent structure passed | ||
568 | as an argument to this ioctl). Then, exchange | ||
569 | inode metadata between orig_fd and donor_fd. | ||
570 | This is especially useful for online | ||
571 | defragmentation, because the allocator has the | ||
572 | opportunity to allocate moved blocks better, | ||
573 | ideally into one contiguous extent. | ||
574 | |||
575 | EXT4_IOC_GROUP_ADD Add a new group descriptor to an existing or | ||
576 | new group descriptor block. The new group | ||
577 | descriptor is described by ext4_new_group_input | ||
578 | structure, which is passed as an argument to | ||
579 | this ioctl. This is especially useful in | ||
580 | conjunction with EXT4_IOC_GROUP_EXTEND, | ||
581 | which allows online resize of the filesystem | ||
582 | to the end of the last existing block group. | ||
583 | Those two ioctls combined is used in userspace | ||
584 | online resize tool (e.g. resize2fs). | ||
585 | |||
586 | EXT4_IOC_MIGRATE This ioctl operates on the filesystem itself. | ||
587 | It converts (migrates) ext3 indirect block mapped | ||
588 | inode to ext4 extent mapped inode by walking | ||
589 | through indirect block mapping of the original | ||
590 | inode and converting contiguous block ranges | ||
591 | into ext4 extents of the temporary inode. Then, | ||
592 | inodes are swapped. This ioctl might help, when | ||
593 | migrating from ext3 to ext4 filesystem, however | ||
594 | suggestion is to create fresh ext4 filesystem | ||
595 | and copy data from the backup. Note, that | ||
596 | filesystem has to support extents for this ioctl | ||
597 | to work. | ||
598 | |||
599 | EXT4_IOC_ALLOC_DA_BLKS Force all of the delay allocated blocks to be | ||
600 | allocated to preserve application-expected ext3 | ||
601 | behaviour. Note that this will also start | ||
602 | triggering a write of the data blocks, but this | ||
603 | behaviour may change in the future as it is | ||
604 | not necessary and has been done this way only | ||
605 | for sake of simplicity. | ||
606 | .............................................................................. | ||
607 | |||
403 | References | 608 | References |
404 | ========== | 609 | ========== |
405 | 610 | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 0c986c9e851..6e29954851a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has | |||
298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated | 298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated |
299 | metadata buffers; getting rid of those is responsibility of method, as it had | 299 | metadata buffers; getting rid of those is responsibility of method, as it had |
300 | been for ->delete_inode(). | 300 | been for ->delete_inode(). |
301 | ->drop_inode() returns int now; it's called on final iput() with inode_lock | 301 | |
302 | held and it returns true if filesystems wants the inode to be dropped. As before, | 302 | ->drop_inode() returns int now; it's called on final iput() with |
303 | generic_drop_inode() is still the default and it's been updated appropriately. | 303 | inode->i_lock held and it returns true if filesystems wants the inode to be |
304 | generic_delete_inode() is also alive and it consists simply of return 1. Note that | 304 | dropped. As before, generic_drop_inode() is still the default and it's been |
305 | all actual eviction work is done by caller after ->drop_inode() returns. | 305 | updated appropriately. generic_delete_inode() is also alive and it consists |
306 | simply of return 1. Note that all actual eviction work is done by caller after | ||
307 | ->drop_inode() returns. | ||
308 | |||
306 | clear_inode() is gone; use end_writeback() instead. As before, it must | 309 | clear_inode() is gone; use end_writeback() instead. As before, it must |
307 | be called exactly once on each call of ->evict_inode() (as it used to be for | 310 | be called exactly once on each call of ->evict_inode() (as it used to be for |
308 | each call of ->delete_inode()). Unlike before, if you are using inode-associated | 311 | each call of ->delete_inode()). Unlike before, if you are using inode-associated |
@@ -397,6 +400,9 @@ a file off. | |||
397 | 400 | ||
398 | -- | 401 | -- |
399 | [mandatory] | 402 | [mandatory] |
403 | |||
404 | -- | ||
405 | [mandatory] | ||
400 | ->get_sb() is gone. Switch to use of ->mount(). Typically it's just | 406 | ->get_sb() is gone. Switch to use of ->mount(). Typically it's just |
401 | a matter of switching from calling get_sb_... to mount_... and changing the | 407 | a matter of switching from calling get_sb_... to mount_... and changing the |
402 | function type. If you were doing it manually, just switch from setting ->mnt_root | 408 | function type. If you were doing it manually, just switch from setting ->mnt_root |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 306f0ae8df0..80815ed654c 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -254,7 +254,7 @@ or bottom half). | |||
254 | should be synchronous or not, not all filesystems check this flag. | 254 | should be synchronous or not, not all filesystems check this flag. |
255 | 255 | ||
256 | drop_inode: called when the last access to the inode is dropped, | 256 | drop_inode: called when the last access to the inode is dropped, |
257 | with the inode_lock spinlock held. | 257 | with the inode->i_lock spinlock held. |
258 | 258 | ||
259 | This method should be either NULL (normal UNIX filesystem | 259 | This method should be either NULL (normal UNIX filesystem |
260 | semantics) or "generic_delete_inode" (for filesystems that do not | 260 | semantics) or "generic_delete_inode" (for filesystems that do not |
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg index 4d0bc70f185..df02245d141 100644 --- a/Documentation/hwmon/f71882fg +++ b/Documentation/hwmon/f71882fg | |||
@@ -2,6 +2,10 @@ Kernel driver f71882fg | |||
2 | ====================== | 2 | ====================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Fintek F71808E | ||
6 | Prefix: 'f71808e' | ||
7 | Addresses scanned: none, address read from Super I/O config space | ||
8 | Datasheet: Not public | ||
5 | * Fintek F71858FG | 9 | * Fintek F71858FG |
6 | Prefix: 'f71858fg' | 10 | Prefix: 'f71858fg' |
7 | Addresses scanned: none, address read from Super I/O config space | 11 | Addresses scanned: none, address read from Super I/O config space |
@@ -26,10 +30,25 @@ Supported chips: | |||
26 | Prefix: 'f71889ed' | 30 | Prefix: 'f71889ed' |
27 | Addresses scanned: none, address read from Super I/O config space | 31 | Addresses scanned: none, address read from Super I/O config space |
28 | Datasheet: Should become available on the Fintek website soon | 32 | Datasheet: Should become available on the Fintek website soon |
33 | * Fintek F71889A | ||
34 | Prefix: 'f71889a' | ||
35 | Addresses scanned: none, address read from Super I/O config space | ||
36 | Datasheet: Should become available on the Fintek website soon | ||
29 | * Fintek F8000 | 37 | * Fintek F8000 |
30 | Prefix: 'f8000' | 38 | Prefix: 'f8000' |
31 | Addresses scanned: none, address read from Super I/O config space | 39 | Addresses scanned: none, address read from Super I/O config space |
32 | Datasheet: Not public | 40 | Datasheet: Not public |
41 | * Fintek F81801U | ||
42 | Prefix: 'f71889fg' | ||
43 | Addresses scanned: none, address read from Super I/O config space | ||
44 | Datasheet: Not public | ||
45 | Note: This is the 64-pin variant of the F71889FG, they have the | ||
46 | same device ID and are fully compatible as far as hardware | ||
47 | monitoring is concerned. | ||
48 | * Fintek F81865F | ||
49 | Prefix: 'f81865f' | ||
50 | Addresses scanned: none, address read from Super I/O config space | ||
51 | Datasheet: Available from the Fintek website | ||
33 | 52 | ||
34 | Author: Hans de Goede <hdegoede@redhat.com> | 53 | Author: Hans de Goede <hdegoede@redhat.com> |
35 | 54 | ||
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt index 8239ebbcddc..99961993257 100644 --- a/Documentation/scheduler/sched-design-CFS.txt +++ b/Documentation/scheduler/sched-design-CFS.txt | |||
@@ -164,7 +164,7 @@ This is the (partial) list of the hooks: | |||
164 | It puts the scheduling entity (task) into the red-black tree and | 164 | It puts the scheduling entity (task) into the red-black tree and |
165 | increments the nr_running variable. | 165 | increments the nr_running variable. |
166 | 166 | ||
167 | - dequeue_tree(...) | 167 | - dequeue_task(...) |
168 | 168 | ||
169 | When a task is no longer runnable, this function is called to keep the | 169 | When a task is no longer runnable, this function is called to keep the |
170 | corresponding scheduling entity out of the red-black tree. It decrements | 170 | corresponding scheduling entity out of the red-black tree. It decrements |
@@ -195,11 +195,6 @@ This is the (partial) list of the hooks: | |||
195 | This function is mostly called from time tick functions; it might lead to | 195 | This function is mostly called from time tick functions; it might lead to |
196 | process switch. This drives the running preemption. | 196 | process switch. This drives the running preemption. |
197 | 197 | ||
198 | - task_new(...) | ||
199 | |||
200 | The core scheduler gives the scheduling module an opportunity to manage new | ||
201 | task startup. The CFS scheduling module uses it for group scheduling, while | ||
202 | the scheduling module for a real-time task does not use it. | ||
203 | 198 | ||
204 | 199 | ||
205 | 200 | ||
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index dbeb8a0d717..7ef9b843d52 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py | |||
@@ -239,8 +239,8 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
239 | buf += "#include <target/target_core_configfs.h>\n" | 239 | buf += "#include <target/target_core_configfs.h>\n" |
240 | buf += "#include <target/target_core_base.h>\n" | 240 | buf += "#include <target/target_core_base.h>\n" |
241 | buf += "#include <target/configfs_macros.h>\n\n" | 241 | buf += "#include <target/configfs_macros.h>\n\n" |
242 | buf += "#include <" + fabric_mod_name + "_base.h>\n" | 242 | buf += "#include \"" + fabric_mod_name + "_base.h\"\n" |
243 | buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" | 243 | buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" |
244 | 244 | ||
245 | buf += "/* Local pointer to allocated TCM configfs fabric module */\n" | 245 | buf += "/* Local pointer to allocated TCM configfs fabric module */\n" |
246 | buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" | 246 | buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" |
@@ -289,6 +289,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
289 | buf += "{\n" | 289 | buf += "{\n" |
290 | buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" | 290 | buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" |
291 | buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" | 291 | buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" |
292 | buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n" | ||
292 | buf += " kfree(nacl);\n" | 293 | buf += " kfree(nacl);\n" |
293 | buf += "}\n\n" | 294 | buf += "}\n\n" |
294 | 295 | ||
@@ -583,9 +584,9 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
583 | buf += "#include <target/target_core_fabric_lib.h>\n" | 584 | buf += "#include <target/target_core_fabric_lib.h>\n" |
584 | buf += "#include <target/target_core_device.h>\n" | 585 | buf += "#include <target/target_core_device.h>\n" |
585 | buf += "#include <target/target_core_tpg.h>\n" | 586 | buf += "#include <target/target_core_tpg.h>\n" |
586 | buf += "#include <target/target_core_configfs.h>\n" | 587 | buf += "#include <target/target_core_configfs.h>\n\n" |
587 | buf += "#include <" + fabric_mod_name + "_base.h>\n" | 588 | buf += "#include \"" + fabric_mod_name + "_base.h\"\n" |
588 | buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" | 589 | buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" |
589 | 590 | ||
590 | buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" | 591 | buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" |
591 | buf += "{\n" | 592 | buf += "{\n" |
@@ -973,14 +974,13 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
973 | def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): | 974 | def tcm_mod_build_kbuild(fabric_mod_dir_var, fabric_mod_name): |
974 | 975 | ||
975 | buf = "" | 976 | buf = "" |
976 | f = fabric_mod_dir_var + "/Kbuild" | 977 | f = fabric_mod_dir_var + "/Makefile" |
977 | print "Writing file: " + f | 978 | print "Writing file: " + f |
978 | 979 | ||
979 | p = open(f, 'w') | 980 | p = open(f, 'w') |
980 | if not p: | 981 | if not p: |
981 | tcm_mod_err("Unable to open file: " + f) | 982 | tcm_mod_err("Unable to open file: " + f) |
982 | 983 | ||
983 | buf = "EXTRA_CFLAGS += -I$(srctree)/drivers/target/ -I$(srctree)/include/ -I$(srctree)/drivers/scsi/ -I$(srctree)/include/scsi/ -I$(srctree)/drivers/target/" + fabric_mod_name + "\n\n" | ||
984 | buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n" | 984 | buf += fabric_mod_name + "-objs := " + fabric_mod_name + "_fabric.o \\\n" |
985 | buf += " " + fabric_mod_name + "_configfs.o\n" | 985 | buf += " " + fabric_mod_name + "_configfs.o\n" |
986 | buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n" | 986 | buf += "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name + ".o\n" |
@@ -1018,7 +1018,7 @@ def tcm_mod_build_kconfig(fabric_mod_dir_var, fabric_mod_name): | |||
1018 | 1018 | ||
1019 | def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name): | 1019 | def tcm_mod_add_kbuild(tcm_dir, fabric_mod_name): |
1020 | buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n" | 1020 | buf = "obj-$(CONFIG_" + fabric_mod_name.upper() + ") += " + fabric_mod_name.lower() + "/\n" |
1021 | kbuild = tcm_dir + "/drivers/target/Kbuild" | 1021 | kbuild = tcm_dir + "/drivers/target/Makefile" |
1022 | 1022 | ||
1023 | f = open(kbuild, 'a') | 1023 | f = open(kbuild, 'a') |
1024 | f.write(buf) | 1024 | f.write(buf) |
@@ -1064,7 +1064,7 @@ def main(modname, proto_ident): | |||
1064 | tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name) | 1064 | tcm_mod_build_kbuild(fabric_mod_dir, fabric_mod_name) |
1065 | tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name) | 1065 | tcm_mod_build_kconfig(fabric_mod_dir, fabric_mod_name) |
1066 | 1066 | ||
1067 | input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kbuild..? [yes,no]: ") | 1067 | input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: ") |
1068 | if input == "yes" or input == "y": | 1068 | if input == "yes" or input == "y": |
1069 | tcm_mod_add_kbuild(tcm_dir, fabric_mod_name) | 1069 | tcm_mod_add_kbuild(tcm_dir, fabric_mod_name) |
1070 | 1070 | ||