summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-20Documentation: kdump: Remind user of nr_cpusZhou Wenjian
nr_cpus can help to save memory. So we should remind user of it. Signed-off-by: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com> Acked-by: Baoquan He <bhe@redhat.com> Acked-by: Xunlei Pang <xpang@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-20Documentation: DMA-API-HOWTO: Fix a typoAndrey Smirnov
Fix a type in example variable name. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-16Merge branch 'driver-api' into doc/4.9Jonathan Corbet
This short series convers device-drivers.tmpl into the RST format, splits it up, and sets up the result under Documentation/driver-api/. For added fun, I've taken one top-level file (hsi.txt) and folded it into the document as a way of showing the direction I'm thinking I would like things to go. There is plenty more of this sort of work that could be done, to say the least - this is just a beginning! The formatted results can be seen at: http://static.lwn.net/kerneldoc/driver-api/index.html As part of the long-term task to turn Documentation/ into less of a horror movie, I'd like to collect documentation of the driver-specific API here. Arguably gpu/ and the media API stuff should eventually move here, though we can discuss the color of that particular shed some other day. Meanwhile, I'd appreciate comments on the general idea.
2016-09-16docs/driver-model: fix typoLaurent Navet
No need to be be, just be should be sufficient. Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-16DMA-API-HOWTO: <asm/generic/scatterlist.h> is no moreChristoph Hellwig
So don't mention it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-16doc-rst:c-domain: function-like macros argumentsMarkus Heiser
Handle signatures of function-like macros well. Don't try to deduce arguments types of function-like macros. Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-16doc-rst:c-domain: fix sphinx version incompatibilityMarkus Heiser
The self.indexnode's tuple has changed in sphinx version 1.4, from a former 4 element tuple to a 5 element tuple. https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-16Documentation/filesystems: Fixed typoRobert Foss
Fixed a -> an typo. Signed-off-by: Robert Foss <robert.foss@collabora.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06docs: Don't format internal MPT docsJonathan Corbet
This is the driver API document, so the internal stuff is just noise here. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06docs: split up serial-interfaces.rstJonathan Corbet
It never made sense to keep these documents together; move each into its own file. Drop the section numbering on hsi.txt on its way to its own file. Suggested-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06docs: Pull the HSI documentation togetherJonathan Corbet
The HSI subsystem documentation was split across hsi.txt and the device-drivers docbook. Now that the latter has been converted to Sphinx, pull in the HSI document so that it's all in one place. Acked-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06docs: Special-case function-pointer parameters in kernel-docJonathan Corbet
Add yet another regex to kernel-doc to trap @param() references separately and not produce corrupt RST markup. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06docs: make kernel-doc handle varargs properlyJonathan Corbet
As far as I can tell, the handling of "..." arguments has never worked right, so any documentation provided was ignored in favor of "variable arguments." This makes kernel-doc handle "@...:" as documented. It does *not* fix spots in kerneldoc comments that don't follow that convention, but they are no more broken than before. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06x86: fix memory ranges in mm documentationLorenzo Stoakes
This is a trivial fix to correct upper bound addresses to always be inclusive. Previously, the majority of ranges specified were inclusive with a small minority specifying an exclusive upper bound. This patch fixes this inconsistency. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06documentation/scsi: Remove nodisconnect parameterFinn Thain
The driver that used the 'nodisconnect' parameter was removed in commit 565bae6a4a8f ("[SCSI] 53c7xx: kill driver"). Related documentation was cleaned up in commit f37a7238d379 ("[SCSI] 53c7xx: fix removal fallout"), except for the remaining two mentions that are removed here. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-06doc: ioctl: Add some clarifications to botching-up-ioctlsLaura Abbott
- The guide currently says to pad the structure to a multiple of 64-bits. This is not necessary in cases where the structure contains no 64-bit types. Clarify this concept to avoid unnecessary padding. - When using __u64 to hold user pointers, blindly trying to do a cast to a void __user * may generate a warning on 32-bit systems about a cast from an integer to a pointer of different size. There is a macro to deal with this which hides an ugly double cast. Add a reference to this macro. Signed-off-by: Laura Abbott <labbott@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-01doc-rst: define PDF's of the media folderMarkus Heiser
To build only the PDF of the media folder run:: make SPHINXDIRS=media pdfdocs Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-01doc-rst: generic way to build PDF of sub-foldersMarkus Heiser
This extends the method to build only sub-folders to the targets "latexdocs" and "pdfdocs". To do so, a conf.py in the sub-folder is required, where the latex_documents of the sub-folder are defined. E.g. to build only gpu's PDF add the following to the Documentation/gpu/conf.py:: +latex_documents = [ + ("index", "gpu.tex", "Linux GPU Driver Developer's Guide", + "The kernel development community", "manual"), +] and run: make SPHINXDIRS=gpu pdfdocs Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-01docs: sphinx-extensions: add metadata parallel-safeMarkus Heiser
The setup() function of a Sphinx-extension can return a dictionary. This is treated by Sphinx as metadata of the extension [1]. With metadata "parallel_read_safe = True" a extension is marked as save for "parallel reading of source". This is needed if you want build in parallel with N processes. E.g.: make SPHINXOPTS=-j4 htmldocs will no longer log warnings like: WARNING: the foobar extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit. Add metadata to extensions: * kernel-doc * flat-table * kernel-include [1] http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Tested-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-01docs-rst: kernel-doc: fix typedef output in RST formatMauro Carvalho Chehab
When using a typedef function like this one: typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle); The Sphinx C domain expects it to create a c:type: reference, as that's the way it creates the type references when parsing a c:function:: declaration. So, a declaration like: .. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle) Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`. So, when outputting such typedefs in RST format, we need to handle this special case, as otherwise it will produce those warnings: ./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc So, change the kernel-doc script to produce a RST output for the above typedef as: .. c:type:: v4l2_check_dv_timings_fnc **Typedef**: timings check callback **Syntax** ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);`` Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-09-01docs-rst: improve typedef parserMauro Carvalho Chehab
Improve the parser to handle typedefs like: typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle); Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-25docs: kernel-parameter: Improve the description of nr_cpus and maxcpusBaoquan He
From the old description people still can't get what's the exact difference between nr_cpus and maxcpus. Especially in kdump kernel nr_cpus is always suggested if it's implemented in the ARCH. The reason is nr_cpus is used to limit the max number of possible cpu in system, the sum of already plugged cpus and hot plug cpus can't exceed its value. However maxcpus is used to limit how many cpus are allowed to be brought up during bootup. Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-24docs-rst: kernel-doc: better output struct membersMauro Carvalho Chehab
Right now, for a struct, kernel-doc produces the following output: .. c:type:: struct v4l2_prio_state stores the priority states **Definition** :: struct v4l2_prio_state { atomic_t prios[4]; }; **Members** ``atomic_t prios[4]`` array with elements to store the array priorities Putting a member name in verbatim and adding a continuation line causes the LaTeX output to generate something like: item[atomic_t prios\[4\]] array with elements to store the array priorities Everything inside "item" is non-breakable, with may produce lines bigger than the column width. Also, for function members, like: int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num); It puts the name of the member at the end, like: int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read With is very confusing. The best is to highlight what really matters: the member name. is a secondary information. So, change kernel-doc, for it to produce the output on a different way: **Members** ``prios[4]`` array with elements to store the array priorities Also, as the type is not part of LaTeX "item[]", LaTeX will split it into multiple lines, if needed. So, both LaTeX/PDF and HTML outputs will look good. It should be noticed, however, that the way Sphinx LaTeX output handles things like: Foo bar is different than the HTML output. On HTML, it will produce something like: **Foo** bar While, on LaTeX, it puts both foo and bar at the same line, like: **Foo** bar Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: add package adjustboxMauro Carvalho Chehab
We need adjustbox to allow adjusting the size of tables that are bigger than the line width. There are quite a few of them at the media books. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: Fix an warning when in interactive modeMauro Carvalho Chehab
When XeLaTeX is in interactive mode, it complains that py@noticelength already exists. Rename it and declare it only once to avoid such messages. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: Use better colors for note/warning/attention boxesMauro Carvalho Chehab
Instead of painting the box with gray, let's use a colored box. IMHO, that makes easier to warn users about some issue pointed by the Sphinx. It also matches to what we do already with the HTML output. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: conf.py: adjust the size of .. note:: tagMauro Carvalho Chehab
While the current implementation works well when using as a paragraph, it doesn't work properly if inside a table. As we have quite a few such cases, fix the logic to take the column size into account. PS.: I took the logic there from the latest version of Sphinx.sty Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs-rst: add support for LaTeX outputMauro Carvalho Chehab
Sphinx supports LaTeX output. Sometimes, it is interesting to call it directly, instead of also generating a PDF. As it comes for free, add a target for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst: migrate ioctl CEC_DQEVENT to c-domainMarkus Heiser
This is only one example, demonstrating the benefits of the patch series. The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and referred by ":name: CEC_DQEVENT". With this change the indirection using ":ref:`CEC_DQEVENT` is no longer needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As addition in the index, there is a entry "CEC_DQEVENT (C function)". Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst: Revert "kernel-doc: fix handling of address_space tags"Markus Heiser
This reverts commit a88b1672d4ddf9895eb53e6980926d5e960dea8e. From the origin comit log:: The RST cpp:function handler is very pedantic: it doesn't allow any macros like __user on it Since the kernel-doc parser does NOT make use of the cpp:domain, there is no need to change the kernel-doc parser eleminating the address_space tags. Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst: moved *duplicate* warnings to nitpicky modeMarkus Heiser
Moved the *duplicate C object description* warnings for function declarations in the nitpicky mode. In nitpick mode, you can suppress those warnings (e.g. ioctl) with:: nitpicky = True nitpick_ignore = [ ("c:func", "ioctl"), ] See Sphinx documentation for the config values for ``nitpick`` and ``nitpick_ignore`` [1]. With this change all the ".. cpp:function:: int ioctl(..)" descriptions (found in the media book) can be migrated to ".. c:function:: int ioctl(..)", without getting any warnings. E.g.:: .. cpp:function:: int ioctl( int fd, int request, struct cec_event *argp ) .. c:function:: int ioctl( int fd, int request, struct cec_event *argp ) The main effect, is that we get those *CPP-types* back into Sphinx's C- namespace and we need no longer to distinguish between c/cpp references, when we refer a function like the ioctl. [1] http://www.sphinx-doc.org/en/stable/config.html?highlight=nitpick#confval-nitpicky Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst:c-domain: ref-name of a function declarationMarkus Heiser
Add option 'name' to the "c:function:" directive. With option 'name' the ref-name of a function can be modified. E.g.:: .. c:function:: int ioctl( int fd, int request ) :name: VIDIOC_LOG_STATUS The func-name (e.g. ioctl) remains in the output but the ref-name changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by:: :c:func:`VIDIOC_LOG_STATUS` Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22doc-rst: add boilerplate to customize c-domainMarkus Heiser
Add a sphinx-extension to customize the sphinx c-domain. No functional changes right yet, just the boilerplate code. Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> [ jc: coding-style tweak ] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22docs: split up the driver bookJonathan Corbet
We don't need to keep it as a single large file anymore; split it up so that it is easier to manage and the individual sections can be read directly as plain files. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22Docs: sphinxify device-drivers.tmplJonathan Corbet
Perform a basic sphinx conversion of the device-drivers docbook and move it to its own directory. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-19Merge branch 'dev-tools' into doc/4.9Jonathan Corbet
Coalesce development-tool documents into a single directory and sphinxify them.
2016-08-18docs: Sphinxify gdb-kernel-debugging.txt and move to dev-toolsJonathan Corbet
Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify kmemcheck.txt and move to dev-toolsJonathan Corbet
Cc: Vegard Nossum <vegardno@ifi.uio.no> Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify kmemleak.txt and move it to dev-toolsJonathan Corbet
Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify ubsan.txt and move it to dev-toolsJonathan Corbet
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify kasan.txt and move to dev-toolsJonathan Corbet
No textual changes beyond formatting. Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinixfy gcov.txt and move to dev-toolsJonathan Corbet
No textual changes beyond formatting. Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify kcov.txt and move to dev-toolsJonathan Corbet
Another document added to the dev-tools collection. Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify sparse.txt and move to dev-toolsJonathan Corbet
Fold the sparse document into the development tools set; no changes to the text itself beyond formatting. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: sphinxify coccinelle.txt and add it to dev-toolsJonathan Corbet
No textual changes have been made, but the formatting has obviously been tweaked. Cc: Michal Marek <mmarek@suse.com> Cc: Gilles Muller <Gilles.Muller@lip6.fr> Acked-by: Nicolas Palix <nicolas.palix@imag.fr> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs: create a new dev-tools directoryJonathan Corbet
This directory will be a collecting point for documentation oriented around development tools. As a step toward ordering Documentation/ it's a small one, but we have to start somewhere... Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18Merge branch 'xelatex' into doc/4.9Jonathan Corbet
Mauro says: This patch series fix Sphinx to allow it to build the media documentation as a PDF file. The first patch is actually a bug fix: one of the previous patch broke compilation for PDF as a hole, as it added an extra parenthesis to a function call. The second patch just removes a left over code for rst2pdf. The other patches change from "pdflatex" to "xelatex" and address several issues that prevent building the media books. I think this patch series belong to docs-next. Feel free to merge them there, if you agree. There's one extra patch that touches Documentation/conf.py, re-adding the media book to the PDF build, but IMHO this one would be better to be merged via the media tree, after the fixes inside the media documentation to fix the build.
2016-08-18docs-rst: enable the Sphinx math extensionMauro Carvalho Chehab
This extension will be used by the media books. The name of the math image extension changed on Sphinx 1.4.x, according with: http://www.sphinx-doc.org/en/stable/ext/math.html#module-sphinx.ext.imgmath Let's autodetect, to keep building with versions < 1.4. Suggested-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: Don't go to interactive mode on errorsMauro Carvalho Chehab
When building for LaTeX, it stops and enters into interactive mode on errors. Don't do that, as there are some non-fatal errors on media books when using Sphinx 1.4.x that we don't know how fix yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-18docs-rst: parse-heraders.pl: escape LaTeX charactersMauro Carvalho Chehab
Let's escape the LaTeX characters, to avoid troubles when outputing them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>