···88 to device min/max capabilities. Values are integer as they are99 stored in a 8bit register in the device. Lowest value is1010 automatically put to TL. Once set, alarms could be search at1111- master level, refer to Documentation/w1/w1_generic.rst for1111+ master level, refer to Documentation/w1/w1-generic.rst for1212 detailed information1313Users: any user space application which wants to communicate with1414 w1_term device
+3-3
Documentation/PCI/pci.rst
···265265---------------------266266.. note::267267 If anything below doesn't make sense, please refer to268268- Documentation/DMA-API.txt. This section is just a reminder that268268+ :doc:`/core-api/dma-api`. This section is just a reminder that269269 drivers need to indicate DMA capabilities of the device and is not270270 an authoritative source for DMA interfaces.271271···291291Setup shared control data292292-------------------------293293Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. shared)294294-memory. See Documentation/DMA-API.txt for a full description of294294+memory. See :doc:`/core-api/dma-api` for a full description of295295the DMA APIs. This section is just a reminder that it needs to be done296296before enabling DMA on the device.297297···421421422422Then clean up "consistent" buffers which contain the control data.423423424424-See Documentation/DMA-API.txt for details on unmapping interfaces.424424+See :doc:`/core-api/dma-api` for details on unmapping interfaces.425425426426427427Unregister from other subsystems
+17-6
Documentation/admin-guide/mm/hugetlbpage.rst
···101101page size may be selected with the "default_hugepagesz=<size>" boot parameter.102102103103Hugetlb boot command line parameter semantics104104-hugepagesz - Specify a huge page size. Used in conjunction with hugepages104104+105105+hugepagesz106106+ Specify a huge page size. Used in conjunction with hugepages105107 parameter to preallocate a number of huge pages of the specified106108 size. Hence, hugepagesz and hugepages are typically specified in107107- pairs such as:109109+ pairs such as::110110+108111 hugepagesz=2M hugepages=512112112+109113 hugepagesz can only be specified once on the command line for a110114 specific huge page size. Valid huge page sizes are architecture111115 dependent.112112-hugepages - Specify the number of huge pages to preallocate. This typically116116+hugepages117117+ Specify the number of huge pages to preallocate. This typically113118 follows a valid hugepagesz or default_hugepagesz parameter. However,114119 if hugepages is the first or only hugetlb command line parameter it115120 implicitly specifies the number of huge pages of default size to116121 allocate. If the number of huge pages of default size is implicitly117122 specified, it can not be overwritten by a hugepagesz,hugepages118123 parameter pair for the default size.119119- For example, on an architecture with 2M default huge page size:124124+125125+ For example, on an architecture with 2M default huge page size::126126+120127 hugepages=256 hugepagesz=2M hugepages=512128128+121129 will result in 256 2M huge pages being allocated and a warning message122130 indicating that the hugepages=512 parameter is ignored. If a hugepages123131 parameter is preceded by an invalid hugepagesz parameter, it will124132 be ignored.125125-default_hugepagesz - Specify the default huge page size. This parameter can133133+default_hugepagesz134134+ pecify the default huge page size. This parameter can126135 only be specified once on the command line. default_hugepagesz can127136 optionally be followed by the hugepages parameter to preallocate a128137 specific number of huge pages of default size. The number of default129138 sized huge pages to preallocate can also be implicitly specified as130139 mentioned in the hugepages section above. Therefore, on an131131- architecture with 2M default huge page size:140140+ architecture with 2M default huge page size::141141+132142 hugepages=256133143 default_hugepagesz=2M hugepages=256134144 hugepages=256 default_hugepagesz=2M145145+135146 will all result in 256 2M huge pages being allocated. Valid default136147 huge page size is architecture dependent.137148
···583583584584The default value is 1.585585586586-See Documentation/nommu-mmap.txt for more information.586586+See Documentation/admin-guide/mm/nommu-mmap.rst for more information.587587588588589589numa_zonelist_order
+1-1
Documentation/arm/booting.rst
···128128129129The boot loader must load a device tree image (dtb) into system ram130130at a 64bit aligned address and initialize it with the boot data. The131131-dtb format is documented in Documentation/devicetree/booting-without-of.txt.131131+dtb format is documented in Documentation/devicetree/booting-without-of.rst.132132The kernel will look for the dtb magic value of 0xd00dfeed at the dtb133133physical address to determine if a dtb has been passed instead of a134134tagged list.
+1-1
Documentation/block/biodoc.rst
···196196do not have a corresponding kernel virtual address space mapping) and197197low-memory pages.198198199199-Note: Please refer to Documentation/DMA-API-HOWTO.txt for a discussion199199+Note: Please refer to :doc:`/core-api/dma-api-howto` for a discussion200200on PCI high mem DMA aspects and mapping of scatter gather lists, and support201201for 64 bit PCI.202202
···8899 The virt_to_bus() and bus_to_virt() functions have been1010 superseded by the functionality provided by the PCI DMA interface1111- (see Documentation/DMA-API-HOWTO.txt). They continue1111+ (see :doc:`/core-api/dma-api-howto`). They continue1212 to be documented below for historical purposes, but new code1313 must not use them. --davidm 00/12/121414
+3-3
Documentation/core-api/dma-api.rst
···55:Author: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>6677This document describes the DMA API. For a more gentle introduction88-of the API (and actual examples), see Documentation/DMA-API-HOWTO.txt.88+of the API (and actual examples), see :doc:`/core-api/dma-api-howto`.991010This API is split into two pieces. Part I describes the basic API.1111Part II describes extensions for supporting non-consistent memory···471471dma_attrs.472472473473The interpretation of DMA attributes is architecture-specific, and474474-each attribute should be documented in Documentation/DMA-attributes.txt.474474+each attribute should be documented in :doc:`/core-api/dma-attributes`.475475476476If dma_attrs are 0, the semantics of each of these functions477477is identical to those of the corresponding function···484484485485 #include <linux/dma-mapping.h>486486 /* DMA_ATTR_FOO should be defined in linux/dma-mapping.h and487487- * documented in Documentation/DMA-attributes.txt */487487+ * documented in Documentation/core-api/dma-attributes.rst */488488 ...489489490490 unsigned long attr;
+1-1
Documentation/core-api/dma-isa-lpc.rst
···1717 #include <asm/dma.h>18181919The first is the generic DMA API used to convert virtual addresses to2020-bus addresses (see Documentation/DMA-API.txt for details).2020+bus addresses (see :doc:`/core-api/dma-api` for details).21212222The second contains the routines specific to ISA DMA transfers. Since2323this is not present on all platforms make sure you construct your
···11- Booting the Linux/ppc kernel without Open Firmware22- --------------------------------------------------11+.. SPDX-License-Identifier: GPL-2.03244-(c) 2005 Benjamin Herrenschmidt <benh at kernel.crashing.org>,55- IBM Corp.66-(c) 2005 Becky Bruce <becky.bruce at freescale.com>,77- Freescale Semiconductor, FSL SOC and 32-bit additions88-(c) 2006 MontaVista Software, Inc.99- Flash chip node definition33+==================================================44+Booting the Linux/ppc kernel without Open Firmware55+==================================================1061111-Table of Contents1212-=================77+Copyright (c) 2005 Benjamin Herrenschmidt <benh at kernel.crashing.org>,88+IBM Corp.99+1010+Copyright (c) 2005 Becky Bruce <becky.bruce at freescale.com>,1111+Freescale Semiconductor, FSL SOC and 32-bit additions1212+1313+Copyright (c) 2006 MontaVista Software, Inc.1414+Flash chip node definition1515+1616+.. Table of Contents13171418 I - Introduction1519 1) Entry point for arch/arm···6561Revision Information6662====================67636868- May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.6464+ May 18, 2005: Rev 0.16565+ - Initial draft, no chapter III yet.69667070- May 19, 2005: Rev 0.2 - Add chapter III and bits & pieces here or6767+ May 19, 2005: Rev 0.26868+ - Add chapter III and bits & pieces here or7169 clarifies the fact that a lot of things are7270 optional, the kernel only requires a very7371 small device tree, though it is encouraged7472 to provide an as complete one as possible.75737676- May 24, 2005: Rev 0.3 - Precise that DT block has to be in RAM7474+ May 24, 2005: Rev 0.37575+ - Precise that DT block has to be in RAM7776 - Misc fixes7877 - Define version 3 and new format version 167978 for the DT block (version 16 needs kernel···8982 "name" property is now automatically9083 deduced from the unit name91849292- June 1, 2005: Rev 0.4 - Correct confusion between OF_DT_END and8585+ June 1, 2005: Rev 0.48686+ - Correct confusion between OF_DT_END and9387 OF_DT_END_NODE in structure definition.9488 - Change version 16 format to always align9589 property data to 4 bytes. Since tokens are···123115 - Compare FSL SOC use of PCI to standard and make sure no new124116 node definition required.125117 - Add more information about node definitions for SOC devices126126- that currently have no standard, like the FSL CPM.118118+ that currently have no standard, like the FSL CPM.127119128120129121I - Introduction···268260269261 b) create your main platform file as270262 "arch/powerpc/platforms/myplatform/myboard_setup.c" and add it271271- to the Makefile under the condition of your CONFIG_263263+ to the Makefile under the condition of your ``CONFIG_``272264 option. This file will define a structure of type "ppc_md"273265 containing the various callbacks that the generic code will274266 use to get to your platform specific code···279271 with classic Powerpc architectures.2802722812733) Entry point for arch/x86282282--------------------------------274274+---------------------------283275284276 There is one single 32bit entry point to the kernel at code32_start,285277 the decompressor (the real mode entry point goes to the same 32bit···288280 Documentation/x86/boot.rst289281 The physical pointer to the device-tree block (defined in chapter II)290282 is passed via setup_data which requires at least boot protocol 2.09.291291- The type filed is defined as283283+ The type filed is defined as::292284293293- #define SETUP_DTB 2285285+ #define SETUP_DTB 2294286295287 This device-tree is used as an extension to the "boot page". As such it296288 does not parse / consider data which is already covered by the boot···362354363355 The kernel is passed the physical address pointing to an area of memory364356 that is roughly described in include/linux/of_fdt.h by the structure365365- boot_param_header:357357+ boot_param_header:::366358367367-struct boot_param_header {359359+ struct boot_param_header {368360 u32 magic; /* magic word OF_DT_HEADER */369361 u32 totalsize; /* total size of DT block */370362 u32 off_dt_struct; /* offset to structure */···382374383375 /* version 17 fields below */384376 u32 size_dt_struct; /* size of the DT structure block */385385-};377377+ };386378387387- Along with the constants:379379+ Along with the constants::388380389389-/* Definitions used by the flattened device tree */390390-#define OF_DT_HEADER 0xd00dfeed /* 4: version,391391- 4: total size */392392-#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name393393- */394394-#define OF_DT_END_NODE 0x2 /* End node */395395-#define OF_DT_PROP 0x3 /* Property: name off,396396- size, content */397397-#define OF_DT_END 0x9381381+ /* Definitions used by the flattened device tree */382382+ #define OF_DT_HEADER 0xd00dfeed /* 4: version,383383+ 4: total size */384384+ #define OF_DT_BEGIN_NODE 0x1 /* Start node: full name385385+ */386386+ #define OF_DT_END_NODE 0x2 /* End node */387387+ #define OF_DT_PROP 0x3 /* Property: name off,388388+ size, content */389389+ #define OF_DT_END 0x9398390399391 All values in this header are in big endian format, the various400392 fields in this header are defined more precisely below. All···438430 way to avoid overriding critical things like, on Open Firmware439431 capable machines, the RTAS instance, or on some pSeries, the TCE440432 tables used for the iommu. Typically, the reserve map should441441- contain _at least_ this DT block itself (header,total_size). If433433+ contain **at least** this DT block itself (header,total_size). If442434 you are passing an initrd to the kernel, you should reserve it as443435 well. You do not need to reserve the kernel image itself. The map444436 should be 64-bit aligned.···493485494486 So the typical layout of a DT block (though the various parts don't495487 need to be in that order) looks like this (addresses go from top to496496- bottom):488488+ bottom)::497489498490499491 ------------------------------···519511 |520512 --- (base + totalsize)521513522522- (*) The alignment gaps are not necessarily present; their presence523523- and size are dependent on the various alignment requirements of524524- the individual data blocks.514514+ (*) The alignment gaps are not necessarily present; their presence515515+ and size are dependent on the various alignment requirements of516516+ the individual data blocks.5255175265185275192) Device tree generalities···608600you a idea of what a device-tree looks like. I have purposefully kept609601the "name" and "linux,phandle" properties which aren't necessary in610602order to give you a better idea of what the tree looks like in611611-practice.603603+practice::612604613605 / o device-tree614606 |- name = "device-tree"···6586506596516606523) Device tree "structure" block653653+--------------------------------661654662655The structure of the device tree is a linearized tree structure. The663656"OF_DT_BEGIN_NODE" token starts a new node, and the "OF_DT_END_NODE"···675666 root node)676667 * [align gap to next 4 bytes boundary]677668 * for each property:669669+678670 * token OF_DT_PROP (that is 0x00000003)679671 * 32-bit value of property value size in bytes (or 0 if no680672 value)681673 * 32-bit value of offset in string block of property name682674 * property value data if any683675 * [align gap to next 4 bytes boundary]676676+684677 * [child nodes if any]685678 * token OF_DT_END_NODE (that is 0x00000002)686679···699688constraint.7006897016904) Device tree "strings" block691691+------------------------------702692703693In order to save space, property names, which are generally redundant,704694are stored separately in the "strings" block. This block is simply the···712700III - Required content of the device tree713701=========================================714702715715-WARNING: All "linux,*" properties defined in this document apply only716716-to a flattened device-tree. If your platform uses a real717717-implementation of Open Firmware or an implementation compatible with718718-the Open Firmware client interface, those properties will be created719719-by the trampoline code in the kernel's prom_init() file. For example,720720-that's where you'll have to add code to detect your board model and721721-set the platform number. However, when using the flattened device-tree722722-entry point, there is no prom_init() pass, and thus you have to723723-provide those properties yourself.703703+.. Warning::704704+705705+ All ``linux,*`` properties defined in this document apply only706706+ to a flattened device-tree. If your platform uses a real707707+ implementation of Open Firmware or an implementation compatible with708708+ the Open Firmware client interface, those properties will be created709709+ by the trampoline code in the kernel's prom_init() file. For example,710710+ that's where you'll have to add code to detect your board model and711711+ set the platform number. However, when using the flattened device-tree712712+ entry point, there is no prom_init() pass, and thus you have to713713+ provide those properties yourself.7247147257157267161) Note about cells and address representation···783769"ranges" property is missing at a given level, it's assumed that784770translation isn't possible, i.e., the registers are not visible on the785771parent bus. The format of the "ranges" property for a bus is a list786786-of:772772+of::787773788774 bus address, parent bus address, size789775···891877892878 This node is the parent of all individual CPU nodes. It doesn't893879 have any specific requirements, though it's generally good practice894894- to have at least:880880+ to have at least::895881896882 #address-cells = <00000001>897883 #size-cells = <00000000>···901887 that format when reading the "reg" properties of a CPU node, see902888 below903889904904- c) The /cpus/* nodes890890+ c) The ``/cpus/*`` nodes905891906892 So under /cpus, you are supposed to create a node for every CPU on907893 the machine. There is no specific restriction on the name of the···917903 - reg : This is the physical CPU number, it's a single 32-bit cell918904 and is also used as-is as the unit number for constructing the919905 unit name in the full path. For example, with 2 CPUs, you would920920- have the full path:906906+ have the full path::907907+921908 /cpus/PowerPC,970FX@0922909 /cpus/PowerPC,970FX@1910910+923911 (unit addresses do not require leading zeroes)924924- - d-cache-block-size : one cell, L1 data cache block size in bytes (*)912912+ - d-cache-block-size : one cell, L1 data cache block size in bytes [#]_925913 - i-cache-block-size : one cell, L1 instruction cache block size in926914 bytes927915 - d-cache-size : one cell, size of L1 data cache in bytes928916 - i-cache-size : one cell, size of L1 instruction cache in bytes929917930930-(*) The cache "block" size is the size on which the cache management931931-instructions operate. Historically, this document used the cache932932-"line" size here which is incorrect. The kernel will prefer the cache933933-block size and will fallback to cache line size for backward934934-compatibility.918918+ .. [#] The cache "block" size is the size on which the cache management919919+ instructions operate. Historically, this document used the cache920920+ "line" size here which is incorrect. The kernel will prefer the cache921921+ block size and will fallback to cache line size for backward922922+ compatibility.935923936924 Recommended properties:937925···979963 #address-cells and #size-cells of the root node. For example,980964 with both of these properties being 2 like in the example given981965 earlier, a 970 based machine with 6Gb of RAM could typically982982- have a "reg" property here that looks like:966966+ have a "reg" property here that looks like::983967984984- 00000000 00000000 00000000 80000000985985- 00000001 00000000 00000001 00000000968968+ 00000000 00000000 00000000 80000000969969+ 00000001 00000000 00000001 00000000986970987971 That is a range starting at 0 of 0x80000000 bytes and a range988972 starting at 0x100000000 and of 0x100000000 bytes. You can see···10631047 See 1) above for more details on defining #address-cells.10641048 - #size-cells : Size representation for "soc" devices10651049 - #interrupt-cells : Defines the width of cells used to represent10661066- interrupts. Typically this value is <2>, which includes a10671067- 32-bit number that represents the interrupt number, and a10681068- 32-bit number that represents the interrupt sense and level.10691069- This field is only needed if the SOC contains an interrupt10701070- controller.10501050+ interrupts. Typically this value is <2>, which includes a10511051+ 32-bit number that represents the interrupt number, and a10521052+ 32-bit number that represents the interrupt sense and level.10531053+ This field is only needed if the SOC contains an interrupt10541054+ controller.1071105510721056 The SOC node may contain child nodes for each SOC device that the10731057 platform uses. Nodes should not be created for devices which exist10741058 on the SOC but are not used by a particular platform. See chapter VI10751059 for more information on how to specify devices that are part of a SOC.1076106010771077- Example SOC node for the MPC8540:10611061+ Example SOC node for the MPC8540::1078106210791063 soc8540@e0000000 {10801064 #address-cells = <1>;···10951079dtc source code can be found at10961080<http://git.jdl.com/gitweb/?p=dtc.git>1097108110981098-WARNING: This version is still in early development stage; the10991099-resulting device-tree "blobs" have not yet been validated with the11001100-kernel. The current generated block lacks a useful reserve map (it will11011101-be fixed to generate an empty one, it's up to the bootloader to fill11021102-it up) among others. The error handling needs work, bugs are lurking,11031103-etc...10821082+.. Warning::10831083+10841084+ This version is still in early development stage; the10851085+ resulting device-tree "blobs" have not yet been validated with the10861086+ kernel. The current generated block lacks a useful reserve map (it will10871087+ be fixed to generate an empty one, it's up to the bootloader to fill10881088+ it up) among others. The error handling needs work, bugs are lurking,10891089+ etc...1104109011051091dtc basically takes a device-tree in a given format and outputs a11061092device-tree in another format. The currently supported formats are:1107109311081108- Input formats:11091109- -------------10941094+Input formats10951095+-------------1110109611111097 - "dtb": "blob" format, that is a flattened device-tree block11121098 with11131113- header all in a binary blob.10991099+ header all in a binary blob.11141100 - "dts": "source" format. This is a text file containing a11151101 "source" for a device-tree. The format is defined later in this11161116- chapter.11021102+ chapter.11171103 - "fs" format. This is a representation equivalent to the11181118- output of /proc/device-tree, that is nodes are directories and11191119- properties are files11041104+ output of /proc/device-tree, that is nodes are directories and11051105+ properties are files1120110611211121- Output formats:11221122- ---------------11071107+Output formats11081108+--------------1123110911241110 - "dtb": "blob" format11251111 - "dts": "source" format···11311113 assembly file exports some symbols that can be used.113211141133111511341134-The syntax of the dtc tool is11161116+The syntax of the dtc tool is::1135111711361118 dtc [-I <input-format>] [-O <output-format>]11371119 [-o output-filename] [-V output_version] input_filename···11451127uniqueness of linux, phandle properties, validity of strings, etc...1146112811471129The format of the .dts "source" file is "C" like, supports C and C++11481148-style comments.11301130+style comments::1149113111501150-/ {11511151-}11321132+ / {11331133+ }1152113411531135The above is the "device-tree" definition. It's the only statement11541136supported currently at the toplevel.1155113711561156-/ {11571157- property1 = "string_value"; /* define a property containing a 011581158- * terminated string11591159- */11381138+::1160113911611161- property2 = <0x1234abcd>; /* define a property containing a11621162- * numerical 32-bit value (hexadecimal)11631163- */11401140+ / {11411141+ property1 = "string_value"; /* define a property containing a 011421142+ * terminated string11431143+ */1164114411651165- property3 = <0x12345678 0x12345678 0xdeadbeef>;11661166- /* define a property containing 311671167- * numerical 32-bit values (cells) in11681168- * hexadecimal11691169- */11701170- property4 = [0x0a 0x0b 0x0c 0x0d 0xde 0xea 0xad 0xbe 0xef];11711171- /* define a property whose content is11721172- * an arbitrary array of bytes11731173- */11451145+ property2 = <0x1234abcd>; /* define a property containing a11461146+ * numerical 32-bit value (hexadecimal)11471147+ */1174114811751175- childnode@address { /* define a child node named "childnode"11761176- * whose unit name is "childnode at11771177- * address"11781178- */11491149+ property3 = <0x12345678 0x12345678 0xdeadbeef>;11501150+ /* define a property containing 311511151+ * numerical 32-bit values (cells) in11521152+ * hexadecimal11531153+ */11541154+ property4 = [0x0a 0x0b 0x0c 0x0d 0xde 0xea 0xad 0xbe 0xef];11551155+ /* define a property whose content is11561156+ * an arbitrary array of bytes11571157+ */1179115811801180- childprop = "hello\n"; /* define a property "childprop" of11811181- * childnode (in this case, a string)11821182- */11831183- };11841184-};11591159+ childnode@address { /* define a child node named "childnode"11601160+ * whose unit name is "childnode at11611161+ * address"11621162+ */11631163+11641164+ childprop = "hello\n"; /* define a property "childprop" of11651165+ * childnode (in this case, a string)11661166+ */11671167+ };11681168+ };1185116911861170Nodes can contain other nodes etc... thus defining the hierarchical11871171structure of the tree.···1342132213431323If the interrupt-parent property is not defined for a node, its13441324interrupt parent is assumed to be an ancestor in the node's13451345-_device tree_ hierarchy.13251325+*device tree* hierarchy.13461326134713273) OpenPIC Interrupt Controllers13481328--------------------------------···1354133413551335Sense and level information should be encoded as follows:1356133613571357- 0 = low to high edge sensitive type enabled13581358- 1 = active low level sensitive type enabled13591359- 2 = active high level sensitive type enabled13601360- 3 = high to low edge sensitive type enabled13371337+ == ========================================13381338+ 0 low to high edge sensitive type enabled13391339+ 1 active low level sensitive type enabled13401340+ 2 active high level sensitive type enabled13411341+ 3 high to low edge sensitive type enabled13421342+ == ========================================13611343136213444) ISA Interrupt Controllers13631345----------------------------···13721350ISA PIC interrupt controllers should adhere to the ISA PIC13731351encodings listed below:1374135213751375- 0 = active low level sensitive type enabled13761376- 1 = active high level sensitive type enabled13771377- 2 = high to low edge sensitive type enabled13781378- 3 = low to high edge sensitive type enabled13531353+ == ========================================13541354+ 0 active low level sensitive type enabled13551355+ 1 active high level sensitive type enabled13561356+ 2 high to low edge sensitive type enabled13571357+ 3 low to high edge sensitive type enabled13581358+ == ========================================1379135913801360VIII - Specifying Device Power Management Information (sleep property)13811381-===================================================================13611361+======================================================================1382136213831363Devices on SOCs often have mechanisms for placing devices into low-power13841364states that are decoupled from the devices' own register blocks. Sometimes,···14111387sleep-map should wait until its necessity is demonstrated).1412138814131389IX - Specifying dma bus information13901390+===================================1414139114151392Some devices may have DMA memory range shifted relatively to the beginning of14161393RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC···14291404for identifying devices supported coherent DMA operations in DT.1430140514311406* DMA Bus master14071407+14321408Optional property:14091409+14331410- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of14341434- (child-bus-address, parent-bus-address, length). Each triplet specified14351435- describes a contiguous DMA address range.14361436- The dma-ranges property is used to describe the direct memory access (DMA)14371437- structure of a memory-mapped bus whose device tree parent can be accessed14381438- from DMA operations originating from the bus. It provides a means of14391439- defining a mapping or translation between the physical address space of14401440- the bus and the physical address space of the parent of the bus.14411441- (for more information see the Devicetree Specification)14111411+ (child-bus-address, parent-bus-address, length). Each triplet specified14121412+ describes a contiguous DMA address range.14131413+ The dma-ranges property is used to describe the direct memory access (DMA)14141414+ structure of a memory-mapped bus whose device tree parent can be accessed14151415+ from DMA operations originating from the bus. It provides a means of14161416+ defining a mapping or translation between the physical address space of14171417+ the bus and the physical address space of the parent of the bus.14181418+ (for more information see the Devicetree Specification)1442141914431420* DMA Bus child14211421+14441422Optional property:14231423+14451424- dma-ranges: <empty> value. if present - It means that DMA addresses14461446- translation has to be enabled for this device.14251425+ translation has to be enabled for this device.14471426- dma-coherent: Present if dma operations are coherent1448142714491449-Example:14501450-soc {14281428+Example::14291429+14301430+ soc {14511431 compatible = "ti,keystone","simple-bus";14521432 ranges = <0x0 0x0 0x0 0xc0000000>;14531433 dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;···14651435 [...]14661436 dma-coherent;14671437 };14681468-};14381438+ };1469143914701440Appendix A - Sample SOC node for MPC854014711441========================================14421442+14431443+::1472144414731445 soc@e0000000 {14741446 #address-cells = <1>;
···228228not restricted to that. Use it whenever it makes sense to take an action after229229all the consumers of a device have probed::230230231231-::232232-233231 int (*remove) (struct device *dev);234232235233remove is called to unbind a driver from a device. This may be
···10101111The big picture is that USB drivers can continue to ignore most DMA issues,1212though they still must provide DMA-ready buffers (see1313-``Documentation/DMA-API-HOWTO.txt``). That's how they've worked through1313+:doc:`/core-api/dma-api-howto`). That's how they've worked through1414the 2.4 (and earlier) kernels, or they can now be DMA-aware.15151616DMA-aware usb drivers:···6060 force a consistent memory access ordering by using memory barriers. It's6161 not using a streaming DMA mapping, so it's good for small transfers on6262 systems where the I/O would otherwise thrash an IOMMU mapping. (See6363- ``Documentation/DMA-API-HOWTO.txt`` for definitions of "coherent" and6363+ :doc:`/core-api/dma-api-howto` for definitions of "coherent" and6464 "streaming" DMA mappings.)65656666 Asking for 1/Nth of a page (as well as asking for N pages) is reasonably···9191Existing buffers aren't usable for DMA without first being mapped into the9292DMA address space of the device. However, most buffers passed to your9393driver can safely be used with such DMA mapping. (See the first section9494-of Documentation/DMA-API-HOWTO.txt, titled "What memory is DMA-able?")9494+of :doc:`/core-api/dma-api-howto`, titled "What memory is DMA-able?")95959696- When you're using scatterlists, you can map everything at once. On some9797 systems, this kicks in an IOMMU and turns the scatterlists into single
+21-23
Documentation/filesystems/proc.rst
···21792179are not related to tasks.21802180218121815 Filesystem behavior21822182-----------------------------21822182+---------------------------2183218321842184Originally, before the advent of pid namepsace, procfs was a global file21852185system. It means that there was only one procfs instance in the system.2186218621872187When pid namespace was added, a separate procfs instance was mounted in21882188each pid namespace. So, procfs mount options are global among all21892189-mountpoints within the same namespace.21892189+mountpoints within the same namespace::2190219021912191-::21912191+ # grep ^proc /proc/mounts21922192+ proc /proc proc rw,relatime,hidepid=2 0 02192219321932193-# grep ^proc /proc/mounts21942194-proc /proc proc rw,relatime,hidepid=2 0 021942194+ # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc21952195+ mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 021962196+ +++ exited with 0 +++2195219721962196-# strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc21972197-mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 021982198-+++ exited with 0 +++21992199-22002200-# grep ^proc /proc/mounts22012201-proc /proc proc rw,relatime,hidepid=2 0 022022202-proc /tmp/proc proc rw,relatime,hidepid=2 0 021982198+ # grep ^proc /proc/mounts21992199+ proc /proc proc rw,relatime,hidepid=2 0 022002200+ proc /tmp/proc proc rw,relatime,hidepid=2 0 02203220122042202and only after remounting procfs mount options will change at all22052205-mountpoints.22032203+mountpoints::2206220422072207-# mount -o remount,hidepid=1 -t proc proc /tmp/proc22052205+ # mount -o remount,hidepid=1 -t proc proc /tmp/proc2208220622092209-# grep ^proc /proc/mounts22102210-proc /proc proc rw,relatime,hidepid=1 0 022112211-proc /tmp/proc proc rw,relatime,hidepid=1 0 022072207+ # grep ^proc /proc/mounts22082208+ proc /proc proc rw,relatime,hidepid=1 0 022092209+ proc /tmp/proc proc rw,relatime,hidepid=1 0 02212221022132211This behavior is different from the behavior of other filesystems.2214221222152213The new procfs behavior is more like other filesystems. Each procfs mount22162214creates a new procfs instance. Mount options affect own procfs instance.22172215It means that it became possible to have several procfs instances22182218-displaying tasks with different filtering options in one pid namespace.22162216+displaying tasks with different filtering options in one pid namespace::2219221722202220-# mount -o hidepid=invisible -t proc proc /proc22212221-# mount -o hidepid=noaccess -t proc proc /tmp/proc22222222-# grep ^proc /proc/mounts22232223-proc /proc proc rw,relatime,hidepid=invisible 0 022242224-proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 022182218+ # mount -o hidepid=invisible -t proc proc /proc22192219+ # mount -o hidepid=noaccess -t proc proc /tmp/proc22202220+ # grep ^proc /proc/mounts22212221+ proc /proc proc rw,relatime,hidepid=invisible 0 022222222+ proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0
+1-1
Documentation/gpu/drm-mm.rst
···314314a pointer on drm_gem_cma_get_unmapped_area().315315316316More detailed information about get_unmapped_area can be found in317317-Documentation/nommu-mmap.txt317317+Documentation/admin-guide/mm/nommu-mmap.rst318318319319Memory Coherency320320----------------
···8787the vas_id field in the VAS_TX_WIN_OPEN ioctl as detailed below.88888989A userspace library libnxz is available here but still in development:9090+9091 https://github.com/abalib/power-gzip91929293Applications that use inflate / deflate calls can link with libnxz···111110a connection with NX co-processor engine:112111113112 ::113113+114114 struct vas_tx_win_open_attr {115115 __u32 version;116116 __s16 vas_id; /* specific instance of vas or -1···121119 __u64 reserved2[6];122120 };123121124124- version: The version field must be currently set to 1.125125- vas_id: If '-1' is passed, kernel will make a best-effort attempt122122+ version:123123+ The version field must be currently set to 1.124124+ vas_id:125125+ If '-1' is passed, kernel will make a best-effort attempt126126 to assign an optimal instance of NX for the process. To127127 select the specific VAS instance, refer128128 "Discovery of available VAS engines" section below.···133129 and must be set to 0.134130135131 The attributes attr for the VAS_TX_WIN_OPEN ioctl are defined as136136- follows:132132+ follows::133133+137134 #define VAS_MAGIC 'v'138135 #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 1,139136 struct vas_tx_win_open_attr)···146141 returns -1 and sets the errno variable to indicate the error.147142148143 Error conditions:144144+145145+ ====== ================================================149146 EINVAL fd does not refer to a valid VAS device.150147 EINVAL Invalid vas ID151148 EINVAL version is not set with proper value···156149 ENOSPC System has too many active windows (connections)157150 opened158151 EINVAL reserved fields are not set to 0.152152+ ====== ================================================159153160154 See the ioctl(2) man page for more details, error codes and161155 restrictions.···166158167159The mmap() system call for a NX-GZIP device fd returns a paste_address168160that the application can use to copy/paste its CRB to the hardware engines.161161+169162 ::170163171164 paste_addr = mmap(addr, size, prot, flags, fd, offset);172165173166 Only restrictions on mmap for a NX-GZIP device fd are:167167+174168 * size should be PAGE_SIZE175169 * offset parameter should be 0ULL176170···180170 In addition to the error conditions listed on the mmap(2) man181171 page, can also fail with one of the following error codes:182172173173+ ====== =============================================183174 EINVAL fd is not associated with an open window184175 (i.e mmap() does not follow a successful call185176 to the VAS_TX_WIN_OPEN ioctl).186177 EINVAL offset field is not 0ULL.178178+ ====== =============================================187179188180Discovery of available VAS engines189181==================================···222210address or any request buffer, raises an interrupt on the CPU to handle the223211fault. Page fault can happen if an application passes invalid addresses or224212request buffers are not in memory. The operating system handles the fault by225225-updating CSB with the following data:213213+updating CSB with the following data::226214227215 csb.flags = CSB_V;228216 csb.cc = CSB_CC_TRANSLATION;···235223236224If the OS can not update CSB due to invalid CSB address, sends SEGV signal237225to the process who opened the send window on which the original request was238238-issued. This signal returns with the following siginfo struct:226226+issued. This signal returns with the following siginfo struct::239227240228 siginfo.si_signo = SIGSEGV;241229 siginfo.si_errno = EFAULT;···260248==============261249262250 ::251251+263252 int use_nx_gzip()264253 {265254 int rc, fd;
···11- Lockless Ring Buffer Design22- ===========================11+.. This file is dual-licensed: you can use it either under the terms22+.. of the GPL 2.0 or the GFDL 1.2 license, at your option. Note that this33+.. dual licensing only applies to this file, and not this project as a44+.. whole.55+..66+.. a) This file is free software; you can redistribute it and/or77+.. modify it under the terms of the GNU General Public License as88+.. published by the Free Software Foundation version 2 of99+.. the License.1010+..1111+.. This file is distributed in the hope that it will be useful,1212+.. but WITHOUT ANY WARRANTY; without even the implied warranty of1313+.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414+.. GNU General Public License for more details.1515+..1616+.. Or, alternatively,1717+..1818+.. b) Permission is granted to copy, distribute and/or modify this1919+.. document under the terms of the GNU Free Documentation License,2020+.. Version 1.2 version published by the Free Software2121+.. Foundation, with no Invariant Sections, no Front-Cover Texts2222+.. and no Back-Cover Texts. A copy of the license is included at2323+.. Documentation/userspace-api/media/fdl-appendix.rst.2424+..2525+.. TODO: replace it to GPL-2.0 OR GFDL-1.2 WITH no-invariant-sections2626+2727+===========================2828+Lockless Ring Buffer Design2929+===========================330431Copyright 2009 Red Hat Inc.55- Author: Steven Rostedt <srostedt@redhat.com>66- License: The GNU Free Documentation License, Version 1.277- (dual licensed under the GPL v2)88-Reviewers: Mathieu Desnoyers, Huang Ying, Hidetoshi Seto,3232+3333+:Author: Steven Rostedt <srostedt@redhat.com>3434+:License: The GNU Free Documentation License, Version 1.23535+ (dual licensed under the GPL v2)3636+:Reviewers: Mathieu Desnoyers, Huang Ying, Hidetoshi Seto,937 and Frederic Weisbecker.10381139···4214Terminology used in this Document4315---------------------------------44164545-tail - where new writes happen in the ring buffer.1717+tail1818+ - where new writes happen in the ring buffer.46194747-head - where new reads happen in the ring buffer.2020+head2121+ - where new reads happen in the ring buffer.48224949-producer - the task that writes into the ring buffer (same as writer)2323+producer2424+ - the task that writes into the ring buffer (same as writer)50255151-writer - same as producer2626+writer2727+ - same as producer52285353-consumer - the task that reads from the buffer (same as reader)2929+consumer3030+ - the task that reads from the buffer (same as reader)54315555-reader - same as consumer.3232+reader3333+ - same as consumer.56345757-reader_page - A page outside the ring buffer used solely (for the most part)5858- by the reader.3535+reader_page3636+ - A page outside the ring buffer used solely (for the most part)3737+ by the reader.59386060-head_page - a pointer to the page that the reader will use next3939+head_page4040+ - a pointer to the page that the reader will use next61416262-tail_page - a pointer to the page that will be written to next4242+tail_page4343+ - a pointer to the page that will be written to next63446464-commit_page - a pointer to the page with the last finished non-nested write.4545+commit_page4646+ - a pointer to the page with the last finished non-nested write.65476666-cmpxchg - hardware-assisted atomic transaction that performs the following:4848+cmpxchg4949+ - hardware-assisted atomic transaction that performs the following::67506868- A = B if previous A == C5151+ A = B if previous A == C69527070- R = cmpxchg(A, C, B) is saying that we replace A with B if and only if7171- current A is equal to C, and we put the old (current) A into R5353+ R = cmpxchg(A, C, B) is saying that we replace A with B if and only5454+ if current A is equal to C, and we put the old (current)5555+ A into R72567373- R gets the previous A regardless if A is updated with B or not.5757+ R gets the previous A regardless if A is updated with B or not.74587575- To see if the update was successful a compare of R == C may be used.5959+ To see if the update was successful a compare of ``R == C``6060+ may be used.76617762The Generic Ring Buffer7863-----------------------···10564but a writer may interrupt another writer, but it must finish writing10665before the previous writer may continue. This is very important to the10766algorithm. The writers act like a "stack". The way interrupts works108108-enforces this behavior.6767+enforces this behavior::109681106911170 writer1 start···155114A sample of how the reader page is swapped: Note this does not156115show the head page in the buffer, it is for demonstrating a swap157116only.117117+118118+::158119159120 +------+160121 |reader| RING BUFFER···215172It is possible that the page swapped is the commit page and the tail page,216173if what is in the ring buffer is less than what is held in a buffer page.217174175175+::218176219219- reader page commit page tail page220220- | | |221221- v | |222222- +---+ | |223223- | |<----------+ |224224- | |<------------------------+225225- | |------+226226- +---+ |227227- |228228- v229229- +---+ +---+ +---+ +---+230230-<---| |--->| |--->| |--->| |--->231231---->| |<---| |<---| |<---| |<---232232- +---+ +---+ +---+ +---+177177+ reader page commit page tail page178178+ | | |179179+ v | |180180+ +---+ | |181181+ | |<----------+ |182182+ | |<------------------------+183183+ | |------+184184+ +---+ |185185+ |186186+ v187187+ +---+ +---+ +---+ +---+188188+ <---| |--->| |--->| |--->| |--->189189+ --->| |<---| |<---| |<---| |<---190190+ +---+ +---+ +---+ +---+233191234192This case is still valid for this algorithm.235193When the writer leaves the page, it simply goes into the ring buffer···240196241197The main pointers:242198243243- reader page - The page used solely by the reader and is not part244244- of the ring buffer (may be swapped in)199199+ reader page200200+ - The page used solely by the reader and is not part201201+ of the ring buffer (may be swapped in)245202246246- head page - the next page in the ring buffer that will be swapped203203+ head page204204+ - the next page in the ring buffer that will be swapped247205 with the reader page.248206249249- tail page - the page where the next write will take place.207207+ tail page208208+ - the page where the next write will take place.250209251251- commit page - the page that last finished a write.210210+ commit page211211+ - the page that last finished a write.252212253213The commit page only is updated by the outermost writer in the254214writer stack. A writer that preempts another writer will not move the···267219with the previous write.268220269221270270- Write reserve:222222+ Write reserve::271223272224 Buffer page273225 +---------+···278230 | empty |279231 +---------+280232281281- Write commit:233233+ Write commit::282234283235 Buffer page284236 +---------+···290242 +---------+291243292244293293- If a write happens after the first reserve:245245+ If a write happens after the first reserve::294246295247 Buffer page296248 +---------+···301253 |reserved |302254 +---------+ <--- tail pointer303255304304- After second writer commits:256256+ After second writer commits::305257306258307259 Buffer page···314266 |commit |315267 +---------+ <--- tail pointer316268317317- When the first writer commits:269269+ When the first writer commits::318270319271 Buffer page320272 +---------+···340292page then no more writes may take place (regardless of the mode341293of the ring buffer: overwrite and produce/consumer).342294343343-The order of pages is:295295+The order of pages is::344296345297 head page346298 commit page347299 tail page348300349349-Possible scenario:350350- tail page351351- head page commit page |352352- | | |353353- v v v354354- +---+ +---+ +---+ +---+355355-<---| |--->| |--->| |--->| |--->356356---->| |<---| |<---| |<---| |<---357357- +---+ +---+ +---+ +---+301301+Possible scenario::302302+303303+ tail page304304+ head page commit page |305305+ | | |306306+ v v v307307+ +---+ +---+ +---+ +---+308308+ <---| |--->| |--->| |--->| |--->309309+ --->| |<---| |<---| |<---| |<---310310+ +---+ +---+ +---+ +---+358311359312There is a special case that the head page is after either the commit page360313and possibly the tail page. That is when the commit (and tail) page has been···364315has been less than a full page that has been committed inside the ring buffer,365316and a reader swaps out a page, it will be swapping out the commit page.366317318318+::367319368368- reader page commit page tail page369369- | | |370370- v | |371371- +---+ | |372372- | |<----------+ |373373- | |<------------------------+374374- | |------+375375- +---+ |376376- |377377- v378378- +---+ +---+ +---+ +---+379379-<---| |--->| |--->| |--->| |--->380380---->| |<---| |<---| |<---| |<---381381- +---+ +---+ +---+ +---+382382- ^383383- |384384- head page320320+ reader page commit page tail page321321+ | | |322322+ v | |323323+ +---+ | |324324+ | |<----------+ |325325+ | |<------------------------+326326+ | |------+327327+ +---+ |328328+ |329329+ v330330+ +---+ +---+ +---+ +---+331331+ <---| |--->| |--->| |--->| |--->332332+ --->| |<---| |<---| |<---| |<---333333+ +---+ +---+ +---+ +---+334334+ ^335335+ |336336+ head page385337386338387339In this case, the head page will not move when the tail and commit···397347the head page will be pushed ahead one. If the buffer is in producer/consumer398348mode, the write will fail.399349400400-Overwrite mode:350350+Overwrite mode::401351402402- tail page403403- |404404- v405405- +---+ +---+ +---+ +---+406406-<---| |--->| |--->| |--->| |--->407407---->| |<---| |<---| |<---| |<---408408- +---+ +---+ +---+ +---+409409- ^410410- |411411- head page412412-413413-414414- tail page415415- |416416- v417417- +---+ +---+ +---+ +---+418418-<---| |--->| |--->| |--->| |--->419419---->| |<---| |<---| |<---| |<---420420- +---+ +---+ +---+ +---+421421- ^422422- |423423- head page352352+ tail page353353+ |354354+ v355355+ +---+ +---+ +---+ +---+356356+ <---| |--->| |--->| |--->| |--->357357+ --->| |<---| |<---| |<---| |<---358358+ +---+ +---+ +---+ +---+359359+ ^360360+ |361361+ head page424362425363426426- tail page427427- |428428- v429429- +---+ +---+ +---+ +---+430430-<---| |--->| |--->| |--->| |--->431431---->| |<---| |<---| |<---| |<---432432- +---+ +---+ +---+ +---+433433- ^434434- |435435- head page364364+ tail page365365+ |366366+ v367367+ +---+ +---+ +---+ +---+368368+ <---| |--->| |--->| |--->| |--->369369+ --->| |<---| |<---| |<---| |<---370370+ +---+ +---+ +---+ +---+371371+ ^372372+ |373373+ head page374374+375375+376376+ tail page377377+ |378378+ v379379+ +---+ +---+ +---+ +---+380380+ <---| |--->| |--->| |--->| |--->381381+ --->| |<---| |<---| |<---| |<---382382+ +---+ +---+ +---+ +---+383383+ ^384384+ |385385+ head page436386437387Note, the reader page will still point to the previous head page.438388But when a swap takes place, it will use the most recent head page.···447397each page must be aligned in memory by 4 bytes. This will allow the 2448398least significant bits of the address to be used as flags, since449399they will always be zero for the address. To get the address,450450-simply mask out the flags.400400+simply mask out the flags::451401452402 MASK = ~3453403···455405456406Two flags will be kept by these two bits:457407458458- HEADER - the page being pointed to is a head page408408+ HEADER409409+ - the page being pointed to is a head page459410460460- UPDATE - the page being pointed to is being updated by a writer411411+ UPDATE412412+ - the page being pointed to is being updated by a writer461413 and was or is about to be a head page.462414415415+::463416464464- reader page465465- |466466- v467467- +---+468468- | |------+469469- +---+ |470470- |471471- v472472- +---+ +---+ +---+ +---+473473-<---| |--->| |-H->| |--->| |--->474474---->| |<---| |<---| |<---| |<---475475- +---+ +---+ +---+ +---+417417+ reader page418418+ |419419+ v420420+ +---+421421+ | |------+422422+ +---+ |423423+ |424424+ v425425+ +---+ +---+ +---+ +---+426426+ <---| |--->| |-H->| |--->| |--->427427+ --->| |<---| |<---| |<---| |<---428428+ +---+ +---+ +---+ +---+476429477430478431The above pointer "-H->" would have the HEADER flag set. That is···483430This pointer means the next page is the head page.484431485432When the tail page meets the head pointer, it will use cmpxchg to486486-change the pointer to the UPDATE state:433433+change the pointer to the UPDATE state::487434488435489489- tail page490490- |491491- v492492- +---+ +---+ +---+ +---+493493-<---| |--->| |-H->| |--->| |--->494494---->| |<---| |<---| |<---| |<---495495- +---+ +---+ +---+ +---+436436+ tail page437437+ |438438+ v439439+ +---+ +---+ +---+ +---+440440+ <---| |--->| |-H->| |--->| |--->441441+ --->| |<---| |<---| |<---| |<---442442+ +---+ +---+ +---+ +---+496443497497- tail page498498- |499499- v500500- +---+ +---+ +---+ +---+501501-<---| |--->| |-U->| |--->| |--->502502---->| |<---| |<---| |<---| |<---503503- +---+ +---+ +---+ +---+444444+ tail page445445+ |446446+ v447447+ +---+ +---+ +---+ +---+448448+ <---| |--->| |-U->| |--->| |--->449449+ --->| |<---| |<---| |<---| |<---450450+ +---+ +---+ +---+ +---+504451505452"-U->" represents a pointer in the UPDATE state.506453···515462and the reader will need to look for the new head page and try again.516463Note, the flags UPDATE and HEADER are never set at the same time.517464518518-The reader swaps the reader page as follows:465465+The reader swaps the reader page as follows::519466520467 +------+521468 |reader| RING BUFFER···530477 +-----H-------------+531478532479The reader sets the reader page next pointer as HEADER to the page after533533-the head page.480480+the head page::534481535482536483 +------+···548495549496It does a cmpxchg with the pointer to the previous head page to make it550497point to the reader page. Note that the new pointer does not have the HEADER551551-flag set. This action atomically moves the head page forward.498498+flag set. This action atomically moves the head page forward::552499553500 +------+554501 |reader| RING BUFFER···564511 +------------------------------------+565512566513After the new head page is set, the previous pointer of the head page is567567-updated to the reader page.514514+updated to the reader page::568515569516 +------+570517 |reader| RING BUFFER···601548602549Note, the way to determine a reader page is simply by examining the previous603550pointer of the page. If the next pointer of the previous page does not604604-point back to the original page, then the original page is a reader page:551551+point back to the original page, then the original page is a reader page::605552606553607554 +--------+···625572move the head page, until the writer is finished with the move.626573627574This eliminates any races that the reader can have on the writer. The reader628628-must spin, and this is why the reader cannot preempt the writer.575575+must spin, and this is why the reader cannot preempt the writer::629576630630- tail page631631- |632632- v633633- +---+ +---+ +---+ +---+634634-<---| |--->| |-H->| |--->| |--->635635---->| |<---| |<---| |<---| |<---636636- +---+ +---+ +---+ +---+577577+ tail page578578+ |579579+ v580580+ +---+ +---+ +---+ +---+581581+ <---| |--->| |-H->| |--->| |--->582582+ --->| |<---| |<---| |<---| |<---583583+ +---+ +---+ +---+ +---+637584638638- tail page639639- |640640- v641641- +---+ +---+ +---+ +---+642642-<---| |--->| |-U->| |--->| |--->643643---->| |<---| |<---| |<---| |<---644644- +---+ +---+ +---+ +---+585585+ tail page586586+ |587587+ v588588+ +---+ +---+ +---+ +---+589589+ <---| |--->| |-U->| |--->| |--->590590+ --->| |<---| |<---| |<---| |<---591591+ +---+ +---+ +---+ +---+645592646646-The following page will be made into the new head page.593593+The following page will be made into the new head page::647594648648- tail page649649- |650650- v651651- +---+ +---+ +---+ +---+652652-<---| |--->| |-U->| |-H->| |--->653653---->| |<---| |<---| |<---| |<---654654- +---+ +---+ +---+ +---+595595+ tail page596596+ |597597+ v598598+ +---+ +---+ +---+ +---+599599+ <---| |--->| |-U->| |-H->| |--->600600+ --->| |<---| |<---| |<---| |<---601601+ +---+ +---+ +---+ +---+655602656603After the new head page has been set, we can set the old head page657657-pointer back to NORMAL.604604+pointer back to NORMAL::658605659659- tail page660660- |661661- v662662- +---+ +---+ +---+ +---+663663-<---| |--->| |--->| |-H->| |--->664664---->| |<---| |<---| |<---| |<---665665- +---+ +---+ +---+ +---+606606+ tail page607607+ |608608+ v609609+ +---+ +---+ +---+ +---+610610+ <---| |--->| |--->| |-H->| |--->611611+ --->| |<---| |<---| |<---| |<---612612+ +---+ +---+ +---+ +---+666613667667-After the head page has been moved, the tail page may now move forward.614614+After the head page has been moved, the tail page may now move forward::668615669669- tail page670670- |671671- v672672- +---+ +---+ +---+ +---+673673-<---| |--->| |--->| |-H->| |--->674674---->| |<---| |<---| |<---| |<---675675- +---+ +---+ +---+ +---+616616+ tail page617617+ |618618+ v619619+ +---+ +---+ +---+ +---+620620+ <---| |--->| |--->| |-H->| |--->621621+ --->| |<---| |<---| |<---| |<---622622+ +---+ +---+ +---+ +---+676623677624678625The above are the trivial updates. Now for the more complex scenarios.···683630page. At this time, we must start dropping writes (usually with some kind684631of warning to the user). But what happens if the commit was still on the685632reader page? The commit page is not part of the ring buffer. The tail page686686-must account for this.633633+must account for this::687634688635689689- reader page commit page690690- | |691691- v |692692- +---+ |693693- | |<----------+694694- | |695695- | |------+696696- +---+ |697697- |698698- v699699- +---+ +---+ +---+ +---+700700-<---| |--->| |-H->| |--->| |--->701701---->| |<---| |<---| |<---| |<---702702- +---+ +---+ +---+ +---+703703- ^704704- |705705- tail page636636+ reader page commit page637637+ | |638638+ v |639639+ +---+ |640640+ | |<----------+641641+ | |642642+ | |------+643643+ +---+ |644644+ |645645+ v646646+ +---+ +---+ +---+ +---+647647+ <---| |--->| |-H->| |--->| |--->648648+ --->| |<---| |<---| |<---| |<---649649+ +---+ +---+ +---+ +---+650650+ ^651651+ |652652+ tail page706653707654If the tail page were to simply push the head page forward, the commit when708655leaving the reader page would not be pointing to the correct page.···729676is not the next page, the tail page is simply updated with a cmpxchg.730677731678Only writers move the tail page. This must be done atomically to protect732732-against nested writers.679679+against nested writers::733680734681 temp_page = tail_page735682 next_page = temp_page->next···737684738685The above will update the tail page if it is still pointing to the expected739686page. If this fails, a nested write pushed it forward, the current write740740-does not need to push it.687687+does not need to push it::741688742689743743- temp page744744- |745745- v746746- tail page747747- |748748- v749749- +---+ +---+ +---+ +---+750750-<---| |--->| |--->| |--->| |--->751751---->| |<---| |<---| |<---| |<---752752- +---+ +---+ +---+ +---+690690+ temp page691691+ |692692+ v693693+ tail page694694+ |695695+ v696696+ +---+ +---+ +---+ +---+697697+ <---| |--->| |--->| |--->| |--->698698+ --->| |<---| |<---| |<---| |<---699699+ +---+ +---+ +---+ +---+753700754754-Nested write comes in and moves the tail page forward:701701+Nested write comes in and moves the tail page forward::755702756756- tail page (moved by nested writer)757757- temp page |758758- | |759759- v v760760- +---+ +---+ +---+ +---+761761-<---| |--->| |--->| |--->| |--->762762---->| |<---| |<---| |<---| |<---763763- +---+ +---+ +---+ +---+703703+ tail page (moved by nested writer)704704+ temp page |705705+ | |706706+ v v707707+ +---+ +---+ +---+ +---+708708+ <---| |--->| |--->| |--->| |--->709709+ --->| |<---| |<---| |<---| |<---710710+ +---+ +---+ +---+ +---+764711765712The above would fail the cmpxchg, but since the tail page has already766713been moved forward, the writer will just try again to reserve storage767714on the new tail page.768715769769-But the moving of the head page is a bit more complex.716716+But the moving of the head page is a bit more complex::770717771771- tail page772772- |773773- v774774- +---+ +---+ +---+ +---+775775-<---| |--->| |-H->| |--->| |--->776776---->| |<---| |<---| |<---| |<---777777- +---+ +---+ +---+ +---+718718+ tail page719719+ |720720+ v721721+ +---+ +---+ +---+ +---+722722+ <---| |--->| |-H->| |--->| |--->723723+ --->| |<---| |<---| |<---| |<---724724+ +---+ +---+ +---+ +---+778725779779-The write converts the head page pointer to UPDATE.726726+The write converts the head page pointer to UPDATE::780727781781- tail page782782- |783783- v784784- +---+ +---+ +---+ +---+785785-<---| |--->| |-U->| |--->| |--->786786---->| |<---| |<---| |<---| |<---787787- +---+ +---+ +---+ +---+728728+ tail page729729+ |730730+ v731731+ +---+ +---+ +---+ +---+732732+ <---| |--->| |-U->| |--->| |--->733733+ --->| |<---| |<---| |<---| |<---734734+ +---+ +---+ +---+ +---+788735789736But if a nested writer preempts here, it will see that the next790737page is a head page, but it is also nested. It will detect that···792739fact that it sees the UPDATE flag instead of a HEADER or NORMAL793740pointer.794741795795-The nested writer will set the new head page pointer.742742+The nested writer will set the new head page pointer::796743797797- tail page798798- |799799- v800800- +---+ +---+ +---+ +---+801801-<---| |--->| |-U->| |-H->| |--->802802---->| |<---| |<---| |<---| |<---803803- +---+ +---+ +---+ +---+744744+ tail page745745+ |746746+ v747747+ +---+ +---+ +---+ +---+748748+ <---| |--->| |-U->| |-H->| |--->749749+ --->| |<---| |<---| |<---| |<---750750+ +---+ +---+ +---+ +---+804751805752But it will not reset the update back to normal. Only the writer806753that converted a pointer from HEAD to UPDATE will convert it back807807-to NORMAL.754754+to NORMAL::808755809809- tail page810810- |811811- v812812- +---+ +---+ +---+ +---+813813-<---| |--->| |-U->| |-H->| |--->814814---->| |<---| |<---| |<---| |<---815815- +---+ +---+ +---+ +---+756756+ tail page757757+ |758758+ v759759+ +---+ +---+ +---+ +---+760760+ <---| |--->| |-U->| |-H->| |--->761761+ --->| |<---| |<---| |<---| |<---762762+ +---+ +---+ +---+ +---+816763817764After the nested writer finishes, the outermost writer will convert818818-the UPDATE pointer to NORMAL.765765+the UPDATE pointer to NORMAL::819766820767821821- tail page822822- |823823- v824824- +---+ +---+ +---+ +---+825825-<---| |--->| |--->| |-H->| |--->826826---->| |<---| |<---| |<---| |<---827827- +---+ +---+ +---+ +---+768768+ tail page769769+ |770770+ v771771+ +---+ +---+ +---+ +---+772772+ <---| |--->| |--->| |-H->| |--->773773+ --->| |<---| |<---| |<---| |<---774774+ +---+ +---+ +---+ +---+828775829776830777It can be even more complex if several nested writes came in and moved831831-the tail page ahead several pages:778778+the tail page ahead several pages::832779833780834834-(first writer)781781+ (first writer)835782836836- tail page837837- |838838- v839839- +---+ +---+ +---+ +---+840840-<---| |--->| |-H->| |--->| |--->841841---->| |<---| |<---| |<---| |<---842842- +---+ +---+ +---+ +---+783783+ tail page784784+ |785785+ v786786+ +---+ +---+ +---+ +---+787787+ <---| |--->| |-H->| |--->| |--->788788+ --->| |<---| |<---| |<---| |<---789789+ +---+ +---+ +---+ +---+843790844844-The write converts the head page pointer to UPDATE.791791+The write converts the head page pointer to UPDATE::845792846846- tail page847847- |848848- v849849- +---+ +---+ +---+ +---+850850-<---| |--->| |-U->| |--->| |--->851851---->| |<---| |<---| |<---| |<---852852- +---+ +---+ +---+ +---+793793+ tail page794794+ |795795+ v796796+ +---+ +---+ +---+ +---+797797+ <---| |--->| |-U->| |--->| |--->798798+ --->| |<---| |<---| |<---| |<---799799+ +---+ +---+ +---+ +---+853800854801Next writer comes in, and sees the update and sets up the new855855-head page.802802+head page::856803857857-(second writer)804804+ (second writer)858805859859- tail page860860- |861861- v862862- +---+ +---+ +---+ +---+863863-<---| |--->| |-U->| |-H->| |--->864864---->| |<---| |<---| |<---| |<---865865- +---+ +---+ +---+ +---+806806+ tail page807807+ |808808+ v809809+ +---+ +---+ +---+ +---+810810+ <---| |--->| |-U->| |-H->| |--->811811+ --->| |<---| |<---| |<---| |<---812812+ +---+ +---+ +---+ +---+866813867814The nested writer moves the tail page forward. But does not set the old868868-update page to NORMAL because it is not the outermost writer.815815+update page to NORMAL because it is not the outermost writer::869816870870- tail page871871- |872872- v873873- +---+ +---+ +---+ +---+874874-<---| |--->| |-U->| |-H->| |--->875875---->| |<---| |<---| |<---| |<---876876- +---+ +---+ +---+ +---+817817+ tail page818818+ |819819+ v820820+ +---+ +---+ +---+ +---+821821+ <---| |--->| |-U->| |-H->| |--->822822+ --->| |<---| |<---| |<---| |<---823823+ +---+ +---+ +---+ +---+877824878825Another writer preempts and sees the page after the tail page is a head page.879879-It changes it from HEAD to UPDATE.826826+It changes it from HEAD to UPDATE::880827881881-(third writer)828828+ (third writer)882829883883- tail page884884- |885885- v886886- +---+ +---+ +---+ +---+887887-<---| |--->| |-U->| |-U->| |--->888888---->| |<---| |<---| |<---| |<---889889- +---+ +---+ +---+ +---+830830+ tail page831831+ |832832+ v833833+ +---+ +---+ +---+ +---+834834+ <---| |--->| |-U->| |-U->| |--->835835+ --->| |<---| |<---| |<---| |<---836836+ +---+ +---+ +---+ +---+890837891891-The writer will move the head page forward:838838+The writer will move the head page forward::892839893840894894-(third writer)841841+ (third writer)895842896896- tail page897897- |898898- v899899- +---+ +---+ +---+ +---+900900-<---| |--->| |-U->| |-U->| |-H->901901---->| |<---| |<---| |<---| |<---902902- +---+ +---+ +---+ +---+843843+ tail page844844+ |845845+ v846846+ +---+ +---+ +---+ +---+847847+ <---| |--->| |-U->| |-U->| |-H->848848+ --->| |<---| |<---| |<---| |<---849849+ +---+ +---+ +---+ +---+903850904851But now that the third writer did change the HEAD flag to UPDATE it905905-will convert it to normal:852852+will convert it to normal::906853907854908908-(third writer)855855+ (third writer)909856910910- tail page911911- |912912- v913913- +---+ +---+ +---+ +---+914914-<---| |--->| |-U->| |--->| |-H->915915---->| |<---| |<---| |<---| |<---916916- +---+ +---+ +---+ +---+917917-918918-919919-Then it will move the tail page, and return back to the second writer.857857+ tail page858858+ |859859+ v860860+ +---+ +---+ +---+ +---+861861+ <---| |--->| |-U->| |--->| |-H->862862+ --->| |<---| |<---| |<---| |<---863863+ +---+ +---+ +---+ +---+920864921865922922-(second writer)866866+Then it will move the tail page, and return back to the second writer::923867924924- tail page925925- |926926- v927927- +---+ +---+ +---+ +---+928928-<---| |--->| |-U->| |--->| |-H->929929---->| |<---| |<---| |<---| |<---930930- +---+ +---+ +---+ +---+868868+869869+ (second writer)870870+871871+ tail page872872+ |873873+ v874874+ +---+ +---+ +---+ +---+875875+ <---| |--->| |-U->| |--->| |-H->876876+ --->| |<---| |<---| |<---| |<---877877+ +---+ +---+ +---+ +---+931878932879933880The second writer will fail to move the tail page because it was already934881moved, so it will try again and add its data to the new tail page.935935-It will return to the first writer.882882+It will return to the first writer::936883937884938938-(first writer)885885+ (first writer)939886940940- tail page941941- |942942- v943943- +---+ +---+ +---+ +---+944944-<---| |--->| |-U->| |--->| |-H->945945---->| |<---| |<---| |<---| |<---946946- +---+ +---+ +---+ +---+887887+ tail page888888+ |889889+ v890890+ +---+ +---+ +---+ +---+891891+ <---| |--->| |-U->| |--->| |-H->892892+ --->| |<---| |<---| |<---| |<---893893+ +---+ +---+ +---+ +---+947894948895The first writer cannot know atomically if the tail page moved949896while it updates the HEAD page. It will then update the head page to950950-what it thinks is the new head page.897897+what it thinks is the new head page::951898952899953953-(first writer)900900+ (first writer)954901955955- tail page956956- |957957- v958958- +---+ +---+ +---+ +---+959959-<---| |--->| |-U->| |-H->| |-H->960960---->| |<---| |<---| |<---| |<---961961- +---+ +---+ +---+ +---+902902+ tail page903903+ |904904+ v905905+ +---+ +---+ +---+ +---+906906+ <---| |--->| |-U->| |-H->| |-H->907907+ --->| |<---| |<---| |<---| |<---908908+ +---+ +---+ +---+ +---+962909963910Since the cmpxchg returns the old value of the pointer the first writer964911will see it succeeded in updating the pointer from NORMAL to HEAD.965912But as we can see, this is not good enough. It must also check to see966966-if the tail page is either where it use to be or on the next page:913913+if the tail page is either where it use to be or on the next page::967914968915969969-(first writer)916916+ (first writer)970917971971- A B tail page972972- | | |973973- v v v974974- +---+ +---+ +---+ +---+975975-<---| |--->| |-U->| |-H->| |-H->976976---->| |<---| |<---| |<---| |<---977977- +---+ +---+ +---+ +---+918918+ A B tail page919919+ | | |920920+ v v v921921+ +---+ +---+ +---+ +---+922922+ <---| |--->| |-U->| |-H->| |-H->923923+ --->| |<---| |<---| |<---| |<---924924+ +---+ +---+ +---+ +---+978925979926If tail page != A and tail page != B, then it must reset the pointer980927back to NORMAL. The fact that it only needs to worry about nested981981-writers means that it only needs to check this after setting the HEAD page.928928+writers means that it only needs to check this after setting the HEAD page::982929983930984984-(first writer)931931+ (first writer)985932986986- A B tail page987987- | | |988988- v v v989989- +---+ +---+ +---+ +---+990990-<---| |--->| |-U->| |--->| |-H->991991---->| |<---| |<---| |<---| |<---992992- +---+ +---+ +---+ +---+933933+ A B tail page934934+ | | |935935+ v v v936936+ +---+ +---+ +---+ +---+937937+ <---| |--->| |-U->| |--->| |-H->938938+ --->| |<---| |<---| |<---| |<---939939+ +---+ +---+ +---+ +---+993940994941Now the writer can update the head page. This is also why the head page must995942remain in UPDATE and only reset by the outermost writer. This prevents996996-the reader from seeing the incorrect head page.943943+the reader from seeing the incorrect head page::997944998945999999-(first writer)946946+ (first writer)100094710011001- A B tail page10021002- | | |10031003- v v v10041004- +---+ +---+ +---+ +---+10051005-<---| |--->| |--->| |--->| |-H->10061006---->| |<---| |<---| |<---| |<---10071007- +---+ +---+ +---+ +---+10081008-948948+ A B tail page949949+ | | |950950+ v v v951951+ +---+ +---+ +---+ +---+952952+ <---| |--->| |--->| |--->| |-H->953953+ --->| |<---| |<---| |<---| |<---954954+ +---+ +---+ +---+ +---+
···570570 [*] 버스 마스터링 DMA 와 일관성에 대해서는 다음을 참고하시기 바랍니다:571571572572 Documentation/driver-api/pci/pci.rst573573- Documentation/DMA-API-HOWTO.txt574574- Documentation/DMA-API.txt573573+ Documentation/core-api/dma-api-howto.rst574574+ Documentation/core-api/dma-api.rst575575576576577577데이터 의존성 배리어 (역사적)···1907190719081908 writel_relaxed() 와 같은 완화된 I/O 접근자들에 대한 자세한 내용을 위해서는19091909 "커널 I/O 배리어의 효과" 섹션을, consistent memory 에 대한 자세한 내용을19101910- 위해선 Documentation/DMA-API.txt 문서를 참고하세요.19101910+ 위해선 Documentation/core-api/dma-api.rst 문서를 참고하세요.191119111912191219131913=========================
···147147 problems with received packets if doing so would not help148148 much.149149150150- See Documentation/unaligned-memory-access.txt for more150150+ See Documentation/core-api/unaligned-memory-access.rst for more151151 information on the topic of unaligned memory accesses.152152153153config ARCH_USE_BUILTIN_BSWAP
+6-6
arch/ia64/hp/common/sba_iommu.c
···907907 * @dir: dma direction908908 * @attrs: optional dma attributes909909 *910910- * See Documentation/DMA-API-HOWTO.txt910910+ * See Documentation/core-api/dma-api-howto.rst911911 */912912static dma_addr_t sba_map_page(struct device *dev, struct page *page,913913 unsigned long poff, size_t size,···10281028 * @dir: R/W or both.10291029 * @attrs: optional dma attributes10301030 *10311031- * See Documentation/DMA-API-HOWTO.txt10311031+ * See Documentation/core-api/dma-api-howto.rst10321032 */10331033static void sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,10341034 enum dma_data_direction dir, unsigned long attrs)···11051105 * @size: number of bytes mapped in driver buffer.11061106 * @dma_handle: IOVA of new buffer.11071107 *11081108- * See Documentation/DMA-API-HOWTO.txt11081108+ * See Documentation/core-api/dma-api-howto.rst11091109 */11101110static void *11111111sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,···11621162 * @vaddr: virtual address IOVA of "consistent" buffer.11631163 * @dma_handler: IO virtual address of "consistent" buffer.11641164 *11651165- * See Documentation/DMA-API-HOWTO.txt11651165+ * See Documentation/core-api/dma-api-howto.rst11661166 */11671167static void sba_free_coherent(struct device *dev, size_t size, void *vaddr,11681168 dma_addr_t dma_handle, unsigned long attrs)···14251425 * @dir: R/W or both.14261426 * @attrs: optional dma attributes14271427 *14281428- * See Documentation/DMA-API-HOWTO.txt14281428+ * See Documentation/core-api/dma-api-howto.rst14291429 */14301430static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,14311431 int nents, enum dma_data_direction dir,···15241524 * @dir: R/W or both.15251525 * @attrs: optional dma attributes15261526 *15271527- * See Documentation/DMA-API-HOWTO.txt15271527+ * See Documentation/core-api/dma-api-howto.rst15281528 */15291529static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,15301530 int nents, enum dma_data_direction dir,
+1-1
arch/parisc/kernel/pci-dma.c
···33** PARISC 1.1 Dynamic DMA mapping support.44** This implementation is for PA-RISC platforms that do not support55** I/O TLBs (aka DMA address translation hardware).66-** See Documentation/DMA-API-HOWTO.txt for interface definitions.66+** See Documentation/core-api/dma-api-howto.rst for interface definitions.77**88** (c) Copyright 1999,2000 Hewlett-Packard Company99** (c) Copyright 2000 Grant Grundler
+2-2
arch/x86/include/asm/dma-mapping.h
···33#define _ASM_X86_DMA_MAPPING_H4455/*66- * IOMMU interface. See Documentation/DMA-API-HOWTO.txt and77- * Documentation/DMA-API.txt for documentation.66+ * IOMMU interface. See Documentation/core-api/dma-api-howto.rst and77+ * Documentation/core-api/dma-api.rst for documentation.88 */991010#include <linux/scatterlist.h>
+1-1
arch/x86/kernel/amd_gart_64.c
···66 * This allows to use PCI devices that only support 32bit addresses on systems77 * with more than 4GB.88 *99- * See Documentation/DMA-API-HOWTO.txt for the interface specification.99+ * See Documentation/core-api/dma-api-howto.rst for the interface specification.1010 *1111 * Copyright 2002 Andi Kleen, SuSE Labs.1212 */
+7-7
drivers/parisc/sba_iommu.c
···666666 * @dev: instance of PCI owned by the driver that's asking667667 * @mask: number of address bits this PCI device can handle668668 *669669- * See Documentation/DMA-API-HOWTO.txt669669+ * See Documentation/core-api/dma-api-howto.rst670670 */671671static int sba_dma_supported( struct device *dev, u64 mask)672672{···698698 * @size: number of bytes to map in driver buffer.699699 * @direction: R/W or both.700700 *701701- * See Documentation/DMA-API-HOWTO.txt701701+ * See Documentation/core-api/dma-api-howto.rst702702 */703703static dma_addr_t704704sba_map_single(struct device *dev, void *addr, size_t size,···788788 * @size: number of bytes mapped in driver buffer.789789 * @direction: R/W or both.790790 *791791- * See Documentation/DMA-API-HOWTO.txt791791+ * See Documentation/core-api/dma-api-howto.rst792792 */793793static void794794sba_unmap_page(struct device *dev, dma_addr_t iova, size_t size,···867867 * @size: number of bytes mapped in driver buffer.868868 * @dma_handle: IOVA of new buffer.869869 *870870- * See Documentation/DMA-API-HOWTO.txt870870+ * See Documentation/core-api/dma-api-howto.rst871871 */872872static void *sba_alloc(struct device *hwdev, size_t size, dma_addr_t *dma_handle,873873 gfp_t gfp, unsigned long attrs)···898898 * @vaddr: virtual address IOVA of "consistent" buffer.899899 * @dma_handler: IO virtual address of "consistent" buffer.900900 *901901- * See Documentation/DMA-API-HOWTO.txt901901+ * See Documentation/core-api/dma-api-howto.rst902902 */903903static void904904sba_free(struct device *hwdev, size_t size, void *vaddr,···933933 * @nents: number of entries in list934934 * @direction: R/W or both.935935 *936936- * See Documentation/DMA-API-HOWTO.txt936936+ * See Documentation/core-api/dma-api-howto.rst937937 */938938static int939939sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,···10171017 * @nents: number of entries in list10181018 * @direction: R/W or both.10191019 *10201020- * See Documentation/DMA-API-HOWTO.txt10201020+ * See Documentation/core-api/dma-api-howto.rst10211021 */10221022static void 10231023sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
+1-1
include/linux/dma-mapping.h
···14141515/**1616 * List of possible attributes associated with a DMA mapping. The semantics1717- * of each attribute should be defined in Documentation/DMA-attributes.txt.1717+ * of each attribute should be defined in Documentation/core-api/dma-attributes.rst.1818 */19192020/*
+1-1
include/linux/fs.h
···2829282928302830/**28312831 * file_sample_sb_err - sample the current errseq_t to test for later errors28322832- * @mapping: mapping to be sampled28322832+ * @file: file pointer to be sampled28332833 *28342834 * Grab the most current superblock-level errseq_t value for the given28352835 * struct file.
+6-4
include/linux/kcsan-checks.h
···337337 * release_for_reuse(obj);338338 * }339339 *340340- * Note: ASSERT_EXCLUSIVE_ACCESS_SCOPED(), if applicable, performs more thorough341341- * checking if a clear scope where no concurrent accesses are expected exists.340340+ * Note:342341 *343343- * Note: For cases where the object is freed, `KASAN <kasan.html>`_ is a better344344- * fit to detect use-after-free bugs.342342+ * 1. ASSERT_EXCLUSIVE_ACCESS_SCOPED(), if applicable, performs more thorough343343+ * checking if a clear scope where no concurrent accesses are expected exists.344344+ *345345+ * 2. For cases where the object is freed, `KASAN <kasan.html>`_ is a better346346+ * fit to detect use-after-free bugs.345347 *346348 * @var: variable to assert on347349 */
+2
include/linux/netdevice.h
···17421742 * @real_num_rx_queues: Number of RX queues currently active in device17431743 * @xdp_prog: XDP sockets filter program pointer17441744 * @gro_flush_timeout: timeout for GRO layer in NAPI17451745+ * @napi_defer_hard_irqs: If not zero, provides a counter that would17461746+ * allow to avoid NIC hard IRQ, on busy queues.17451747 *17461748 * @rx_handler: handler for received packets17471749 * @rx_handler_data: XXX: need comments on this one
+4
include/linux/phylink.h
···6262 * @dev: a pointer to a struct device associated with the MAC6363 * @type: operation type of PHYLINK instance6464 * @pcs_poll: MAC PCS cannot provide link change interrupt6565+ * @poll_fixed_state: if true, starts link_poll,6666+ * if MAC link is at %MLO_AN_FIXED mode.6767+ * @get_fixed_state: callback to execute to determine the fixed link state,6868+ * if MAC link is at %MLO_AN_FIXED mode.6569 */6670struct phylink_config {6771 struct device *dev;
+1-1
include/media/videobuf-dma-sg.h
···3131 * does memory allocation too using vmalloc_32().3232 *3333 * videobuf_dma_*()3434- * see Documentation/DMA-API-HOWTO.txt, these functions to3434+ * see Documentation/core-api/dma-api-howto.rst, these functions to3535 * basically the same. The map function does also build a3636 * scatterlist for the buffer (and unmap frees it ...)3737 *
+1-1
init/Kconfig
···19571957 userspace. Since that isn't generally a problem on no-MMU systems,19581958 it is normally safe to say Y here.1959195919601960- See Documentation/nommu-mmap.txt for more information.19601960+ See Documentation/mm/nommu-mmap.rst for more information.1961196119621962config SYSTEM_DATA_VERIFICATION19631963 def_bool n
+1-1
kernel/dma/debug.c
···10711071 /*10721072 * Drivers should use dma_mapping_error() to check the returned10731073 * addresses of dma_map_single() and dma_map_page().10741074- * If not, print this warning message. See Documentation/DMA-API.txt.10741074+ * If not, print this warning message. See Documentation/core-api/dma-api.rst.10751075 */10761076 if (entry->map_err_type == MAP_ERR_NOT_CHECKED) {10771077 err_printk(ref->dev, entry,
+1-1
mm/Kconfig
···387387 This option specifies the initial value of this option. The default388388 of 1 says that all excess pages should be trimmed.389389390390- See Documentation/nommu-mmap.txt for more information.390390+ See Documentation/mm/nommu-mmap.rst for more information.391391392392config TRANSPARENT_HUGEPAGE393393 bool "Transparent Hugepage Support"
+1-1
mm/nommu.c
···55 * Replacement code for mm functions to support CPU's that don't66 * have any form of memory management unit (thus no virtual memory).77 *88- * See Documentation/nommu-mmap.txt88+ * See Documentation/mm/nommu-mmap.rst99 *1010 * Copyright (c) 2004-2008 David Howells <dhowells@redhat.com>1111 * Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com>
+1
net/core/dev.c
···7898789878997899/**79007900 * netdev_get_xmit_slave - Get the xmit slave of master device79017901+ * @dev: device79017902 * @skb: The packet79027903 * @all_slaves: assume all the slaves are active79037904 *
···11// SPDX-License-Identifier: GPL-2.022/*33- * Tests Memory Protection Keys (see Documentation/vm/protection-keys.txt)33+ * Tests Memory Protection Keys (see Documentation/core-api/protection-keys.rst)44 *55 * There are examples in here of:66 * * how to set protection keys on memory