Skip to content

Commit f961638

Browse files
committed
Merge tag 'docs-6.19' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "This has been another busy cycle for documentation, with a lot of build-system thrashing. That work should slow down from here on out. - The various scripts and tools for documentation were spread out in several directories; now they are (almost) all coalesced under tools/docs/. The holdout is the kernel-doc script, which cannot be easily moved without some further thought. - As the amount of Python code increases, we are accumulating modules that are imported by multiple programs. These modules have been pulled together under tools/lib/python/ -- at least, for documentation-related programs. There is other Python code in the tree that might eventually want to move toward this organization. - The Perl kernel-doc.pl script has been removed. It is no longer used by default, and nobody has missed it, least of all anybody who actually had to look at it. - The docs build was controlled by a complex mess of makefilese that few dared to touch. Mauro has moved that logic into a new program (tools/docs/sphinx-build-wrapper) that, with any luck at all, will be far easier to understand and maintain. - The get_feat.pl program, used to access information under Documentation/features/, has been rewritten in Python, bringing an end to the use of Perl in the docs subsystem. - The top-level README file has been reorganized into a more reader-friendly presentation. - A lot of Chinese translation additions - Typo fixes and documentation updates as usual" * tag 'docs-6.19' of git://git.lwn.net/linux: (164 commits) docs: makefile: move rustdoc check to the build wrapper README: restructure with role-based documentation and guidelines docs: kdoc: various fixes for grammar, spelling, punctuation docs: kdoc_parser: use '@' for Excess enum value docs: submitting-patches: Clarify that removal of Acks needs explanation too docs: kdoc_parser: add data/function attributes to ignore docs: MAINTAINERS: update Mauro's files/paths docs/zh_CN: Add wd719x.rst translation docs/zh_CN: Add libsas.rst translation get_feat.pl: remove it, as it got replaced by get_feat.py Documentation/sphinx/kernel_feat.py: use class directly tools/docs/get_feat.py: convert get_feat.pl to Python Documentation/admin-guide: fix typo and comment in cscope example docs/zh_CN: Add data-integrity.rst translation docs/zh_CN: Add blk-mq.rst translation docs/zh_CN: Add block/index.rst translation docs/zh_CN: Update the Chinese translation of kbuild.rst docs: bring some order to our Python module hierarchy docs: Move the python libraries to tools/lib/python Documentation/kernel-parameters: Move the kernel build options ...
2 parents a619fe3 + 464257b commit f961638

287 files changed

Lines changed: 9639 additions & 5290 deletions

File tree

Some content is hidden

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

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[MASTER]
2-
init-hook='import sys; sys.path += ["scripts/lib/kdoc", "scripts/lib/abi", "tools/docs/lib"]'
2+
init-hook='import sys; sys.path += ["tools/lib/python"]'

Documentation/ABI/testing/sysfs-module

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Description: Module taint flags:
5959
F force-loaded module
6060
C staging driver module
6161
E unsigned module
62+
K livepatch module
63+
N in-kernel test module
6264
== =====================
6365

6466
What: /sys/module/grant_table/parameters/free_per_iteration

Documentation/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ config WARN_ABI_ERRORS
1919
described at Documentation/ABI/README. Yet, as they're manually
2020
written, it would be possible that some of those files would
2121
have errors that would break them for being parsed by
22-
scripts/get_abi.pl. Add a check to verify them.
22+
tools/docs/get_abi.py. Add a check to verify them.
2323

2424
If unsure, select 'N'.
2525

Documentation/Makefile

Lines changed: 35 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ subdir- := devicetree/bindings
88
ifneq ($(MAKECMDGOALS),cleandocs)
99
# Check for broken documentation file references
1010
ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y)
11-
$(shell $(srctree)/scripts/documentation-file-ref-check --warn)
11+
$(shell $(srctree)/tools/docs/documentation-file-ref-check --warn)
1212
endif
1313

1414
# Check for broken ABI files
1515
ifeq ($(CONFIG_WARN_ABI_ERRORS),y)
16-
$(shell $(srctree)/scripts/get_abi.py --dir $(srctree)/Documentation/ABI validate)
16+
$(shell $(srctree)/tools/docs/get_abi.py --dir $(srctree)/Documentation/ABI validate)
1717
endif
1818
endif
1919

