Skip to content

Commit 624ad33

Browse files
committed
Merge tag 'docs-5.16' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "This is a relatively unexciting cycle for documentation. - Some small scripts/kerneldoc fixes - More Chinese translation work, but at a much reduced rate. - The tip-tree maintainer's handbook ...plus the usual array of build fixes, typo fixes, etc" * tag 'docs-5.16' of git://git.lwn.net/linux: (53 commits) kernel-doc: support DECLARE_PHY_INTERFACE_MASK() docs/zh_CN: add core-api xarray translation docs/zh_CN: add core-api assoc_array translation speakup: Fix typo in documentation "boo" -> "boot" docs: submitting-patches: make section about the Link: tag more explicit docs: deprecated.rst: Clarify open-coded arithmetic with literals scripts: documentation-file-ref-check: fix bpf selftests path scripts: documentation-file-ref-check: ignore hidden files coding-style.rst: trivial: fix location of driver model macros docs: f2fs: fix text alignment docs/zh_CN add PCI pci.rst translation docs/zh_CN add PCI index.rst translation docs: translations: zh_CN: memory-hotplug.rst: fix a typo docs: translations: zn_CN: irq-affinity.rst: add a missing extension block: add documentation for inflight scripts: kernel-doc: Ignore __alloc_size() attribute docs: pdfdocs: Adjust \headheight for fancyhdr docs: UML: user_mode_linux_howto_v2 edits docs: use the lore redirector everywhere docs: proc.rst: mountinfo: align columns ...
2 parents 313b6ff + 603bdf5 commit 624ad33

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

+3866
-173
lines changed

Documentation/ABI/testing/sysfs-block

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ Description:
2828
For more details refer Documentation/admin-guide/iostats.rst
2929

3030

31+
What: /sys/block/<disk>/inflight
32+
Date: October 2009
33+
Contact: Jens Axboe <[email protected]>, Nikanth Karthikesan <[email protected]>
34+
Description:
35+
Reports the number of I/O requests currently in progress
36+
(pending / in flight) in a device driver. This can be less
37+
than the number of requests queued in the block device queue.
38+
The report contains 2 fields: one for read requests
39+
and one for write requests.
40+
The value type is unsigned int.
41+
Cf. Documentation/block/stat.rst which contains a single value for
42+
requests in flight.
43+
This is related to nr_requests in Documentation/block/queue-sysfs.rst
44+
and for SCSI device also its queue_depth.
45+
46+
3147
What: /sys/block/<disk>/diskseq
3248
Date: February 2021
3349
Contact: Matteo Croce <[email protected]>

Documentation/ABI/testing/sysfs-driver-xen-blkback

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Description:
2929
What: /sys/module/xen_blkback/parameters/buffer_squeeze_duration_ms
3030
Date: December 2019
3131
KernelVersion: 5.6
32-
Contact: SeongJae Park <[email protected]>
32+
Contact: SeongJae Park <[email protected]>
3333
Description:
3434
When memory pressure is reported to blkback this option
3535
controls the duration in milliseconds that blkback will not
@@ -39,7 +39,7 @@ Description:
3939
What: /sys/module/xen_blkback/parameters/feature_persistent
4040
Date: September 2020
4141
KernelVersion: 5.10
42-
Contact: SeongJae Park <[email protected]>
42+
Contact: SeongJae Park <[email protected]>
4343
Description:
4444
Whether to enable the persistent grants feature or not. Note
4545
that this option only takes effect on newly created backends.

Documentation/ABI/testing/sysfs-driver-xen-blkfront

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Description:
1212
What: /sys/module/xen_blkfront/parameters/feature_persistent
1313
Date: September 2020
1414
KernelVersion: 5.10
15-
Contact: SeongJae Park <[email protected]>
15+
Contact: SeongJae Park <[email protected]>
1616
Description:
1717
Whether to enable the persistent grants feature or not. Note
1818
that this option only takes effect on newly created frontends.

Documentation/admin-guide/mm/pagemap.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,28 @@ you can go through every map in the process, find the PFNs, look those up
196196
in kpagecount, and tally up the number of pages that are only referenced
197197
once.
198198

199+
Exceptions for Shared Memory
200+
============================
201+
202+
Page table entries for shared pages are cleared when the pages are zapped or
203+
swapped out. This makes swapped out pages indistinguishable from never-allocated
204+
ones.
205+
206+
In kernel space, the swap location can still be retrieved from the page cache.
207+
However, values stored only on the normal PTE get lost irretrievably when the
208+
page is swapped out (i.e. SOFT_DIRTY).
209+
210+
In user space, whether the page is present, swapped or none can be deduced with
211+
the help of lseek and/or mincore system calls.
212+
213+
lseek() can differentiate between accessed pages (present or swapped out) and
214+
holes (none/non-allocated) by specifying the SEEK_DATA flag on the file where
215+
the pages are backed. For anonymous shared pages, the file can be found in
216+
``/proc/pid/map_files/``.
217+
218+
mincore() can differentiate between pages in memory (present, including swap
219+
cache) and out of memory (swapped out or none/non-allocated).
220+
199221
Other notes
200222
===========
201223

