aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:05:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:05:11 -0400
commit0f776dc377f6c87f4e4d4a5f63602f33fb93b31e (patch)
tree25811858d15be4c526c6c887d8c41c0546edd6b9
parent015cd867e566e3a27b5e8062eb24eeaa4d77297f (diff)
parenta88b1672d4ddf9895eb53e6980926d5e960dea8e (diff)
Merge tag 'docs-for-linus' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "Some big changes this month, headlined by the addition of a new formatted documentation mechanism based on the Sphinx system. The objectives here are to make it easier to create better-integrated (and more attractive) documents while (eventually) dumping our one-of-a-kind, cobbled-together system for something that is widely used and maintained by others. There's a fair amount of information what's being done, why, and how to use it in: https://lwn.net/Articles/692704/ https://lwn.net/Articles/692705/ Closer to home, Documentation/kernel-documentation.rst describes how it works. For now, the new system exists alongside the old one; you should soon see the GPU documentation converted over in the DRM pull and some significant media conversion work as well. Once all the docs have been moved over and we're convinced that the rough edges (of which are are a few) have been smoothed over, the DocBook-based stuff should go away. Primary credit is to Jani Nikula for doing the heavy lifting to make this stuff actually work; there has also been notable effort from Markus Heiser, Daniel Vetter, and Mauro Carvalho Chehab. Expect a couple of conflicts on the new index.rst file over the course of the merge window; they are trivially resolvable. That file may be a bit of a conflict magnet in the short term, but I don't expect that situation to last for any real length of time. Beyond that, of course, we have the usual collection of tweaks, updates, and typo fixes" * tag 'docs-for-linus' of git://git.lwn.net/linux: (77 commits) doc-rst: kernel-doc: fix handling of address_space tags Revert "doc/sphinx: Enable keep_warnings" doc-rst: kernel-doc directive, fix state machine reporter docs: deprecate kernel-doc-nano-HOWTO.txt doc/sphinx: Enable keep_warnings Documentation: add watermark_scale_factor to the list of vm systcl file kernel-doc: Fix up warning output docs: Get rid of some kernel-documentation warnings doc-rst: add an option to ignore DocBooks when generating docs workqueue: Fix a typo in workqueue.txt Doc: ocfs: Fix typo in filesystems/ocfs2-online-filecheck.txt Documentation/sphinx: skip build if user requested specific DOCBOOKS Documentation: add cleanmediadocs to the documentation targets Add .pyc files to .gitignore Doc: PM: Fix a typo in intel_powerclamp.txt doc-rst: flat-table directive - initial implementation Documentation: add meta-documentation for Sphinx and kernel-doc Documentation: tiny typo fix in usb/gadget_multi.txt Documentation: fix wrong value in md.txt bcache: documentation formatting, edited for clarity, stripe alignment notes ...
-rw-r--r--Documentation/.gitignore2
-rw-r--r--Documentation/00-INDEX4
-rw-r--r--Documentation/CodingStyle2
-rw-r--r--Documentation/DocBook/Makefile30
-rw-r--r--Documentation/Makefile.sphinx78
-rw-r--r--Documentation/bcache.txt197
-rw-r--r--Documentation/conf.py414
-rw-r--r--Documentation/development-process/4.Coding2
-rw-r--r--Documentation/dmaengine/provider.txt2
-rw-r--r--Documentation/filesystems/ocfs2-online-filecheck.txt10
-rw-r--r--Documentation/index.rst22
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt3
-rw-r--r--Documentation/kernel-documentation.rst654
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--Documentation/md.txt2
-rw-r--r--Documentation/mic/mpssd/mpssd.c4
-rw-r--r--Documentation/security/self-protection.txt28
-rw-r--r--Documentation/sphinx/convert_template.sed18
-rw-r--r--Documentation/sphinx/kernel-doc.py141
-rw-r--r--Documentation/sphinx/post_convert.sed23
-rw-r--r--Documentation/sphinx/rstFlatTable.py365
-rwxr-xr-xDocumentation/sphinx/tmplcvt19
-rw-r--r--Documentation/sync_file.txt6
-rw-r--r--Documentation/sysctl/vm.txt1
-rw-r--r--Documentation/thermal/intel_powerclamp.txt2
-rw-r--r--Documentation/usb/gadget_multi.txt2
-rw-r--r--Documentation/workqueue.txt2
-rw-r--r--Documentation/zh_CN/CodingStyle581
-rw-r--r--Makefile7
-rwxr-xr-xscripts/kernel-doc457
30 files changed, 2653 insertions, 430 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
new file mode 100644
index 000000000000..e74fec8693b2
--- /dev/null
+++ b/Documentation/.gitignore
@@ -0,0 +1,2 @@
1output
2*.pyc
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index cd077ca0e1b8..cb9a6c6fa83b 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -255,10 +255,10 @@ kbuild/
255 - directory with info about the kernel build process. 255 - directory with info about the kernel build process.
256kdump/ 256kdump/
257 - directory with mini HowTo on getting the crash dump code to work. 257 - directory with mini HowTo on getting the crash dump code to work.
258kernel-doc-nano-HOWTO.txt
259 - mini HowTo on generation and location of kernel documentation files.
260kernel-docs.txt 258kernel-docs.txt
261 - listing of various WWW + books that document kernel internals. 259 - listing of various WWW + books that document kernel internals.
260kernel-documentation.rst
261 - how to write and format reStructuredText kernel documentation
262kernel-parameters.txt 262kernel-parameters.txt
263 - summary listing of command line / boot prompt args for the kernel. 263 - summary listing of command line / boot prompt args for the kernel.
264kernel-per-CPU-kthreads.txt 264kernel-per-CPU-kthreads.txt
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 9a70ddd16584..a096836723ca 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -458,7 +458,7 @@ of the function, telling people what it does, and possibly WHY it does
458it. 458it.
459 459
460When commenting the kernel API functions, please use the kernel-doc format. 460When commenting the kernel API functions, please use the kernel-doc format.
461See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc 461See the files Documentation/kernel-documentation.rst and scripts/kernel-doc
462for details. 462for details.
463 463
464Linux style for comments is the C89 "/* ... */" style. 464Linux style for comments is the C89 "/* ... */" style.
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index d70f9b68174e..01bab5014a4a 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -6,6 +6,8 @@
6# To add a new book the only step required is to add the book to the 6# To add a new book the only step required is to add the book to the
7# list of DOCBOOKS. 7# list of DOCBOOKS.
8 8
9ifeq ($(IGNORE_DOCBOOKS),)
10
9DOCBOOKS := z8530book.xml device-drivers.xml \ 11DOCBOOKS := z8530book.xml device-drivers.xml \
10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ 12 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 writing_usb_driver.xml networking.xml \ 13 writing_usb_driver.xml networking.xml \
@@ -33,10 +35,6 @@ PDF_METHOD = $(prefer-db2x)
33PS_METHOD = $(prefer-db2x) 35PS_METHOD = $(prefer-db2x)
34 36
35 37
36###
37# The targets that may be used.
38PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs
39
40targets += $(DOCBOOKS) 38targets += $(DOCBOOKS)
41BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 39BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
42xmldocs: $(BOOKS) 40xmldocs: $(BOOKS)
@@ -63,6 +61,9 @@ installmandocs: mandocs
63 sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \ 61 sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \
64 xargs install -m 644 -t /usr/local/man/man9/ 62 xargs install -m 644 -t /usr/local/man/man9/
65 63
64# no-op for the DocBook toolchain
65epubdocs:
66
66### 67###
67#External programs used 68#External programs used
68KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref 69KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref
@@ -216,10 +217,24 @@ silent_gen_xml = :
216 -e "s/>/\\&gt;/g"; \ 217 -e "s/>/\\&gt;/g"; \
217 echo "</programlisting>") > $@ 218 echo "</programlisting>") > $@
218 219
220else
221
222# Needed, due to cleanmediadocs
223include Documentation/DocBook/media/Makefile
224
225htmldocs:
226pdfdocs:
227psdocs:
228xmldocs:
229installmandocs:
230
231endif # IGNORE_DOCBOOKS
232
233
219### 234###
220# Help targets as used by the top-level makefile 235# Help targets as used by the top-level makefile
221dochelp: 236dochelp:
222 @echo ' Linux kernel internal documentation in different formats:' 237 @echo ' Linux kernel internal documentation in different formats (DocBook):'
223 @echo ' htmldocs - HTML' 238 @echo ' htmldocs - HTML'
224 @echo ' pdfdocs - PDF' 239 @echo ' pdfdocs - PDF'
225 @echo ' psdocs - Postscript' 240 @echo ' psdocs - Postscript'
@@ -228,8 +243,11 @@ dochelp:
228 @echo ' installmandocs - install man pages generated by mandocs' 243 @echo ' installmandocs - install man pages generated by mandocs'
229 @echo ' cleandocs - clean all generated DocBook files' 244 @echo ' cleandocs - clean all generated DocBook files'
230 @echo 245 @echo
231 @echo 'make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml' 246 @echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'
232 @echo ' valid values for DOCBOOKS are: $(DOCBOOKS)' 247 @echo ' valid values for DOCBOOKS are: $(DOCBOOKS)'
248 @echo
249 @echo " make IGNORE_DOCBOOKS=1 [target] Don't generate docs from Docbook"
250 @echo ' This is useful to generate only the ReST docs (Sphinx)'
233 251
234 252
235### 253###
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
new file mode 100644
index 000000000000..d8d13c92a178
--- /dev/null
+++ b/Documentation/Makefile.sphinx
@@ -0,0 +1,78 @@
1# -*- makefile -*-
2# Makefile for Sphinx documentation
3#
4
5# You can set these variables from the command line.
6SPHINXBUILD = sphinx-build
7SPHINXOPTS =
8PAPER =
9BUILDDIR = $(obj)/output
10
11# User-friendly check for sphinx-build
12HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
13
14ifeq ($(HAVE_SPHINX),0)
15
16.DEFAULT:
17 $(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.)
18 @echo " SKIP Sphinx $@ target."
19
20else ifneq ($(DOCBOOKS),)
21
22# Skip Sphinx build if the user explicitly requested DOCBOOKS.
23.DEFAULT:
24 @echo " SKIP Sphinx $@ target (DOCBOOKS specified)."
25
26else # HAVE_SPHINX
27
28# User-friendly check for rst2pdf