]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
docs: filesystems: convert sysfs-pci.txt to ReST
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 27 Apr 2020 21:17:17 +0000 (23:17 +0200)
committerJonathan Corbet <corbet@lwn.net>
Tue, 5 May 2020 15:22:24 +0000 (09:22 -0600)
- Add a SPDX header;
- Adjust document title;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add table markups;
- Add it to filesystems/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/2a9d307753c97d1a843341a2ef1993d43a407ded.1588021877.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/filesystems/index.rst
Documentation/filesystems/sysfs-pci.rst [moved from Documentation/filesystems/sysfs-pci.txt with 92% similarity]

index 5fb2b216620497efeefd2d53e3b4c2d2712720d4..7afb58dff43bd0c00600a316ffa27b74243812fe 100644 (file)
@@ -34,6 +34,7 @@ algorithms work.
    quota
    seq_file
    sharedsubtree
+   sysfs-pci
 
    automount-support
 
similarity index 92%
rename from Documentation/filesystems/sysfs-pci.txt
rename to Documentation/filesystems/sysfs-pci.rst
index 06f1d64c6f702fa2507b748b6feb5a6bddf20975..a265f3e2cc80ac5e7b12541e573838098e4da31f 100644 (file)
@@ -1,8 +1,11 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+============================================
 Accessing PCI device resources through sysfs
---------------------------------------------
+============================================
 
 sysfs, usually mounted at /sys, provides access to PCI resources on platforms
-that support it.  For example, a given bus might look like this:
+that support it.  For example, a given bus might look like this::
 
      /sys/devices/pci0000:17
      |-- 0000:17:00.0
@@ -30,8 +33,9 @@ This bus contains a single function device in slot 0.  The domain and bus
 numbers are reproduced for convenience.  Under the device directory are several
 files, each with their own function.
 
+       =================== =====================================================
        file               function
-       ----               --------
+       =================== =====================================================
        class              PCI class (ascii, ro)
        config             PCI config space (binary, rw)
        device             PCI device (ascii, ro)
@@ -40,13 +44,16 @@ files, each with their own function.
        local_cpus         nearby CPU mask (cpumask, ro)
        remove             remove device from kernel's list (ascii, wo)
        resource                   PCI resource host addresses (ascii, ro)
-       resource0..N       PCI resource N, if present (binary, mmap, rw[1])
+       resource0..N       PCI resource N, if present (binary, mmap, rw\ [1]_)
        resource0_wc..N_wc  PCI WC map resource N, if prefetchable (binary, mmap)
        revision                   PCI revision (ascii, ro)
        rom                PCI ROM resource, if present (binary, ro)
        subsystem_device           PCI subsystem device (ascii, ro)
        subsystem_vendor           PCI subsystem vendor (ascii, ro)
        vendor             PCI vendor (ascii, ro)
+       =================== =====================================================
+
+::
 
   ro - read only file
   rw - file is readable and writable
@@ -56,7 +63,7 @@ files, each with their own function.
   binary - file contains binary data
   cpumask - file contains a cpumask type
 
-[1] rw for RESOURCE_IO (I/O port) regions only
+.. [1] rw for RESOURCE_IO (I/O port) regions only
 
 The read only files are informational, writes to them will be ignored, with
 the exception of the 'rom' file.  Writable files can be used to perform
@@ -67,11 +74,11 @@ don't support mmapping of certain resources, so be sure to check the return
 value from any attempted mmap.  The most notable of these are I/O port
 resources, which also provide read/write access.
 
-The 'enable' file provides a counter that indicates how many times the device 
+The 'enable' file provides a counter that indicates how many times the device
 has been enabled.  If the 'enable' file currently returns '4', and a '1' is
 echoed into it, it will then return '5'.  Echoing a '0' into it will decrease
 the count.  Even when it returns to 0, though, some of the initialisation
-may not be reversed.  
+may not be reversed.
 
 The 'rom' file is special in that it provides read-only access to the device's
 ROM file, if available.  It's disabled by default, however, so applications
@@ -93,7 +100,7 @@ Accessing legacy resources through sysfs
 
 Legacy I/O port and ISA memory resources are also provided in sysfs if the
 underlying platform supports them.  They're located in the PCI class hierarchy,
-e.g.
+e.g.::
 
        /sys/class/pci_bus/0000:17/
        |-- bridge -> ../../../devices/pci0000:17