Skip to content

Commit 3e443d1

Browse files
committed
Merge tag 'docs-6.16' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "A moderately busy cycle for documentation this time around: - The most significant change is the replacement of the old kernel-doc script (a monstrous collection of Perl regexes that predates the Git era) with a Python reimplementation. That, too, is a horrifying collection of regexes, but in a much cleaner and more maintainable structure that integrates far better with the Sphinx build system. This change has been in linux-next for the full 6.15 cycle; the small number of problems that turned up have been addressed, seemingly to everybody's satisfaction. The Perl kernel-doc script remains in tree (as scripts/kernel-doc.pl) and can be used with a command-line option if need be. Unless some reason to keep it around materializes, it will probably go away in 6.17. Credit goes to Mauro Carvalho Chehab for doing all this work. - Some RTLA documentation updates - A handful of Chinese translations - The usual collection of typo fixes, general updates, etc" * tag 'docs-6.16' of git://git.lwn.net/linux: (85 commits) Docs: doc-guide: update sphinx.rst Sphinx version number docs: doc-guide: clarify latest theme usage Documentation/scheduler: Fix typo in sched-stats domain field description scripts: kernel-doc: prevent a KeyError when checking output docs: kerneldoc.py: simplify exception handling logic MAINTAINERS: update linux-doc entry to cover new Python scripts docs: align with scripts/syscall.tbl migration Documentation: NTB: Fix typo Documentation: ioctl-number: Update table intro docs: conf.py: drop backward support for old Sphinx versions Docs: driver-api/basics: add kobject_event interfaces Docs: relay: editing cleanups docs: fix "incase" typo in coresight/panic.rst Fix spelling error for 'parallel' docs: admin-guide: fix typos in reporting-issues.rst docs: dmaengine: add explanation for DMA_ASYNC_TX capability Documentation: leds: improve readibility of multicolor doc docs: fix typo in firmware-related section docs: Makefile: Inherit PYTHONPYCACHEPREFIX setting as env variable Documentation: ioctl-number: Update outdated submission info ...
2 parents 95bf376 + d6d8860 commit 3e443d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+7336
-2815
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
*.o
4141
*.o.*
4242
*.patch
43+
*.pyc
4344
*.rmeta
4445
*.rpm
4546
*.rsi

.pylintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[MASTER]
2+
init-hook='import sys; sys.path += ["scripts/lib/kdoc", "scripts/lib/abi"]'

Documentation/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ endif #HAVE_LATEXMK
6060
# Internal variables.
6161
PAPEROPT_a4 = -D latex_paper_size=a4
6262
PAPEROPT_letter = -D latex_paper_size=letter
63-
KERNELDOC = $(srctree)/scripts/kernel-doc
64-
KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
65-
ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
63+
ALLSPHINXOPTS = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
64+
ALLSPHINXOPTS += $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
6665
ifneq ($(wildcard $(srctree)/.config),)
6766
ifeq ($(CONFIG_RUST),y)
6867
# Let Sphinx know we will include rustdoc
@@ -83,9 +82,11 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
8382
# $5 reST source folder relative to $(src),
8483
# e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media
8584

85+
PYTHONPYCACHEPREFIX ?= $(abspath $(BUILDDIR)/__pycache__)
86+
8687
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
8788
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
88-
PYTHONDONTWRITEBYTECODE=1 \
89+
PYTHONPYCACHEPREFIX="$(PYTHONPYCACHEPREFIX)" \
8990
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(src)/$5/$(SPHINX_CONF)) \
9091
$(PYTHON3) $(srctree)/scripts/jobserver-exec \
9192
$(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \

Documentation/admin-guide/namespaces/resource-control.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
===========================
2-
Namespaces research control
3-
===========================
1+
====================================
2+
User namespaces and resource control
3+
====================================
44

5-
There are a lot of kinds of objects in the kernel that don't have
6-
individual limits or that have limits that are ineffective when a set
7-
of processes is allowed to switch user ids. With user namespaces
8-
enabled in a kernel for people who don't trust their users or their
9-
users programs to play nice this problems becomes more acute.
5+
The kernel contains many kinds of objects that either don't have
6+
individual limits or that have limits which are ineffective when
7+
a set of processes is allowed to switch their UID. On a system
8+
where the admins don't trust their users or their users' programs,
9+
user namespaces expose the system to potential misuse of resources.
1010

11-
Therefore it is recommended that memory control groups be enabled in
12-
kernels that enable user namespaces, and it is further recommended
13-
that userspace configure memory control groups to limit how much
14-
memory user's they don't trust to play nice can use.
11+
In order to mitigate this, we recommend that admins enable memory
12+
control groups on any system that enables user namespaces.
13+
Furthermore, we recommend that admins configure the memory control
14+
groups to limit the maximum memory usable by any untrusted user.
1515

1616
Memory control groups can be configured by installing the libcgroup
1717
package present on most distros editing /etc/cgrules.conf,

Documentation/admin-guide/pm/cpufreq.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ are the following:
231231
present).
232232