Documentation/admin-guide/spkguide.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ As mentioned earlier, Speakup can either be completely compiled into the
543543
kernel, with the exception of the help module, or it can be compiled as
544544
a series of modules. When compiled as modules, Speakup will only be
545545
able to speak some of the bootup messages if your system administrator
546-
has configured the system to load the modules at boo time. The modules
546+
has configured the system to load the modules at boot time. The modules
547547
can be loaded after the file systems have been checked and mounted, or
548548
from an initrd. There is a third possibility. Speakup can be compiled
549549
with some components built into the kernel, and others as modules. As

Documentation/arm/marvell.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Orion family
2121
- Datasheet: https://web.archive.org/web/20210124231420/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-datasheet.pdf
2222
- Programmer's User Guide: https://web.archive.org/web/20210124231536/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-opensource-manual.pdf
2323
- User Manual: https://web.archive.org/web/20210124231631/http://csclub.uwaterloo.ca/~board/ts7800/MV88F5182-usermanual.pdf
24+
- Functional Errata: https://web.archive.org/web/20210704165540/https://www.digriz.org.uk/ts78xx/88F5182_Functional_Errata.pdf
2425
- 88F5281
2526

2627
- Datasheet: https://web.archive.org/web/20131028144728/http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf
@@ -212,6 +213,7 @@ EBU Armada family ARMv8
212213
arch/arm64/boot/dts/marvell/armada-37*
213214

214215
Armada 7K Flavors:
216+
- 88F6040 (AP806 Quad 600 MHz + one CP110)
215217
- 88F7020 (AP806 Dual + one CP110)
216218
- 88F7040 (AP806 Quad + one CP110)
217219

@@ -243,6 +245,23 @@ EBU Armada family ARMv8
243245
Device tree files:
244246
arch/arm64/boot/dts/marvell/armada-80*
245247

248+
Octeon TX2 CN913x Flavors:
249+
- CN9130 (AP807 Quad + one internal CP115)
250+
- CN9131 (AP807 Quad + one internal CP115 + one external CP115 / 88F8215)
251+
- CN9132 (AP807 Quad + one internal CP115 + two external CP115 / 88F8215)
252+
253+
Core:
254+
ARM Cortex A72
255+
256+
Homepage:
257+
https://web.archive.org/web/20200803150818/https://www.marvell.com/products/infrastructure-processors/multi-core-processors/octeon-tx2/octeon-tx2-cn9130.html
258+
259+
Product Brief:
260+
https://web.archive.org/web/20200803150818/https://www.marvell.com/content/dam/marvell/en/public-collateral/embedded-processors/marvell-infrastructure-processors-octeon-tx2-cn913x-product-brief-2020-02.pdf
261+
262+
Device tree files:
263+
arch/arm64/boot/dts/marvell/cn913*
264+
246265
Avanta family
247266
-------------
248267

Documentation/asm-annotations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ macros, it was decided that brand new macros should be introduced instead::
6464
of importing all the crappy, historic, essentially randomly chosen
6565
debug symbol macro names from the binutils and older kernels?
6666

67-
.. _discussion: https://lkml.kernel.org/r/[email protected]
67+
.. _discussion: https://lore.kernel.org/r/[email protected]
6868

6969
Macros Description
7070
------------------

Documentation/block/queue-sysfs.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ discard_max_hw_bytes (RO)
4040
-------------------------
4141
Devices that support discard functionality may have internal limits on
4242
the number of bytes that can be trimmed or unmapped in a single operation.
43-
The discard_max_bytes parameter is set by the device driver to the maximum
44-
number of bytes that can be discarded in a single operation. Discard
45-
requests issued to the device must not exceed this limit. A discard_max_bytes
46-
value of 0 means that the device does not support discard functionality.
43+
The `discard_max_hw_bytes` parameter is set by the device driver to the
44+
maximum number of bytes that can be discarded in a single operation.
45+
Discard requests issued to the device must not exceed this limit.
46+
A `discard_max_hw_bytes` value of 0 means that the device does not support
47+
discard functionality.
4748

4849
discard_max_bytes (RW)
4950
----------------------

