]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - Documentation/DocBook/kernel-api.tmpl
PCI: cleanup debug output resources
[mirror_ubuntu-zesty-kernel.git] / Documentation / DocBook / kernel-api.tmpl
CommitLineData
1da177e4
LT
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="LinuxKernelAPI">
6 <bookinfo>
7 <title>The Linux Kernel API</title>
8
9 <legalnotice>
10 <para>
11 This documentation is free software; you can redistribute
12 it and/or modify it under the terms of the GNU General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later
15 version.
16 </para>
17
18 <para>
19 This program is distributed in the hope that it will be
20 useful, but WITHOUT ANY WARRANTY; without even the implied
21 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 See the GNU General Public License for more details.
23 </para>
24
25 <para>
26 You should have received a copy of the GNU General Public
27 License along with this program; if not, write to the Free
28 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 MA 02111-1307 USA
30 </para>
31
32 <para>
33 For more details see the file COPYING in the source
34 distribution of Linux.
35 </para>
36 </legalnotice>
37 </bookinfo>
38
39<toc></toc>
40
1da177e4
LT
41 <chapter id="adt">
42 <title>Data Types</title>
43 <sect1><title>Doubly Linked Lists</title>
44!Iinclude/linux/list.h
45 </sect1>
46 </chapter>
47
48 <chapter id="libc">
49 <title>Basic C Library Functions</title>
50
51 <para>
52 When writing drivers, you cannot in general use routines which are
53 from the C Library. Some of the functions have been found generally
54 useful and they are listed below. The behaviour of these functions
55 may vary slightly from those defined by ANSI, and these deviations
56 are noted in the text.
57 </para>
58
59 <sect1><title>String Conversions</title>
60!Ilib/vsprintf.c
61!Elib/vsprintf.c
62 </sect1>
63 <sect1><title>String Manipulation</title>
4dc3b16b
PP
64<!-- All functions are exported at now
65X!Ilib/string.c
66 -->
1da177e4
LT
67!Elib/string.c
68 </sect1>
69 <sect1><title>Bit Operations</title>
a1a739c5 70!Iarch/x86/include/asm/bitops.h
1da177e4 71 </sect1>
28e83baa
RD
72 </chapter>
73
74 <chapter id="kernel-lib">
75 <title>Basic Kernel Library Functions</title>
76
77 <para>
78 The Linux kernel provides more basic utility functions.
79 </para>
80
6e1907ff
RD
81 <sect1><title>Bitmap Operations</title>
82!Elib/bitmap.c
83!Ilib/bitmap.c
84 </sect1>
28e83baa
RD
85
86 <sect1><title>Command-line Parsing</title>
87!Elib/cmdline.c
88 </sect1>
2f72100c 89
ad241528
JN
90 <sect1 id="crc"><title>CRC Functions</title>
91!Elib/crc7.c
2f72100c 92!Elib/crc16.c
ad241528 93!Elib/crc-itu-t.c
2f72100c
RD
94!Elib/crc32.c
95!Elib/crc-ccitt.c
96 </sect1>
1da177e4
LT
97 </chapter>
98
99 <chapter id="mm">
100 <title>Memory Management in Linux</title>
101 <sect1><title>The Slab Cache</title>
800590f5 102!Iinclude/linux/slab.h
1da177e4
LT
103!Emm/slab.c
104 </sect1>
105 <sect1><title>User Space Memory Access</title>
a1a739c5 106!Iarch/x86/include/asm/uaccess_32.h
f3cf31ad 107!Earch/x86/lib/usercopy_32.c
1da177e4 108 </sect1>
4dc3b16b 109 <sect1><title>More Memory Management Functions</title>
4dc3b16b
PP
110!Emm/readahead.c
111!Emm/filemap.c
112!Emm/memory.c
113!Emm/vmalloc.c
88ca3b94 114!Imm/page_alloc.c
4dc3b16b 115!Emm/mempool.c
a80a438b 116!Emm/dmapool.c
4dc3b16b
PP
117!Emm/page-writeback.c
118!Emm/truncate.c
119 </sect1>
120 </chapter>
121
122
123 <chapter id="ipc">
124 <title>Kernel IPC facilities</title>
125
126 <sect1><title>IPC utilities</title>
127!Iipc/util.c
128 </sect1>
1da177e4
LT
129 </chapter>
130
131 <chapter id="kfifo">
132 <title>FIFO Buffer</title>
133 <sect1><title>kfifo interface</title>
134!Iinclude/linux/kfifo.h
135!Ekernel/kfifo.c
136 </sect1>
137 </chapter>
138
4c78a663
RD
139 <chapter id="relayfs">
140 <title>relay interface support</title>
141
142 <para>
143 Relay interface support
144 is designed to provide an efficient mechanism for tools and
145 facilities to relay large amounts of data from kernel space to
146 user space.
147 </para>
148
149 <sect1><title>relay interface</title>
150!Ekernel/relay.c
151!Ikernel/relay.c
152 </sect1>
153 </chapter>
154
1da177e4
LT
155 <chapter id="modload">
156 <title>Module Support</title>
157 <sect1><title>Module Loading</title>
158!Ekernel/kmod.c
159 </sect1>
160 <sect1><title>Inter Module support</title>
161 <para>
162 Refer to the file kernel/module.c for more information.
163 </para>
164<!-- FIXME: Removed for now since no structured comments in source
165X!Ekernel/module.c
166-->
167 </sect1>
168 </chapter>
169
170 <chapter id="hardware">
171 <title>Hardware Interfaces</title>
172 <sect1><title>Interrupt Handling</title>
8f2709b5 173!Ekernel/irq/manage.c
1da177e4
LT
174 </sect1>
175
eed34d0f
RD
176 <sect1><title>DMA Channels</title>
177!Ekernel/dma.c
178 </sect1>
179
4dc3b16b 180 <sect1><title>Resources Management</title>
2b54960b 181!Ikernel/resource.c
e1ca66d1 182!Ekernel/resource.c
4dc3b16b
PP
183 </sect1>
184
1da177e4 185 <sect1><title>MTRR Handling</title>
f3cf31ad 186!Earch/x86/kernel/cpu/mtrr/main.c
1da177e4 187 </sect1>
b0ef371e 188
1da177e4
LT
189 <sect1><title>PCI Support Library</title>
190!Edrivers/pci/pci.c
4dc3b16b
PP
191!Edrivers/pci/pci-driver.c
192!Edrivers/pci/remove.c
193!Edrivers/pci/pci-acpi.c
d75763d2 194!Edrivers/pci/search.c
4dc3b16b
PP
195!Edrivers/pci/msi.c
196!Edrivers/pci/bus.c
f05aab8e
RD
197<!-- FIXME: Removed for now since no structured comments in source
198X!Edrivers/pci/hotplug.c
199-->
4dc3b16b
PP
200!Edrivers/pci/probe.c
201!Edrivers/pci/rom.c
15b49bee 202!Edrivers/pci/iov.c
1da177e4
LT
203 </sect1>
204 <sect1><title>PCI Hotplug Support Library</title>
205!Edrivers/pci/hotplug/pci_hotplug_core.c
206 </sect1>
207 <sect1><title>MCA Architecture</title>
208 <sect2><title>MCA Device Functions</title>
209 <para>
f3cf31ad 210 Refer to the file arch/x86/kernel/mca_32.c for more information.
1da177e4
LT
211 </para>
212<!-- FIXME: Removed for now since no structured comments in source
f3cf31ad 213X!Earch/x86/kernel/mca_32.c
1da177e4
LT
214-->
215 </sect2>
216 <sect2><title>MCA Bus DMA</title>
a1a739c5 217!Iarch/x86/include/asm/mca_dma.h
1da177e4
LT
218 </sect2>
219 </sect1>
220 </chapter>
221
b0ef371e
RD
222 <chapter id="firmware">
223 <title>Firmware Interfaces</title>
224 <sect1><title>DMI Interfaces</title>
225!Edrivers/firmware/dmi_scan.c
226 </sect1>
6e8c8188
RD
227 <sect1><title>EDD Interfaces</title>
228!Idrivers/firmware/edd.c
229 </sect1>
b0ef371e
RD
230 </chapter>
231
1da177e4
LT
232 <chapter id="security">
233 <title>Security Framework</title>
20510f2f 234!Isecurity/security.c
3f23d815 235!Esecurity/inode.c
1da177e4
LT
236 </chapter>
237
862f5f01
RD
238 <chapter id="audit">
239 <title>Audit Interfaces</title>
240!Ekernel/audit.c
241!Ikernel/auditsc.c
242!Ikernel/auditfilter.c
243 </chapter>
244
245 <chapter id="accounting">
246 <title>Accounting Framework</title>
247!Ikernel/acct.c
248 </chapter>
249
1da177e4
LT
250 <chapter id="blkdev">
251 <title>Block Devices</title>
caf03feb 252!Eblock/blk-core.c
5d87a052 253!Iblock/blk-core.c
caf03feb
RD
254!Eblock/blk-map.c
255!Iblock/blk-sysfs.c
256!Eblock/blk-settings.c
257!Eblock/blk-exec.c
258!Eblock/blk-barrier.c
259!Eblock/blk-tag.c
5d87a052 260!Iblock/blk-tag.c
710027a4 261!Eblock/blk-integrity.c
88cacbb2 262!Ikernel/trace/blktrace.c
710027a4
RD
263!Iblock/genhd.c
264!Eblock/genhd.c
1da177e4
LT
265 </chapter>
266
cf3e43db
JC
267 <chapter id="chrdev">
268 <title>Char devices</title>
269!Efs/char_dev.c
270 </chapter>
271
1da177e4
LT
272 <chapter id="miscdev">
273 <title>Miscellaneous Devices</title>
274!Edrivers/char/misc.c
275 </chapter>
276
e275ac47
DB
277 <chapter id="clk">
278 <title>Clock Framework</title>
279
280 <para>
281 The clock framework defines programming interfaces to support
282 software management of the system clock tree.
283 This framework is widely used with System-On-Chip (SOC) platforms
284 to support power management and various devices which may need
285 custom clock rates.
286 Note that these "clocks" don't relate to timekeeping or real
287 time clocks (RTCs), each of which have separate frameworks.
288 These <structname>struct clk</structname> instances may be used
289 to manage for example a 96 MHz signal that is used to shift bits
290 into and out of peripherals or busses, or otherwise trigger
291 synchronous state machine transitions in system hardware.
292 </para>
293
294 <para>
295 Power management is supported by explicit software clock gating:
296 unused clocks are disabled, so the system doesn't waste power
297 changing the state of transistors that aren't in active use.
298 On some systems this may be backed by hardware clock gating,
299 where clocks are gated without being disabled in software.
300 Sections of chips that are powered but not clocked may be able
301 to retain their last state.
302 This low power state is often called a <emphasis>retention
303 mode</emphasis>.
304 This mode still incurs leakage currents, especially with finer
305 circuit geometries, but for CMOS circuits power is mostly used
306 by clocked state changes.
307 </para>
308
309 <para>
310 Power-aware drivers only enable their clocks when the device
311 they manage is in active use. Also, system sleep states often
312 differ according to which clock domains are active: while a
313 "standby" state may allow wakeup from several active domains, a
314 "mem" (suspend-to-RAM) state may require a more wholesale shutdown
315 of clocks derived from higher speed PLLs and oscillators, limiting
316 the number of possible wakeup event sources. A driver's suspend
317 method may need to be aware of system-specific clock constraints
318 on the target sleep state.
319 </para>
320
321 <para>
322 Some platforms support programmable clock generators. These
323 can be used by external chips of various kinds, such as other
324 CPUs, multimedia codecs, and devices with strict requirements
325 for interface clocking.
326 </para>
327
328!Iinclude/linux/clk.h
329 </chapter>
330
1da177e4 331</book>