233233
The existence of the limit may be a result of some (often unintentional)
234-
BIOS settings, restrictions coming from a service processor or another
234+
BIOS settings, restrictions coming from a service processor or other
235235
BIOS/HW-based mechanisms.
236236

237237
This does not cover ACPI thermal limitations which can be discovered
@@ -258,8 +258,8 @@ are the following:
258258
extension on ARM). If one cannot be determined, this attribute should
259259
not be present.
260260

261-
Note, that failed attempt to retrieve current frequency for a given
262-
CPU(s) will result in an appropriate error, i.e: EAGAIN for CPU that
261+
Note that failed attempt to retrieve current frequency for a given
262+
CPU(s) will result in an appropriate error, i.e.: EAGAIN for CPU that
263263
remains idle (raised on ARM).
264264

265265
``cpuinfo_max_freq``
@@ -499,7 +499,7 @@ This governor exposes the following tunables:
499499
represented by it to be 1.5 times as high as the transition latency
500500
(the default)::
501501

502-
# echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate
502+
# echo `$(($(cat cpuinfo_transition_latency) * 3 / 2))` > ondemand/sampling_rate
503503

504504
``up_threshold``
505505
If the estimated CPU load is above this value (in percent), the governor

Documentation/admin-guide/quickly-build-trimmed-linux.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ again.
347347

348348
[:ref:`details<uninstall>`]
349349

350-
.. _submit_improvements:
350+
.. _submit_improvements_qbtl:
351351

352352
Did you run into trouble following any of the above steps that is not cleared up
353353
by the reference section below? Or do you have ideas how to improve the text?
@@ -1070,7 +1070,7 @@ complicated, and harder to follow.
10701070

10711071
That being said: this of course is a balancing act. Hence, if you think an
10721072
additional use-case is worth describing, suggest it to the maintainers of this
1073-
document, as :ref:`described above <submit_improvements>`.
1073+
document, as :ref:`described above <submit_improvements_qbtl>`.
10741074

10751075

10761076
..

Documentation/admin-guide/reporting-issues.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you are facing multiple issues with the Linux kernel at once, report each
4141
separately. While writing your report, include all information relevant to the
4242
issue, like the kernel and the distro used. In case of a regression, CC the
4343
regressions mailing list ([email protected]) to your report. Also try
44-
to pin-point the culprit with a bisection; if you succeed, include its
44+
to pinpoint the culprit with a bisection; if you succeed, include its
4545
commit-id and CC everyone in the sign-off-by chain.
4646

4747
Once the report is out, answer any questions that come up and help where you
@@ -206,7 +206,7 @@ Reporting issues only occurring in older kernel version lines
206206
This subsection is for you, if you tried the latest mainline kernel as outlined
207207
above, but failed to reproduce your issue there; at the same time you want to
208208
see the issue fixed in a still supported stable or longterm series or vendor
209-
kernels regularly rebased on those. If that the case, follow these steps:
209+
kernels regularly rebased on those. If that is the case, follow these steps:
210210