Documentation/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@
353353
\\setsansfont{DejaVu Sans}
354354
\\setromanfont{DejaVu Serif}
355355
\\setmonofont{DejaVu Sans Mono}
356+
% Adjust \\headheight for fancyhdr
357+
\\addtolength{\\headheight}{1.6pt}
358+
\\addtolength{\\topmargin}{-1.6pt}
356359
''',
357360
}
358361

Documentation/dev-tools/checkpatch.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,39 @@ Indentation and Line Breaks
710710

711711
See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
712712

713+
**SPLIT_STRING**
714+
Quoted strings that appear as messages in userspace and can be
715+
grepped, should not be split across multiple lines.
716+
717+
See: https://lore.kernel.org/lkml/20120203052727.GA15035@leaf/
718+
719+
**MULTILINE_DEREFERENCE**
720+
A single dereferencing identifier spanned on multiple lines like::
721+
722+
struct_identifier->member[index].
723+
member = <foo>;
724+
725+
is generally hard to follow. It can easily lead to typos and so makes
726+
the code vulnerable to bugs.
727+
728+
If fixing the multiple line dereferencing leads to an 80 column
729+
violation, then either rewrite the code in a more simple way or if the
730+
starting part of the dereferencing identifier is the same and used at
731+
multiple places then store it in a temporary variable, and use that
732+
temporary variable only at all the places. For example, if there are
733+
two dereferencing identifiers::
734+
735+
member1->member2->member3.foo1;
736+
member1->member2->member3.foo2;
737+
738+
then store the member1->member2->member3 part in a temporary variable.
739+
It not only helps to avoid the 80 column violation but also reduces
740+
the program size by removing the unnecessary dereferences.
741+
742+
But if none of the above methods work then ignore the 80 column
743+
violation because it is much easier to read a dereferencing identifier
744+
on a single line.
745+
713746
**TRAILING_STATEMENTS**
714747
Trailing statements (for example after any conditional) should be
715748
on the next line.
@@ -845,6 +878,38 @@ Macros, Attributes and Symbols
845878
Use the `fallthrough;` pseudo keyword instead of
846879
`/* fallthrough */` like comments.
847880

881+
**TRAILING_SEMICOLON**
882+
Macro definition should not end with a semicolon. The macro
883+
invocation style should be consistent with function calls.
884+
This can prevent any unexpected code paths::
885+
886+
#define MAC do_something;
887+
888+
If this macro is used within a if else statement, like::
889+
890+
if (some_condition)
891+
MAC;
892+
893+
else
894+
do_something;
895+
896+
Then there would be a compilation error, because when the macro is
897+
expanded there are two trailing semicolons, so the else branch gets
898+
orphaned.
899+
900+
See: https://lore.kernel.org/lkml/1399671106.2912.21.camel@joe-AO725/
901+
902+
**SINGLE_STATEMENT_DO_WHILE_MACRO**
903+
For the multi-statement macros, it is necessary to use the do-while
904+
loop to avoid unpredictable code paths. The do-while loop helps to
905+
group the multiple statements into a single one so that a
906+
function-like macro can be used as a function only.
907+
908+
But for the single statement macros, it is unnecessary to use the
909+
do-while loop. Although the code is syntactically correct but using
910+
the do-while loop is redundant. So remove the do-while loop for single
911+
statement macros.
912+
848913
**WEAK_DECLARATION**
849914
Using weak declarations like __attribute__((weak)) or __weak
850915
can have unintended link defects. Avoid using them.
@@ -920,6 +985,11 @@ Functions and Variables
920985
Your compiler (or rather your loader) automatically does
921986
it for you.
922987

988+
**MULTIPLE_ASSIGNMENTS**
989+
Multiple assignments on a single line makes the code unnecessarily
990+
complicated. So on a single line assign value to a single variable
991+
only, this makes the code more readable and helps avoid typos.
992+
923993
**RETURN_PARENTHESES**
924994
return is not a function and as such doesn't need parentheses::
925995

@@ -957,6 +1027,17 @@ Permissions
9571027
Permission bits should use 4 digit octal permissions (like 0700 or 0444).
9581028
Avoid using any other base like decimal.
9591029

1030+
**SYMBOLIC_PERMS**
1031+
Permission bits in the octal form are more readable and easier to
1032+
understand than their symbolic counterparts because many command-line
1033+
tools use this notation. Experienced kernel developers have been using
1034+
these traditional Unix permission bits for decades and so they find it
1035+
easier to understand the octal notation than the symbolic macros.
1036+
For example, it is harder to read S_IWUSR|S_IRUGO than 0644, which
1037+
obscures the developer's intent rather than clarifying it.
1038+
1039+
See: https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/
1040+
9601041

9611042
Spacing and Brackets
9621043
--------------------

0 commit comments

Comments
 (0)