@@ -23,21 +23,22 @@ SPHINXOPTS =
2323
SPHINXDIRS = .
2424
DOCS_THEME =
2525
DOCS_CSS =
26-
_SPHINXDIRS = $(sort $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))
27-
SPHINX_CONF = conf.py
26+
RUSTDOC =
2827
PAPER =
2928
BUILDDIR = $(obj)/output
3029
PDFLATEX = xelatex
3130
LATEXOPTS = -interaction=batchmode -no-shell-escape
3231

32+
PYTHONPYCACHEPREFIX ?= $(abspath $(BUILDDIR)/__pycache__)
33+
34+
# Wrapper for sphinx-build
35+
36+
BUILD_WRAPPER = $(srctree)/tools/docs/sphinx-build-wrapper
37+
3338
# For denylisting "variable font" files
3439
# Can be overridden by setting as an env variable
3540
FONTS_CONF_DENY_VF ?= $(HOME)/deny-vf
3641

37-
ifeq ($(findstring 1, $(KBUILD_VERBOSE)),)
38-
SPHINXOPTS += "-q"
39-
endif
40-
4142
# User-friendly check for sphinx-build
4243
HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
4344

@@ -46,141 +47,46 @@ ifeq ($(HAVE_SPHINX),0)
4647
.DEFAULT:
4748
$(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
4849
@echo
49-
@$(srctree)/scripts/sphinx-pre-install
50+
@$(srctree)/tools/docs/sphinx-pre-install
5051
@echo " SKIP Sphinx $@ target."
5152

5253
else # HAVE_SPHINX
5354

54-
# User-friendly check for pdflatex and latexmk
55-
HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
56-
HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi)
57-
58-
ifeq ($(HAVE_LATEXMK),1)
59-
PDFLATEX := latexmk -$(PDFLATEX)
60-
endif #HAVE_LATEXMK
61-
62-
# Internal variables.
63-
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
64-
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
65-
ALLSPHINXOPTS = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
66-
ALLSPHINXOPTS += $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
67-
ifneq ($(wildcard $(srctree)/.config),)
68-
ifeq ($(CONFIG_RUST),y)
69-
# Let Sphinx know we will include rustdoc
70-
ALLSPHINXOPTS += -t rustdoc
71-
endif
72-
endif
73-
# the i18n builder cannot share the environment and doctrees with the others
74-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
55+
# Common documentation targets
56+
htmldocs mandocs infodocs texinfodocs latexdocs epubdocs xmldocs pdfdocs linkcheckdocs:
57+
$(Q)PYTHONPYCACHEPREFIX="$(PYTHONPYCACHEPREFIX)" \
58+
$(srctree)/tools/docs/sphinx-pre-install --version-check
59+
+$(Q)PYTHONPYCACHEPREFIX="$(PYTHONPYCACHEPREFIX)" \
60+
$(PYTHON3) $(BUILD_WRAPPER) $@ \
61+
--sphinxdirs="$(SPHINXDIRS)" $(RUSTDOC) \
62+
--builddir="$(BUILDDIR)" --deny-vf=$(FONTS_CONF_DENY_VF) \
63+
--theme=$(DOCS_THEME) --css=$(DOCS_CSS) --paper=$(PAPER)
7564

76-
# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
77-
loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
7865