211211
* Prepare yourself for the possibility that going through the next few steps
212212
might not get the issue solved in older releases: the fix might be too big
@@ -312,7 +312,7 @@ small modifications to a kernel based on a recent Linux version; that for
312312
example often holds true for the mainline kernels shipped by Debian GNU/Linux
313313
Sid or Fedora Rawhide. Some developers will also accept reports about issues
314314
with kernels from distributions shipping the latest stable kernel, as long as
315-
its only slightly modified; that for example is often the case for Arch Linux,
315+
it's only slightly modified; that for example is often the case for Arch Linux,
316316
regular Fedora releases, and openSUSE Tumbleweed. But keep in mind, you better
317317
want to use a mainline Linux and avoid using a stable kernel for this
318318
process, as outlined in the section 'Install a fresh kernel for testing' in more

Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ culprit might be known already. For further details on what actually qualifies
267267
as a regression check out Documentation/admin-guide/reporting-regressions.rst.
268268

269269
If you run into any problems while following this guide or have ideas how to
270-
improve it, :ref:`please let the kernel developers know <submit_improvements>`.
270+
improve it, :ref:`please let the kernel developers know <submit_improvements_vbbr>`.
271271

272272
.. _introprep_bissbs:
273273

@@ -1055,7 +1055,7 @@ follow these instructions.
10551055

10561056
[:ref:`details <introoptional_bisref>`]
10571057

1058-
.. _submit_improvements:
1058+
.. _submit_improvements_vbbr:
10591059

10601060
Conclusion
10611061
----------

Documentation/arch/x86/x86_64/fsgs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ instructions. Clang 5 supports them as well.
130130

131131
=================== ===========================
132132
_readfsbase_u64() Read the FS base register
133-
_readfsbase_u64() Read the GS base register
133+
_readgsbase_u64() Read the GS base register
134134
_writefsbase_u64() Write the FS base register
135135
_writegsbase_u64() Write the GS base register
136136
=================== ===========================

Documentation/conf.py

