diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-19 07:07:50 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-09-20 20:38:22 -0400 |
commit | 44f9d45e382f4ac5955d0fbac2503039c8be9159 (patch) | |
tree | 1deb973ee9b6e1e67b24fa081f26a4c981178c37 | |
parent | 1d7078d4e2bcc212394cdacd233b050a84b0354a (diff) |
Documentation/stable_api_nonsense.txt: convert it to ReST markup
Add markups for it to be properly parsed by Sphinx.
As people browsing this document may not notice that the source
file title is "stable_api_nonsense", I opted to use bold to
the rationale for this document. I also found it better to
add a note when it says that the nonsense applies only to the
kABI/kAPI, and not to uAPI.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r-- | Documentation/stable_api_nonsense.txt | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/Documentation/stable_api_nonsense.txt b/Documentation/stable_api_nonsense.txt index db3be892afb2..9187b4ef4bac 100644 --- a/Documentation/stable_api_nonsense.txt +++ b/Documentation/stable_api_nonsense.txt | |||
@@ -1,17 +1,24 @@ | |||
1 | The Linux Kernel Driver Interface | 1 | The Linux Kernel Driver Interface |
2 | ================================== | ||
3 | |||
2 | (all of your questions answered and then some) | 4 | (all of your questions answered and then some) |
3 | 5 | ||
4 | Greg Kroah-Hartman <greg@kroah.com> | 6 | Greg Kroah-Hartman <greg@kroah.com> |
5 | 7 | ||
6 | This is being written to try to explain why Linux does not have a binary | 8 | This is being written to try to explain why Linux **does not have a binary |
7 | kernel interface, nor does it have a stable kernel interface. Please | 9 | kernel interface, nor does it have a stable kernel interface**. |
8 | realize that this article describes the _in kernel_ interfaces, not the | 10 | |
9 | kernel to userspace interfaces. The kernel to userspace interface is | 11 | .. note:: |
10 | the one that application programs use, the syscall interface. That | 12 | |
11 | interface is _very_ stable over time, and will not break. I have old | 13 | Please realize that this article describes the **in kernel** interfaces, not |
12 | programs that were built on a pre 0.9something kernel that still work | 14 | the kernel to userspace interfaces. |
13 | just fine on the latest 2.6 kernel release. That interface is the one | 15 | |
14 | that users and application programmers can count on being stable. | 16 | The kernel to userspace interface is the one that application programs use, |
17 | the syscall interface. That interface is **very** stable over time, and | ||
18 | will not break. I have old programs that were built on a pre 0.9something | ||
19 | kernel that still work just fine on the latest 2.6 kernel release. | ||
20 | That interface is the one that users and application programmers can count | ||
21 | on being stable. | ||
15 | 22 | ||
16 | 23 | ||
17 | Executive Summary | 24 | Executive Summary |
@@ -33,7 +40,7 @@ to worry about the in-kernel interfaces changing. For the majority of | |||
33 | the world, they neither see this interface, nor do they care about it at | 40 | the world, they neither see this interface, nor do they care about it at |
34 | all. | 41 | all. |
35 | 42 | ||
36 | First off, I'm not going to address _any_ legal issues about closed | 43 | First off, I'm not going to address **any** legal issues about closed |
37 | source, hidden source, binary blobs, source wrappers, or any other term | 44 | source, hidden source, binary blobs, source wrappers, or any other term |
38 | that describes kernel drivers that do not have their source code | 45 | that describes kernel drivers that do not have their source code |
39 | released under the GPL. Please consult a lawyer if you have any legal | 46 | released under the GPL. Please consult a lawyer if you have any legal |
@@ -51,19 +58,23 @@ Binary Kernel Interface | |||
51 | Assuming that we had a stable kernel source interface for the kernel, a | 58 | Assuming that we had a stable kernel source interface for the kernel, a |
52 | binary interface would naturally happen too, right? Wrong. Please | 59 | binary interface would naturally happen too, right? Wrong. Please |
53 | consider the following facts about the Linux kernel: | 60 | consider the following facts about the Linux kernel: |
61 | |||
54 | - Depending on the version of the C compiler you use, different kernel | 62 | - Depending on the version of the C compiler you use, different kernel |
55 | data structures will contain different alignment of structures, and | 63 | data structures will contain different alignment of structures, and |
56 | possibly include different functions in different ways (putting | 64 | possibly include different functions in different ways (putting |
57 | functions inline or not.) The individual function organization | 65 | functions inline or not.) The individual function organization |
58 | isn't that important, but the different data structure padding is | 66 | isn't that important, but the different data structure padding is |
59 | very important. | 67 | very important. |
68 | |||
60 | - Depending on what kernel build options you select, a wide range of | 69 | - Depending on what kernel build options you select, a wide range of |
61 | different things can be assumed by the kernel: | 70 | different things can be assumed by the kernel: |
71 | |||
62 | - different structures can contain different fields | 72 | - different structures can contain different fields |
63 | - Some functions may not be implemented at all, (i.e. some locks | 73 | - Some functions may not be implemented at all, (i.e. some locks |
64 | compile away to nothing for non-SMP builds.) | 74 | compile away to nothing for non-SMP builds.) |
65 | - Memory within the kernel can be aligned in different ways, | 75 | - Memory within the kernel can be aligned in different ways, |
66 | depending on the build options. | 76 | depending on the build options. |
77 | |||
67 | - Linux runs on a wide range of different processor architectures. | 78 | - Linux runs on a wide range of different processor architectures. |
68 | There is no way that binary drivers from one architecture will run | 79 | There is no way that binary drivers from one architecture will run |
69 | on another architecture properly. | 80 | on another architecture properly. |
@@ -105,6 +116,7 @@ As a specific examples of this, the in-kernel USB interfaces have | |||
105 | undergone at least three different reworks over the lifetime of this | 116 | undergone at least three different reworks over the lifetime of this |
106 | subsystem. These reworks were done to address a number of different | 117 | subsystem. These reworks were done to address a number of different |
107 | issues: | 118 | issues: |
119 | |||
108 | - A change from a synchronous model of data streams to an asynchronous | 120 | - A change from a synchronous model of data streams to an asynchronous |
109 | one. This reduced the complexity of a number of drivers and | 121 | one. This reduced the complexity of a number of drivers and |
110 | increased the throughput of all USB drivers such that we are now | 122 | increased the throughput of all USB drivers such that we are now |
@@ -166,6 +178,7 @@ very little effort on your part. | |||
166 | 178 | ||
167 | The very good side effects of having your driver in the main kernel tree | 179 | The very good side effects of having your driver in the main kernel tree |
168 | are: | 180 | are: |
181 | |||
169 | - The quality of the driver will rise as the maintenance costs (to the | 182 | - The quality of the driver will rise as the maintenance costs (to the |
170 | original developer) will decrease. | 183 | original developer) will decrease. |
171 | - Other developers will add features to your driver. | 184 | - Other developers will add features to your driver. |
@@ -175,7 +188,7 @@ are: | |||
175 | changes require it. | 188 | changes require it. |
176 | - The driver automatically gets shipped in all Linux distributions | 189 | - The driver automatically gets shipped in all Linux distributions |
177 | without having to ask the distros to add it. | 190 | without having to ask the distros to add it. |
178 | 191 | ||
179 | As Linux supports a larger number of different devices "out of the box" | 192 | As Linux supports a larger number of different devices "out of the box" |
180 | than any other operating system, and it supports these devices on more | 193 | than any other operating system, and it supports these devices on more |
181 | different processor architectures than any other operating system, this | 194 | different processor architectures than any other operating system, this |