Commit Graph

14 Commits

Author SHA1 Message Date
Randy Dunlap a1d115ab6b docs: time: make separate section for time and timers
Give time & timer APIs their own section and begin adding
entries to that section. Move hrtimers immediately after
this new section so that they are all together.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: John Stultz <jstultz@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20230704052405.5089-1-rdunlap@infradead.org
2023-07-14 13:47:07 -06:00
Paul E. McKenney e74f4059d1 locking/atomic: docs: Add atomic operations to the driver basic API documentation
Add the generated atomic headers to driver-api/basics.rst in order to
provide documentation for the Linux kernel's atomic operations.

At the same time, dtop the x86 atomic header, which provides kerneldoc
comments for some arch_atomic*_*() operations. The arch_atomic*_*()
operations are now purely an implenentation detail of the
raw_atomic*_*() ops, and outside of implementing the atomics, code
should use the raw_atomic*_*() forms.

[Mark: add atomic-{instrumented,long}.h, update commit message]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605070124.3741859-27-mark.rutland@arm.com
2023-06-05 09:57:24 +02:00
Kees Cook 31970608a6 overflow: Fix kern-doc markup for functions
Fix the kern-doc markings for several of the overflow helpers and move
their location into the core kernel API documentation, where it belongs
(it's not driver-specific).

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: linux-hardening@vger.kernel.org
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2022-10-25 14:57:42 -07:00
Mauro Carvalho Chehab a57c3522e8 docs: basics.rst: avoid duplicated C function declaration
pci_device_id is already documented at pci.rst:

	./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'PCI/pci'.
	Declaration is 'pci_device_id'.

The kstrtol and kstrtoul are already at kernel-api:

	./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'kstrtoul'.
	./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'kstrtol'.

And the printk is already defined at printk-basics:

	./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/printk-basics'.
	Declaration is 'printk'.

So, exclude those identifiers from basirs.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-15 07:49:45 +02:00
Mauro Carvalho Chehab 044248db5d docs: basics.rst: get rid of rcu kernel-doc macros
Those are already defined at kernel-api.rst, as part of the
synchronization primitives chapter.

This solves several Sphinx 3 warnings, like:

	.../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'rcu_idle_enter'.
	.../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'rcu_idle_exit'.
	.../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'rcu_is_watching'.
	.../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'call_rcu'.
	.../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'.
	Declaration is 'synchronize_rcu'.
	...

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-15 07:49:42 +02:00
Mauro Carvalho Chehab c9e3d519ee docs: basics.rst: move kernel-doc workqueue markups to workqueue.rst
As there's already a rst file with workqueue markups, containing
part of them, move the other definitions, in order to avoid
warnings with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-15 07:49:41 +02:00
Jonathan Corbet a5f6f88c3d docs: Do not seek comments in kernel/rcu/tree_plugin.h
There are no kerneldoc comments in this file, so do not attempt to
include them in the docs build.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-05-24 14:23:40 -06:00
Kees Cook 84253c8be3 docs: Introduce deprecated APIs list
As discussed in the "API replacement/deprecation" thread[1], this makes
an effort to document what things shouldn't get (re)added to the kernel,
by introducing Documentation/process/deprecated.rst.

[1] https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2018-September/005282.html

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-10-18 12:22:43 -06:00
Elena Reshetova b6e859f6cd docs: refcount_t documentation
Some functions from refcount_t API provide different
memory ordering guarantees that their atomic counterparts.
This adds a document outlining these differences (
Documentation/core-api/refcount-vs-atomic.rst) as well as
some other minor improvements.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-12-11 14:37:11 -07:00
Jonathan Corbet b18b12ae60 docs: Do not include kerneldoc comments from kernel/sys.c
...because there are none there, and I cannot figure out what would ever
have been of interest there.  This eliminates this warning:

    ./kernel/sys.c:1: warning: no structured comments found

from the build.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-07-17 14:05:36 -06:00
Jonathan Corbet 127d4b3764 docs: Get module_init() docs from module.h
The docs build complains:

    ./include/linux/init.h:1: warning: no structured comments found

The problem is that the comments in question were moved to module.h in
commit 0fd972a7d9 (module: relocate module_init from init.h to
module.h).  Fix basics.rst to match.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-07-17 13:55:58 -06:00
Jonathan Corbet ecebcd4da6 docs: Do not include from kernel/rcu/srcu.c
That file went away with commit bd8cc5a062 (srcu: Remove Classic SRCU)
during the 4.13 merge window, leading to errors like:

  Error: Cannot open file ./kernel/rcu/srcu.c

during the docs build.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-07-04 13:16:41 -06:00
Mauro Carvalho Chehab d76a085bc8 driver-api/basics.rst: add device table header
The structs there at device table are used by other documentation
at the Kernel. So, add it to the driver API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-04-11 14:35:28 -06:00
Jonathan Corbet dcec3c8c9a docs: split up the driver book
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-22 14:42:08 -06:00