Lines changed: 66 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ def have_command(cmd):
2828
"""
2929
return shutil.which(cmd) is not None
3030

31-
# Get Sphinx version
32-
major, minor, patch = sphinx.version_info[:3]
33-
34-
#
35-
# Warn about older versions that we don't want to support for much
36-
# longer.
37-
#
38-
if (major < 2) or (major == 2 and minor < 4):
39-
print('WARNING: support for Sphinx < 2.4 will be removed soon.')
40-
4131
# If extensions (or modules to document with autodoc) are in another directory,
4232
# add these directories to sys.path here. If the directory is relative to the
4333
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -57,76 +47,71 @@ def have_command(cmd):
5747
'maintainers_include', 'sphinx.ext.autosectionlabel',
5848
'kernel_abi', 'kernel_feat', 'translations']
5949

60-
if major >= 3:
61-
if (major > 3) or (minor > 0 or patch >= 2):
62-
# Sphinx c function parser is more pedantic with regards to type
63-
# checking. Due to that, having macros at c:function cause problems.
64-
# Those needed to be scaped by using c_id_attributes[] array
65-
c_id_attributes = [
66-
# GCC Compiler types not parsed by Sphinx:
67-
"__restrict__",
68-
69-
# include/linux/compiler_types.h:
70-
"__iomem",
71-
"__kernel",
72-
"noinstr",
73-
"notrace",
74-
"__percpu",
75-
"__rcu",
76-
"__user",
77-
"__force",
78-
"__counted_by_le",
79-
"__counted_by_be",
80-
81-
# include/linux/compiler_attributes.h:
82-
"__alias",
83-
"__aligned",
84-
"__aligned_largest",
85-
"__always_inline",
86-
"__assume_aligned",
87-
"__cold",
88-
"__attribute_const__",
89-
"__copy",
90-
"__pure",
91-
"__designated_init",
92-
"__visible",
93-
"__printf",
94-
"__scanf",
95-
"__gnu_inline",
96-
"__malloc",
97-
"__mode",
98-
"__no_caller_saved_registers",
99-
"__noclone",
100-
"__nonstring",
101-
"__noreturn",
102-
"__packed",
103-
"__pure",
104-
"__section",
105-
"__always_unused",
106-
"__maybe_unused",
107-
"__used",
108-
"__weak",
109-
"noinline",
110-
"__fix_address",
111-
"__counted_by",
112-
113-
# include/linux/memblock.h:
114-
"__init_memblock",
115-
"__meminit",
116-
117-
# include/linux/init.h:
118-
"__init",
119-
"__ref",
120-
121-
# include/linux/linkage.h:
122-
"asmlinkage",
123-
124-
# include/linux/btf.h
125-
"__bpf_kfunc",
126-
]
127-
128-
else:
129-
extensions.append('cdomain')
50+
# Since Sphinx version 3, the C function parser is more pedantic with regards
51+
# to type checking. Due to that, having macros at c:function cause problems.
52+
# Those needed to be escaped by using c_id_attributes[] array
53+
c_id_attributes = [
54+
# GCC Compiler types not parsed by Sphinx:
55+
"__restrict__",
56+
57+
# include/linux/compiler_types.h:
58+
"__iomem",
59+
"__kernel",
60+
"noinstr",
61+
"notrace",
62+
"__percpu",
63+
"__rcu",
64+
"__user",
65+
"__force",
66+
"__counted_by_le",
67+
"__counted_by_be",
68+
69+
# include/linux/compiler_attributes.h:
70+
"__alias",
71+
"__aligned",
72+
"__aligned_largest",
73+
"__always_inline",
74+
"__assume_aligned",
75+
"__cold",
76+
"__attribute_const__",
77+
"__copy",
78+
"__pure",
79+
"__designated_init",
80+
"__visible",
81+
"__printf",
82+
"__scanf",
83+
"__gnu_inline",
84+
"__malloc",
85+
"__mode",
86+
"__no_caller_saved_registers",
87+
"__noclone",
88+
"__nonstring",
89+
"__noreturn",
90+
"__packed",
91+
"__pure",
92+
"__section",
93+
"__always_unused",
94+
"__maybe_unused",
95+
"__used",
96+
"__weak",
97+
"noinline",
98+
"__fix_address",
99+
"__counted_by",
100+
101+
# include/linux/memblock.h:
102+
"__init_memblock",
103+
"__meminit",
104+
105+
# include/linux/init.h:
106+
"__init",
107+
"__ref",
108+
109+
# include/linux/linkage.h:
110+
"asmlinkage",
111+
112+
# include/linux/btf.h
113+
"__bpf_kfunc",
114+
]
130115

131116
# Ensure that autosectionlabel will produce unique names
132117
autosectionlabel_prefix_document = True
@@ -149,10 +134,6 @@ def have_command(cmd):
149134
else:
150135
sys.stderr.write("Unknown env SPHINX_IMGMATH=%s ignored.\n" % env_sphinx_imgmath)
151136

152-
# Always load imgmath for Sphinx <1.8 or for epub docs
153-
load_imgmath = (load_imgmath or (major == 1 and minor < 8)
154-
or 'epub' in sys.argv)
155-
156137
if load_imgmath:
157138
extensions.append("sphinx.ext.imgmath")
158139
math_renderer = 'imgmath'
@@ -322,14 +303,6 @@ def get_cline_version():
322303
for l in css:
323304
html_css_files.append(l)
324305

325-
if major <= 1 and minor < 8:
326-
html_context = {
327-
'css_files': [],
328-
}
329-
330-
for l in html_css_files:
331-
html_context['css_files'].append('_static/' + l)
332-
333306
if html_theme == 'alabaster':
334307
html_theme_options = {
335308
'description': get_cline_version(),
@@ -409,11 +382,6 @@ def get_cline_version():
409382
''',
410383
}
411384

412-
# Fix reference escape troubles with Sphinx 1.4.x
413-
if major == 1:
414-
latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
415-
416-
417385
# Load kerneldoc specific LaTeX settings
418386
latex_elements['preamble'] += '''
419387
% Load kerneldoc specific LaTeX settings
@@ -540,7 +508,7 @@ def get_cline_version():
540508
# kernel-doc extension configuration for running Sphinx directly (e.g. by Read
541509
# the Docs). In a normal build, these are supplied from the Makefile via command
542510
# line arguments.
543-
kerneldoc_bin = '../scripts/kernel-doc'
511+
kerneldoc_bin = '../scripts/kernel-doc.py'
544512
kerneldoc_srctree = '..'
545513

546514
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)