Skip to content

Commit 1404f29

Browse files
author
Jonathan Corbet
committed
Merge branch 'fp' into docs-mw
The top-level index.rst file is the entry point for the kernel's documentation, especially for readers of the HTML output. It is currently a mess containing everything we thought to throw in there. Firefox says it would require 26 pages of paper to print it. That is not a user-friendly introduction. This series aims to improve our documentation entry point with a focus on rewriting index.rst. The result is, IMO, simpler and more approachable. For anybody who wants to see the rendered results without building the docs, have a look at: https://static.lwn.net/kerneldoc/ This time around I've rendered the pages using the "Read The Docs" theme, since that's what everybody will get by default. That theme ignores the directives regarding the left column, so the results are not as good there. I have a series proposing a default-theme change in the works, but that's a separate topic. This is only a beginning; I think this kind of organizational effort has to be pushed down into the lower layers of the docs tree itself. But one has to start somewhere.
2 parents 49beeea + 4898760 commit 1404f29

File tree

11 files changed

+175
-153
lines changed

11 files changed

+175
-153
lines changed

Documentation/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ def have_command(cmd):
369369
html_use_smartypants = False
370370

371371
# Custom sidebar templates, maps document names to template names.
372-
#html_sidebars = {}
372+
# Note that the RTD theme ignores this.
373+
html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']}
373374

374375
# Additional templates that should be rendered to pages, maps page names to
375376
# template names.

Documentation/asm-annotations.rst renamed to Documentation/core-api/asm-annotations.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ annotated objects like this, tools can be run on them to generate more useful
4343
information. In particular, on properly annotated objects, ``objtool`` can be
4444
run to check and fix the object if needed. Currently, ``objtool`` can report
4545
missing frame pointer setup/destruction in functions. It can also
46-
automatically generate annotations for :doc:`ORC unwinder <x86/orc-unwinder>`
46+
automatically generate annotations for the ORC unwinder
47+
(Documentation/x86/orc-unwinder.rst)
4748
for most code. Both of these are especially important to support reliable
48-
stack traces which are in turn necessary for :doc:`Kernel live patching
49-
<livepatch/livepatch>`.
49+
stack traces which are in turn necessary for kernel live patching
50+
(Documentation/livepatch/livepatch.rst).
5051

5152
Caveat and Discussion
5253
---------------------

Documentation/core-api/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ it.
2323
printk-formats
2424
printk-index
2525
symbol-namespaces
26+
asm-annotations
2627

2728
Data structures and low-level utilities
2829
=======================================
@@ -44,6 +45,8 @@ Library functionality that is used throughout the kernel.
4445
this_cpu_ops
4546
timekeeping
4647
errseq
48+
wrappers/atomic_t
49+
wrappers/atomic_bitops
4750

4851
Low level entry and exit
4952
========================
@@ -67,6 +70,7 @@ Documentation/locking/index.rst for more related documentation.
6770
local_ops
6871
padata
6972
../RCU/index
73+
wrappers/memory-barriers.rst
7074

7175
Low-level hardware management
7276
=============================
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
This is a simple wrapper to bring atomic_bitops.txt into the RST world
3+
until such a time as that file can be converted directly.
4+
5+
=============
6+
Atomic bitops
7+
=============
8+
9+
.. raw:: latex
10+
11+
\footnotesize
12+
13+
.. include:: ../../atomic_bitops.txt
14+
:literal:
15+
16+
.. raw:: latex
17+
18+
\normalsize
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
This is a simple wrapper to bring atomic_t.txt into the RST world
3+
until such a time as that file can be converted directly.
4+
5+
============
6+
Atomic types
7+
============
8+
9+
.. raw:: latex
10+
11+
\footnotesize
12+
13+
.. include:: ../../atomic_t.txt
14+
:literal:
15+
16+
.. raw:: latex
17+
18+
\normalsize
19+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
This is a simple wrapper to bring memory-barriers.txt into the RST world
3+
until such a time as that file can be converted directly.
4+
5+
============================
6+
Linux kernel memory barriers
7+
============================
8+
9+
.. raw:: latex
10+
11+
\footnotesize
12+
13+
.. include:: ../../memory-barriers.txt
14+
:literal:
15+
16+
.. raw:: latex
17+
18+
\normalsize

Documentation/index.rst

Lines changed: 50 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
4-
.. The Linux Kernel documentation master file, created by
5-
sphinx-quickstart on Fri Feb 12 13:51:46 2016.
6-
You can adapt this file completely to your liking, but it should at least
7-
contain the root `toctree` directive.
8-
93
.. _linux_doc:
104

115
The Linux Kernel documentation
@@ -18,133 +12,84 @@ documents into a coherent whole. Please note that improvements to the
1812
documentation are welcome; join the linux-doc list at vger.kernel.org if
1913
you want to help out.
2014

21-
Licensing documentation
22-
-----------------------
15+
Working with the development community
16+
--------------------------------------
2317

24-
The following describes the license of the Linux kernel source code
25-
(GPLv2), how to properly mark the license of individual files in the source
26-
tree, as well as links to the full license text.
27-
28-
* :ref:`kernel_licensing`
29-
30-
User-oriented documentation
31-
---------------------------
32-
33-
The following manuals are written for *users* of the kernel — those who are
34-
trying to get it to work optimally on a given system.
18+
The essential guides for interacting with the kernel's development
19+
community and getting your work upstream.
3520

3621
.. toctree::
37-
:maxdepth: 2
38-
39-
admin-guide/index
40-
kbuild/index
41-
42-
Firmware-related documentation
43-
------------------------------
44-
The following holds information on the kernel's expectations regarding the
45-
platform firmwares.
22+
:maxdepth: 1
4623

