aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 07:07:50 -0400
committerJonathan Corbet <corbet@lwn.net>2016-09-20 20:38:22 -0400
commit44f9d45e382f4ac5955d0fbac2503039c8be9159 (patch)
tree1deb973ee9b6e1e67b24fa081f26a4c981178c37
parent1d7078d4e2bcc212394cdacd233b050a84b0354a (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.txt35
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 @@
1The Linux Kernel Driver Interface 1The 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
4Greg Kroah-Hartman <greg@kroah.com> 6Greg Kroah-Hartman <greg@kroah.com>
5 7
6This is being written to try to explain why Linux does not have a binary 8This is being written to try to explain why Linux **does not have a binary
7kernel interface, nor does it have a stable kernel interface. Please 9kernel interface, nor does it have a stable kernel interface**.
8realize that this article describes the _in kernel_ interfaces, not the 10
9kernel to userspace interfaces. The kernel to userspace interface is 11.. note::
10the one that application programs use, the syscall interface. That 12
11interface is _very_ stable over time, and will not break. I have old 13 Please realize that this article describes the **in kernel** interfaces, not
12programs that were built on a pre 0.9something kernel that still work 14 the kernel to userspace interfaces.
13just fine on the latest 2.6 kernel release. That interface is the one 15
14that 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
17Executive Summary 24Executive Summary
@@ -33,7 +40,7 @@ to worry about the in-kernel interfaces changing. For the majority of
33the world, they neither see this interface, nor do they care about it at 40the world, they neither see this interface, nor do they care about it at
34all. 41all.
35 42
36First off, I'm not going to address _any_ legal issues about closed 43First off, I'm not going to address **any** legal issues about closed
37source, hidden source, binary blobs, source wrappers, or any other term 44source, hidden source, binary blobs, source wrappers, or any other term
38that describes kernel drivers that do not have their source code 45that describes kernel drivers that do not have their source code
39released under the GPL. Please consult a lawyer if you have any legal 46released under the GPL. Please consult a lawyer if you have any legal
@@ -51,19 +58,23 @@ Binary Kernel Interface
51Assuming that we had a stable kernel source interface for the kernel, a 58Assuming that we had a stable kernel source interface for the kernel, a
52binary interface would naturally happen too, right? Wrong. Please 59binary interface would naturally happen too, right? Wrong. Please
53consider the following facts about the Linux kernel: 60consider 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
105undergone at least three different reworks over the lifetime of this 116undergone at least three different reworks over the lifetime of this
106subsystem. These reworks were done to address a number of different 117subsystem. These reworks were done to address a number of different
107issues: 118issues:
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
167The very good side effects of having your driver in the main kernel tree 179The very good side effects of having your driver in the main kernel tree
168are: 180are:
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
179As Linux supports a larger number of different devices "out of the box" 192As Linux supports a larger number of different devices "out of the box"
180than any other operating system, and it supports these devices on more 193than any other operating system, and it supports these devices on more
181different processor architectures than any other operating system, this 194different processor architectures than any other operating system, this