79-
# $2 sphinx builder e.g. "html"
80-
# $3 name of the build subfolder / e.g. "userspace-api/media", used as:
81-
# * dest folder relative to $(BUILDDIR) and
82-
# * cache folder relative to $(BUILDDIR)/.doctrees
83-
# $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man
84-
# $5 reST source folder relative to $(src),
85-
# e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media
86-
87-
PYTHONPYCACHEPREFIX ?= $(abspath $(BUILDDIR)/__pycache__)
88-
89-
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
90-
cmd_sphinx = \
91-
PYTHONPYCACHEPREFIX="$(PYTHONPYCACHEPREFIX)" \
92-
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(src)/$5/$(SPHINX_CONF)) \
93-
$(PYTHON3) $(srctree)/scripts/jobserver-exec \
94-
$(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \
95-
$(SPHINXBUILD) \
96-
-b $2 \
97-
-c $(abspath $(src)) \
98-
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
99-
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
100-
$(ALLSPHINXOPTS) \
101-
$(abspath $(src)/$5) \
102-
$(abspath $(BUILDDIR)/$3/$4) && \
103-
if [ "x$(DOCS_CSS)" != "x" ]; then \
104-
cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
105-
fi
106-
107-
htmldocs:
108-
@$(srctree)/scripts/sphinx-pre-install --version-check
109-
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
110-
111-
htmldocs-redirects: $(srctree)/Documentation/.renames.txt
112-
@tools/docs/gen-redirects.py --output $(BUILDDIR) < $<
113-
114-
# If Rust support is available and .config exists, add rustdoc generated contents.
115-
# If there are any, the errors from this make rustdoc will be displayed but
116-
# won't stop the execution of htmldocs
117-
118-
ifneq ($(wildcard $(srctree)/.config),)
119-
ifeq ($(CONFIG_RUST),y)
120-
$(Q)$(MAKE) rustdoc || true
121-
endif
12266
endif
12367

124-
texinfodocs:
125-
@$(srctree)/scripts/sphinx-pre-install --version-check
126-
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
127-
128-
# Note: the 'info' Make target is generated by sphinx itself when
129-
# running the texinfodocs target define above.
130-
infodocs: texinfodocs
131-
$(MAKE) -C $(BUILDDIR)/texinfo info
132-
133-
linkcheckdocs:
134-
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
135-
136-
latexdocs:
137-
@$(srctree)/scripts/sphinx-pre-install --version-check
138-
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
139-
140-
ifeq ($(HAVE_PDFLATEX),0)
141-
142-
pdfdocs:
143-
$(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
144-
@echo " SKIP Sphinx $@ target."
145-
146-
else # HAVE_PDFLATEX
147-
148-
pdfdocs: DENY_VF = XDG_CONFIG_HOME=$(FONTS_CONF_DENY_VF)
149-
pdfdocs: latexdocs
150-
@$(srctree)/scripts/sphinx-pre-install --version-check
151-
$(foreach var,$(SPHINXDIRS), \
152-
$(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" $(DENY_VF) -C $(BUILDDIR)/$(var)/latex || sh $(srctree)/scripts/check-variable-fonts.sh || exit; \
153-
mkdir -p $(BUILDDIR)/$(var)/pdf; \
154-
mv $(subst .tex,.pdf,$(wildcard $(BUILDDIR)/$(var)/latex/*.tex)) $(BUILDDIR)/$(var)/pdf/; \
155-
)
156-
157-
endif # HAVE_PDFLATEX
158-
159-
epubdocs:
160-
@$(srctree)/scripts/sphinx-pre-install --version-check
161-
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
162-
163-
xmldocs:
164-
@$(srctree)/scripts/sphinx-pre-install --version-check
165-
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
166-
167-
endif # HAVE_SPHINX
168-
16968
# The following targets are independent of HAVE_SPHINX, and the rules should
17069
# work or silently pass without Sphinx.
17170

71+
htmldocs-redirects: $(srctree)/Documentation/.renames.txt
72+
@tools/docs/gen-redirects.py --output $(BUILDDIR) < $<
73+
17274
refcheckdocs:
173-
$(Q)cd $(srctree);scripts/documentation-file-ref-check
75+
$(Q)cd $(srctree); tools/docs/documentation-file-ref-check
17476

17577
cleandocs:
17678
$(Q)rm -rf $(BUILDDIR)
17779

80+
# Used only on help
81+
_SPHINXDIRS = $(shell printf "%s\n" $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)) | sort -f)
82+
17883
dochelp:
17984
@echo ' Linux kernel internal documentation in different formats from ReST:'
18085
@echo ' htmldocs - HTML'
18186
@echo ' htmldocs-redirects - generate HTML redirects for moved pages'
18287
@echo ' texinfodocs - Texinfo'
18388
@echo ' infodocs - Info'
89+
@echo ' mandocs - Man pages'
18490
@echo ' latexdocs - LaTeX'
18591
@echo ' pdfdocs - PDF'
18692
@echo ' epubdocs - EPUB'
@@ -192,13 +98,17 @@ dochelp:
19298
@echo ' cleandocs - clean all generated files'
19399
@echo
194100
@echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
195-
@echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)'
196-
@echo
197-
@echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'
198-
@echo ' configuration. This is e.g. useful to build with nit-picking config.'
101+
@echo ' top level values for SPHINXDIRS are: $(_SPHINXDIRS)'
102+
@echo ' you may also use a subdirectory like SPHINXDIRS=userspace-api/media,'
103+
@echo ' provided that there is an index.rst file at the subdirectory.'
199104
@echo
200105
@echo ' make DOCS_THEME={sphinx-theme} selects a different Sphinx theme.'
201106
@echo
202107
@echo ' make DOCS_CSS={a .css file} adds a DOCS_CSS override file for html/epub output.'
203108
@echo
109+
@echo ' make PAPER={a4|letter} Specifies the paper size used for LaTeX/PDF output.'
110+
@echo
111+
@echo ' make FONTS_CONF_DENY_VF={path} sets a deny list to block variable Noto CJK fonts'
112+
@echo ' for PDF build. See tools/lib/python/kdoc/latex_fonts.py for more details'
113+
@echo
204114
@echo ' Default location for the generated documents is Documentation/output'

Documentation/accounting/taskstats.rst

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,41 +76,43 @@ The messages are in the format::
7676
The taskstats payload is one of the following three kinds:
7777

7878
1. Commands: Sent from user to kernel. Commands to get data on
79-
a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID,
80-
containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes
81-
the task/process for which userspace wants statistics.
82-
83-
Commands to register/deregister interest in exit data from a set of cpus
84-
consist of one attribute, of type
85-
TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the
86-
attribute payload. The cpumask is specified as an ascii string of
87-
comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8
88-
the cpumask would be "1-3,5,7-8". If userspace forgets to deregister interest
89-
in cpus before closing the listening socket, the kernel cleans up its interest
90-
set over time. However, for the sake of efficiency, an explicit deregistration
91-
is advisable.
79+
a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID,
80+
containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes
81+
the task/process for which userspace wants statistics.
82+
83+
Commands to register/deregister interest in exit data from a set of cpus
84+
consist of one attribute, of type
85+
TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the
86+
attribute payload. The cpumask is specified as an ascii string of
87+
comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8
88+
the cpumask would be "1-3,5,7-8". If userspace forgets to deregister
89+
interest in cpus before closing the listening socket, the kernel cleans up
90+
its interest set over time. However, for the sake of efficiency, an explicit
91+
deregistration is advisable.
9292

9393
2. Response for a command: sent from the kernel in response to a userspace
94-
command. The payload is a series of three attributes of type:
94+
command. The payload is a series of three attributes of type:
9595

96-
a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
97-
a pid/tgid will be followed by some stats.
96+
a) TASKSTATS_TYPE_AGGR_PID/TGID: attribute containing no payload but
97+
indicates a pid/tgid will be followed by some stats.
9898

99-
b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
100-
are being returned.
99+
b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose
100+
stats are being returned.
101101

102-
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
103-
same structure is used for both per-pid and per-tgid stats.
102+
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
103+
same structure is used for both per-pid and per-tgid stats.
104104

105105
3. New message sent by kernel whenever a task exits. The payload consists of a
106106
series of attributes of the following type:
107107

108-
a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats
109-
b) TASKSTATS_TYPE_PID: contains exiting task's pid
110-
c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats
111-
d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be tgid+stats
112-
e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs
113-
f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's process
108+
a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats
109+
b) TASKSTATS_TYPE_PID: contains exiting task's pid
110+
c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats
111+
d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be
112+
tgid+stats
113+
e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs
114+
f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's
115+
process
114116

115117

116118
per-tgid stats

Documentation/admin-guide/efi-stub.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ because the image we're executing is interpreted by the EFI shell,
7979
which understands relative paths, whereas the rest of the command line
8080
is passed to bzImage.efi.
8181

82+
.. hint::
83+
It is also possible to provide an initrd using a Linux-specific UEFI
84+
protocol at boot time. See :ref:`pe-coff-entry-point` for details.
8285

8386
The "dtb=" option
8487
-----------------

Documentation/admin-guide/hw-vuln/l1d_flush.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ specifically opt into the feature to enable it.
3131
Mitigation
3232
----------
3333

34-
When PR_SET_L1D_FLUSH is enabled for a task a flush of the L1D cache is
34+
When PR_SPEC_L1D_FLUSH is enabled for a task a flush of the L1D cache is
3535
performed when the task is scheduled out and the incoming task belongs to a
3636
different process and therefore to a different address space.
3737

Documentation/admin-guide/hw-vuln/spectre.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ The possible values in this file are:
406406

407407
- Single threaded indirect branch prediction (STIBP) status for protection
408408
between different hyper threads. This feature can be controlled through
409-
prctl per process, or through kernel command line options. This is x86
409+
prctl per process, or through kernel command line options. This is an x86
410410
only feature. For more details see below.
411411

412412
==================== ========================================================

0 commit comments

Comments
 (0)