47-
.. toctree::
48-
:maxdepth: 2
24+
process/development-process
25+
process/submitting-patches
26+
Code of conduct <process/code-of-conduct>
27+
maintainer/index
28+
All development-process docs <process/index>
4929

50-
firmware-guide/index
51-
devicetree/index
5230

53-
Application-developer documentation
54-
-----------------------------------
31+
Internal API manuals
32+
--------------------
5533

56-
The user-space API manual gathers together documents describing aspects of
57-
the kernel interface as seen by application developers.
34+
Manuals for use by developers working to interface with the rest of the
35+
kernel.
5836

5937
.. toctree::
60-
:maxdepth: 2
61-
62-
userspace-api/index
38+
:maxdepth: 1
6339

40+
core-api/index
41+
driver-api/index
42+
subsystem-apis
43+
Locking in the kernel <locking/index>
6444

65-
Introduction to kernel development
66-
----------------------------------
45+
Development tools and processes
46+
-------------------------------
6747

68-
These manuals contain overall information about how to develop the kernel.
69-
The kernel community is quite large, with thousands of developers
70-
contributing over the course of a year. As with any large community,
71-
knowing how things are done will make the process of getting your changes
72-
merged much easier.
48+
Various other manuals with useful information for all kernel developers.
7349

7450
.. toctree::
75-
:maxdepth: 2
51+
:maxdepth: 1
7652

77-
process/index
78-
dev-tools/index
53+
process/license-rules
7954
doc-guide/index
55+
dev-tools/index
56+
dev-tools/testing-overview
8057
kernel-hacking/index
8158
trace/index
82-
maintainer/index
8359
fault-injection/index
8460
livepatch/index
8561

8662

87-
Kernel API documentation
88-
------------------------
63+
User-oriented documentation
64+
---------------------------
8965

90-
These books get into the details of how specific kernel subsystems work
91-
from the point of view of a kernel developer. Much of the information here
92-
is taken directly from the kernel source, with supplemental material added
93-
as needed (or at least as we managed to add it — probably *not* all that is
94-
needed).
66+
The following manuals are written for *users* of the kernel — those who are
67+
trying to get it to work optimally on a given system and application
68+
developers seeking information on the kernel's user-space APIs.
9569

9670
.. toctree::
97-
:maxdepth: 2
71+
:maxdepth: 1
9872

99-
driver-api/index
100-
core-api/index
101-
locking/index
102-
accounting/index
103-
block/index
104-
cdrom/index
105-
cpu-freq/index
106-
fb/index
107-
fpga/index
108-
hid/index
109-
i2c/index
110-
iio/index
111-
isdn/index
112-
infiniband/index
113-
leds/index
114-
netlabel/index
115-
networking/index
116-
pcmcia/index
117-
power/index
118-
target/index
119-
timers/index
120-
spi/index
121-
w1/index
122-
watchdog/index
123-
virt/index
124-
input/index
125-
hwmon/index
126-
gpu/index
127-
security/index
128-
sound/index
129-
crypto/index
130-
filesystems/index
131-
mm/index
132-
bpf/index
133-
usb/index
134-
PCI/index
135-
scsi/index
136-
misc-devices/index
137-
scheduler/index
138-
mhi/index
139-
peci/index
140-
141-
Architecture-agnostic documentation
142-
-----------------------------------
73+
admin-guide/index
74+
The kernel build system <kbuild/index>
75+
admin-guide/reporting-issues.rst
76+
User-space tools <tools/index>
77+
userspace-api/index
78+
79+
See also: the `Linux man pages <https://www.kernel.org/doc/man-pages/>`_,
80+
which are kept separately from the kernel's own documentation.
81+
82+
Firmware-related documentation
83+
------------------------------
84+
The following holds information on the kernel's expectations regarding the
85+
platform firmwares.
14386

14487
.. toctree::
145-
:maxdepth: 2
88+
:maxdepth: 1
89+
90+
firmware-guide/index
91+
devicetree/index
14692

147-
asm-annotations
14893

14994
Architecture-specific documentation
15095
-----------------------------------
@@ -163,9 +108,8 @@ of the documentation body, or may require some adjustments and/or conversion
163108
to ReStructured Text format, or are simply too old.
164109

165110
.. toctree::
166-
:maxdepth: 2
111+
:maxdepth: 1
167112

168-
tools/index
169113
staging/index
170114

171115

Documentation/process/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
.. _process_index:
77

8+
=============================================
89
Working with the kernel development community
910
=============================================
1011

Documentation/staging/index.rst

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,3 @@ Unsorted Documentation
1414
static-keys
1515
tee
1616
xz
17-
18-
Atomic Types
19-
============
20-
21-
.. raw:: latex
22-
23-
\footnotesize
24-
25-
.. include:: ../atomic_t.txt
26-
:literal:
27-
28-
.. raw:: latex
29-
30-
\normalsize
31-
32-
Atomic bitops
33-
=============
34-
35-
.. raw:: latex
36-
37-
\footnotesize
38-
39-
.. include:: ../atomic_bitops.txt
40-
:literal:
41-
42-
.. raw:: latex
43-
44-
\normalsize
45-
46-
Memory Barriers
47-
===============
48-
49-
.. raw:: latex
50-
51-
\footnotesize
52-
53-
.. include:: ../memory-barriers.txt
54-
:literal:
55-
56-
.. raw:: latex
57-
58-
\normalsize

0 commit comments

Comments
 (0)