Unified · Split
| @@ -1910,6 +1910,15 @@ S: 660 Harvard Ave. #7 · 1909 unmodified lines | ||
| 1910 | 1910 | S: Santa Clara, CA 95051 |
| 1911 | 1911 | S: USA |
| 1912 | 1912 | |
| 1913 | +N: Kukjin Kim | |
| 1914 | +E: kgene@kernel.org | |
| 1915 | +D: Samsung S3C, S5P and Exynos ARM architectures | |
| 1916 | + | |
| 1917 | +N: Sangbeom Kim | |
| 1918 | +E: sbkim73@samsung.com | |
| 1919 | +D: Samsung SoC Audio (ASoC) drivers | |
| 1920 | +D: Samsung PMIC (RTC, regulators, MFD) drivers | |
| 1921 | + | |
| 1913 | 1922 | N: Russell King |
| 1914 | 1923 | E: rmk@arm.linux.org.uk |
| 1915 | 1924 | D: Linux/arm integrator, maintainer & hacker |
| @@ -32,7 +32,7 @@ The different levels of stability are: · 31 unmodified lines | ||
| 32 | 32 | layout of the files below for details on how to do this.) |
| 33 | 33 | |
| 34 | 34 | obsolete/ |
| 35 | − This directory documents interfaces that are still remaining in | |
| 35 | + This directory documents interfaces that are still remaining in | |
| 36 | 36 | the kernel, but are marked to be removed at some later point in |
| 37 | 37 | time. The description of the interface will document the reason |
| 38 | 38 | why it is obsolete and when it can be expected to be removed. |
| @@ -58,6 +58,14 @@ Users: All users of this interface who wish to be notified when · 19 unmodified lines | ||
| 58 | 58 | be changed further. |
| 59 | 59 | |
| 60 | 60 | |
| 61 | +Note: | |
| 62 | + The fields should be use a simple notation, compatible with ReST markup. | |
| 63 | + Also, the file **should not** have a top-level index, like:: | |
| 64 | + | |
| 65 | + === | |
| 66 | + foo | |
| 67 | + === | |
| 68 | + | |
| 61 | 69 | How things move between levels: |
| 62 | 70 | |
| 63 | 71 | Interfaces in stable may move to obsolete, as long as the proper |
| @@ -8,11 +8,11 @@ Description: Device DAX is the device-centric analogue of Filesystem · 7 unmodified lines | ||
| 8 | 8 | system. Device DAX is strict, precise and predictable. |
| 9 | 9 | Specifically this interface: |
| 10 | 10 | |
| 11 | − 1/ Guarantees fault granularity with respect to a given | |
| 12 | − page size (pte, pmd, or pud) set at configuration time. | |
| 11 | + 1. Guarantees fault granularity with respect to a given | |
| 12 | + page size (pte, pmd, or pud) set at configuration time. | |
| 13 | 13 | |
| 14 | − 2/ Enforces deterministic behavior by being strict about | |
| 15 | − what fault scenarios are supported. | |
| 14 | + 2. Enforces deterministic behavior by being strict about | |
| 15 | + what fault scenarios are supported. | |
| 16 | 16 | |
| 17 | 17 | The /sys/class/dax/ interface enumerates all the |
| 18 | 18 | device-dax instances in the system. The ABI is |
| @@ -7,10 +7,13 @@ Description: It is possible to switch the cpi setting of the mouse with the · 6 unmodified lines | ||
| 7 | 7 | setting reported by the mouse. This number has to be further |
| 8 | 8 | processed to receive the real dpi value: |
| 9 | 9 | |
| 10 | + ===== ==== | |
| 10 | 11 | VALUE DPI |
| 12 | + ===== ==== | |
| 11 | 13 | 1 400 |
| 12 | 14 | 2 800 |
| 13 | 15 | 4 1600 |
| 16 | + ===== ==== | |
| 14 | 17 | |
| 15 | 18 | This file is readonly. |
| 16 | 19 | Has never been used. If bookkeeping is done, it's done in userland tools. |
| @@ -13,6 +13,8 @@ Description: · 12 unmodified lines | ||
| 13 | 13 | GPIOs are identified as they are inside the kernel, using integers in |
| 14 | 14 | the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information. |
| 15 | 15 | |
| 16 | + :: | |
| 17 | + | |
| 16 | 18 | /sys/class/gpio |
| 17 | 19 | /export ... asks the kernel to export a GPIO to userspace |
| 18 | 20 | /unexport ... to return a GPIO to the kernel |
| @@ -5,6 +5,7 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | devfs has been unmaintained for a number of years, has unfixable |
| 6 | 6 | races, contains a naming policy within the kernel that is |
| 7 | 7 | against the LSB, and can be replaced by using udev. |
| 8 | + | |
| 8 | 9 | The files fs/devfs/*, include/linux/devfs_fs*.h were removed, |
| 9 | 10 | along with the assorted devfs function calls throughout the |
| 10 | 11 | kernel tree. |
| @@ -7,6 +7,7 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | to implement sensible device security policies, and its low level |
| 8 | 8 | of abstraction that required userspace clients to duplicate much |
| 9 | 9 | of the kernel's ieee1394 core functionality. |
| 10 | + | |
| 10 | 11 | Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of |
| 11 | 12 | firewire-core. |
| 12 | 13 | |
| @@ -10,4 +10,4 @@ Description: This file was deprecated because there no longer was a way to · 9 unmodified lines | ||
| 10 | 10 | claim just control over a single rfkill instance. |
| 11 | 11 | This file was scheduled to be removed in 2012, and was removed |
| 12 | 12 | in 2016. |
| 13 | −Values: 0: Kernel handles events | |
| 13 | +Values: 0: Kernel handles events | |
| @@ -8,6 +8,7 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | performance issues in its first generation. Any video1394 user had |
| 9 | 9 | to use raw1394 + libraw1394 too because video1394 did not provide |
| 10 | 10 | asynchronous I/O for device discovery and configuration. |
| 11 | + | |
| 11 | 12 | Replaced by /dev/fw*, i.e. the <linux/firewire-cdev.h> ABI of |
| 12 | 13 | firewire-core. |
| 13 | 14 | |
| @@ -14,13 +14,17 @@ Description: · 13 unmodified lines | ||
| 14 | 14 | Each /dev/fw* is associated with one IEEE 1394 node, which can |
| 15 | 15 | be remote or local nodes. Operations on a /dev/fw* file have |
| 16 | 16 | different scope: |
| 17 | + | |
| 17 | 18 | - The 1394 node which is associated with the file: |
| 19 | + | |
| 18 | 20 | - Asynchronous request transmission |
| 19 | 21 | - Get the Configuration ROM |
| 20 | 22 | - Query node ID |
| 21 | 23 | - Query maximum speed of the path between this node |
| 22 | 24 | and local node |
| 25 | + | |
| 23 | 26 | - The 1394 bus (i.e. "card") to which the node is attached to: |
| 27 | + | |
| 24 | 28 | - Isochronous stream transmission and reception |
| 25 | 29 | - Asynchronous stream transmission and reception |
| 26 | 30 | - Asynchronous broadcast request transmission |
| @@ -31,7 +35,9 @@ Description: · 4 unmodified lines | ||
| 31 | 35 | manager |
| 32 | 36 | - Query cycle time |
| 33 | 37 | - Bus reset initiation, bus reset event reception |
| 38 | + | |
| 34 | 39 | - All 1394 buses: |
| 40 | + | |
| 35 | 41 | - Allocation of IEEE 1212 address ranges on the local |
| 36 | 42 | link layers, reception of inbound requests to such |
| 37 | 43 | an address range, asynchronous response transmission |
| @@ -43,6 +49,7 @@ Description: · 5 unmodified lines | ||
| 43 | 49 | userland implement different access permission models, some |
| 44 | 50 | operations are restricted to /dev/fw* files that are associated |
| 45 | 51 | with a local node: |
| 52 | + | |
| 46 | 53 | - Addition of descriptors or directories to the local |
| 47 | 54 | nodes' Configuration ROM |
| 48 | 55 | - PHY packet transmission and reception |
| @@ -55,50 +62,50 @@ Description: · 6 unmodified lines | ||
| 55 | 62 | The following file operations are supported: |
| 56 | 63 | |
| 57 | 64 | open(2) |
| 58 | − Currently the only useful flags are O_RDWR. | |
| 65 | + Currently the only useful flags are O_RDWR. | |
| 59 | 66 | |
| 60 | 67 | ioctl(2) |
| 61 | − Initiate various actions. Some take immediate effect, others | |
| 62 | − are performed asynchronously while or after the ioctl returns. | |
| 63 | − See the inline documentation in <linux/firewire-cdev.h> for | |
| 64 | − descriptions of all ioctls. | |
| 68 | + Initiate various actions. Some take immediate effect, others | |
| 69 | + are performed asynchronously while or after the ioctl returns. | |
| 70 | + See the inline documentation in <linux/firewire-cdev.h> for | |
| 71 | + descriptions of all ioctls. | |
| 65 | 72 | |
| 66 | 73 | poll(2), select(2), epoll_wait(2) etc. |
| 67 | − Watch for events to become available to be read. | |
| 74 | + Watch for events to become available to be read. | |
| 68 | 75 | |
| 69 | 76 | read(2) |
| 70 | − Receive various events. There are solicited events like | |
| 71 | − outbound asynchronous transaction completion or isochronous | |
| 72 | − buffer completion, and unsolicited events such as bus resets, | |
| 73 | − request reception, or PHY packet reception. Always use a read | |
| 74 | − buffer which is large enough to receive the largest event that | |
| 75 | − could ever arrive. See <linux/firewire-cdev.h> for descriptions | |
| 76 | − of all event types and for which ioctls affect reception of | |
| 77 | − events. | |
| 77 | + Receive various events. There are solicited events like | |
| 78 | + outbound asynchronous transaction completion or isochronous | |
| 79 | + buffer completion, and unsolicited events such as bus resets, | |
| 80 | + request reception, or PHY packet reception. Always use a read | |
| 81 | + buffer which is large enough to receive the largest event that | |
| 82 | + could ever arrive. See <linux/firewire-cdev.h> for descriptions | |
| 83 | + of all event types and for which ioctls affect reception of | |
| 84 | + events. | |
| 78 | 85 | |
| 79 | 86 | mmap(2) |
| 80 | − Allocate a DMA buffer for isochronous reception or transmission | |
| 81 | − and map it into the process address space. The arguments should | |
| 82 | − be used as follows: addr = NULL, length = the desired buffer | |
| 83 | − size, i.e. number of packets times size of largest packet, | |
| 84 | − prot = at least PROT_READ for reception and at least PROT_WRITE | |
| 85 | − for transmission, flags = MAP_SHARED, fd = the handle to the | |
| 86 | − /dev/fw*, offset = 0. | |
| 87 | + Allocate a DMA buffer for isochronous reception or transmission | |
| 88 | + and map it into the process address space. The arguments should | |
| 89 | + be used as follows: addr = NULL, length = the desired buffer | |
| 90 | + size, i.e. number of packets times size of largest packet, | |
| 91 | + prot = at least PROT_READ for reception and at least PROT_WRITE | |
| 92 | + for transmission, flags = MAP_SHARED, fd = the handle to the | |
| 93 | + /dev/fw*, offset = 0. | |
| 87 | 94 | |
| 88 | 95 | Isochronous reception works in packet-per-buffer fashion except |
| 89 | 96 | for multichannel reception which works in buffer-fill mode. |
| 90 | 97 | |
| 91 | 98 | munmap(2) |
| 92 | − Unmap the isochronous I/O buffer from the process address space. | |
| 99 | + Unmap the isochronous I/O buffer from the process address space. | |
| 93 | 100 | |
| 94 | 101 | close(2) |
| 95 | − Besides stopping and freeing I/O contexts that were associated | |
| 96 | − with the file descriptor, back out any changes to the local | |
| 97 | − nodes' Configuration ROM. Deallocate isochronous channels and | |
| 98 | − bandwidth at the IRM that were marked for kernel-assisted | |
| 99 | − re- and deallocation. | |
| 100 | − | |
| 101 | −Users: libraw1394 | |
| 102 | − libdc1394 | |
| 103 | − libhinawa | |
| 102 | + Besides stopping and freeing I/O contexts that were associated | |
| 103 | + with the file descriptor, back out any changes to the local | |
| 104 | + nodes' Configuration ROM. Deallocate isochronous channels and | |
| 105 | + bandwidth at the IRM that were marked for kernel-assisted | |
| 106 | + re- and deallocation. | |
| 107 | + | |
| 108 | +Users: libraw1394; | |
| 109 | + libdc1394; | |
| 110 | + libhinawa; | |
| 104 | 111 | tools like linux-firewire-utils, fwhack, ... |
| @@ -1,22 +1,26 @@ | ||
| 1 | −What: /sys/firmware/acpi/pm_profile | |
| 1 | +What: /sys/firmware/acpi/pm_profile | |
| 2 | 2 | Date: 03-Nov-2011 |
| 3 | 3 | KernelVersion: v3.2 |
| 4 | 4 | Contact: linux-acpi@vger.kernel.org |
| 5 | −Description: The ACPI pm_profile sysfs interface exports the platform | |
| 5 | +Description: The ACPI pm_profile sysfs interface exports the platform | |
| 6 | 6 | power management (and performance) requirement expectations |
| 7 | 7 | as provided by BIOS. The integer value is directly passed as |
| 8 | 8 | retrieved from the FADT ACPI table. |
| 9 | −Values: For possible values see ACPI specification: | |
| 9 | + | |
| 10 | +Values: For possible values see ACPI specification: | |
| 10 | 11 | 5.2.9 Fixed ACPI Description Table (FADT) |
| 11 | 12 | Field: Preferred_PM_Profile |
| 12 | 13 | |
| 13 | 14 | Currently these values are defined by spec: |
| 14 | − 0 Unspecified | |
| 15 | − 1 Desktop | |
| 16 | − 2 Mobile | |
| 17 | − 3 Workstation | |
| 18 | − 4 Enterprise Server | |
| 19 | − 5 SOHO Server | |
| 20 | − 6 Appliance PC | |
| 21 | − 7 Performance Server | |
| 15 | + | |
| 16 | + == ================= | |
| 17 | + 0 Unspecified | |
| 18 | + 1 Desktop | |
| 19 | + 2 Mobile | |
| 20 | + 3 Workstation | |
| 21 | + 4 Enterprise Server | |
| 22 | + 5 SOHO Server | |
| 23 | + 6 Appliance PC | |
| 24 | + 7 Performance Server | |
| 22 | 25 | >7 Reserved |
| 26 | + == ================= | |
| @@ -47,6 +47,7 @@ Description: · 46 unmodified lines | ||
| 47 | 47 | IEEE 1394 node device attribute. |
| 48 | 48 | Read-only and immutable. |
| 49 | 49 | Values: 1: The sysfs entry represents a local node (a controller card). |
| 50 | + | |
| 50 | 51 | 0: The sysfs entry represents a remote node. |
| 51 | 52 | |
| 52 | 53 | |
| @@ -125,7 +126,9 @@ Description: · 72 unmodified lines | ||
| 125 | 126 | Read-only attribute, immutable during the target's lifetime. |
| 126 | 127 | Format, as exposed by firewire-sbp2 since 2.6.22, May 2007: |
| 127 | 128 | Colon-separated hexadecimal string representations of |
| 129 | + | |
| 128 | 130 | u64 EUI-64 : u24 directory_ID : u16 LUN |
| 131 | + | |
| 129 | 132 | without 0x prefixes, without whitespace. The former sbp2 driver |
| 130 | 133 | (removed in 2.6.37 after being superseded by firewire-sbp2) used |
| 131 | 134 | a somewhat shorter format which was not as close to SAM. |
| @@ -9,13 +9,14 @@ Description: · 8 unmodified lines | ||
| 9 | 9 | Note: This file is only present if CONFIG_NVMEM_SYSFS |
| 10 | 10 | is enabled |
| 11 | 11 | |
| 12 | − ex: | |
| 13 | − hexdump /sys/bus/nvmem/devices/qfprom0/nvmem | |
| 12 | + ex:: | |
| 14 | 13 | |
| 15 | − 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | |
| 16 | − * | |
| 17 | − 00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00 | |
| 18 | − 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | |
| 19 | − ... | |
| 20 | − * | |
| 21 | − 0001000 | |
| 14 | + hexdump /sys/bus/nvmem/devices/qfprom0/nvmem | |
| 15 | + | |
| 16 | + 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | |
| 17 | + * | |
| 18 | + 00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00 | |
| 19 | + 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | |
| 20 | + ... | |
| 21 | + * | |
| 22 | + 0001000 | |
| @@ -50,8 +50,10 @@ Description: · 49 unmodified lines | ||
| 50 | 50 | |
| 51 | 51 | Tools can use this file and the connected_duration file to |
| 52 | 52 | compute the percentage of time that a device has been active. |
| 53 | − For example, | |
| 54 | − echo $((100 * `cat active_duration` / `cat connected_duration`)) | |
| 53 | + For example:: | |
| 54 | + | |
| 55 | + echo $((100 * `cat active_duration` / `cat connected_duration`)) | |
| 56 | + | |
| 55 | 57 | will give an integer percentage. Note that this does not |
| 56 | 58 | account for counter wrap. |
| 57 | 59 | Users: |
| @@ -63,13 +63,6 @@ Contact: Stephen Hemminger <sthemmin@microsoft.com> · 62 unmodified lines | ||
| 63 | 63 | Description: VCPU (sub)channel is affinitized to |
| 64 | 64 | Users: tools/hv/lsvmbus and other debugging tools |
| 65 | 65 | |
| 66 | −What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu | |
| 67 | −Date: September. 2017 | |
| 68 | −KernelVersion: 4.14 | |
| 69 | −Contact: Stephen Hemminger <sthemmin@microsoft.com> | |
| 70 | −Description: VCPU (sub)channel is affinitized to | |
| 71 | −Users: tools/hv/lsvmbus and other debugging tools | |
| 72 | − | |
| 73 | 66 | What: /sys/bus/vmbus/devices/<UUID>/channels/<N>/in_mask |
| 74 | 67 | Date: September. 2017 |
| 75 | 68 | KernelVersion: 4.14 |
| @@ -6,6 +6,7 @@ Description: Bus scanning interval, microseconds component. · 5 unmodified lines | ||
| 6 | 6 | control systems are attached/generate presence for as short as |
| 7 | 7 | 100 ms - hence the tens-to-hundreds milliseconds scan intervals |
| 8 | 8 | are required. |
| 9 | + | |
| 9 | 10 | see Documentation/w1/w1-generic.rst for detailed information. |
| 10 | 11 | Users: any user space application which wants to know bus scanning |
| 11 | 12 | interval |
| @@ -4,6 +4,7 @@ KernelVersion: 2.6.12 · 3 unmodified lines | ||
| 4 | 4 | Contact: Richard Purdie <rpurdie@rpsys.net> |
| 5 | 5 | Description: |
| 6 | 6 | Control BACKLIGHT power, values are FB_BLANK_* from fb.h |
| 7 | + | |
| 7 | 8 | - FB_BLANK_UNBLANK (0) : power on. |
| 8 | 9 | - FB_BLANK_POWERDOWN (4) : power off |
| 9 | 10 | Users: HAL |
| @@ -8,12 +8,14 @@ Date: Apr, 2005 · 7 unmodified lines | ||
| 8 | 8 | KernelVersion: v2.6.12 |
| 9 | 9 | Contact: linux-rdma@vger.kernel.org |
| 10 | 10 | Description: |
| 11 | + =============== =========================================== | |
| 11 | 12 | node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, |
| 12 | 13 | switch or router) |
| 13 | 14 | |
| 14 | 15 | node_guid: (RO) Node GUID |
| 15 | 16 | |
| 16 | 17 | sys_image_guid: (RO) System image GUID |
| 18 | + =============== =========================================== | |
| 17 | 19 | |
| 18 | 20 | |
| 19 | 21 | What: /sys/class/infiniband/<device>/node_desc |
| @@ -47,6 +49,7 @@ KernelVersion: v2.6.12 · 27 unmodified lines | ||
| 47 | 49 | Contact: linux-rdma@vger.kernel.org |
| 48 | 50 | Description: |
| 49 | 51 | |
| 52 | + =============== =============================================== | |
| 50 | 53 | lid: (RO) Port LID |
| 51 | 54 | |
| 52 | 55 | rate: (RO) Port data rate (active width * active |
| @@ -66,8 +69,9 @@ Description: · 13 unmodified lines | ||
| 66 | 69 | |
| 67 | 70 | cap_mask: (RO) Port capability mask. 2 bits here are |
| 68 | 71 | settable- IsCommunicationManagementSupported |
| 69 | − (set when CM module is loaded) and IsSM (set via | |
| 70 | − open of issmN file). | |
| 72 | + (set when CM module is loaded) and IsSM (set | |
| 73 | + via open of issmN file). | |
| 74 | + =============== =============================================== | |
| 71 | 75 | |
| 72 | 76 | |
| 73 | 77 | What: /sys/class/infiniband/<device>/ports/<port-num>/link_layer |
| @@ -103,8 +107,7 @@ Date: Apr, 2005 · 29 unmodified lines | ||
| 103 | 107 | KernelVersion: v2.6.12 |
| 104 | 108 | Contact: linux-rdma@vger.kernel.org |
| 105 | 109 | Description: |
| 106 | − Errors info: | |
| 107 | − ----------- | |
| 110 | + **Errors info**: | |
| 108 | 111 | |
| 109 | 112 | symbol_error: (RO) Total number of minor link errors detected on |
| 110 | 113 | one or more physical lanes. |
| @@ -142,8 +145,7 @@ Description: · 31 unmodified lines | ||
| 142 | 145 | intervention. It can also indicate hardware issues or extremely |
| 143 | 146 | poor link signal integrity |
| 144 | 147 | |
| 145 | − Data info: | |
| 146 | − --------- | |
| 148 | + **Data info**: | |
| 147 | 149 | |
| 148 | 150 | port_xmit_data: (RO) Total number of data octets, divided by 4 |
| 149 | 151 | (lanes), transmitted on all VLs. This is 64 bit counter |
| @@ -176,8 +178,7 @@ Description: · 26 unmodified lines | ||
| 176 | 178 | transmitted on all VLs from the port. This may include multicast |
| 177 | 179 | packets with errors. |
| 178 | 180 | |
| 179 | − Misc info: | |
| 180 | − --------- | |
| 181 | + **Misc info**: | |
| 181 | 182 | |
| 182 | 183 | port_xmit_discards: (RO) Total number of outbound packets |
| 183 | 184 | discarded by the port because the port is down or congested. |
| @@ -244,9 +245,11 @@ Description: · 60 unmodified lines | ||
| 244 | 245 | two umad devices and two issm devices, while a switch will have |
| 245 | 246 | one device of each type (for switch port 0). |
| 246 | 247 | |
| 248 | + ======= ===================================== | |
| 247 | 249 | ibdev: (RO) Show Infiniband (IB) device name |
| 248 | 250 | |
| 249 | 251 | port: (RO) Display port number |
| 252 | + ======= ===================================== | |
| 250 | 253 | |
| 251 | 254 | |
| 252 | 255 | What: /sys/class/infiniband_mad/abi_version |
| @@ -264,10 +267,12 @@ Date: Sept, 2005 · 11 unmodified lines | ||
| 264 | 267 | KernelVersion: v2.6.14 |
| 265 | 268 | Contact: linux-rdma@vger.kernel.org |
| 266 | 269 | Description: |
| 270 | + =============== =========================================== | |
| 267 | 271 | ibdev: (RO) Display Infiniband (IB) device name |
| 268 | 272 | |
| 269 | 273 | abi_version: (RO) Show ABI version of IB device specific |
| 270 | 274 | interfaces. |
| 275 | + =============== =========================================== | |
| 271 | 276 | |
| 272 | 277 | |
| 273 | 278 | What: /sys/class/infiniband_verbs/abi_version |
| @@ -289,12 +294,14 @@ Date: Apr, 2005 · 15 unmodified lines | ||
| 289 | 294 | KernelVersion: v2.6.12 |
| 290 | 295 | Contact: linux-rdma@vger.kernel.org |
| 291 | 296 | Description: |
| 297 | + =============== ================================================ | |
| 292 | 298 | hw_rev: (RO) Hardware revision number |
| 293 | 299 | |
| 294 | 300 | hca_type: (RO) Host Channel Adapter type: MT23108, MT25208 |
| 295 | 301 | (MT23108 compat mode), MT25208 or MT25204 |
| 296 | 302 | |
| 297 | 303 | board_id: (RO) Manufacturing board ID |
| 304 | + =============== ================================================ | |
| 298 | 305 | |
| 299 | 306 | |
| 300 | 307 | sysfs interface for Mellanox ConnectX HCA IB driver (mlx4) |
| @@ -307,11 +314,13 @@ Date: Sep, 2007 · 6 unmodified lines | ||
| 307 | 314 | KernelVersion: v2.6.24 |
| 308 | 315 | Contact: linux-rdma@vger.kernel.org |
| 309 | 316 | Description: |
| 317 | + =============== =============================== | |
| 310 | 318 | hw_rev: (RO) Hardware revision number |
| 311 | 319 | |
| 312 | 320 | hca_type: (RO) Host channel adapter type |
| 313 | 321 | |
| 314 | 322 | board_id: (RO) Manufacturing board ID |
| 323 | + =============== =============================== | |
| 315 | 324 | |
| 316 | 325 | |
| 317 | 326 | What: /sys/class/infiniband/mlx4_X/iov/ports/<port-num>/gids/<n> |
| @@ -337,6 +346,7 @@ Description: · 19 unmodified lines | ||
| 337 | 346 | example, ports/1/pkeys/10 contains the value at index 10 in port |
| 338 | 347 | 1's P_Key table. |
| 339 | 348 | |
| 349 | + ======================= ========================================== | |
| 340 | 350 | gids/<n>: (RO) The physical port gids n = 0..127 |
| 341 | 351 | |
| 342 | 352 | admin_guids/<n>: (RW) Allows examining or changing the |
| @@ -365,6 +375,7 @@ Description: · 22 unmodified lines | ||
| 365 | 375 | guest, whenever it uses its pkey index |
| 366 | 376 | 1, will actually be using the real pkey |
| 367 | 377 | index 10. |
| 378 | + ======================= ========================================== | |
| 368 | 379 | |
| 369 | 380 | |
| 370 | 381 | What: /sys/class/infiniband/mlx4_X/iov/<pci-slot-num>/ports/<m>/smi_enabled |
| @@ -376,12 +387,14 @@ Description: · 5 unmodified lines | ||
| 376 | 387 | Enabling QP0 on VFs for selected VF/port. By default, no VFs are |
| 377 | 388 | enabled for QP0 operation. |
| 378 | 389 | |
| 379 | − smi_enabled: (RO) Indicates whether smi is currently enabled | |
| 380 | − for the indicated VF/port | |
| 390 | + ================= ==== =========================================== | |
| 391 | + smi_enabled: (RO) Indicates whether smi is currently enabled | |
| 392 | + for the indicated VF/port | |
| 381 | 393 | |
| 382 | − enable_smi_admin:(RW) Used by the admin to request that smi | |
| 383 | − capability be enabled or disabled for the | |
| 384 | − indicated VF/port. 0 = disable, 1 = enable. | |
| 394 | + enable_smi_admin: (RW) Used by the admin to request that smi | |
| 395 | + capability be enabled or disabled for the | |
| 396 | + indicated VF/port. 0 = disable, 1 = enable. | |
| 397 | + ================= ==== =========================================== | |
| 385 | 398 | |
| 386 | 399 | The requested enablement will occur at the next reset of the VF |
| 387 | 400 | (e.g. driver restart on the VM which owns the VF). |
| @@ -398,6 +411,7 @@ KernelVersion: v2.6.35 · 10 unmodified lines | ||
| 398 | 411 | Contact: linux-rdma@vger.kernel.org |
| 399 | 412 | Description: |
| 400 | 413 | |
| 414 | + =============== ============================================= | |
| 401 | 415 | hw_rev: (RO) Hardware revision number |
| 402 | 416 | |
| 403 | 417 | hca_type: (RO) Driver short name. Should normally match |
| @@ -406,6 +420,7 @@ Description: · 2 unmodified lines | ||
| 406 | 420 | |
| 407 | 421 | board_id: (RO) Manufacturing board id. (Vendor + device |
| 408 | 422 | information) |
| 423 | + =============== ============================================= | |
| 409 | 424 | |
| 410 | 425 | |
| 411 | 426 | sysfs interface for Intel IB driver qib |
| @@ -426,6 +441,7 @@ Date: May, 2010 · 14 unmodified lines | ||
| 426 | 441 | KernelVersion: v2.6.35 |
| 427 | 442 | Contact: linux-rdma@vger.kernel.org |
| 428 | 443 | Description: |
| 444 | + =============== ====================================================== | |
| 429 | 445 | version: (RO) Display version information of installed software |
| 430 | 446 | and drivers. |
| 431 | 447 | |
| @@ -452,6 +468,7 @@ Description: · 20 unmodified lines | ||
| 452 | 468 | chip_reset: (WO) Reset the chip if possible by writing |
| 453 | 469 | "reset" to this file. Only allowed if no user |
| 454 | 470 | contexts are open that use chip resources. |
| 471 | + =============== ====================================================== | |
| 455 | 472 | |
| 456 | 473 | |
| 457 | 474 | What: /sys/class/infiniband/qibX/ports/N/sl2vl/[0-15] |
| @@ -471,14 +488,16 @@ Contact: linux-rdma@vger.kernel.org · 13 unmodified lines | ||
| 471 | 488 | Description: |
| 472 | 489 | Per-port congestion control. Both are binary attributes. |
| 473 | 490 | |
| 474 | − cc_table_bin: (RO) Congestion control table size followed by | |
| 491 | + =============== ================================================ | |
| 492 | + cc_table_bin (RO) Congestion control table size followed by | |
| 475 | 493 | table entries. |
| 476 | 494 | |
| 477 | − cc_settings_bin:(RO) Congestion settings: port control, control | |
| 495 | + cc_settings_bin (RO) Congestion settings: port control, control | |
| 478 | 496 | map and an array of 16 entries for the |
| 479 | 497 | congestion entries - increase, timer, event log |
| 480 | 498 | trigger threshold and the minimum injection rate |
| 481 | 499 | delay. |
| 500 | + =============== ================================================ | |
| 482 | 501 | |
| 483 | 502 | What: /sys/class/infiniband/qibX/ports/N/linkstate/loopback |
| 484 | 503 | What: /sys/class/infiniband/qibX/ports/N/linkstate/led_override |
| @@ -491,6 +510,7 @@ Contact: linux-rdma@vger.kernel.org · 6 unmodified lines | ||
| 491 | 510 | Description: |
| 492 | 511 | [to be documented] |
| 493 | 512 | |
| 513 | + =============== =============================================== | |
| 494 | 514 | loopback: (WO) |
| 495 | 515 | led_override: (WO) |
| 496 | 516 | hrtbt_enable: (RW) |
| @@ -501,6 +521,7 @@ Description: · 4 unmodified lines | ||
| 501 | 521 | errors. Possible states are- "Initted", |
| 502 | 522 | "Present", "IB_link_up", "IB_configured" or |
| 503 | 523 | "Fatal_Hardware_Error". |
| 524 | + =============== =============================================== | |
| 504 | 525 | |
| 505 | 526 | What: /sys/class/infiniband/qibX/ports/N/diag_counters/rc_resends |
| 506 | 527 | What: /sys/class/infiniband/qibX/ports/N/diag_counters/seq_naks |
| @@ -549,6 +570,7 @@ Contact: Christian Benvenuti <benve@cisco.com>, · 42 unmodified lines | ||
| 549 | 570 | linux-rdma@vger.kernel.org |
| 550 | 571 | Description: |
| 551 | 572 | |
| 573 | + =============== =============================================== | |
| 552 | 574 | board_id: (RO) Manufacturing board id |
| 553 | 575 | |
| 554 | 576 | config: (RO) Report the configuration for this PF |
| @@ -561,6 +583,7 @@ Description: · 6 unmodified lines | ||
| 561 | 583 | |
| 562 | 584 | iface: (RO) Shows which network interface this usNIC |
| 563 | 585 | entry is associated to (visible with ifconfig). |
| 586 | + =============== =============================================== | |
| 564 | 587 | |
| 565 | 588 | What: /sys/class/infiniband/usnic_X/qpn/summary |
| 566 | 589 | What: /sys/class/infiniband/usnic_X/qpn/context |
| @@ -605,6 +628,7 @@ Date: May, 2016 · 38 unmodified lines | ||
| 605 | 628 | KernelVersion: v4.6 |
| 606 | 629 | Contact: linux-rdma@vger.kernel.org |
| 607 | 630 | Description: |
| 631 | + =============== ============================================= | |
| 608 | 632 | hw_rev: (RO) Hardware revision number |
| 609 | 633 | |
| 610 | 634 | board_id: (RO) Manufacturing board id |
| @@ -623,6 +647,7 @@ Description: · 12 unmodified lines | ||
| 623 | 647 | available. |
| 624 | 648 | |
| 625 | 649 | tempsense: (RO) Thermal sense information |
| 650 | + =============== ============================================= | |
| 626 | 651 | |
| 627 | 652 | |
| 628 | 653 | What: /sys/class/infiniband/hfi1_X/ports/N/CCMgtA/cc_settings_bin |
| @@ -634,19 +659,21 @@ Contact: linux-rdma@vger.kernel.org · 5 unmodified lines | ||
| 634 | 659 | Description: |
| 635 | 660 | Per-port congestion control. |
| 636 | 661 | |
| 637 | − cc_table_bin: (RO) CCA tables used by PSM2 Congestion control | |
| 662 | + =============== ================================================ | |
| 663 | + cc_table_bin (RO) CCA tables used by PSM2 Congestion control | |
| 638 | 664 | table size followed by table entries. Binary |
| 639 | 665 | attribute. |
| 640 | 666 | |
| 641 | − cc_settings_bin:(RO) Congestion settings: port control, control | |
| 667 | + cc_settings_bin (RO) Congestion settings: port control, control | |
| 642 | 668 | map and an array of 16 entries for the |
| 643 | 669 | congestion entries - increase, timer, event log |
| 644 | 670 | trigger threshold and the minimum injection rate |
| 645 | 671 | delay. Binary attribute. |
| 646 | 672 | |
| 647 | − cc_prescan: (RW) enable prescanning for faster BECN | |
| 673 | + cc_prescan (RW) enable prescanning for faster BECN | |
| 648 | 674 | response. Write "on" to enable and "off" to |
| 649 | 675 | disable. |
| 676 | + =============== ================================================ | |
| 650 | 677 | |
| 651 | 678 | What: /sys/class/infiniband/hfi1_X/ports/N/sc2vl/[0-31] |
| 652 | 679 | What: /sys/class/infiniband/hfi1_X/ports/N/sl2sc/[0-31] |
| @@ -655,11 +682,13 @@ Date: May, 2016 · 2 unmodified lines | ||
| 655 | 682 | KernelVersion: v4.6 |
| 656 | 683 | Contact: linux-rdma@vger.kernel.org |
| 657 | 684 | Description: |
| 685 | + =============== =================================================== | |
| 658 | 686 | sc2vl/: (RO) 32 files (0 - 31) used to translate sl->vl |
| 659 | 687 | |
| 660 | 688 | sl2sc/: (RO) 32 files (0 - 31) used to translate sl->sc |
| 661 | 689 | |
| 662 | 690 | vl2mtu/: (RO) 16 files (0 - 15) used to determine MTU for vl |
| 691 | + =============== =================================================== | |
| 663 | 692 | |
| 664 | 693 | |
| 665 | 694 | What: /sys/class/infiniband/hfi1_X/sdma_N/cpu_list |
| @@ -670,26 +699,28 @@ Contact: linux-rdma@vger.kernel.org · 4 unmodified lines | ||
| 670 | 699 | Description: |
| 671 | 700 | sdma<N>/ contains one directory per sdma engine (0 - 15) |
| 672 | 701 | |
| 702 | + =============== ============================================== | |
| 673 | 703 | cpu_list: (RW) List of cpus for user-process to sdma |
| 674 | 704 | engine assignment. |
| 675 | 705 | |
| 676 | 706 | vl: (RO) Displays the virtual lane (vl) the sdma |
| 677 | 707 | engine maps to. |
| 708 | + =============== ============================================== | |
| 678 | 709 | |
| 679 | 710 | This interface gives the user control on the affinity settings |
| 680 | 711 | for the device. As an example, to set an sdma engine irq |
| 681 | 712 | affinity and thread affinity of a user processes to use the |
| 682 | 713 | sdma engine, which is "near" in terms of NUMA configuration, or |
| 683 | − physical cpu location, the user will do: | |
| 714 | + physical cpu location, the user will do:: | |
| 684 | 715 | |
| 685 | − echo "3" > /proc/irq/<N>/smp_affinity_list | |
| 686 | − echo "4-7" > /sys/devices/.../sdma3/cpu_list | |
| 687 | − cat /sys/devices/.../sdma3/vl | |
| 688 | − 0 | |
| 689 | − echo "8" > /proc/irq/<M>/smp_affinity_list | |
| 690 | − echo "9-12" > /sys/devices/.../sdma4/cpu_list | |
| 691 | − cat /sys/devices/.../sdma4/vl | |
| 692 | − 1 | |
| 716 | + echo "3" > /proc/irq/<N>/smp_affinity_list | |
| 717 | + echo "4-7" > /sys/devices/.../sdma3/cpu_list | |
| 718 | + cat /sys/devices/.../sdma3/vl | |
| 719 | + 0 | |
| 720 | + echo "8" > /proc/irq/<M>/smp_affinity_list | |
| 721 | + echo "9-12" > /sys/devices/.../sdma4/cpu_list | |
| 722 | + cat /sys/devices/.../sdma4/vl | |
| 723 | + 1 | |
| 693 | 724 | |
| 694 | 725 | to make sure that when a process runs on cpus 4,5,6, or 7, and |
| 695 | 726 | uses vl=0, then sdma engine 3 is selected by the driver, and |
| @@ -711,11 +742,13 @@ Date: Jan, 2016 · 15 unmodified lines | ||
| 711 | 742 | KernelVersion: v4.10 |
| 712 | 743 | Contact: linux-rdma@vger.kernel.org |
| 713 | 744 | Description: |
| 745 | + =============== ==== ======================== | |
| 714 | 746 | hw_rev: (RO) Hardware revision number |
| 715 | 747 | |
| 716 | 748 | hca_type: (RO) Show HCA type (I40IW) |
| 717 | 749 | |
| 718 | 750 | board_id: (RO) I40IW board ID |
| 751 | + =============== ==== ======================== | |
| 719 | 752 | |
| 720 | 753 | |
| 721 | 754 | sysfs interface for QLogic qedr NIC Driver |
| @@ -728,9 +761,11 @@ KernelVersion: v4.10 · 6 unmodified lines | ||
| 728 | 761 | Contact: linux-rdma@vger.kernel.org |
| 729 | 762 | Description: |
| 730 | 763 | |
| 764 | + =============== ==== ======================== | |
| 731 | 765 | hw_rev: (RO) Hardware revision number |
| 732 | 766 | |
| 733 | 767 | hca_type: (RO) Display HCA type |
| 768 | + =============== ==== ======================== | |
| 734 | 769 | |
| 735 | 770 | |
| 736 | 771 | sysfs interface for VMware Paravirtual RDMA driver |
| @@ -744,11 +779,13 @@ KernelVersion: v4.10 · 7 unmodified lines | ||
| 744 | 779 | Contact: linux-rdma@vger.kernel.org |
| 745 | 780 | Description: |
| 746 | 781 | |
| 782 | + =============== ==== ===================================== | |
| 747 | 783 | hw_rev: (RO) Hardware revision number |
| 748 | 784 | |
| 749 | 785 | hca_type: (RO) Host channel adapter type |
| 750 | 786 | |
| 751 | 787 | board_id: (RO) Display PVRDMA manufacturing board ID |
| 788 | + =============== ==== ===================================== | |
| 752 | 789 | |
| 753 | 790 | |
| 754 | 791 | sysfs interface for Broadcom NetXtreme-E RoCE driver |
| @@ -760,6 +797,8 @@ Date: Feb, 2017 · 5 unmodified lines | ||
| 760 | 797 | KernelVersion: v4.11 |
| 761 | 798 | Contact: linux-rdma@vger.kernel.org |
| 762 | 799 | Description: |
| 800 | + =============== ==== ========================= | |
| 763 | 801 | hw_rev: (RO) Hardware revision number |
| 764 | 802 | |
| 765 | 803 | hca_type: (RO) Host channel adapter type |
| 804 | + =============== ==== ========================= | |
| @@ -2,7 +2,7 @@ rfkill - radio frequency (RF) connector kill switch support · 1 unmodified line | ||
| 2 | 2 | |
| 3 | 3 | For details to this subsystem look at Documentation/driver-api/rfkill.rst. |
| 4 | 4 | |
| 5 | −For the deprecated /sys/class/rfkill/*/claim knobs of this interface look in | |
| 5 | +For the deprecated ``/sys/class/rfkill/*/claim`` knobs of this interface look in | |
| 6 | 6 | Documentation/ABI/removed/sysfs-class-rfkill. |
| 7 | 7 | |
| 8 | 8 | What: /sys/class/rfkill |
| @@ -36,9 +36,10 @@ KernelVersion v2.6.22 · 27 unmodified lines | ||
| 36 | 36 | Contact: linux-wireless@vger.kernel.org |
| 37 | 37 | Description: Whether the soft blocked state is initialised from non-volatile |
| 38 | 38 | storage at startup. |
| 39 | −Values: A numeric value. | |
| 40 | − 0: false | |
| 41 | − 1: true | |
| 39 | +Values: A numeric value: | |
| 40 | + | |
| 41 | + - 0: false | |
| 42 | + - 1: true | |
| 42 | 43 | |
| 43 | 44 | |
| 44 | 45 | What: /sys/class/rfkill/rfkill[0-9]+/state |
| @@ -54,6 +55,7 @@ Description: Current state of the transmitter. · 9 unmodified lines | ||
| 54 | 55 | through this interface. There will likely be another attempt to |
| 55 | 56 | remove it in the future. |
| 56 | 57 | Values: A numeric value. |
| 58 | + | |
| 57 | 59 | 0: RFKILL_STATE_SOFT_BLOCKED |
| 58 | 60 | transmitter is turned off by software |
| 59 | 61 | 1: RFKILL_STATE_UNBLOCKED |
| @@ -69,6 +71,7 @@ KernelVersion v2.6.34 · 9 unmodified lines | ||
| 69 | 71 | Contact: linux-wireless@vger.kernel.org |
| 70 | 72 | Description: Current hardblock state. This file is read only. |
| 71 | 73 | Values: A numeric value. |
| 74 | + | |
| 72 | 75 | 0: inactive |
| 73 | 76 | The transmitter is (potentially) active. |
| 74 | 77 | 1: active |
| @@ -82,7 +85,9 @@ KernelVersion v2.6.34 · 7 unmodified lines | ||
| 82 | 85 | Contact: linux-wireless@vger.kernel.org |
| 83 | 86 | Description: Current softblock state. This file is read and write. |
| 84 | 87 | Values: A numeric value. |
| 88 | + | |
| 85 | 89 | 0: inactive |
| 86 | 90 | The transmitter is (potentially) active. |
| 91 | + | |
| 87 | 92 | 1: active |
| 88 | 93 | The transmitter is turned off by software. |
| @@ -32,11 +32,11 @@ KernelVersion: 2.6.12 · 31 unmodified lines | ||
| 32 | 32 | Contact: linux-integrity@vger.kernel.org |
| 33 | 33 | Description: The "caps" property contains TPM manufacturer and version info. |
| 34 | 34 | |
| 35 | − Example output: | |
| 35 | + Example output:: | |
| 36 | 36 | |
| 37 | − Manufacturer: 0x53544d20 | |
| 38 | − TCG version: 1.2 | |
| 39 | − Firmware version: 8.16 | |
| 37 | + Manufacturer: 0x53544d20 | |
| 38 | + TCG version: 1.2 | |
| 39 | + Firmware version: 8.16 | |
| 40 | 40 | |
| 41 | 41 | Manufacturer is a hex dump of the 4 byte manufacturer info |
| 42 | 42 | space in a TPM. TCG version shows the TCG TPM spec level that |
| @@ -54,9 +54,9 @@ Description: The "durations" property shows the 3 vendor-specific values · 11 unmodified lines | ||
| 54 | 54 | any longer than necessary before starting to poll for a |
| 55 | 55 | result. |
| 56 | 56 | |
| 57 | − Example output: | |
| 57 | + Example output:: | |
| 58 | 58 | |
| 59 | − 3015000 4508000 180995000 [original] | |
| 59 | + 3015000 4508000 180995000 [original] | |
| 60 | 60 | |
| 61 | 61 | Here the short, medium and long durations are displayed in |
| 62 | 62 | usecs. "[original]" indicates that the values are displayed |
| @@ -92,14 +92,14 @@ Description: The "pcrs" property will dump the current value of all Platform · 29 unmodified lines | ||
| 92 | 92 | values may be constantly changing, the output is only valid |
| 93 | 93 | for a snapshot in time. |
| 94 | 94 | |
| 95 | − Example output: | |
| 95 | + Example output:: | |
| 96 | 96 | |
| 97 | − PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 98 | − PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 99 | − PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 100 | − PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 101 | − PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 102 | − ... | |
| 97 | + PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 98 | + PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 99 | + PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 100 | + PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 101 | + PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75 | |
| 102 | + ... | |
| 103 | 103 | |
| 104 | 104 | The number of PCRs and hex bytes needed to represent a PCR |
| 105 | 105 | value will vary depending on TPM chip version. For TPM 1.1 and |
| @@ -119,44 +119,44 @@ Description: The "pubek" property will return the TPM's public endorsement · 13 unmodified lines | ||
| 119 | 119 | ated at TPM manufacture time and exists for the life of the |
| 120 | 120 | chip. |
| 121 | 121 | |
| 122 | − Example output: | |
| 123 | − | |
| 124 | − Algorithm: 00 00 00 01 | |
| 125 | − Encscheme: 00 03 | |
| 126 | − Sigscheme: 00 01 | |
| 127 | − Parameters: 00 00 08 00 00 00 00 02 00 00 00 00 | |
| 128 | − Modulus length: 256 | |
| 129 | − Modulus: | |
| 130 | − B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C | |
| 131 | − 3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6 | |
| 132 | − 1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB | |
| 133 | − 86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3 | |
| 134 | − D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B | |
| 135 | − 82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26 | |
| 136 | − 0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E | |
| 137 | − 1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D | |
| 138 | − 6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0 | |
| 139 | − A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6 | |
| 140 | − 47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6 | |
| 141 | − 10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70 | |
| 142 | − E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A | |
| 143 | − F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6 | |
| 144 | − F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B | |
| 145 | − C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B | |
| 146 | − | |
| 147 | − Possible values: | |
| 148 | − | |
| 149 | − Algorithm: TPM_ALG_RSA (1) | |
| 150 | − Encscheme: TPM_ES_RSAESPKCSv15 (2) | |
| 122 | + Example output:: | |
| 123 | + | |
| 124 | + Algorithm: 00 00 00 01 | |
| 125 | + Encscheme: 00 03 | |
| 126 | + Sigscheme: 00 01 | |
| 127 | + Parameters: 00 00 08 00 00 00 00 02 00 00 00 00 | |
| 128 | + Modulus length: 256 | |
| 129 | + Modulus: | |
| 130 | + B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C | |
| 131 | + 3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6 | |
| 132 | + 1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB | |
| 133 | + 86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3 | |
| 134 | + D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B | |
| 135 | + 82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26 | |
| 136 | + 0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E | |
| 137 | + 1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D | |
| 138 | + 6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0 | |
| 139 | + A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6 | |
| 140 | + 47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6 | |
| 141 | + 10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70 | |
| 142 | + E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A | |
| 143 | + F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6 | |
| 144 | + F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B | |
| 145 | + C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B | |
| 146 | + | |
| 147 | + Possible values:: | |
| 148 | + | |
| 149 | + Algorithm: TPM_ALG_RSA (1) | |
| 150 | + Encscheme: TPM_ES_RSAESPKCSv15 (2) | |
| 151 | 151 | TPM_ES_RSAESOAEP_SHA1_MGF1 (3) |
| 152 | − Sigscheme: TPM_SS_NONE (1) | |
| 153 | − Parameters, a byte string of 3 u32 values: | |
| 152 | + Sigscheme: TPM_SS_NONE (1) | |
| 153 | + Parameters, a byte string of 3 u32 values: | |
| 154 | 154 | Key Length (bits): 00 00 08 00 (2048) |
| 155 | 155 | Num primes: 00 00 00 02 (2) |
| 156 | 156 | Exponent Size: 00 00 00 00 (0 means the |
| 157 | 157 | default exp) |
| 158 | − Modulus Length: 256 (bytes) | |
| 159 | − Modulus: The 256 byte Endorsement Key modulus | |
| 158 | + Modulus Length: 256 (bytes) | |
| 159 | + Modulus: The 256 byte Endorsement Key modulus | |
| 160 | 160 | |
| 161 | 161 | What: /sys/class/tpm/tpmX/device/temp_deactivated |
| 162 | 162 | Date: April 2006 |
| @@ -176,9 +176,9 @@ Description: The "timeouts" property shows the 4 vendor-specific values · 13 unmodified lines | ||
| 176 | 176 | timeouts is defined by the TPM interface spec that the chip |
| 177 | 177 | conforms to. |
| 178 | 178 | |
| 179 | − Example output: | |
| 179 | + Example output:: | |
| 180 | 180 | |
| 181 | − 750000 750000 750000 750000 [original] | |
| 181 | + 750000 750000 750000 750000 [original] | |
| 182 | 182 | |
| 183 | 183 | The four timeout values are shown in usecs, with a trailing |
| 184 | 184 | "[original]" or "[adjusted]" depending on whether the values |
| @@ -191,6 +191,6 @@ Contact: linux-integrity@vger.kernel.org · 6 unmodified lines | ||
| 191 | 191 | Description: The "tpm_version_major" property shows the TCG spec major version |
| 192 | 192 | implemented by the TPM device. |
| 193 | 193 | |
| 194 | − Example output: | |
| 194 | + Example output:: | |
| 195 | 195 | |
| 196 | − 2 | |
| 196 | + 2 | |
| @@ -1,5 +1,6 @@ | ||
| 1 | −# Note: This documents additional properties of any device beyond what | |
| 2 | −# is documented in Documentation/admin-guide/sysfs-rules.rst | |
| 1 | +Note: | |
| 2 | + This documents additional properties of any device beyond what | |
| 3 | + is documented in Documentation/admin-guide/sysfs-rules.rst | |
| 3 | 4 | |
| 4 | 5 | What: /sys/devices/*/of_node |
| 5 | 6 | Date: February 2015 |
| @@ -12,13 +12,15 @@ Description: · 11 unmodified lines | ||
| 12 | 12 | resets. Three registers are used by the FSBL and |
| 13 | 13 | other Xilinx software products: GLOBAL_GEN_STORAGE{4:6}. |
| 14 | 14 | |
| 15 | − Usage: | |
| 16 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 17 | − # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 15 | + Usage:: | |
| 16 | + | |
| 17 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 18 | + # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 19 | + | |
| 20 | + Example:: | |
| 18 | 21 | |
| 19 | − Example: | |
| 20 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 21 | − # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 22 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 23 | + # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0 | |
| 22 | 24 | |
| 23 | 25 | Users: Xilinx |
| 24 | 26 | |
| @@ -39,13 +41,15 @@ Description: · 14 unmodified lines | ||
| 39 | 41 | software products: PERS_GLOB_GEN_STORAGE{4:7}. |
| 40 | 42 | Register is reset only by a POR reset. |
| 41 | 43 | |
| 42 | − Usage: | |
| 43 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 44 | − # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 44 | + Usage:: | |
| 45 | + | |
| 46 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 47 | + # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 48 | + | |
| 49 | + Example:: | |
| 45 | 50 | |
| 46 | − Example: | |
| 47 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 48 | − # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 51 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 52 | + # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0 | |
| 49 | 53 | |
| 50 | 54 | Users: Xilinx |
| 51 | 55 | |
| @@ -61,23 +65,28 @@ Description: · 9 unmodified lines | ||
| 61 | 65 | |
| 62 | 66 | Following are available shutdown scopes(subtypes): |
| 63 | 67 | |
| 64 | − subsystem: Only the APU along with all of its peripherals | |
| 68 | + subsystem: | |
| 69 | + Only the APU along with all of its peripherals | |
| 65 | 70 | not used by other processing units will be |
| 66 | 71 | shut down. This may result in the FPD power |
| 67 | 72 | domain being shut down provided that no other |
| 68 | 73 | processing unit uses FPD peripherals or DRAM. |
| 69 | − ps_only: The complete PS will be shut down, including the | |
| 74 | + ps_only: | |
| 75 | + The complete PS will be shut down, including the | |
| 70 | 76 | RPU, PMU, etc. Only the PL domain (FPGA) |
| 71 | 77 | remains untouched. |
| 72 | − system: The complete system/device is shut down. | |
| 78 | + system: | |
| 79 | + The complete system/device is shut down. | |
| 73 | 80 | |
| 74 | − Usage: | |
| 75 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 76 | − # echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 81 | + Usage:: | |
| 82 | + | |
| 83 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 84 | + # echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 85 | + | |
| 86 | + Example:: | |
| 77 | 87 | |
| 78 | − Example: | |
| 79 | − # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 80 | − # echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 88 | + # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 89 | + # echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope | |
| 81 | 90 | |
| 82 | 91 | Users: Xilinx |
| 83 | 92 | |
| @@ -94,10 +103,13 @@ Description: · 10 unmodified lines | ||
| 94 | 103 | system restart. |
| 95 | 104 | |
| 96 | 105 | Usage: |
| 97 | − Set healthy bit | |
| 98 | − # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status | |
| 99 | 106 | |
| 100 | − Unset healthy bit | |
| 101 | − # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status | |
| 107 | + Set healthy bit:: | |
| 108 | + | |
| 109 | + # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status | |
| 110 | + | |
| 111 | + Unset healthy bit:: | |
| 112 | + | |
| 113 | + # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status | |
| 102 | 114 | |
| 103 | 115 | Users: Xilinx |
| @@ -6,6 +6,7 @@ Description: Interface for making ib_srp connect to a new target. · 5 unmodified lines | ||
| 6 | 6 | One can request ib_srp to connect to a new target by writing |
| 7 | 7 | a comma-separated list of login parameters to this sysfs |
| 8 | 8 | attribute. The supported parameters are: |
| 9 | + | |
| 9 | 10 | * id_ext, a 16-digit hexadecimal number specifying the eight |
| 10 | 11 | byte identifier extension in the 16-byte SRP target port |
| 11 | 12 | identifier. The target port identifier is sent by ib_srp |
| @@ -69,6 +69,7 @@ Description: Controls if typing interrupts output from speakup. With · 68 unmodified lines | ||
| 69 | 69 | speakup if for example |
| 70 | 70 | the say screen command is used before the |
| 71 | 71 | entire screen is read. |
| 72 | + | |
| 72 | 73 | With no_interrupt set to one, if the say |
| 73 | 74 | screen command is used, and one then types on the keyboard, |
| 74 | 75 | speakup will continue to say the whole screen regardless until |
| @@ -215,8 +216,10 @@ Description: This file contains names for key states. · 140 unmodified lines | ||
| 215 | 216 | Again, these are part of the help system. For instance, if you |
| 216 | 217 | had pressed speakup + keypad 3, you would hear: |
| 217 | 218 | "speakup keypad 3 is go to bottom edge." |
| 219 | + | |
| 218 | 220 | The speakup key is depressed, so the name of the key state is |
| 219 | 221 | speakup. |
| 222 | + | |
| 220 | 223 | This part of the message comes from the states collection. |
| 221 | 224 | |
| 222 | 225 | What: /sys/accessibility/speakup/i18n/characters |
| @@ -297,6 +300,7 @@ KernelVersion: 2.6 · 74 unmodified lines | ||
| 297 | 300 | Contact: speakup@linux-speakup.org |
| 298 | 301 | Description: Controls if punctuation is spoken by speakup, or by the |
| 299 | 302 | synthesizer. |
| 303 | + | |
| 300 | 304 | For example, speakup speaks ">" as "greater", while |
| 301 | 305 | the espeak synthesizer used by the soft driver speaks "greater |
| 302 | 306 | than". Zero lets speakup speak the punctuation. One lets the |
| @@ -17,6 +17,7 @@ Description: · 16 unmodified lines | ||
| 17 | 17 | directory has a name of the form "<key>-<vendor guid>" |
| 18 | 18 | and contains the following files: |
| 19 | 19 | |
| 20 | + =============== ======================================== | |
| 20 | 21 | attributes: A read-only text file enumerating the |
| 21 | 22 | EFI variable flags. Potential values |
| 22 | 23 | include: |
| @@ -59,12 +60,14 @@ Description: · 36 unmodified lines | ||
| 59 | 60 | |
| 60 | 61 | size: As ASCII representation of the size of |
| 61 | 62 | the variable's value. |
| 63 | + =============== ======================================== | |
| 62 | 64 | |
| 63 | 65 | |
| 64 | 66 | In addition, two other magic binary files are provided |
| 65 | 67 | in the top-level directory and are used for adding and |
| 66 | 68 | removing variables: |
| 67 | 69 | |
| 70 | + =============== ======================================== | |
| 68 | 71 | new_var: Takes a "struct efi_variable" and |
| 69 | 72 | instructs the EFI firmware to create a |
| 70 | 73 | new variable. |
| @@ -73,3 +76,4 @@ Description: · 2 unmodified lines | ||
| 73 | 76 | instructs the EFI firmware to remove any |
| 74 | 77 | variable that has a matching vendor GUID |
| 75 | 78 | and variable key name. |
| 79 | + =============== ======================================== | |
| @@ -7,6 +7,7 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | This is only for the powerpc/powernv platform. |
| 9 | 9 | |
| 10 | + =============== =============================================== | |
| 10 | 11 | initiate_dump: When '1' is written to it, |
| 11 | 12 | we will initiate a dump. |
| 12 | 13 | Read this file for supported commands. |
| @@ -19,8 +20,11 @@ Description: · 6 unmodified lines | ||
| 19 | 20 | and ID of the dump, use the id and type files. |
| 20 | 21 | Do not rely on any particular size of dump |
| 21 | 22 | type or dump id. |
| 23 | + =============== =============================================== | |
| 22 | 24 | |
| 23 | 25 | Each dump has the following files: |
| 26 | + | |
| 27 | + =============== =============================================== | |
| 24 | 28 | id: An ASCII representation of the dump ID |
| 25 | 29 | in hex (e.g. '0x01') |
| 26 | 30 | type: An ASCII representation of the type of |
| @@ -39,3 +43,4 @@ Description: · 12 unmodified lines | ||
| 39 | 43 | inaccessible. |
| 40 | 44 | Reading this file will get a list of |
| 41 | 45 | supported actions. |
| 46 | + =============== =============================================== | |
| @@ -38,6 +38,7 @@ Description: · 37 unmodified lines | ||
| 38 | 38 | For each log entry (directory), there are the following |
| 39 | 39 | files: |
| 40 | 40 | |
| 41 | + ============== ================================================ | |
| 41 | 42 | id: An ASCII representation of the ID of the |
| 42 | 43 | error log, in hex - e.g. "0x01". |
| 43 | 44 | |
| @@ -58,3 +59,4 @@ Description: · 14 unmodified lines | ||
| 58 | 59 | entry will be removed from sysfs. |
| 59 | 60 | Reading this file will list the supported |
| 60 | 61 | operations (currently just acknowledge). |
| 62 | + ============== ================================================ | |
| @@ -33,6 +33,8 @@ Description: If running under Xen: · 32 unmodified lines | ||
| 33 | 33 | Space separated list of supported guest system types. Each type |
| 34 | 34 | is in the format: <class>-<major>.<minor>-<arch> |
| 35 | 35 | With: |
| 36 | + | |
| 37 | + ======== ============================================ | |
| 36 | 38 | <class>: "xen" -- x86: paravirtualized, arm: standard |
| 37 | 39 | "hvm" -- x86 only: fully virtualized |
| 38 | 40 | <major>: major guest interface version |
| @@ -43,6 +45,7 @@ Description: If running under Xen: · 4 unmodified lines | ||
| 43 | 45 | "x86_64": 64 bit x86 guest |
| 44 | 46 | "armv7l": 32 bit arm guest |
| 45 | 47 | "aarch64": 64 bit arm guest |
| 48 | + ======== ============================================ | |
| 46 | 49 | |
| 47 | 50 | What: /sys/hypervisor/properties/changeset |
| 48 | 51 | Date: March 2009 |
| @@ -1,3 +1,9 @@ | ||
| 1 | +What: vDSO | |
| 2 | +Date: July 2011 | |
| 3 | +KernelVersion: 3.0 | |
| 4 | +Contact: Andy Lutomirski <luto@kernel.org> | |
| 5 | +Description: | |
| 6 | + | |
| 1 | 7 | On some architectures, when the kernel loads any userspace program it |
| 2 | 8 | maps an ELF DSO into that program's address space. This DSO is called |
| 3 | 9 | the vDSO and it often contains useful and highly-optimized alternatives |
| @@ -23,6 +29,7 @@ Unless otherwise noted, the set of symbols with any given version and the · 19 unmodified lines | ||
| 23 | 29 | ABI of those symbols is considered stable. It may vary across architectures, |
| 24 | 30 | though. |
| 25 | 31 | |
| 26 | −(As of this writing, this ABI documentation as been confirmed for x86_64. | |
| 32 | +Note: | |
| 33 | + As of this writing, this ABI documentation as been confirmed for x86_64. | |
| 27 | 34 | The maintainers of the other vDSO-using architectures should confirm |
| 28 | − that it is correct for their architecture.) | |
| 35 | + that it is correct for their architecture. | |
| @@ -14,7 +14,8 @@ Description: · 13 unmodified lines | ||
| 14 | 14 | This group contains the configuration for user defined ACPI |
| 15 | 15 | tables. The attributes of a user define table are: |
| 16 | 16 | |
| 17 | − aml - a binary attribute that the user can use to | |
| 17 | + aml | |
| 18 | + - a binary attribute that the user can use to | |
| 18 | 19 | fill in the ACPI aml definitions. Once the aml |
| 19 | 20 | data is written to this file and the file is |
| 20 | 21 | closed the table will be loaded and ACPI devices |
| @@ -26,11 +27,26 @@ Description: · 5 unmodified lines | ||
| 26 | 27 | The rest of the attributes are read-only and are valid only |
| 27 | 28 | after the table has been loaded by filling the aml entry: |
| 28 | 29 | |
| 29 | − signature - ASCII table signature | |
| 30 | − length - length of table in bytes, including the header | |
| 31 | − revision - ACPI Specification minor version number | |
| 32 | − oem_id - ASCII OEM identification | |
| 33 | − oem_table_id - ASCII OEM table identification | |
| 34 | − oem_revision - OEM revision number | |
| 35 | − asl_compiler_id - ASCII ASL compiler vendor ID | |
| 36 | − asl_compiler_revision - ASL compiler version | |
| 30 | + signature | |
| 31 | + - ASCII table signature | |
| 32 | + | |
| 33 | + length | |
| 34 | + - length of table in bytes, including the header | |
| 35 | + | |
| 36 | + revision | |
| 37 | + - ACPI Specification minor version number | |
| 38 | + | |
| 39 | + oem_id | |
| 40 | + - ASCII OEM identification | |
| 41 | + | |
| 42 | + oem_table_id | |
| 43 | + - ASCII OEM table identification | |
| 44 | + | |
| 45 | + oem_revision | |
| 46 | + - OEM revision number | |
| 47 | + | |
| 48 | + asl_compiler_id | |
| 49 | + - ASCII ASL compiler vendor ID | |
| 50 | + | |
| 51 | + asl_compiler_revision | |
| 52 | + - ASL compiler version | |
| @@ -15,22 +15,28 @@ KernelVersion: 5.2 · 14 unmodified lines | ||
| 15 | 15 | Description: |
| 16 | 16 | The attributes: |
| 17 | 17 | |
| 18 | − buffer_size configure the buffer size for this channel | |
| 18 | + buffer_size | |
| 19 | + configure the buffer size for this channel | |
| 19 | 20 | |
| 20 | − subbuffer_size configure the sub-buffer size for this channel | |
| 21 | + subbuffer_size | |
| 22 | + configure the sub-buffer size for this channel | |
| 21 | 23 | (needed for synchronous and isochrnous data) |
| 22 | 24 | |
| 23 | 25 | |
| 24 | − num_buffers configure number of buffers used for this | |
| 26 | + num_buffers | |
| 27 | + configure number of buffers used for this | |
| 25 | 28 | channel |
| 26 | 29 | |
| 27 | − datatype configure type of data that will travel over | |
| 30 | + datatype | |
| 31 | + configure type of data that will travel over | |
| 28 | 32 | this channel |
| 29 | 33 | |
| 30 | − direction configure whether this link will be an input | |
| 34 | + direction | |
| 35 | + configure whether this link will be an input | |
| 31 | 36 | or output |
| 32 | 37 | |
| 33 | − dbr_size configure DBR data buffer size (this is used | |
| 38 | + dbr_size | |
| 39 | + configure DBR data buffer size (this is used | |
| 34 | 40 | for MediaLB communication only) |
| 35 | 41 | |
| 36 | 42 | packets_per_xact |
| @@ -39,18 +45,23 @@ Description: · 2 unmodified lines | ||
| 39 | 45 | transmitted via USB (this is used for USB |
| 40 | 46 | communication only) |
| 41 | 47 | |
| 42 | − device name of the device the link is to be attached to | |
| 48 | + device | |
| 49 | + name of the device the link is to be attached to | |
| 43 | 50 | |
| 44 | − channel name of the channel the link is to be attached to | |
| 51 | + channel | |
| 52 | + name of the channel the link is to be attached to | |
| 45 | 53 | |
| 46 | − comp_params pass parameters needed by some components | |
| 54 | + comp_params | |
| 55 | + pass parameters needed by some components | |
| 47 | 56 | |
| 48 | − create_link write '1' to this attribute to trigger the | |
| 57 | + create_link | |
| 58 | + write '1' to this attribute to trigger the | |
| 49 | 59 | creation of the link. In case of speculative |
| 50 | 60 | configuration, the creation is post-poned until |
| 51 | 61 | a physical device is being attached to the bus. |
| 52 | 62 | |
| 53 | − destroy_link write '1' to this attribute to destroy an | |
| 63 | + destroy_link | |
| 64 | + write '1' to this attribute to destroy an | |
| 54 | 65 | active link |
| 55 | 66 | |
| 56 | 67 | What: /sys/kernel/config/most_video/<link> |
| @@ -59,22 +70,28 @@ KernelVersion: 5.2 · 2 unmodified lines | ||
| 59 | 70 | Description: |
| 60 | 71 | The attributes: |
| 61 | 72 | |
| 62 | − buffer_size configure the buffer size for this channel | |
| 73 | + buffer_size | |
| 74 | + configure the buffer size for this channel | |
| 63 | 75 | |
| 64 | − subbuffer_size configure the sub-buffer size for this channel | |
| 76 | + subbuffer_size | |
| 77 | + configure the sub-buffer size for this channel | |
| 65 | 78 | (needed for synchronous and isochrnous data) |
| 66 | 79 | |
| 67 | 80 | |
| 68 | − num_buffers configure number of buffers used for this | |
| 81 | + num_buffers | |
| 82 | + configure number of buffers used for this | |
| 69 | 83 | channel |
| 70 | 84 | |
| 71 | − datatype configure type of data that will travel over | |
| 85 | + datatype | |
| 86 | + configure type of data that will travel over | |
| 72 | 87 | this channel |
| 73 | 88 | |
| 74 | − direction configure whether this link will be an input | |
| 89 | + direction | |
| 90 | + configure whether this link will be an input | |
| 75 | 91 | or output |
| 76 | 92 | |
| 77 | − dbr_size configure DBR data buffer size (this is used | |
| 93 | + dbr_size | |
| 94 | + configure DBR data buffer size (this is used | |
| 78 | 95 | for MediaLB communication only) |
| 79 | 96 | |
| 80 | 97 | packets_per_xact |
| @@ -83,18 +100,23 @@ Description: · 2 unmodified lines | ||
| 83 | 100 | transmitted via USB (this is used for USB |
| 84 | 101 | communication only) |
| 85 | 102 | |
| 86 | − device name of the device the link is to be attached to | |
| 103 | + device | |
| 104 | + name of the device the link is to be attached to | |
| 87 | 105 | |
| 88 | − channel name of the channel the link is to be attached to | |
| 106 | + channel | |
| 107 | + name of the channel the link is to be attached to | |
| 89 | 108 | |
| 90 | − comp_params pass parameters needed by some components | |
| 109 | + comp_params | |
| 110 | + pass parameters needed by some components | |
| 91 | 111 | |
| 92 | − create_link write '1' to this attribute to trigger the | |
| 112 | + create_link | |
| 113 | + write '1' to this attribute to trigger the | |
| 93 | 114 | creation of the link. In case of speculative |
| 94 | 115 | configuration, the creation is post-poned until |
| 95 | 116 | a physical device is being attached to the bus. |
| 96 | 117 | |
| 97 | − destroy_link write '1' to this attribute to destroy an | |
| 118 | + destroy_link | |
| 119 | + write '1' to this attribute to destroy an | |
| 98 | 120 | active link |
| 99 | 121 | |
| 100 | 122 | What: /sys/kernel/config/most_net/<link> |
| @@ -103,22 +125,28 @@ KernelVersion: 5.2 · 2 unmodified lines | ||
| 103 | 125 | Description: |
| 104 | 126 | The attributes: |
| 105 | 127 | |
| 106 | − buffer_size configure the buffer size for this channel | |
| 128 | + buffer_size | |
| 129 | + configure the buffer size for this channel | |
| 107 | 130 | |
| 108 | − subbuffer_size configure the sub-buffer size for this channel | |
| 131 | + subbuffer_size | |
| 132 | + configure the sub-buffer size for this channel | |
| 109 | 133 | (needed for synchronous and isochrnous data) |
| 110 | 134 | |
| 111 | 135 | |
| 112 | − num_buffers configure number of buffers used for this | |
| 136 | + num_buffers | |
| 137 | + configure number of buffers used for this | |
| 113 | 138 | channel |
| 114 | 139 | |
| 115 | − datatype configure type of data that will travel over | |
| 140 | + datatype | |
| 141 | + configure type of data that will travel over | |
| 116 | 142 | this channel |
| 117 | 143 | |
| 118 | − direction configure whether this link will be an input | |
| 144 | + direction | |
| 145 | + configure whether this link will be an input | |
| 119 | 146 | or output |
| 120 | 147 | |
| 121 | − dbr_size configure DBR data buffer size (this is used | |
| 148 | + dbr_size | |
| 149 | + configure DBR data buffer size (this is used | |
| 122 | 150 | for MediaLB communication only) |
| 123 | 151 | |
| 124 | 152 | packets_per_xact |
| @@ -127,18 +155,23 @@ Description: · 2 unmodified lines | ||
| 127 | 155 | transmitted via USB (this is used for USB |
| 128 | 156 | communication only) |
| 129 | 157 | |
| 130 | − device name of the device the link is to be attached to | |
| 158 | + device | |
| 159 | + name of the device the link is to be attached to | |
| 131 | 160 | |
| 132 | − channel name of the channel the link is to be attached to | |
| 161 | + channel | |
| 162 | + name of the channel the link is to be attached to | |
| 133 | 163 | |
| 134 | − comp_params pass parameters needed by some components | |
| 164 | + comp_params | |
| 165 | + pass parameters needed by some components | |
| 135 | 166 | |
| 136 | − create_link write '1' to this attribute to trigger the | |
| 167 | + create_link | |
| 168 | + write '1' to this attribute to trigger the | |
| 137 | 169 | creation of the link. In case of speculative |
| 138 | 170 | configuration, the creation is post-poned until |
| 139 | 171 | a physical device is being attached to the bus. |
| 140 | 172 | |
| 141 | − destroy_link write '1' to this attribute to destroy an | |
| 173 | + destroy_link | |
| 174 | + write '1' to this attribute to destroy an | |
| 142 | 175 | active link |
| 143 | 176 | |
| 144 | 177 | What: /sys/kernel/config/most_sound/<card> |
| @@ -147,7 +180,8 @@ KernelVersion: 5.2 · 2 unmodified lines | ||
| 147 | 180 | Description: |
| 148 | 181 | The attributes: |
| 149 | 182 | |
| 150 | − create_card write '1' to this attribute to trigger the | |
| 183 | + create_card | |
| 184 | + write '1' to this attribute to trigger the | |
| 151 | 185 | registration of the sound card with the ALSA |
| 152 | 186 | subsystem. |
| 153 | 187 | |
| @@ -157,22 +191,28 @@ KernelVersion: 5.2 · 3 unmodified lines | ||
| 157 | 191 | Description: |
| 158 | 192 | The attributes: |
| 159 | 193 | |
| 160 | − buffer_size configure the buffer size for this channel | |
| 194 | + buffer_size | |
| 195 | + configure the buffer size for this channel | |
| 161 | 196 | |
| 162 | − subbuffer_size configure the sub-buffer size for this channel | |
| 197 | + subbuffer_size | |
| 198 | + configure the sub-buffer size for this channel | |
| 163 | 199 | (needed for synchronous and isochrnous data) |
| 164 | 200 | |
| 165 | 201 | |
| 166 | − num_buffers configure number of buffers used for this | |
| 202 | + num_buffers | |
| 203 | + configure number of buffers used for this | |
| 167 | 204 | channel |
| 168 | 205 | |
| 169 | − datatype configure type of data that will travel over | |
| 206 | + datatype | |
| 207 | + configure type of data that will travel over | |
| 170 | 208 | this channel |
| 171 | 209 | |
| 172 | − direction configure whether this link will be an input | |
| 210 | + direction | |
| 211 | + configure whether this link will be an input | |
| 173 | 212 | or output |
| 174 | 213 | |
| 175 | − dbr_size configure DBR data buffer size (this is used | |
| 214 | + dbr_size | |
| 215 | + configure DBR data buffer size (this is used | |
| 176 | 216 | for MediaLB communication only) |
| 177 | 217 | |
| 178 | 218 | packets_per_xact |
| @@ -181,16 +221,21 @@ Description: · 2 unmodified lines | ||
| 181 | 221 | transmitted via USB (this is used for USB |
| 182 | 222 | communication only) |
| 183 | 223 | |
| 184 | − device name of the device the link is to be attached to | |
| 224 | + device | |
| 225 | + name of the device the link is to be attached to | |
| 185 | 226 | |
| 186 | − channel name of the channel the link is to be attached to | |
| 227 | + channel | |
| 228 | + name of the channel the link is to be attached to | |
| 187 | 229 | |
| 188 | − comp_params pass parameters needed by some components | |
| 230 | + comp_params | |
| 231 | + pass parameters needed by some components | |
| 189 | 232 | |
| 190 | − create_link write '1' to this attribute to trigger the | |
| 233 | + create_link | |
| 234 | + write '1' to this attribute to trigger the | |
| 191 | 235 | creation of the link. In case of speculative |
| 192 | 236 | configuration, the creation is post-poned until |
| 193 | 237 | a physical device is being attached to the bus. |
| 194 | 238 | |
| 195 | − destroy_link write '1' to this attribute to destroy an | |
| 239 | + destroy_link | |
| 240 | + write '1' to this attribute to destroy an | |
| 196 | 241 | active link |
| @@ -10,22 +10,24 @@ Description: · 9 unmodified lines | ||
| 10 | 10 | This interfaces can be used to show spear's PCIe device capability. |
| 11 | 11 | |
| 12 | 12 | Nodes are only visible when configfs is mounted. To mount configfs |
| 13 | − in /config directory use: | |
| 14 | − # mount -t configfs none /config/ | |
| 13 | + in /config directory use:: | |
| 15 | 14 | |
| 16 | − For nth PCIe Device Controller | |
| 17 | − /config/pcie-gadget.n/ | |
| 18 | − link ... used to enable ltssm and read its status. | |
| 19 | − int_type ...used to configure and read type of supported | |
| 20 | − interrupt | |
| 21 | − no_of_msi ... used to configure number of MSI vector needed and | |
| 15 | + # mount -t configfs none /config/ | |
| 16 | + | |
| 17 | + For nth PCIe Device Controller /config/pcie-gadget.n/: | |
| 18 | + | |
| 19 | + =============== ====================================================== | |
| 20 | + link used to enable ltssm and read its status. | |
| 21 | + int_type used to configure and read type of supported interrupt | |
| 22 | + no_of_msi used to configure number of MSI vector needed and | |
| 22 | 23 | to read no of MSI granted. |
| 23 | − inta ... write 1 to assert INTA and 0 to de-assert. | |
| 24 | − send_msi ... write MSI vector to be sent. | |
| 25 | − vendor_id ... used to write and read vendor id (hex) | |
| 26 | − device_id ... used to write and read device id (hex) | |
| 27 | − bar0_size ... used to write and read bar0_size | |
| 28 | − bar0_address ... used to write and read bar0 mapped area in hex. | |
| 29 | − bar0_rw_offset ... used to write and read offset of bar0 where | |
| 30 | − bar0_data will be written or read. | |
| 31 | − bar0_data ... used to write and read data at bar0_rw_offset. | |
| 24 | + inta write 1 to assert INTA and 0 to de-assert. | |
| 25 | + send_msi write MSI vector to be sent. | |
| 26 | + vendor_id used to write and read vendor id (hex) | |
| 27 | + device_id used to write and read device id (hex) | |
| 28 | + bar0_size used to write and read bar0_size | |
| 29 | + bar0_address used to write and read bar0 mapped area in hex. | |
| 30 | + bar0_rw_offset used to write and read offset of bar0 where bar0_data | |
| 31 | + will be written or read. | |
| 32 | + bar0_data used to write and read data at bar0_rw_offset. | |
| 33 | + =============== ====================================================== | |
| @@ -12,22 +12,24 @@ Description: · 11 unmodified lines | ||
| 12 | 12 | |
| 13 | 13 | The attributes of a gadget: |
| 14 | 14 | |
| 15 | − UDC - bind a gadget to UDC/unbind a gadget; | |
| 16 | − write UDC's name found in /sys/class/udc/* | |
| 17 | − to bind a gadget, empty string "" to unbind. | |
| 18 | − | |
| 19 | − max_speed - maximum speed the driver supports. Valid | |
| 20 | − names are super-speed-plus, super-speed, | |
| 21 | − high-speed, full-speed, and low-speed. | |
| 22 | − | |
| 23 | − bDeviceClass - USB device class code | |
| 24 | − bDeviceSubClass - USB device subclass code | |
| 25 | − bDeviceProtocol - USB device protocol code | |
| 26 | − bMaxPacketSize0 - maximum endpoint 0 packet size | |
| 27 | − bcdDevice - bcd device release number | |
| 28 | − bcdUSB - bcd USB specification version number | |
| 29 | − idProduct - product ID | |
| 30 | − idVendor - vendor ID | |
| 15 | + ================ ============================================ | |
| 16 | + UDC bind a gadget to UDC/unbind a gadget; | |
| 17 | + write UDC's name found in /sys/class/udc/* | |
| 18 | + to bind a gadget, empty string "" to unbind. | |
| 19 | + | |
| 20 | + max_speed maximum speed the driver supports. Valid | |
| 21 | + names are super-speed-plus, super-speed, | |
| 22 | + high-speed, full-speed, and low-speed. | |
| 23 | + | |
| 24 | + bDeviceClass USB device class code | |
| 25 | + bDeviceSubClass USB device subclass code | |
| 26 | + bDeviceProtocol USB device protocol code | |
| 27 | + bMaxPacketSize0 maximum endpoint 0 packet size | |
| 28 | + bcdDevice bcd device release number | |
| 29 | + bcdUSB bcd USB specification version number | |
| 30 | + idProduct product ID | |
| 31 | + idVendor vendor ID | |
| 32 | + ================ ============================================ | |
| 31 | 33 | |
| 32 | 34 | What: /config/usb-gadget/gadget/configs |
| 33 | 35 | Date: Jun 2013 |
| @@ -41,8 +43,10 @@ KernelVersion: 3.11 · 7 unmodified lines | ||
| 41 | 43 | Description: |
| 42 | 44 | The attributes of a configuration: |
| 43 | 45 | |
| 44 | − bmAttributes - configuration characteristics | |
| 45 | − MaxPower - maximum power consumption from the bus | |
| 46 | + ================ ====================================== | |
| 47 | + bmAttributes configuration characteristics | |
| 48 | + MaxPower maximum power consumption from the bus | |
| 49 | + ================ ====================================== | |
| 46 | 50 | |
| 47 | 51 | What: /config/usb-gadget/gadget/configs/config/strings |
| 48 | 52 | Date: Jun 2013 |
| @@ -57,7 +61,9 @@ KernelVersion: 3.11 · 8 unmodified lines | ||
| 57 | 61 | Description: |
| 58 | 62 | The attributes: |
| 59 | 63 | |
| 60 | − configuration - configuration description | |
| 64 | + ================ ========================= | |
| 65 | + configuration configuration description | |
| 66 | + ================ ========================= | |
| 61 | 67 | |
| 62 | 68 | |
| 63 | 69 | What: /config/usb-gadget/gadget/functions |
| @@ -76,8 +82,10 @@ Description: · 12 unmodified lines | ||
| 76 | 82 | |
| 77 | 83 | The attributes: |
| 78 | 84 | |
| 79 | − compatible_id - 8-byte string for "Compatible ID" | |
| 80 | − sub_compatible_id - 8-byte string for "Sub Compatible ID" | |
| 85 | + ================= ===================================== | |
| 86 | + compatible_id 8-byte string for "Compatible ID" | |
| 87 | + sub_compatible_id 8-byte string for "Sub Compatible ID" | |
| 88 | + ================= ===================================== | |
| 81 | 89 | |
| 82 | 90 | What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property> |
| 83 | 91 | Date: May 2014 |
| @@ -89,16 +97,19 @@ Description: · 5 unmodified lines | ||
| 89 | 97 | |
| 90 | 98 | The attributes: |
| 91 | 99 | |
| 92 | − type - value 1..7 for interpreting the data | |
| 93 | − 1: unicode string | |
| 94 | − 2: unicode string with environment variable | |
| 95 | − 3: binary | |
| 96 | − 4: little-endian 32-bit | |
| 97 | − 5: big-endian 32-bit | |
| 98 | − 6: unicode string with a symbolic link | |
| 99 | − 7: multiple unicode strings | |
| 100 | − data - blob of data to be interpreted depending on | |
| 100 | + ===== =============================================== | |
| 101 | + type value 1..7 for interpreting the data | |
| 102 | + | |
| 103 | + - 1: unicode string | |
| 104 | + - 2: unicode string with environment variable | |
| 105 | + - 3: binary | |
| 106 | + - 4: little-endian 32-bit | |
| 107 | + - 5: big-endian 32-bit | |
| 108 | + - 6: unicode string with a symbolic link | |
| 109 | + - 7: multiple unicode strings | |
| 110 | + data blob of data to be interpreted depending on | |
| 101 | 111 | type |
| 112 | + ===== =============================================== | |
| 102 | 113 | |
| 103 | 114 | What: /config/usb-gadget/gadget/strings |
| 104 | 115 | Date: Jun 2013 |
| @@ -113,9 +124,11 @@ KernelVersion: 3.11 · 8 unmodified lines | ||
| 113 | 124 | Description: |
| 114 | 125 | The attributes: |
| 115 | 126 | |
| 116 | − serialnumber - gadget's serial number (string) | |
| 117 | − product - gadget's product description | |
| 118 | − manufacturer - gadget's manufacturer description | |
| 127 | + ============ ================================= | |
| 128 | + serialnumber gadget's serial number (string) | |
| 129 | + product gadget's product description | |
| 130 | + manufacturer gadget's manufacturer description | |
| 131 | + ============ ================================= | |
| 119 | 132 | |
| 120 | 133 | What: /config/usb-gadget/gadget/os_desc |
| 121 | 134 | Date: May 2014 |
| @@ -123,8 +136,10 @@ KernelVersion: 3.16 · 1 unmodified line | ||
| 123 | 136 | Description: |
| 124 | 137 | This group contains "OS String" extension handling attributes. |
| 125 | 138 | |
| 126 | − use - flag turning "OS Desctiptors" support on/off | |
| 127 | − b_vendor_code - one-byte value used for custom per-device and | |
| 139 | + ============= =============================================== | |
| 140 | + use flag turning "OS Desctiptors" support on/off | |
| 141 | + b_vendor_code one-byte value used for custom per-device and | |
| 128 | 142 | per-interface requests |
| 129 | − qw_sign - an identifier to be reported as "OS String" | |
| 143 | + qw_sign an identifier to be reported as "OS String" | |
| 130 | 144 | proper |
| 145 | + ============= =============================================== | |
| @@ -4,13 +4,17 @@ KernelVersion: 3.11 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − ifname - network device interface name associated with | |
| 7 | + ifname | |
| 8 | + - network device interface name associated with | |
| 8 | 9 | this function instance |
| 9 | − qmult - queue length multiplier for high and | |
| 10 | + qmult | |
| 11 | + - queue length multiplier for high and | |
| 10 | 12 | super speed |
| 11 | − host_addr - MAC address of host's end of this | |
| 13 | + host_addr | |
| 14 | + - MAC address of host's end of this | |
| 12 | 15 | Ethernet over USB link |
| 13 | − dev_addr - MAC address of device's end of this | |
| 16 | + dev_addr | |
| 17 | + - MAC address of device's end of this | |
| 14 | 18 | Ethernet over USB link |
| 15 | 19 | |
| 16 | 20 | |
| @@ -4,11 +4,13 @@ KernelVersion: 3.11 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − ifname - network device interface name associated with | |
| 7 | + ========== ============================================= | |
| 8 | + ifname network device interface name associated with | |
| 8 | 9 | this function instance |
| 9 | − qmult - queue length multiplier for high and | |
| 10 | + qmult queue length multiplier for high and | |
| 10 | 11 | super speed |
| 11 | − host_addr - MAC address of host's end of this | |
| 12 | + host_addr MAC address of host's end of this | |
| 12 | 13 | Ethernet over USB link |
| 13 | − dev_addr - MAC address of device's end of this | |
| 14 | + dev_addr MAC address of device's end of this | |
| 14 | 15 | Ethernet over USB link |
| 16 | + ========== ============================================= | |
| @@ -4,8 +4,10 @@ KernelVersion: 3.19 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − protocol - HID protocol to use | |
| 8 | − report_desc - blob corresponding to HID report descriptors | |
| 7 | + ============= ============================================ | |
| 8 | + protocol HID protocol to use | |
| 9 | + report_desc blob corresponding to HID report descriptors | |
| 9 | 10 | except the data passed through /dev/hidg<N> |
| 10 | − report_length - HID report length | |
| 11 | − subclass - HID device subclass to use | |
| 11 | + report_length HID report length | |
| 12 | + subclass HID device subclass to use | |
| 13 | + ============= ============================================ | |
| @@ -4,5 +4,7 @@ KernelVersion: 3.13 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − qlen - depth of loopback queue | |
| 8 | − buflen - buffer length | |
| 7 | + ======= ======================= | |
| 8 | + qlen depth of loopback queue | |
| 9 | + buflen buffer length | |
| 10 | + ======= ======================= | |
| @@ -4,12 +4,14 @@ KernelVersion: 3.13 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − stall - Set to permit function to halt bulk endpoints. | |
| 7 | + =========== ============================================== | |
| 8 | + stall Set to permit function to halt bulk endpoints. | |
| 8 | 9 | Disabled on some USB devices known not to work |
| 9 | 10 | correctly. You should set it to true. |
| 10 | − num_buffers - Number of pipeline buffers. Valid numbers | |
| 11 | + num_buffers Number of pipeline buffers. Valid numbers | |
| 11 | 12 | are 2..4. Available only if |
| 12 | 13 | CONFIG_USB_GADGET_DEBUG_FILES is set. |
| 14 | + =========== ============================================== | |
| 13 | 15 | |
| 14 | 16 | What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name |
| 15 | 17 | Date: Oct 2013 |
| @@ -17,15 +19,17 @@ KernelVersion: 3.13 · 1 unmodified line | ||
| 17 | 19 | Description: |
| 18 | 20 | The attributes: |
| 19 | 21 | |
| 20 | − file - The path to the backing file for the LUN. | |
| 22 | + =========== ============================================== | |
| 23 | + file The path to the backing file for the LUN. | |
| 21 | 24 | Required if LUN is not marked as removable. |
| 22 | − ro - Flag specifying access to the LUN shall be | |
| 25 | + ro Flag specifying access to the LUN shall be | |
| 23 | 26 | read-only. This is implied if CD-ROM emulation |
| 24 | 27 | is enabled as well as when it was impossible |
| 25 | 28 | to open "filename" in R/W mode. |
| 26 | − removable - Flag specifying that LUN shall be indicated as | |
| 29 | + removable Flag specifying that LUN shall be indicated as | |
| 27 | 30 | being removable. |
| 28 | − cdrom - Flag specifying that LUN shall be reported as | |
| 31 | + cdrom Flag specifying that LUN shall be reported as | |
| 29 | 32 | being a CD-ROM. |
| 30 | − nofua - Flag specifying that FUA flag | |
| 33 | + nofua Flag specifying that FUA flag | |
| 31 | 34 | in SCSI WRITE(10,12) |
| 35 | + =========== ============================================== | |
| @@ -4,9 +4,11 @@ KernelVersion: 3.19 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − index - index value for the USB MIDI adapter | |
| 8 | − id - ID string for the USB MIDI adapter | |
| 9 | − buflen - MIDI buffer length | |
| 10 | − qlen - USB read request queue length | |
| 11 | − in_ports - number of MIDI input ports | |
| 12 | − out_ports - number of MIDI output ports | |
| 7 | + ========== ==================================== | |
| 8 | + index index value for the USB MIDI adapter | |
| 9 | + id ID string for the USB MIDI adapter | |
| 10 | + buflen MIDI buffer length | |
| 11 | + qlen USB read request queue length | |
| 12 | + in_ports number of MIDI input ports | |
| 13 | + out_ports number of MIDI output ports | |
| 14 | + ========== ==================================== | |
| @@ -4,6 +4,8 @@ KernelVersion: 4.1 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − pnp_string - Data to be passed to the host in pnp string | |
| 8 | − q_len - Number of requests per endpoint | |
| 7 | + ========== =========================================== | |
| 8 | + pnp_string Data to be passed to the host in pnp string | |
| 9 | + q_len Number of requests per endpoint | |
| 10 | + ========== =========================================== | |
| 9 | 11 | |
| @@ -4,14 +4,16 @@ KernelVersion: 3.11 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − ifname - network device interface name associated with | |
| 7 | + ========= ============================================= | |
| 8 | + ifname network device interface name associated with | |
| 8 | 9 | this function instance |
| 9 | − qmult - queue length multiplier for high and | |
| 10 | + qmult queue length multiplier for high and | |
| 10 | 11 | super speed |
| 11 | − host_addr - MAC address of host's end of this | |
| 12 | + host_addr MAC address of host's end of this | |
| 12 | 13 | Ethernet over USB link |
| 13 | − dev_addr - MAC address of device's end of this | |
| 14 | + dev_addr MAC address of device's end of this | |
| 14 | 15 | Ethernet over USB link |
| 15 | − class - USB interface class, default is 02 (hex) | |
| 16 | − subclass - USB interface subclass, default is 06 (hex) | |
| 17 | − protocol - USB interface protocol, default is 00 (hex) | |
| 16 | + class USB interface class, default is 02 (hex) | |
| 17 | + subclass USB interface subclass, default is 06 (hex) | |
| 18 | + protocol USB interface protocol, default is 00 (hex) | |
| 19 | + ========= ============================================= | |
| @@ -4,11 +4,13 @@ KernelVersion: 3.13 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − pattern - 0 (all zeros), 1 (mod63), 2 (none) | |
| 8 | − isoc_interval - 1..16 | |
| 9 | − isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss) | |
| 10 | − isoc_mult - 0..2 (hs/ss only) | |
| 11 | − isoc_maxburst - 0..15 (ss only) | |
| 12 | − buflen - buffer length | |
| 13 | − bulk_qlen - depth of queue for bulk | |
| 14 | − iso_qlen - depth of queue for iso | |
| 7 | + ============== ================================== | |
| 8 | + pattern 0 (all zeros), 1 (mod63), 2 (none) | |
| 9 | + isoc_interval 1..16 | |
| 10 | + isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss) | |
| 11 | + isoc_mult 0..2 (hs/ss only) | |
| 12 | + isoc_maxburst 0..15 (ss only) | |
| 13 | + buflen buffer length | |
| 14 | + bulk_qlen depth of queue for bulk | |
| 15 | + iso_qlen depth of queue for iso | |
| 16 | + ============== ================================== | |
| @@ -4,11 +4,13 @@ KernelVersion: 3.11 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − ifname - network device interface name associated with | |
| 7 | + ========== ============================================= | |
| 8 | + ifname network device interface name associated with | |
| 8 | 9 | this function instance |
| 9 | − qmult - queue length multiplier for high and | |
| 10 | + qmult queue length multiplier for high and | |
| 10 | 11 | super speed |
| 11 | − host_addr - MAC address of host's end of this | |
| 12 | + host_addr MAC address of host's end of this | |
| 12 | 13 | Ethernet over USB link |
| 13 | − dev_addr - MAC address of device's end of this | |
| 14 | + dev_addr MAC address of device's end of this | |
| 14 | 15 | Ethernet over USB link |
| 16 | + ========== ============================================= | |
| @@ -4,11 +4,13 @@ KernelVersion: 4.14 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − c_chmask - capture channel mask | |
| 8 | − c_srate - capture sampling rate | |
| 9 | − c_ssize - capture sample size (bytes) | |
| 10 | − p_chmask - playback channel mask | |
| 11 | − p_srate - playback sampling rate | |
| 12 | − p_ssize - playback sample size (bytes) | |
| 13 | − req_number - the number of pre-allocated request | |
| 14 | − for both capture and playback | |
| 7 | + ========== =================================== | |
| 8 | + c_chmask capture channel mask | |
| 9 | + c_srate capture sampling rate | |
| 10 | + c_ssize capture sample size (bytes) | |
| 11 | + p_chmask playback channel mask | |
| 12 | + p_srate playback sampling rate | |
| 13 | + p_ssize playback sample size (bytes) | |
| 14 | + req_number the number of pre-allocated request | |
| 15 | + for both capture and playback | |
| 16 | + ========== =================================== | |
| @@ -4,9 +4,11 @@ KernelVersion: 3.18 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The attributes: |
| 6 | 6 | |
| 7 | − c_chmask - capture channel mask | |
| 8 | − c_srate - capture sampling rate | |
| 9 | − c_ssize - capture sample size (bytes) | |
| 10 | − p_chmask - playback channel mask | |
| 11 | − p_srate - playback sampling rate | |
| 12 | − p_ssize - playback sample size (bytes) | |
| 7 | + ========= ============================ | |
| 8 | + c_chmask capture channel mask | |
| 9 | + c_srate capture sampling rate | |
| 10 | + c_ssize capture sample size (bytes) | |
| 11 | + p_chmask playback channel mask | |
| 12 | + p_srate playback sampling rate | |
| 13 | + p_ssize playback sample size (bytes) | |
| 14 | + ========= ============================ | |
| @@ -3,9 +3,11 @@ Date: Dec 2014 · 2 unmodified lines | ||
| 3 | 3 | KernelVersion: 4.0 |
| 4 | 4 | Description: UVC function directory |
| 5 | 5 | |
| 6 | − streaming_maxburst - 0..15 (ss only) | |
| 7 | − streaming_maxpacket - 1..1023 (fs), 1..3072 (hs/ss) | |
| 8 | − streaming_interval - 1..16 | |
| 6 | + =================== ============================= | |
| 7 | + streaming_maxburst 0..15 (ss only) | |
| 8 | + streaming_maxpacket 1..1023 (fs), 1..3072 (hs/ss) | |
| 9 | + streaming_interval 1..16 | |
| 10 | + =================== ============================= | |
| 9 | 11 | |
| 10 | 12 | What: /config/usb-gadget/gadget/functions/uvc.name/control |
| 11 | 13 | Date: Dec 2014 |
| @@ -13,8 +15,11 @@ KernelVersion: 4.0 · 1 unmodified line | ||
| 13 | 15 | Description: Control descriptors |
| 14 | 16 | |
| 15 | 17 | All attributes read only: |
| 16 | − bInterfaceNumber - USB interface number for this | |
| 17 | − streaming interface | |
| 18 | + | |
| 19 | + ================ ============================= | |
| 20 | + bInterfaceNumber USB interface number for this | |
| 21 | + streaming interface | |
| 22 | + ================ ============================= | |
| 18 | 23 | |
| 19 | 24 | What: /config/usb-gadget/gadget/functions/uvc.name/control/class |
| 20 | 25 | Date: Dec 2014 |
| @@ -47,13 +52,16 @@ KernelVersion: 4.0 · 26 unmodified lines | ||
| 47 | 52 | Description: Default output terminal descriptors |
| 48 | 53 | |
| 49 | 54 | All attributes read only: |
| 50 | − iTerminal - index of string descriptor | |
| 51 | − bSourceID - id of the terminal to which this terminal | |
| 55 | + | |
| 56 | + ============== ============================================= | |
| 57 | + iTerminal index of string descriptor | |
| 58 | + bSourceID id of the terminal to which this terminal | |
| 52 | 59 | is connected |
| 53 | − bAssocTerminal - id of the input terminal to which this output | |
| 60 | + bAssocTerminal id of the input terminal to which this output | |
| 54 | 61 | terminal is associated |
| 55 | − wTerminalType - terminal type | |
| 56 | − bTerminalID - a non-zero id of this terminal | |
| 62 | + wTerminalType terminal type | |
| 63 | + bTerminalID a non-zero id of this terminal | |
| 64 | + ============== ============================================= | |
| 57 | 65 | |
| 58 | 66 | What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera |
| 59 | 67 | Date: Dec 2014 |
| @@ -66,16 +74,19 @@ KernelVersion: 4.0 · 6 unmodified lines | ||
| 66 | 74 | Description: Default camera terminal descriptors |
| 67 | 75 | |
| 68 | 76 | All attributes read only: |
| 69 | − bmControls - bitmap specifying which controls are | |
| 70 | − supported for the video stream | |
| 71 | − wOcularFocalLength - the value of Locular | |
| 72 | − wObjectiveFocalLengthMax- the value of Lmin | |
| 73 | − wObjectiveFocalLengthMin- the value of Lmax | |
| 74 | − iTerminal - index of string descriptor | |
| 75 | − bAssocTerminal - id of the output terminal to which | |
| 76 | − this terminal is connected | |
| 77 | − wTerminalType - terminal type | |
| 78 | − bTerminalID - a non-zero id of this terminal | |
| 77 | + | |
| 78 | + ======================== ==================================== | |
| 79 | + bmControls bitmap specifying which controls are | |
| 80 | + supported for the video stream | |
| 81 | + wOcularFocalLength the value of Locular | |
| 82 | + wObjectiveFocalLengthMax the value of Lmin | |
| 83 | + wObjectiveFocalLengthMin the value of Lmax | |
| 84 | + iTerminal index of string descriptor | |
| 85 | + bAssocTerminal id of the output terminal to which | |
| 86 | + this terminal is connected | |
| 87 | + wTerminalType terminal type | |
| 88 | + bTerminalID a non-zero id of this terminal | |
| 89 | + ======================== ==================================== | |
| 79 | 90 | |
| 80 | 91 | What: /config/usb-gadget/gadget/functions/uvc.name/control/processing |
| 81 | 92 | Date: Dec 2014 |
| @@ -88,13 +99,16 @@ KernelVersion: 4.0 · 6 unmodified lines | ||
| 88 | 99 | Description: Default processing unit descriptors |
| 89 | 100 | |
| 90 | 101 | All attributes read only: |
| 91 | − iProcessing - index of string descriptor | |
| 92 | − bmControls - bitmap specifying which controls are | |
| 102 | + | |
| 103 | + =============== ======================================== | |
| 104 | + iProcessing index of string descriptor | |
| 105 | + bmControls bitmap specifying which controls are | |
| 93 | 106 | supported for the video stream |
| 94 | − wMaxMultiplier - maximum digital magnification x100 | |
| 95 | − bSourceID - id of the terminal to which this unit is | |
| 107 | + wMaxMultiplier maximum digital magnification x100 | |
| 108 | + bSourceID id of the terminal to which this unit is | |
| 96 | 109 | connected |
| 97 | − bUnitID - a non-zero id of this unit | |
| 110 | + bUnitID a non-zero id of this unit | |
| 111 | + =============== ======================================== | |
| 98 | 112 | |
| 99 | 113 | What: /config/usb-gadget/gadget/functions/uvc.name/control/header |
| 100 | 114 | Date: Dec 2014 |
| @@ -114,8 +128,11 @@ KernelVersion: 4.0 · 13 unmodified lines | ||
| 114 | 128 | Description: Streaming descriptors |
| 115 | 129 | |
| 116 | 130 | All attributes read only: |
| 117 | − bInterfaceNumber - USB interface number for this | |
| 118 | − streaming interface | |
| 131 | + | |
| 132 | + ================ ============================= | |
| 133 | + bInterfaceNumber USB interface number for this | |
| 134 | + streaming interface | |
| 135 | + ================ ============================= | |
| 119 | 136 | |
| 120 | 137 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class |
| 121 | 138 | Date: Dec 2014 |
| @@ -148,13 +165,16 @@ KernelVersion: 4.0 · 26 unmodified lines | ||
| 148 | 165 | Description: Default color matching descriptors |
| 149 | 166 | |
| 150 | 167 | All attributes read only: |
| 151 | − bMatrixCoefficients - matrix used to compute luma and | |
| 152 | − chroma values from the color primaries | |
| 153 | − bTransferCharacteristics- optoelectronic transfer | |
| 154 | − characteristic of the source picutre, | |
| 155 | − also called the gamma function | |
| 156 | − bColorPrimaries - color primaries and the reference | |
| 157 | − white | |
| 168 | + | |
| 169 | + ======================== ====================================== | |
| 170 | + bMatrixCoefficients matrix used to compute luma and | |
| 171 | + chroma values from the color primaries | |
| 172 | + bTransferCharacteristics optoelectronic transfer | |
| 173 | + characteristic of the source picutre, | |
| 174 | + also called the gamma function | |
| 175 | + bColorPrimaries color primaries and the reference | |
| 176 | + white | |
| 177 | + ======================== ====================================== | |
| 158 | 178 | |
| 159 | 179 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg |
| 160 | 180 | Date: Dec 2014 |
| @@ -168,47 +188,52 @@ Description: Specific MJPEG format descriptors · 7 unmodified lines | ||
| 168 | 188 | |
| 169 | 189 | All attributes read only, |
| 170 | 190 | except bmaControls and bDefaultFrameIndex: |
| 171 | − bFormatIndex - unique id for this format descriptor; | |
| 191 | + | |
| 192 | + =================== ===================================== | |
| 193 | + bFormatIndex unique id for this format descriptor; | |
| 172 | 194 | only defined after parent header is |
| 173 | 195 | linked into the streaming class; |
| 174 | 196 | read-only |
| 175 | − bmaControls - this format's data for bmaControls in | |
| 197 | + bmaControls this format's data for bmaControls in | |
| 176 | 198 | the streaming header |
| 177 | − bmInterfaceFlags - specifies interlace information, | |
| 199 | + bmInterfaceFlags specifies interlace information, | |
| 178 | 200 | read-only |
| 179 | − bAspectRatioY - the X dimension of the picture aspect | |
| 201 | + bAspectRatioY the X dimension of the picture aspect | |
| 180 | 202 | ratio, read-only |
| 181 | − bAspectRatioX - the Y dimension of the picture aspect | |
| 203 | + bAspectRatioX the Y dimension of the picture aspect | |
| 182 | 204 | ratio, read-only |
| 183 | − bmFlags - characteristics of this format, | |
| 205 | + bmFlags characteristics of this format, | |
| 184 | 206 | read-only |
| 185 | − bDefaultFrameIndex - optimum frame index for this stream | |
| 207 | + bDefaultFrameIndex optimum frame index for this stream | |
| 208 | + =================== ===================================== | |
| 186 | 209 | |
| 187 | 210 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name/name |
| 188 | 211 | Date: Dec 2014 |
| 189 | 212 | KernelVersion: 4.0 |
| 190 | 213 | Description: Specific MJPEG frame descriptors |
| 191 | 214 | |
| 192 | − bFrameIndex - unique id for this framedescriptor; | |
| 193 | − only defined after parent format is | |
| 194 | − linked into the streaming header; | |
| 195 | − read-only | |
| 196 | − dwFrameInterval - indicates how frame interval can be | |
| 197 | − programmed; a number of values | |
| 198 | − separated by newline can be specified | |
| 199 | − dwDefaultFrameInterval - the frame interval the device would | |
| 200 | − like to use as default | |
| 201 | − dwMaxVideoFrameBufferSize- the maximum number of bytes the | |
| 202 | − compressor will produce for a video | |
| 203 | − frame or still image | |
| 204 | − dwMaxBitRate - the maximum bit rate at the shortest | |
| 205 | − frame interval in bps | |
| 206 | − dwMinBitRate - the minimum bit rate at the longest | |
| 207 | − frame interval in bps | |
| 208 | − wHeight - height of decoded bitmap frame in px | |
| 209 | − wWidth - width of decoded bitmam frame in px | |
| 210 | − bmCapabilities - still image support, fixed frame-rate | |
| 211 | − support | |
| 215 | + ========================= ===================================== | |
| 216 | + bFrameIndex unique id for this framedescriptor; | |
| 217 | + only defined after parent format is | |
| 218 | + linked into the streaming header; | |
| 219 | + read-only | |
| 220 | + dwFrameInterval indicates how frame interval can be | |
| 221 | + programmed; a number of values | |
| 222 | + separated by newline can be specified | |
| 223 | + dwDefaultFrameInterval the frame interval the device would | |
| 224 | + like to use as default | |
| 225 | + dwMaxVideoFrameBufferSize the maximum number of bytes the | |
| 226 | + compressor will produce for a video | |
| 227 | + frame or still image | |
| 228 | + dwMaxBitRate the maximum bit rate at the shortest | |
| 229 | + frame interval in bps | |
| 230 | + dwMinBitRate the minimum bit rate at the longest | |
| 231 | + frame interval in bps | |
| 232 | + wHeight height of decoded bitmap frame in px | |
| 233 | + wWidth width of decoded bitmam frame in px | |
| 234 | + bmCapabilities still image support, fixed frame-rate | |
| 235 | + support | |
| 236 | + ========================= ===================================== | |
| 212 | 237 | |
| 213 | 238 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed |
| 214 | 239 | Date: Dec 2014 |
| @@ -220,50 +245,54 @@ Date: Dec 2014 · 5 unmodified lines | ||
| 220 | 245 | KernelVersion: 4.0 |
| 221 | 246 | Description: Specific uncompressed format descriptors |
| 222 | 247 | |
| 223 | − bFormatIndex - unique id for this format descriptor; | |
| 248 | + ================== ======================================= | |
| 249 | + bFormatIndex unique id for this format descriptor; | |
| 224 | 250 | only defined after parent header is |
| 225 | 251 | linked into the streaming class; |
| 226 | 252 | read-only |
| 227 | − bmaControls - this format's data for bmaControls in | |
| 253 | + bmaControls this format's data for bmaControls in | |
| 228 | 254 | the streaming header |
| 229 | − bmInterfaceFlags - specifies interlace information, | |
| 255 | + bmInterfaceFlags specifies interlace information, | |
| 230 | 256 | read-only |
| 231 | − bAspectRatioY - the X dimension of the picture aspect | |
| 257 | + bAspectRatioY the X dimension of the picture aspect | |
| 232 | 258 | ratio, read-only |
| 233 | − bAspectRatioX - the Y dimension of the picture aspect | |
| 259 | + bAspectRatioX the Y dimension of the picture aspect | |
| 234 | 260 | ratio, read-only |
| 235 | − bDefaultFrameIndex - optimum frame index for this stream | |
| 236 | − bBitsPerPixel - number of bits per pixel used to | |
| 261 | + bDefaultFrameIndex optimum frame index for this stream | |
| 262 | + bBitsPerPixel number of bits per pixel used to | |
| 237 | 263 | specify color in the decoded video |
| 238 | 264 | frame |
| 239 | − guidFormat - globally unique id used to identify | |
| 265 | + guidFormat globally unique id used to identify | |
| 240 | 266 | stream-encoding format |
| 267 | + ================== ======================================= | |
| 241 | 268 | |
| 242 | 269 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name/name |
| 243 | 270 | Date: Dec 2014 |
| 244 | 271 | KernelVersion: 4.0 |
| 245 | 272 | Description: Specific uncompressed frame descriptors |
| 246 | 273 | |
| 247 | − bFrameIndex - unique id for this framedescriptor; | |
| 248 | − only defined after parent format is | |
| 249 | − linked into the streaming header; | |
| 250 | − read-only | |
| 251 | − dwFrameInterval - indicates how frame interval can be | |
| 252 | − programmed; a number of values | |
| 253 | − separated by newline can be specified | |
| 254 | − dwDefaultFrameInterval - the frame interval the device would | |
| 255 | − like to use as default | |
| 256 | − dwMaxVideoFrameBufferSize- the maximum number of bytes the | |
| 257 | − compressor will produce for a video | |
| 258 | − frame or still image | |
| 259 | − dwMaxBitRate - the maximum bit rate at the shortest | |
| 260 | − frame interval in bps | |
| 261 | − dwMinBitRate - the minimum bit rate at the longest | |
| 262 | − frame interval in bps | |
| 263 | − wHeight - height of decoded bitmap frame in px | |
| 264 | − wWidth - width of decoded bitmam frame in px | |
| 265 | − bmCapabilities - still image support, fixed frame-rate | |
| 266 | − support | |
| 274 | + ========================= ===================================== | |
| 275 | + bFrameIndex unique id for this framedescriptor; | |
| 276 | + only defined after parent format is | |
| 277 | + linked into the streaming header; | |
| 278 | + read-only | |
| 279 | + dwFrameInterval indicates how frame interval can be | |
| 280 | + programmed; a number of values | |
| 281 | + separated by newline can be specified | |
| 282 | + dwDefaultFrameInterval the frame interval the device would | |
| 283 | + like to use as default | |
| 284 | + dwMaxVideoFrameBufferSize the maximum number of bytes the | |
| 285 | + compressor will produce for a video | |
| 286 | + frame or still image | |
| 287 | + dwMaxBitRate the maximum bit rate at the shortest | |
| 288 | + frame interval in bps | |
| 289 | + dwMinBitRate the minimum bit rate at the longest | |
| 290 | + frame interval in bps | |
| 291 | + wHeight height of decoded bitmap frame in px | |
| 292 | + wWidth width of decoded bitmam frame in px | |
| 293 | + bmCapabilities still image support, fixed frame-rate | |
| 294 | + support | |
| 295 | + ========================= ===================================== | |
| 267 | 296 | |
| 268 | 297 | What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header |
| 269 | 298 | Date: Dec 2014 |
| @@ -276,17 +305,20 @@ KernelVersion: 4.0 · 6 unmodified lines | ||
| 276 | 305 | Description: Specific streaming header descriptors |
| 277 | 306 | |
| 278 | 307 | All attributes read only: |
| 279 | − bTriggerUsage - how the host software will respond to | |
| 308 | + | |
| 309 | + ==================== ===================================== | |
| 310 | + bTriggerUsage how the host software will respond to | |
| 280 | 311 | a hardware trigger interrupt event |
| 281 | − bTriggerSupport - flag specifying if hardware | |
| 312 | + bTriggerSupport flag specifying if hardware | |
| 282 | 313 | triggering is supported |
| 283 | − bStillCaptureMethod - method of still image caputre | |
| 314 | + bStillCaptureMethod method of still image caputre | |
| 284 | 315 | supported |
| 285 | − bTerminalLink - id of the output terminal to which | |
| 316 | + bTerminalLink id of the output terminal to which | |
| 286 | 317 | the video endpoint of this interface |
| 287 | 318 | is connected |
| 288 | − bmInfo - capabilities of this video streaming | |
| 319 | + bmInfo capabilities of this video streaming | |
| 289 | 320 | interface |
| 321 | + ==================== ===================================== | |
| 290 | 322 | |
| 291 | 323 | What: /sys/class/udc/udc.name/device/gadget/video4linux/video.name/function_name |
| 292 | 324 | Date: May 2018 |
| @@ -23,7 +23,7 @@ error injections without having to know the details of the driver-specific · 22 unmodified lines | ||
| 23 | 23 | commands. |
| 24 | 24 | |
| 25 | 25 | Note that the output of 'error-inj' shall be valid as input to 'error-inj'. |
| 26 | −So this must work: | |
| 26 | +So this must work:: | |
| 27 | 27 | |
| 28 | 28 | $ cat error-inj >einj.txt |
| 29 | 29 | $ cat einj.txt >error-inj |
| @@ -20,9 +20,13 @@ Description: Allow the root user to disable/enable in runtime the clock · 19 unmodified lines | ||
| 20 | 20 | The user can supply a bitmask value, each bit represents |
| 21 | 21 | a different engine to disable/enable its clock gating feature. |
| 22 | 22 | The bitmask is composed of 20 bits: |
| 23 | − 0 - 7 : DMA channels | |
| 24 | − 8 - 11 : MME engines | |
| 25 | − 12 - 19 : TPC engines | |
| 23 | + | |
| 24 | + ======= ============ | |
| 25 | + 0 - 7 DMA channels | |
| 26 | + 8 - 11 MME engines | |
| 27 | + 12 - 19 TPC engines | |
| 28 | + ======= ============ | |
| 29 | + | |
| 26 | 30 | The bit's location of a specific engine can be determined |
| 27 | 31 | using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values |
| 28 | 32 | are defined in uapi habanalabs.h file in enum gaudi_engine_id |
| @@ -59,6 +63,7 @@ Description: Allows the root user to read or write directly through the · 30 unmodified lines | ||
| 59 | 63 | the generic Linux user-space PCI mapping) because the DDR bar |
| 60 | 64 | is very small compared to the DDR memory and only the driver can |
| 61 | 65 | move the bar before and after the transaction. |
| 66 | + | |
| 62 | 67 | If the IOMMU is disabled, it also allows the root user to read |
| 63 | 68 | or write from the host a device VA of a host mapped memory |
| 64 | 69 | |
| @@ -73,6 +78,7 @@ Description: Allows the root user to read or write 64 bit data directly · 8 unmodified lines | ||
| 73 | 78 | the generic Linux user-space PCI mapping) because the DDR bar |
| 74 | 79 | is very small compared to the DDR memory and only the driver can |
| 75 | 80 | move the bar before and after the transaction. |
| 81 | + | |
| 76 | 82 | If the IOMMU is disabled, it also allows the root user to read |
| 77 | 83 | or write from the host a device VA of a host mapped memory |
| 78 | 84 | |
| @@ -6,7 +6,7 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | General information like which GPE is assigned to the EC and whether |
| 7 | 7 | the global lock should get used. |
| 8 | 8 | Knowing the EC GPE one can watch the amount of HW events related to |
| 9 | −the EC here (XY -> GPE number from /sys/kernel/debug/ec/*/gpe): | |
| 9 | +the EC here (XY -> GPE number from `/sys/kernel/debug/ec/*/gpe`): | |
| 10 | 10 | /sys/firmware/acpi/interrupts/gpeXY |
| 11 | 11 | |
| 12 | 12 | The io file is binary and a userspace tool located here: |
| @@ -14,7 +14,8 @@ ftp://ftp.suse.com/pub/people/trenn/sources/ec/ · 1 unmodified line | ||
| 14 | 14 | should get used to read out the 256 Embedded Controller registers |
| 15 | 15 | or writing to them. |
| 16 | 16 | |
| 17 | −CAUTION: Do not write to the Embedded Controller if you don't know | |
| 18 | −what you are doing! Rebooting afterwards also is a good idea. | |
| 19 | −This can influence the way your machine is cooled and fans may | |
| 20 | −not get switched on again after you did a wrong write. | |
| 17 | +CAUTION: | |
| 18 | + Do not write to the Embedded Controller if you don't know | |
| 19 | + what you are doing! Rebooting afterwards also is a good idea. | |
| 20 | + This can influence the way your machine is cooled and fans may | |
| 21 | + not get switched on again after you did a wrong write. | |
| @@ -2,13 +2,19 @@ What: /sys/kernel/debug/moxtet/input · 1 unmodified line | ||
| 2 | 2 | Date: March 2019 |
| 3 | 3 | KernelVersion: 5.3 |
| 4 | 4 | Contact: Marek Behún <marek.behun@nic.cz> |
| 5 | −Description: (R) Read input from the shift registers, in hexadecimal. | |
| 5 | +Description: (Read) Read input from the shift registers, in hexadecimal. | |
| 6 | 6 | Returns N+1 bytes, where N is the number of Moxtet connected |
| 7 | 7 | modules. The first byte is from the CPU board itself. |
| 8 | − Example: 101214 | |
| 9 | − 10: CPU board with SD card | |
| 10 | − 12: 2 = PCIe module, 1 = IRQ not active | |
| 11 | − 14: 4 = Peridot module, 1 = IRQ not active | |
| 8 | + | |
| 9 | + Example:: | |
| 10 | + | |
| 11 | + 101214 | |
| 12 | + | |
| 13 | + == ======================================= | |
| 14 | + 10 CPU board with SD card | |
| 15 | + 12 2 = PCIe module, 1 = IRQ not active | |
| 16 | + 14 4 = Peridot module, 1 = IRQ not active | |
| 17 | + == ======================================= | |
| 12 | 18 | |
| 13 | 19 | What: /sys/kernel/debug/moxtet/output |
| 14 | 20 | Date: March 2019 |
| @@ -17,7 +23,13 @@ Contact: Marek Behún <marek.behun@nic.cz> · 2 unmodified lines | ||
| 17 | 23 | Description: (RW) Read last written value to the shift registers, in |
| 18 | 24 | hexadecimal, or write values to the shift registers, also |
| 19 | 25 | in hexadecimal. |
| 20 | − Example: 0102 | |
| 21 | − 01: 01 was last written, or is to be written, to the | |
| 22 | − first module's shift register | |
| 23 | − 02: the same for second module | |
| 26 | + | |
| 27 | + Example:: | |
| 28 | + | |
| 29 | + 0102 | |
| 30 | + | |
| 31 | + == ================================================ | |
| 32 | + 01 01 was last written, or is to be written, to the | |
| 33 | + first module's shift register | |
| 34 | + 02 the same for second module | |
| 35 | + == ================================================ | |
| @@ -4,42 +4,42 @@ KernelVersion: 3.4 · 3 unmodified lines | ||
| 4 | 4 | Contact: Kent Yoder <key@linux.vnet.ibm.com> |
| 5 | 5 | Description: |
| 6 | 6 | |
| 7 | − These debugfs interfaces are built by the nx-crypto driver, built in | |
| 7 | +These debugfs interfaces are built by the nx-crypto driver, built in | |
| 8 | 8 | arch/powerpc/crypto/nx. |
| 9 | 9 | |
| 10 | 10 | Error Detection |
| 11 | 11 | =============== |
| 12 | 12 | |
| 13 | 13 | errors: |
| 14 | −- A u32 providing a total count of errors since the driver was loaded. The | |
| 15 | −only errors counted here are those returned from the hcall, H_COP_OP. | |
| 14 | + A u32 providing a total count of errors since the driver was loaded. The | |
| 15 | + only errors counted here are those returned from the hcall, H_COP_OP. | |
| 16 | 16 | |
| 17 | 17 | last_error: |
| 18 | −- The most recent non-zero return code from the H_COP_OP hcall. -EBUSY is not | |
| 19 | −recorded here (the hcall will retry until -EBUSY goes away). | |
| 18 | + The most recent non-zero return code from the H_COP_OP hcall. -EBUSY is not | |
| 19 | + recorded here (the hcall will retry until -EBUSY goes away). | |
| 20 | 20 | |
| 21 | 21 | last_error_pid: |
| 22 | −- The process ID of the process who received the most recent error from the | |
| 23 | −hcall. | |
| 22 | + The process ID of the process who received the most recent error from the | |
| 23 | + hcall. | |
| 24 | 24 | |
| 25 | 25 | Device Use |
| 26 | 26 | ========== |
| 27 | 27 | |
| 28 | 28 | aes_bytes: |
| 29 | −- The total number of bytes encrypted using AES in any of the driver's | |
| 30 | −supported modes. | |
| 29 | + The total number of bytes encrypted using AES in any of the driver's | |
| 30 | + supported modes. | |
| 31 | 31 | |
| 32 | 32 | aes_ops: |
| 33 | −- The total number of AES operations submitted to the hardware. | |
| 33 | + The total number of AES operations submitted to the hardware. | |
| 34 | 34 | |
| 35 | 35 | sha256_bytes: |
| 36 | −- The total number of bytes hashed by the hardware using SHA-256. | |
| 36 | + The total number of bytes hashed by the hardware using SHA-256. | |
| 37 | 37 | |
| 38 | 38 | sha256_ops: |
| 39 | −- The total number of SHA-256 operations submitted to the hardware. | |
| 39 | + The total number of SHA-256 operations submitted to the hardware. | |
| 40 | 40 | |
| 41 | 41 | sha512_bytes: |
| 42 | −- The total number of bytes hashed by the hardware using SHA-512. | |
| 42 | + The total number of bytes hashed by the hardware using SHA-512. | |
| 43 | 43 | |
| 44 | 44 | sha512_ops: |
| 45 | −- The total number of SHA-512 operations submitted to the hardware. | |
| 45 | + The total number of SHA-512 operations submitted to the hardware. | |
| @@ -4,16 +4,15 @@ KernelVersion: 2.6.20 · 3 unmodified lines | ||
| 4 | 4 | Contact: Thomas Maier <balagi@justmail.de> |
| 5 | 5 | Description: |
| 6 | 6 | |
| 7 | −debugfs interface | |
| 8 | −----------------- | |
| 9 | − | |
| 10 | 7 | The pktcdvd module (packet writing driver) creates |
| 11 | 8 | these files in debugfs: |
| 12 | 9 | |
| 13 | 10 | /sys/kernel/debug/pktcdvd/pktcdvd[0-7]/ |
| 14 | − info (0444) Lots of driver statistics and infos. | |
| 15 | 11 | |
| 16 | −Example: | |
| 17 | −------- | |
| 12 | + ==== ====== ==================================== | |
| 13 | + info 0444 Lots of driver statistics and infos. | |
| 14 | + ==== ====== ==================================== | |
| 15 | + | |
| 16 | +Example:: | |
| 18 | 17 | |
| 19 | −cat /sys/kernel/debug/pktcdvd/pktcdvd0/info | |
| 18 | + cat /sys/kernel/debug/pktcdvd/pktcdvd0/info | |
| @@ -2,8 +2,13 @@ What: /sys/kernel/debug/turris-mox-rwtm/do_sign · 1 unmodified line | ||
| 2 | 2 | Date: Jun 2020 |
| 3 | 3 | KernelVersion: 5.8 |
| 4 | 4 | Contact: Marek Behún <marek.behun@nic.cz> |
| 5 | −Description: (W) Message to sign with the ECDSA private key stored in | |
| 6 | − device's OTP. The message must be exactly 64 bytes (since | |
| 7 | − this is intended for SHA-512 hashes). | |
| 8 | − (R) The resulting signature, 136 bytes. This contains the R and | |
| 9 | − S values of the ECDSA signature, both in big-endian format. | |
| 5 | +Description: | |
| 6 | + | |
| 7 | + ======= =========================================================== | |
| 8 | + (Write) Message to sign with the ECDSA private key stored in | |
| 9 | + device's OTP. The message must be exactly 64 bytes | |
| 10 | + (since this is intended for SHA-512 hashes). | |
| 11 | + (Read) The resulting signature, 136 bytes. This contains the | |
| 12 | + R and S values of the ECDSA signature, both in | |
| 13 | + big-endian format. | |
| 14 | + ======= =========================================================== | |
| @@ -27,16 +27,17 @@ Description: · 26 unmodified lines | ||
| 27 | 27 | for writing, two for the type and at least a single byte of |
| 28 | 28 | data. |
| 29 | 29 | |
| 30 | − Example: | |
| 31 | − // Request EC info type 3 (EC firmware build date) | |
| 32 | − // Corresponds with sending type 0x00f0 with | |
| 33 | − // MBOX = [38, 00, 03, 00] | |
| 34 | − $ echo 00 f0 38 00 03 00 > /sys/kernel/debug/wilco_ec/raw | |
| 35 | − // View the result. The decoded ASCII result "12/21/18" is | |
| 36 | − // included after the raw hex. | |
| 37 | − // Corresponds with MBOX = [00, 00, 31, 32, 2f, 32, 31, 38, ...] | |
| 38 | − $ cat /sys/kernel/debug/wilco_ec/raw | |
| 39 | − 00 00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 ..12/21/18.8... | |
| 30 | + Example:: | |
| 31 | + | |
| 32 | + // Request EC info type 3 (EC firmware build date) | |
| 33 | + // Corresponds with sending type 0x00f0 with | |
| 34 | + // MBOX = [38, 00, 03, 00] | |
| 35 | + $ echo 00 f0 38 00 03 00 > /sys/kernel/debug/wilco_ec/raw | |
| 36 | + // View the result. The decoded ASCII result "12/21/18" is | |
| 37 | + // included after the raw hex. | |
| 38 | + // Corresponds with MBOX = [00, 00, 31, 32, 2f, 32, 31, 38, ...] | |
| 39 | + $ cat /sys/kernel/debug/wilco_ec/raw | |
| 40 | + 00 00 31 32 2f 32 31 2f 31 38 00 38 00 01 00 2f 00 ..12/21/18.8... | |
| 40 | 41 | |
| 41 | 42 | Note that the first 16 bytes of the received MBOX[] will be |
| 42 | 43 | printed, even if some of the data is junk, and skipping bytes |
| @@ -10,29 +10,29 @@ Description: · 9 unmodified lines | ||
| 10 | 10 | <uapi/linux/wmi.h> |
| 11 | 11 | |
| 12 | 12 | 1) To perform an SMBIOS call from userspace, you'll need to |
| 13 | − first determine the minimum size of the calling interface | |
| 14 | − buffer for your machine. | |
| 15 | − Platforms that contain larger buffers can return larger | |
| 16 | − objects from the system firmware. | |
| 17 | − Commonly this size is either 4k or 32k. | |
| 13 | + first determine the minimum size of the calling interface | |
| 14 | + buffer for your machine. | |
| 15 | + Platforms that contain larger buffers can return larger | |
| 16 | + objects from the system firmware. | |
| 17 | + Commonly this size is either 4k or 32k. | |
| 18 | 18 | |
| 19 | − To determine the size of the buffer read() a u64 dword from | |
| 20 | − the WMI character device /dev/wmi/dell-smbios. | |
| 19 | + To determine the size of the buffer read() a u64 dword from | |
| 20 | + the WMI character device /dev/wmi/dell-smbios. | |
| 21 | 21 | |
| 22 | 22 | 2) After you've determined the minimum size of the calling |
| 23 | − interface buffer, you can allocate a structure that represents | |
| 24 | − the structure documented above. | |
| 23 | + interface buffer, you can allocate a structure that represents | |
| 24 | + the structure documented above. | |
| 25 | 25 | |
| 26 | 26 | 3) In the 'length' object store the size of the buffer you |
| 27 | − determined above and allocated. | |
| 27 | + determined above and allocated. | |
| 28 | 28 | |
| 29 | 29 | 4) In this buffer object, prepare as necessary for the SMBIOS |
| 30 | − call you're interested in. Typically SMBIOS buffers have | |
| 31 | − "class", "select", and "input" defined to values that coincide | |
| 32 | − with the data you are interested in. | |
| 33 | − Documenting class/select/input values is outside of the scope | |
| 34 | − of this documentation. Check with the libsmbios project for | |
| 35 | − further documentation on these values. | |
| 30 | + call you're interested in. Typically SMBIOS buffers have | |
| 31 | + "class", "select", and "input" defined to values that coincide | |
| 32 | + with the data you are interested in. | |
| 33 | + Documenting class/select/input values is outside of the scope | |
| 34 | + of this documentation. Check with the libsmbios project for | |
| 35 | + further documentation on these values. | |
| 36 | 36 | |
| 37 | 37 | 6) Run the call by using ioctl() as described in the header. |
| 38 | 38 | |
| @@ -6,6 +6,7 @@ Description: The /dev/kmsg character device node provides userspace access · 5 unmodified lines | ||
| 6 | 6 | to the kernel's printk buffer. |
| 7 | 7 | |
| 8 | 8 | Injecting messages: |
| 9 | + | |
| 9 | 10 | Every write() to the opened device node places a log entry in |
| 10 | 11 | the kernel's printk buffer. |
| 11 | 12 | |
| @@ -21,6 +22,7 @@ Description: The /dev/kmsg character device node provides userspace access · 9 unmodified lines | ||
| 21 | 22 | the messages can always be reliably determined. |
| 22 | 23 | |
| 23 | 24 | Accessing the buffer: |
| 25 | + | |
| 24 | 26 | Every read() from the opened device node receives one record |
| 25 | 27 | of the kernel's printk buffer. |
| 26 | 28 | |
| @@ -48,6 +50,7 @@ Description: The /dev/kmsg character device node provides userspace access · 21 unmodified lines | ||
| 48 | 50 | if needed, without limiting the interface to a single reader. |
| 49 | 51 | |
| 50 | 52 | The device supports seek with the following parameters: |
| 53 | + | |
| 51 | 54 | SEEK_SET, 0 |
| 52 | 55 | seek to the first entry in the buffer |
| 53 | 56 | SEEK_END, 0 |
| @@ -87,18 +90,22 @@ Description: The /dev/kmsg character device node provides userspace access · 33 unmodified lines | ||
| 87 | 90 | readable context of the message, for reliable processing in |
| 88 | 91 | userspace. |
| 89 | 92 | |
| 90 | − Example: | |
| 91 | − 7,160,424069,-;pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) | |
| 92 | − SUBSYSTEM=acpi | |
| 93 | − DEVICE=+acpi:PNP0A03:00 | |
| 94 | − 6,339,5140900,-;NET: Registered protocol family 10 | |
| 95 | − 30,340,5690716,-;udevd[80]: starting version 181 | |
| 93 | + Example:: | |
| 94 | + | |
| 95 | + 7,160,424069,-;pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) | |
| 96 | + SUBSYSTEM=acpi | |
| 97 | + DEVICE=+acpi:PNP0A03:00 | |
| 98 | + 6,339,5140900,-;NET: Registered protocol family 10 | |
| 99 | + 30,340,5690716,-;udevd[80]: starting version 181 | |
| 96 | 100 | |
| 97 | 101 | The DEVICE= key uniquely identifies devices the following way: |
| 98 | − b12:8 - block dev_t | |
| 99 | − c127:3 - char dev_t | |
| 100 | − n8 - netdev ifindex | |
| 101 | − +sound:card0 - subsystem:devname | |
| 102 | + | |
| 103 | + ============ ================= | |
| 104 | + b12:8 block dev_t | |
| 105 | + c127:3 char dev_t | |
| 106 | + n8 netdev ifindex | |
| 107 | + +sound:card0 subsystem:devname | |
| 108 | + ============ ================= | |
| 102 | 109 | |
| 103 | 110 | The flags field carries '-' by default. A 'c' indicates a |
| 104 | 111 | fragment of a line. Note, that these hints about continuation |
| @@ -17,26 +17,33 @@ Description: · 16 unmodified lines | ||
| 17 | 17 | echoing a value to <securityfs>/evm made up of the |
| 18 | 18 | following bits: |
| 19 | 19 | |
| 20 | + === ================================================== | |
| 20 | 21 | Bit Effect |
| 22 | + === ================================================== | |
| 21 | 23 | 0 Enable HMAC validation and creation |
| 22 | 24 | 1 Enable digital signature validation |
| 23 | 25 | 2 Permit modification of EVM-protected metadata at |
| 24 | 26 | runtime. Not supported if HMAC validation and |
| 25 | 27 | creation is enabled. |
| 26 | 28 | 31 Disable further runtime modification of EVM policy |
| 29 | + === ================================================== | |
| 27 | 30 | |
| 28 | − For example: | |
| 31 | + For example:: | |
| 29 | 32 | |
| 30 | − echo 1 ><securityfs>/evm | |
| 33 | + echo 1 ><securityfs>/evm | |
| 31 | 34 | |
| 32 | 35 | will enable HMAC validation and creation |
| 33 | 36 | |
| 34 | − echo 0x80000003 ><securityfs>/evm | |
| 37 | + :: | |
| 38 | + | |
| 39 | + echo 0x80000003 ><securityfs>/evm | |
| 35 | 40 | |
| 36 | 41 | will enable HMAC and digital signature validation and |
| 37 | 42 | HMAC creation and disable all further modification of policy. |
| 38 | 43 | |
| 39 | − echo 0x80000006 ><securityfs>/evm | |
| 44 | + :: | |
| 45 | + | |
| 46 | + echo 0x80000006 ><securityfs>/evm | |
| 40 | 47 | |
| 41 | 48 | will enable digital signature validation, permit |
| 42 | 49 | modification of EVM-protected metadata and |
| @@ -65,7 +72,7 @@ Description: · 22 unmodified lines | ||
| 65 | 72 | Shows the set of extended attributes used to calculate or |
| 66 | 73 | validate the EVM signature, and allows additional attributes |
| 67 | 74 | to be added at runtime. Any signatures generated after |
| 68 | − additional attributes are added (and on files posessing those | |
| 75 | + additional attributes are added (and on files possessing those | |
| 69 | 76 | additional attributes) will only be valid if the same |
| 70 | 77 | additional attributes are configured on system boot. Writing |
| 71 | 78 | a single period (.) will lock the xattr list from any further |
| @@ -12,15 +12,16 @@ Description: · 11 unmodified lines | ||
| 12 | 12 | The following file operations are supported: |
| 13 | 13 | |
| 14 | 14 | open(2) |
| 15 | − Currently the only useful flags are O_RDWR. | |
| 15 | + Currently the only useful flags are O_RDWR. | |
| 16 | 16 | |
| 17 | 17 | ioctl(2) |
| 18 | − Initiate various actions. | |
| 19 | − See the inline documentation in [include/uapi]<linux/gpio.h> | |
| 20 | − for descriptions of all ioctls. | |
| 18 | + Initiate various actions. | |
| 19 | + | |
| 20 | + See the inline documentation in [include/uapi]<linux/gpio.h> | |
| 21 | + for descriptions of all ioctls. | |
| 21 | 22 | |
| 22 | 23 | close(2) |
| 23 | − Stops and free up the I/O contexts that was associated | |
| 24 | − with the file descriptor. | |
| 24 | + Stops and free up the I/O contexts that was associated | |
| 25 | + with the file descriptor. | |
| 25 | 26 | |
| 26 | 27 | Users: TBD |
| @@ -15,19 +15,22 @@ Description: · 14 unmodified lines | ||
| 15 | 15 | IMA appraisal, if configured, uses these file measurements |
| 16 | 16 | for local measurement appraisal. |
| 17 | 17 | |
| 18 | − rule format: action [condition ...] | |
| 18 | + :: | |
| 19 | 19 | |
| 20 | − action: measure | dont_measure | appraise | dont_appraise | | |
| 21 | − audit | hash | dont_hash | |
| 22 | − condition:= base | lsm [option] | |
| 20 | + rule format: action [condition ...] | |
| 21 | + | |
| 22 | + action: measure | dont_measure | appraise | dont_appraise | | |
| 23 | + audit | hash | dont_hash | |
| 24 | + condition:= base | lsm [option] | |
| 23 | 25 | base: [[func=] [mask=] [fsmagic=] [fsuuid=] [uid=] |
| 24 | 26 | [euid=] [fowner=] [fsname=]] |
| 25 | 27 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
| 26 | 28 | [obj_user=] [obj_role=] [obj_type=]] |
| 27 | 29 | option: [[appraise_type=]] [template=] [permit_directio] |
| 28 | 30 | [appraise_flag=] [keyrings=] |
| 29 | − base: func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK][MODULE_CHECK] | |
| 30 | − [FIRMWARE_CHECK] | |
| 31 | + base: | |
| 32 | + func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK]MODULE_CHECK] | |
| 33 | + [FIRMWARE_CHECK] | |
| 31 | 34 | [KEXEC_KERNEL_CHECK] [KEXEC_INITRAMFS_CHECK] |
| 32 | 35 | [KEXEC_CMDLINE] [KEY_CHECK] |
| 33 | 36 | mask:= [[^]MAY_READ] [[^]MAY_WRITE] [[^]MAY_APPEND] |
| @@ -37,8 +40,9 @@ Description: · 3 unmodified lines | ||
| 37 | 40 | uid:= decimal value |
| 38 | 41 | euid:= decimal value |
| 39 | 42 | fowner:= decimal value |
| 40 | − lsm: are LSM specific | |
| 41 | − option: appraise_type:= [imasig] [imasig|modsig] | |
| 43 | + lsm: are LSM specific | |
| 44 | + option: | |
| 45 | + appraise_type:= [imasig] [imasig|modsig] | |
| 42 | 46 | appraise_flag:= [check_blacklist] |
| 43 | 47 | Currently, blacklist check is only for files signed with appended |
| 44 | 48 | signature. |
| @@ -49,7 +53,7 @@ Description: · 4 unmodified lines | ||
| 49 | 53 | (eg, ima-ng). Only valid when action is "measure". |
| 50 | 54 | pcr:= decimal value |
| 51 | 55 | |
| 52 | − default policy: | |
| 56 | + default policy: | |
| 53 | 57 | # PROC_SUPER_MAGIC |
| 54 | 58 | dont_measure fsmagic=0x9fa0 |
| 55 | 59 | dont_appraise fsmagic=0x9fa0 |
| @@ -97,7 +101,8 @@ Description: · 41 unmodified lines | ||
| 97 | 101 | |
| 98 | 102 | Examples of LSM specific definitions: |
| 99 | 103 | |
| 100 | − SELinux: | |
| 104 | + SELinux:: | |
| 105 | + | |
| 101 | 106 | dont_measure obj_type=var_log_t |
| 102 | 107 | dont_appraise obj_type=var_log_t |
| 103 | 108 | dont_measure obj_type=auditd_log_t |
| @@ -105,10 +110,11 @@ Description: · 1 unmodified line | ||
| 105 | 110 | measure subj_user=system_u func=FILE_CHECK mask=MAY_READ |
| 106 | 111 | measure subj_role=system_r func=FILE_CHECK mask=MAY_READ |
| 107 | 112 | |
| 108 | − Smack: | |
| 113 | + Smack:: | |
| 114 | + | |
| 109 | 115 | measure subj_user=_ func=FILE_CHECK mask=MAY_READ |
| 110 | 116 | |
| 111 | − Example of measure rules using alternate PCRs: | |
| 117 | + Example of measure rules using alternate PCRs:: | |
| 112 | 118 | |
| 113 | 119 | measure func=KEXEC_KERNEL_CHECK pcr=4 |
| 114 | 120 | measure func=KEXEC_INITRAMFS_CHECK pcr=5 |
| @@ -6,32 +6,38 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | of block devices. Each line contains the following 14 |
| 7 | 7 | fields: |
| 8 | 8 | |
| 9 | − 1 - major number | |
| 10 | − 2 - minor mumber | |
| 11 | − 3 - device name | |
| 12 | − 4 - reads completed successfully | |
| 13 | − 5 - reads merged | |
| 14 | − 6 - sectors read | |
| 15 | − 7 - time spent reading (ms) | |
| 16 | − 8 - writes completed | |
| 17 | − 9 - writes merged | |
| 18 | − 10 - sectors written | |
| 19 | − 11 - time spent writing (ms) | |
| 20 | − 12 - I/Os currently in progress | |
| 21 | − 13 - time spent doing I/Os (ms) | |
| 22 | − 14 - weighted time spent doing I/Os (ms) | |
| 9 | + == =================================== | |
| 10 | + 1 major number | |
| 11 | + 2 minor mumber | |
| 12 | + 3 device name | |
| 13 | + 4 reads completed successfully | |
| 14 | + 5 reads merged | |
| 15 | + 6 sectors read | |
| 16 | + 7 time spent reading (ms) | |
| 17 | + 8 writes completed | |
| 18 | + 9 writes merged | |
| 19 | + 10 sectors written | |
| 20 | + 11 time spent writing (ms) | |
| 21 | + 12 I/Os currently in progress | |
| 22 | + 13 time spent doing I/Os (ms) | |
| 23 | + 14 weighted time spent doing I/Os (ms) | |
| 24 | + == =================================== | |
| 23 | 25 | |
| 24 | 26 | Kernel 4.18+ appends four more fields for discard |
| 25 | 27 | tracking putting the total at 18: |
| 26 | 28 | |
| 27 | − 15 - discards completed successfully | |
| 28 | − 16 - discards merged | |
| 29 | − 17 - sectors discarded | |
| 30 | − 18 - time spent discarding | |
| 29 | + == =================================== | |
| 30 | + 15 discards completed successfully | |
| 31 | + 16 discards merged | |
| 32 | + 17 sectors discarded | |
| 33 | + 18 time spent discarding | |
| 34 | + == =================================== | |
| 31 | 35 | |
| 32 | 36 | Kernel 5.5+ appends two more fields for flush requests: |
| 33 | 37 | |
| 34 | − 19 - flush requests completed successfully | |
| 35 | − 20 - time spent flushing | |
| 38 | + == ===================================== | |
| 39 | + 19 flush requests completed successfully | |
| 40 | + 20 time spent flushing | |
| 41 | + == ===================================== | |
| 36 | 42 | |
| 37 | 43 | For more details refer to Documentation/admin-guide/iostats.rst |
| @@ -14,28 +14,28 @@ Description: · 13 unmodified lines | ||
| 14 | 14 | For more details, see Documentation/filesystems/proc.rst |
| 15 | 15 | and the procfs man page. |
| 16 | 16 | |
| 17 | − Typical output looks like this: | |
| 17 | + Typical output looks like this:: | |
| 18 | 18 | |
| 19 | − 00100000-ff709000 ---p 00000000 00:00 0 [rollup] | |
| 20 | − Size: 1192 kB | |
| 21 | − KernelPageSize: 4 kB | |
| 22 | − MMUPageSize: 4 kB | |
| 23 | − Rss: 884 kB | |
| 24 | − Pss: 385 kB | |
| 25 | − Pss_Anon: 301 kB | |
| 26 | − Pss_File: 80 kB | |
| 27 | − Pss_Shmem: 4 kB | |
| 28 | − Shared_Clean: 696 kB | |
| 29 | − Shared_Dirty: 0 kB | |
| 30 | − Private_Clean: 120 kB | |
| 31 | − Private_Dirty: 68 kB | |
| 32 | − Referenced: 884 kB | |
| 33 | − Anonymous: 68 kB | |
| 34 | − LazyFree: 0 kB | |
| 35 | − AnonHugePages: 0 kB | |
| 36 | − ShmemPmdMapped: 0 kB | |
| 37 | − Shared_Hugetlb: 0 kB | |
| 38 | − Private_Hugetlb: 0 kB | |
| 39 | − Swap: 0 kB | |
| 40 | − SwapPss: 0 kB | |
| 41 | − Locked: 385 kB | |
| 19 | + 00100000-ff709000 ---p 00000000 00:00 0 [rollup] | |
| 20 | + Size: 1192 kB | |
| 21 | + KernelPageSize: 4 kB | |
| 22 | + MMUPageSize: 4 kB | |
| 23 | + Rss: 884 kB | |
| 24 | + Pss: 385 kB | |
| 25 | + Pss_Anon: 301 kB | |
| 26 | + Pss_File: 80 kB | |
| 27 | + Pss_Shmem: 4 kB | |
| 28 | + Shared_Clean: 696 kB | |
| 29 | + Shared_Dirty: 0 kB | |
| 30 | + Private_Clean: 120 kB | |
| 31 | + Private_Dirty: 68 kB | |
| 32 | + Referenced: 884 kB | |
| 33 | + Anonymous: 68 kB | |
| 34 | + LazyFree: 0 kB | |
| 35 | + AnonHugePages: 0 kB | |
| 36 | + ShmemPmdMapped: 0 kB | |
| 37 | + Shared_Hugetlb: 0 kB | |
| 38 | + Private_Hugetlb: 0 kB | |
| 39 | + Swap: 0 kB | |
| 40 | + SwapPss: 0 kB | |
| 41 | + Locked: 385 kB | |
| @@ -9,25 +9,25 @@ Description: Generic interface to platform dependent persistent storage. · 8 unmodified lines | ||
| 9 | 9 | provide a generic interface to show records captured in |
| 10 | 10 | the dying moments. In the case of a panic the last part |
| 11 | 11 | of the console log is captured, but other interesting |
| 12 | − data can also be saved. | |
| 12 | + data can also be saved:: | |
| 13 | 13 | |
| 14 | − # mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore | |
| 14 | + # mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore | |
| 15 | 15 | |
| 16 | − $ ls -l /sys/fs/pstore/ | |
| 17 | − total 0 | |
| 18 | − -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1 | |
| 16 | + $ ls -l /sys/fs/pstore/ | |
| 17 | + total 0 | |
| 18 | + -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1 | |
| 19 | 19 | |
| 20 | 20 | Different users of this interface will result in different |
| 21 | 21 | filename prefixes. Currently two are defined: |
| 22 | 22 | |
| 23 | − "dmesg" - saved console log | |
| 24 | − "mce" - architecture dependent data from fatal h/w error | |
| 23 | + - "dmesg" - saved console log | |
| 24 | + - "mce" - architecture dependent data from fatal h/w error | |
| 25 | 25 | |
| 26 | 26 | Once the information in a file has been read, removing |
| 27 | 27 | the file will signal to the underlying persistent storage |
| 28 | − device that it can reclaim the space for later re-use. | |
| 28 | + device that it can reclaim the space for later re-use:: | |
| 29 | 29 | |
| 30 | − $ rm /sys/fs/pstore/dmesg-erst-1 | |
| 30 | + $ rm /sys/fs/pstore/dmesg-erst-1 | |
| 31 | 31 | |
| 32 | 32 | The expectation is that all files in /sys/fs/pstore/ |
| 33 | 33 | will be saved elsewhere and erased from persistent store |
| @@ -44,4 +44,3 @@ Description: Generic interface to platform dependent persistent storage. · 10 unmodified lines | ||
| 44 | 44 | backends are available, the preferred backend may be |
| 45 | 45 | set by passing the pstore.backend= argument to the kernel at |
| 46 | 46 | boot time. |
| 47 | − | |
| @@ -4,23 +4,27 @@ Contact: Jerome Marchand <jmarchan@redhat.com> · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | The /sys/block/<disk>/stat files displays the I/O |
| 6 | 6 | statistics of disk <disk>. They contain 11 fields: |
| 7 | − 1 - reads completed successfully | |
| 8 | − 2 - reads merged | |
| 9 | − 3 - sectors read | |
| 10 | − 4 - time spent reading (ms) | |
| 11 | − 5 - writes completed | |
| 12 | − 6 - writes merged | |
| 13 | − 7 - sectors written | |
| 14 | − 8 - time spent writing (ms) | |
| 15 | − 9 - I/Os currently in progress | |
| 16 | − 10 - time spent doing I/Os (ms) | |
| 17 | − 11 - weighted time spent doing I/Os (ms) | |
| 18 | − 12 - discards completed | |
| 19 | − 13 - discards merged | |
| 20 | − 14 - sectors discarded | |
| 21 | − 15 - time spent discarding (ms) | |
| 22 | − 16 - flush requests completed | |
| 23 | − 17 - time spent flushing (ms) | |
| 7 | + | |
| 8 | + == ============================================== | |
| 9 | + 1 reads completed successfully | |
| 10 | + 2 reads merged | |
| 11 | + 3 sectors read | |
| 12 | + 4 time spent reading (ms) | |
| 13 | + 5 writes completed | |
| 14 | + 6 writes merged | |
| 15 | + 7 sectors written | |
| 16 | + 8 time spent writing (ms) | |
| 17 | + 9 I/Os currently in progress | |
| 18 | + 10 time spent doing I/Os (ms) | |
| 19 | + 11 weighted time spent doing I/Os (ms) | |
| 20 | + 12 discards completed | |
| 21 | + 13 discards merged | |
| 22 | + 14 sectors discarded | |
| 23 | + 15 time spent discarding (ms) | |
| 24 | + 16 flush requests completed | |
| 25 | + 17 time spent flushing (ms) | |
| 26 | + == ============================================== | |
| 27 | + | |
| 24 | 28 | For more details refer Documentation/admin-guide/iostats.rst |
| 25 | 29 | |
| 26 | 30 | |
| @@ -8,11 +8,13 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | It has the following valid values: |
| 10 | 10 | |
| 11 | + == ======================================================== | |
| 11 | 12 | 0 OFF - the LED is not activated on activity |
| 12 | 13 | 1 BLINK_ON - the LED blinks on every 10ms when activity is |
| 13 | 14 | detected. |
| 14 | 15 | 2 BLINK_OFF - the LED is on when idle, and blinks off |
| 15 | 16 | every 10ms when activity is detected. |
| 17 | + == ======================================================== | |
| 16 | 18 | |
| 17 | 19 | Note that the user must turn sw_activity OFF it they wish to |
| 18 | 20 | control the activity LED via the em_message file. |
| @@ -9,9 +9,9 @@ Description: To unmap a volume, "normal" or "force" has to be written to: · 8 unmodified lines | ||
| 9 | 9 | is using the device. When "force" is used, the device is also unmapped |
| 10 | 10 | when device is in use. All I/Os that are in progress will fail. |
| 11 | 11 | |
| 12 | − Example: | |
| 12 | + Example:: | |
| 13 | 13 | |
| 14 | − # echo "normal" > /sys/block/rnbd0/rnbd/unmap_device | |
| 14 | + # echo "normal" > /sys/block/rnbd0/rnbd/unmap_device | |
| 15 | 15 | |
| 16 | 16 | What: /sys/block/rnbd<N>/rnbd/state |
| 17 | 17 | Date: Feb 2020 |
| @@ -5,6 +5,7 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | This attribute indicates the full path of ACPI namespace |
| 6 | 6 | object associated with the device object. For example, |
| 7 | 7 | \_SB_.PCI0. |
| 8 | + | |
| 8 | 9 | This file is not present for device objects representing |
| 9 | 10 | fixed ACPI hardware features (like power and sleep |
| 10 | 11 | buttons). |
| @@ -67,14 +68,16 @@ Description: · 56 unmodified lines | ||
| 67 | 68 | The return value is a decimal integer representing the device's |
| 68 | 69 | status bitmap: |
| 69 | 70 | |
| 70 | − Bit [0] – Set if the device is present. | |
| 71 | − Bit [1] – Set if the device is enabled and decoding its | |
| 72 | − resources. | |
| 73 | − Bit [2] – Set if the device should be shown in the UI. | |
| 74 | − Bit [3] – Set if the device is functioning properly (cleared if | |
| 75 | − device failed its diagnostics). | |
| 76 | − Bit [4] – Set if the battery is present. | |
| 77 | − Bits [31:5] – Reserved (must be cleared) | |
| 71 | + =========== ================================================== | |
| 72 | + Bit [0] Set if the device is present. | |
| 73 | + Bit [1] Set if the device is enabled and decoding its | |
| 74 | + resources. | |
| 75 | + Bit [2] Set if the device should be shown in the UI. | |
| 76 | + Bit [3] Set if the device is functioning properly (cleared | |
| 77 | + if device failed its diagnostics). | |
| 78 | + Bit [4] Set if the battery is present. | |
| 79 | + Bits [31:5] Reserved (must be cleared) | |
| 80 | + =========== ================================================== | |
| 78 | 81 | |
| 79 | 82 | If bit [0] is clear, then bit 1 must also be clear (a device |
| 80 | 83 | that is not present cannot be enabled). |
| @@ -8,50 +8,50 @@ What: /sys/bus/coresight/devices/<cti-name>/powered · 7 unmodified lines | ||
| 8 | 8 | Date: March 2020 |
| 9 | 9 | KernelVersion 5.7 |
| 10 | 10 | Contact: Mike Leach or Mathieu Poirier |
| 11 | −Description: (R) Indicate if the CTI hardware is powered. | |
| 11 | +Description: (Read) Indicate if the CTI hardware is powered. | |
| 12 | 12 | |
| 13 | 13 | What: /sys/bus/coresight/devices/<cti-name>/ctmid |
| 14 | 14 | Date: March 2020 |
| 15 | 15 | KernelVersion 5.7 |
| 16 | 16 | Contact: Mike Leach or Mathieu Poirier |
| 17 | −Description: (R) Display the associated CTM ID | |
| 17 | +Description: (Read) Display the associated CTM ID | |
| 18 | 18 | |
| 19 | 19 | What: /sys/bus/coresight/devices/<cti-name>/nr_trigger_cons |
| 20 | 20 | Date: March 2020 |
| 21 | 21 | KernelVersion 5.7 |
| 22 | 22 | Contact: Mike Leach or Mathieu Poirier |
| 23 | −Description: (R) Number of devices connected to triggers on this CTI | |
| 23 | +Description: (Read) Number of devices connected to triggers on this CTI | |
| 24 | 24 | |
| 25 | 25 | What: /sys/bus/coresight/devices/<cti-name>/triggers<N>/name |
| 26 | 26 | Date: March 2020 |
| 27 | 27 | KernelVersion 5.7 |
| 28 | 28 | Contact: Mike Leach or Mathieu Poirier |
| 29 | −Description: (R) Name of connected device <N> | |
| 29 | +Description: (Read) Name of connected device <N> | |
| 30 | 30 | |
| 31 | 31 | What: /sys/bus/coresight/devices/<cti-name>/triggers<N>/in_signals |
| 32 | 32 | Date: March 2020 |
| 33 | 33 | KernelVersion 5.7 |
| 34 | 34 | Contact: Mike Leach or Mathieu Poirier |
| 35 | −Description: (R) Input trigger signals from connected device <N> | |
| 35 | +Description: (Read) Input trigger signals from connected device <N> | |
| 36 | 36 | |
| 37 | 37 | What: /sys/bus/coresight/devices/<cti-name>/triggers<N>/in_types |
| 38 | 38 | Date: March 2020 |
| 39 | 39 | KernelVersion 5.7 |
| 40 | 40 | Contact: Mike Leach or Mathieu Poirier |
| 41 | −Description: (R) Functional types for the input trigger signals | |
| 41 | +Description: (Read) Functional types for the input trigger signals | |
| 42 | 42 | from connected device <N> |
| 43 | 43 | |
| 44 | 44 | What: /sys/bus/coresight/devices/<cti-name>/triggers<N>/out_signals |
| 45 | 45 | Date: March 2020 |
| 46 | 46 | KernelVersion 5.7 |
| 47 | 47 | Contact: Mike Leach or Mathieu Poirier |
| 48 | −Description: (R) Output trigger signals to connected device <N> | |
| 48 | +Description: (Read) Output trigger signals to connected device <N> | |
| 49 | 49 | |
| 50 | 50 | What: /sys/bus/coresight/devices/<cti-name>/triggers<N>/out_types |
| 51 | 51 | Date: March 2020 |
| 52 | 52 | KernelVersion 5.7 |
| 53 | 53 | Contact: Mike Leach or Mathieu Poirier |
| 54 | −Description: (R) Functional types for the output trigger signals | |
| 54 | +Description: (Read) Functional types for the output trigger signals | |
| 55 | 55 | to connected device <N> |
| 56 | 56 | |
| 57 | 57 | What: /sys/bus/coresight/devices/<cti-name>/regs/inout_sel |
| @@ -88,7 +88,7 @@ What: /sys/bus/coresight/devices/<cti-name>/regs/intack · 30 unmodified lines | ||
| 88 | 88 | Date: March 2020 |
| 89 | 89 | KernelVersion 5.7 |
| 90 | 90 | Contact: Mike Leach or Mathieu Poirier |
| 91 | −Description: (W) Write the INTACK register. | |
| 91 | +Description: (Write) Write the INTACK register. | |
| 92 | 92 | |
| 93 | 93 | What: /sys/bus/coresight/devices/<cti-name>/regs/appset |
| 94 | 94 | Date: March 2020 |
| @@ -101,99 +101,99 @@ What: /sys/bus/coresight/devices/<cti-name>/regs/appclear · 6 unmodified lines | ||
| 101 | 101 | Date: March 2020 |
| 102 | 102 | KernelVersion 5.7 |
| 103 | 103 | Contact: Mike Leach or Mathieu Poirier |
| 104 | −Description: (W) Write APPCLEAR register to deactivate channel. | |
| 104 | +Description: (Write) Write APPCLEAR register to deactivate channel. | |
| 105 | 105 | |
| 106 | 106 | What: /sys/bus/coresight/devices/<cti-name>/regs/apppulse |
| 107 | 107 | Date: March 2020 |
| 108 | 108 | KernelVersion 5.7 |
| 109 | 109 | Contact: Mike Leach or Mathieu Poirier |
| 110 | −Description: (W) Write APPPULSE to pulse a channel active for one clock | |
| 110 | +Description: (Write) Write APPPULSE to pulse a channel active for one clock | |
| 111 | 111 | cycle. |
| 112 | 112 | |
| 113 | 113 | What: /sys/bus/coresight/devices/<cti-name>/regs/chinstatus |
| 114 | 114 | Date: March 2020 |
| 115 | 115 | KernelVersion 5.7 |
| 116 | 116 | Contact: Mike Leach or Mathieu Poirier |
| 117 | −Description: (R) Read current status of channel inputs. | |
| 117 | +Description: (Read) Read current status of channel inputs. | |
| 118 | 118 | |
| 119 | 119 | What: /sys/bus/coresight/devices/<cti-name>/regs/choutstatus |
| 120 | 120 | Date: March 2020 |
| 121 | 121 | KernelVersion 5.7 |
| 122 | 122 | Contact: Mike Leach or Mathieu Poirier |
| 123 | −Description: (R) read current status of channel outputs. | |
| 123 | +Description: (Read) read current status of channel outputs. | |
| 124 | 124 | |
| 125 | 125 | What: /sys/bus/coresight/devices/<cti-name>/regs/triginstatus |
| 126 | 126 | Date: March 2020 |
| 127 | 127 | KernelVersion 5.7 |
| 128 | 128 | Contact: Mike Leach or Mathieu Poirier |
| 129 | −Description: (R) read current status of input trigger signals | |
| 129 | +Description: (Read) read current status of input trigger signals | |
| 130 | 130 | |
| 131 | 131 | What: /sys/bus/coresight/devices/<cti-name>/regs/trigoutstatus |
| 132 | 132 | Date: March 2020 |
| 133 | 133 | KernelVersion 5.7 |
| 134 | 134 | Contact: Mike Leach or Mathieu Poirier |
| 135 | −Description: (R) read current status of output trigger signals. | |
| 135 | +Description: (Read) read current status of output trigger signals. | |
| 136 | 136 | |
| 137 | 137 | What: /sys/bus/coresight/devices/<cti-name>/channels/trigin_attach |
| 138 | 138 | Date: March 2020 |
| 139 | 139 | KernelVersion 5.7 |
| 140 | 140 | Contact: Mike Leach or Mathieu Poirier |
| 141 | −Description: (W) Attach a CTI input trigger to a CTM channel. | |
| 141 | +Description: (Write) Attach a CTI input trigger to a CTM channel. | |
| 142 | 142 | |
| 143 | 143 | What: /sys/bus/coresight/devices/<cti-name>/channels/trigin_detach |
| 144 | 144 | Date: March 2020 |
| 145 | 145 | KernelVersion 5.7 |
| 146 | 146 | Contact: Mike Leach or Mathieu Poirier |
| 147 | −Description: (W) Detach a CTI input trigger from a CTM channel. | |
| 147 | +Description: (Write) Detach a CTI input trigger from a CTM channel. | |
| 148 | 148 | |
| 149 | 149 | What: /sys/bus/coresight/devices/<cti-name>/channels/trigout_attach |
| 150 | 150 | Date: March 2020 |
| 151 | 151 | KernelVersion 5.7 |
| 152 | 152 | Contact: Mike Leach or Mathieu Poirier |
| 153 | −Description: (W) Attach a CTI output trigger to a CTM channel. | |
| 153 | +Description: (Write) Attach a CTI output trigger to a CTM channel. | |
| 154 | 154 | |
| 155 | 155 | What: /sys/bus/coresight/devices/<cti-name>/channels/trigout_detach |
| 156 | 156 | Date: March 2020 |
| 157 | 157 | KernelVersion 5.7 |
| 158 | 158 | Contact: Mike Leach or Mathieu Poirier |
| 159 | −Description: (W) Detach a CTI output trigger from a CTM channel. | |
| 159 | +Description: (Write) Detach a CTI output trigger from a CTM channel. | |
| 160 | 160 | |
| 161 | 161 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_gate_enable |
| 162 | 162 | Date: March 2020 |
| 163 | 163 | KernelVersion 5.7 |
| 164 | 164 | Contact: Mike Leach or Mathieu Poirier |
| 165 | −Description: (RW) Enable CTIGATE for single channel (W) or list enabled | |
| 165 | +Description: (RW) Enable CTIGATE for single channel (Write) or list enabled | |
| 166 | 166 | channels through the gate (R). |
| 167 | 167 | |
| 168 | 168 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_gate_disable |
| 169 | 169 | Date: March 2020 |
| 170 | 170 | KernelVersion 5.7 |
| 171 | 171 | Contact: Mike Leach or Mathieu Poirier |
| 172 | −Description: (W) Disable CTIGATE for single channel. | |
| 172 | +Description: (Write) Disable CTIGATE for single channel. | |
| 173 | 173 | |
| 174 | 174 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_set |
| 175 | 175 | Date: March 2020 |
| 176 | 176 | KernelVersion 5.7 |
| 177 | 177 | Contact: Mike Leach or Mathieu Poirier |
| 178 | −Description: (W) Activate a single channel. | |
| 178 | +Description: (Write) Activate a single channel. | |
| 179 | 179 | |
| 180 | 180 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_clear |
| 181 | 181 | Date: March 2020 |
| 182 | 182 | KernelVersion 5.7 |
| 183 | 183 | Contact: Mike Leach or Mathieu Poirier |
| 184 | −Description: (W) Deactivate a single channel. | |
| 184 | +Description: (Write) Deactivate a single channel. | |
| 185 | 185 | |
| 186 | 186 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_pulse |
| 187 | 187 | Date: March 2020 |
| 188 | 188 | KernelVersion 5.7 |
| 189 | 189 | Contact: Mike Leach or Mathieu Poirier |
| 190 | −Description: (W) Pulse a single channel - activate for a single clock cycle. | |
| 190 | +Description: (Write) Pulse a single channel - activate for a single clock cycle. | |
| 191 | 191 | |
| 192 | 192 | What: /sys/bus/coresight/devices/<cti-name>/channels/trigout_filtered |
| 193 | 193 | Date: March 2020 |
| 194 | 194 | KernelVersion 5.7 |
| 195 | 195 | Contact: Mike Leach or Mathieu Poirier |
| 196 | −Description: (R) List of output triggers filtered across all connections. | |
| 196 | +Description: (Read) List of output triggers filtered across all connections. | |
| 197 | 197 | |
| 198 | 198 | What: /sys/bus/coresight/devices/<cti-name>/channels/trig_filter_enable |
| 199 | 199 | Date: March 2020 |
| @@ -205,13 +205,13 @@ What: /sys/bus/coresight/devices/<cti-name>/channels/chan_inuse · 5 unmodified lines | ||
| 205 | 205 | Date: March 2020 |
| 206 | 206 | KernelVersion 5.7 |
| 207 | 207 | Contact: Mike Leach or Mathieu Poirier |
| 208 | −Description: (R) show channels with at least one attached trigger signal. | |
| 208 | +Description: (Read) show channels with at least one attached trigger signal. | |
| 209 | 209 | |
| 210 | 210 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_free |
| 211 | 211 | Date: March 2020 |
| 212 | 212 | KernelVersion 5.7 |
| 213 | 213 | Contact: Mike Leach or Mathieu Poirier |
| 214 | −Description: (R) show channels with no attached trigger signals. | |
| 214 | +Description: (Read) show channels with no attached trigger signals. | |
| 215 | 215 | |
| 216 | 216 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_xtrigs_sel |
| 217 | 217 | Date: March 2020 |
| @@ -224,18 +224,18 @@ What: /sys/bus/coresight/devices/<cti-name>/channels/chan_xtrigs_in · 6 unmodified lines | ||
| 224 | 224 | Date: March 2020 |
| 225 | 225 | KernelVersion 5.7 |
| 226 | 226 | Contact: Mike Leach or Mathieu Poirier |
| 227 | −Description: (R) Read to see input triggers connected to selected view | |
| 227 | +Description: (Read) Read to see input triggers connected to selected view | |
| 228 | 228 | channel. |
| 229 | 229 | |
| 230 | 230 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_xtrigs_out |
| 231 | 231 | Date: March 2020 |
| 232 | 232 | KernelVersion 5.7 |
| 233 | 233 | Contact: Mike Leach or Mathieu Poirier |
| 234 | −Description: (R) Read to see output triggers connected to selected view | |
| 234 | +Description: (Read) Read to see output triggers connected to selected view | |
| 235 | 235 | channel. |
| 236 | 236 | |
| 237 | 237 | What: /sys/bus/coresight/devices/<cti-name>/channels/chan_xtrigs_reset |
| 238 | 238 | Date: March 2020 |
| 239 | 239 | KernelVersion 5.7 |
| 240 | 240 | Contact: Mike Leach or Mathieu Poirier |
| 241 | −Description: (W) Clear all channel / trigger programming. | |
| 241 | +Description: (Write) Clear all channel / trigger programming. | |
| @@ -4,7 +4,10 @@ KernelVersion: 3.19 · 3 unmodified lines | ||
| 4 | 4 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 5 | 5 | Description: (RW) Add/remove a sink from a trace path. There can be multiple |
| 6 | 6 | source for a single sink. |
| 7 | − ex: echo 1 > /sys/bus/coresight/devices/20010000.etb/enable_sink | |
| 7 | + | |
| 8 | + ex:: | |
| 9 | + | |
| 10 | + echo 1 > /sys/bus/coresight/devices/20010000.etb/enable_sink | |
| 8 | 11 | |
| 9 | 12 | What: /sys/bus/coresight/devices/<memory_map>.etb/trigger_cntr |
| 10 | 13 | Date: November 2014 |
| @@ -20,21 +23,21 @@ What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/rdp · 9 unmodified lines | ||
| 20 | 23 | Date: March 2016 |
| 21 | 24 | KernelVersion: 4.7 |
| 22 | 25 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 23 | −Description: (R) Defines the depth, in words, of the trace RAM in powers of | |
| 26 | +Description: (Read) Defines the depth, in words, of the trace RAM in powers of | |
| 24 | 27 | 2. The value is read directly from HW register RDP, 0x004. |
| 25 | 28 | |
| 26 | 29 | What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/sts |
| 27 | 30 | Date: March 2016 |
| 28 | 31 | KernelVersion: 4.7 |
| 29 | 32 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 30 | −Description: (R) Shows the value held by the ETB status register. The value | |
| 33 | +Description: (Read) Shows the value held by the ETB status register. The value | |
| 31 | 34 | is read directly from HW register STS, 0x00C. |
| 32 | 35 | |
| 33 | 36 | What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/rrp |
| 34 | 37 | Date: March 2016 |
| 35 | 38 | KernelVersion: 4.7 |
| 36 | 39 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 37 | −Description: (R) Shows the value held by the ETB RAM Read Pointer register | |
| 40 | +Description: (Read) Shows the value held by the ETB RAM Read Pointer register | |
| 38 | 41 | that is used to read entries from the Trace RAM over the APB |
| 39 | 42 | interface. The value is read directly from HW register RRP, |
| 40 | 43 | 0x014. |
| @@ -43,7 +46,7 @@ What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/rwp · 2 unmodified lines | ||
| 43 | 46 | Date: March 2016 |
| 44 | 47 | KernelVersion: 4.7 |
| 45 | 48 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 46 | −Description: (R) Shows the value held by the ETB RAM Write Pointer register | |
| 49 | +Description: (Read) Shows the value held by the ETB RAM Write Pointer register | |
| 47 | 50 | that is used to sets the write pointer to write entries from |
| 48 | 51 | the CoreSight bus into the Trace RAM. The value is read directly |
| 49 | 52 | from HW register RWP, 0x018. |
| @@ -52,21 +55,21 @@ What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/trg · 2 unmodified lines | ||
| 52 | 55 | Date: March 2016 |
| 53 | 56 | KernelVersion: 4.7 |
| 54 | 57 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 55 | −Description: (R) Similar to "trigger_cntr" above except that this value is | |
| 58 | +Description: (Read) Similar to "trigger_cntr" above except that this value is | |
| 56 | 59 | read directly from HW register TRG, 0x01C. |
| 57 | 60 | |
| 58 | 61 | What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/ctl |
| 59 | 62 | Date: March 2016 |
| 60 | 63 | KernelVersion: 4.7 |
| 61 | 64 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 62 | −Description: (R) Shows the value held by the ETB Control register. The value | |
| 65 | +Description: (Read) Shows the value held by the ETB Control register. The value | |
| 63 | 66 | is read directly from HW register CTL, 0x020. |
| 64 | 67 | |
| 65 | 68 | What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/ffsr |
| 66 | 69 | Date: March 2016 |
| 67 | 70 | KernelVersion: 4.7 |
| 68 | 71 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 69 | −Description: (R) Shows the value held by the ETB Formatter and Flush Status | |
| 72 | +Description: (Read) Shows the value held by the ETB Formatter and Flush Status | |
| 70 | 73 | register. The value is read directly from HW register FFSR, |
| 71 | 74 | 0x300. |
| 72 | 75 | |
| @@ -74,6 +77,6 @@ What: /sys/bus/coresight/devices/<memory_map>.etb/mgmt/ffcr · 1 unmodified line | ||
| 74 | 77 | Date: March 2016 |
| 75 | 78 | KernelVersion: 4.7 |
| 76 | 79 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 77 | −Description: (R) Shows the value held by the ETB Formatter and Flush Control | |
| 80 | +Description: (Read) Shows the value held by the ETB Formatter and Flush Control | |
| 78 | 81 | register. The value is read directly from HW register FFCR, |
| 79 | 82 | 0x304. |
| @@ -146,28 +146,28 @@ What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_addr_cmp · 145 unmodified lines | ||
| 146 | 146 | Date: November 2014 |
| 147 | 147 | KernelVersion: 3.19 |
| 148 | 148 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 149 | −Description: (R) Provides the number of address comparators pairs accessible | |
| 149 | +Description: (Read) Provides the number of address comparators pairs accessible | |
| 150 | 150 | on a trace unit, as specified by bit 3:0 of register ETMCCR. |
| 151 | 151 | |
| 152 | 152 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_cntr |
| 153 | 153 | Date: November 2014 |
| 154 | 154 | KernelVersion: 3.19 |
| 155 | 155 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 156 | −Description: (R) Provides the number of counters accessible on a trace unit, | |
| 156 | +Description: (Read) Provides the number of counters accessible on a trace unit, | |
| 157 | 157 | as specified by bit 15:13 of register ETMCCR. |
| 158 | 158 | |
| 159 | 159 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/nr_ctxid_cmp |
| 160 | 160 | Date: November 2014 |
| 161 | 161 | KernelVersion: 3.19 |
| 162 | 162 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 163 | −Description: (R) Provides the number of context ID comparator available on a | |
| 163 | +Description: (Read) Provides the number of context ID comparator available on a | |
| 164 | 164 | trace unit, as specified by bit 25:24 of register ETMCCR. |
| 165 | 165 | |
| 166 | 166 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/reset |
| 167 | 167 | Date: November 2014 |
| 168 | 168 | KernelVersion: 3.19 |
| 169 | 169 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 170 | −Description: (W) Cancels all configuration on a trace unit and set it back | |
| 170 | +Description: (Write) Cancels all configuration on a trace unit and set it back | |
| 171 | 171 | to its boot configuration. |
| 172 | 172 | |
| 173 | 173 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/seq_12_event |
| @@ -216,7 +216,7 @@ What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/curr_seq_state · 42 unmodified lines | ||
| 216 | 216 | Date: November 2014 |
| 217 | 217 | KernelVersion: 3.19 |
| 218 | 218 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 219 | −Description: (R) Holds the current state of the sequencer. | |
| 219 | +Description: (Read) Holds the current state of the sequencer. | |
| 220 | 220 | |
| 221 | 221 | What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/sync_freq |
| 222 | 222 | Date: November 2014 |
| @@ -12,75 +12,75 @@ What: /sys/bus/coresight/devices/etm<N>/cpu · 11 unmodified lines | ||
| 12 | 12 | Date: April 2015 |
| 13 | 13 | KernelVersion: 4.01 |
| 14 | 14 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 15 | −Description: (R) The CPU this tracing entity is associated with. | |
| 15 | +Description: (Read) The CPU this tracing entity is associated with. | |
| 16 | 16 | |
| 17 | 17 | What: /sys/bus/coresight/devices/etm<N>/nr_pe_cmp |
| 18 | 18 | Date: April 2015 |
| 19 | 19 | KernelVersion: 4.01 |
| 20 | 20 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 21 | −Description: (R) Indicates the number of PE comparator inputs that are | |
| 21 | +Description: (Read) Indicates the number of PE comparator inputs that are | |
| 22 | 22 | available for tracing. |
| 23 | 23 | |
| 24 | 24 | What: /sys/bus/coresight/devices/etm<N>/nr_addr_cmp |
| 25 | 25 | Date: April 2015 |
| 26 | 26 | KernelVersion: 4.01 |
| 27 | 27 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 28 | −Description: (R) Indicates the number of address comparator pairs that are | |
| 28 | +Description: (Read) Indicates the number of address comparator pairs that are | |
| 29 | 29 | available for tracing. |
| 30 | 30 | |
| 31 | 31 | What: /sys/bus/coresight/devices/etm<N>/nr_cntr |
| 32 | 32 | Date: April 2015 |
| 33 | 33 | KernelVersion: 4.01 |
| 34 | 34 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 35 | −Description: (R) Indicates the number of counters that are available for | |
| 35 | +Description: (Read) Indicates the number of counters that are available for | |
| 36 | 36 | tracing. |
| 37 | 37 | |
| 38 | 38 | What: /sys/bus/coresight/devices/etm<N>/nr_ext_inp |
| 39 | 39 | Date: April 2015 |
| 40 | 40 | KernelVersion: 4.01 |
| 41 | 41 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 42 | −Description: (R) Indicates how many external inputs are implemented. | |
| 42 | +Description: (Read) Indicates how many external inputs are implemented. | |
| 43 | 43 | |
| 44 | 44 | What: /sys/bus/coresight/devices/etm<N>/numcidc |
| 45 | 45 | Date: April 2015 |
| 46 | 46 | KernelVersion: 4.01 |
| 47 | 47 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 48 | −Description: (R) Indicates the number of Context ID comparators that are | |
| 48 | +Description: (Read) Indicates the number of Context ID comparators that are | |
| 49 | 49 | available for tracing. |
| 50 | 50 | |
| 51 | 51 | What: /sys/bus/coresight/devices/etm<N>/numvmidc |
| 52 | 52 | Date: April 2015 |
| 53 | 53 | KernelVersion: 4.01 |
| 54 | 54 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 55 | −Description: (R) Indicates the number of VMID comparators that are available | |
| 55 | +Description: (Read) Indicates the number of VMID comparators that are available | |
| 56 | 56 | for tracing. |
| 57 | 57 | |
| 58 | 58 | What: /sys/bus/coresight/devices/etm<N>/nrseqstate |
| 59 | 59 | Date: April 2015 |
| 60 | 60 | KernelVersion: 4.01 |
| 61 | 61 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 62 | −Description: (R) Indicates the number of sequencer states that are | |
| 62 | +Description: (Read) Indicates the number of sequencer states that are | |
| 63 | 63 | implemented. |
| 64 | 64 | |
| 65 | 65 | What: /sys/bus/coresight/devices/etm<N>/nr_resource |
| 66 | 66 | Date: April 2015 |
| 67 | 67 | KernelVersion: 4.01 |
| 68 | 68 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 69 | −Description: (R) Indicates the number of resource selection pairs that are | |
| 69 | +Description: (Read) Indicates the number of resource selection pairs that are | |
| 70 | 70 | available for tracing. |
| 71 | 71 | |
| 72 | 72 | What: /sys/bus/coresight/devices/etm<N>/nr_ss_cmp |
| 73 | 73 | Date: April 2015 |
| 74 | 74 | KernelVersion: 4.01 |
| 75 | 75 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 76 | −Description: (R) Indicates the number of single-shot comparator controls that | |
| 76 | +Description: (Read) Indicates the number of single-shot comparator controls that | |
| 77 | 77 | are available for tracing. |
| 78 | 78 | |
| 79 | 79 | What: /sys/bus/coresight/devices/etm<N>/reset |
| 80 | 80 | Date: April 2015 |
| 81 | 81 | KernelVersion: 4.01 |
| 82 | 82 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 83 | −Description: (W) Cancels all configuration on a trace unit and set it back | |
| 83 | +Description: (Write) Cancels all configuration on a trace unit and set it back | |
| 84 | 84 | to its boot configuration. |
| 85 | 85 | |
| 86 | 86 | What: /sys/bus/coresight/devices/etm<N>/mode |
| @@ -300,7 +300,7 @@ What: /sys/bus/coresight/devices/etm<N>/addr_cmp_view · 213 unmodified lines | ||
| 300 | 300 | Date: December 2019 |
| 301 | 301 | KernelVersion: 5.5 |
| 302 | 302 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 303 | −Description: (R) Print the current settings for the selected address | |
| 303 | +Description: (Read) Print the current settings for the selected address | |
| 304 | 304 | comparator. |
| 305 | 305 | |
| 306 | 306 | What: /sys/bus/coresight/devices/etm<N>/sshot_idx |
| @@ -319,7 +319,7 @@ What: /sys/bus/coresight/devices/etm<N>/sshot_status · 12 unmodified lines | ||
| 319 | 319 | Date: December 2019 |
| 320 | 320 | KernelVersion: 5.5 |
| 321 | 321 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 322 | −Description: (R) Print the current value of the selected single shot | |
| 322 | +Description: (Read) Print the current value of the selected single shot | |
| 323 | 323 | status register. |
| 324 | 324 | |
| 325 | 325 | What: /sys/bus/coresight/devices/etm<N>/sshot_pe_ctrl |
| @@ -333,111 +333,111 @@ What: /sys/bus/coresight/devices/etm<N>/mgmt/trcoslsr · 7 unmodified lines | ||
| 333 | 333 | Date: April 2015 |
| 334 | 334 | KernelVersion: 4.01 |
| 335 | 335 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 336 | −Description: (R) Print the content of the OS Lock Status Register (0x304). | |
| 336 | +Description: (Read) Print the content of the OS Lock Status Register (0x304). | |
| 337 | 337 | The value it taken directly from the HW. |
| 338 | 338 | |
| 339 | 339 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpdcr |
| 340 | 340 | Date: April 2015 |
| 341 | 341 | KernelVersion: 4.01 |
| 342 | 342 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 343 | −Description: (R) Print the content of the Power Down Control Register | |
| 343 | +Description: (Read) Print the content of the Power Down Control Register | |
| 344 | 344 | (0x310). The value is taken directly from the HW. |
| 345 | 345 | |
| 346 | 346 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpdsr |
| 347 | 347 | Date: April 2015 |
| 348 | 348 | KernelVersion: 4.01 |
| 349 | 349 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 350 | −Description: (R) Print the content of the Power Down Status Register | |
| 350 | +Description: (Read) Print the content of the Power Down Status Register | |
| 351 | 351 | (0x314). The value is taken directly from the HW. |
| 352 | 352 | |
| 353 | 353 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trclsr |
| 354 | 354 | Date: April 2015 |
| 355 | 355 | KernelVersion: 4.01 |
| 356 | 356 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 357 | −Description: (R) Print the content of the SW Lock Status Register | |
| 357 | +Description: (Read) Print the content of the SW Lock Status Register | |
| 358 | 358 | (0xFB4). The value is taken directly from the HW. |
| 359 | 359 | |
| 360 | 360 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcauthstatus |
| 361 | 361 | Date: April 2015 |
| 362 | 362 | KernelVersion: 4.01 |
| 363 | 363 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 364 | −Description: (R) Print the content of the Authentication Status Register | |
| 364 | +Description: (Read) Print the content of the Authentication Status Register | |
| 365 | 365 | (0xFB8). The value is taken directly from the HW. |
| 366 | 366 | |
| 367 | 367 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcdevid |
| 368 | 368 | Date: April 2015 |
| 369 | 369 | KernelVersion: 4.01 |
| 370 | 370 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 371 | −Description: (R) Print the content of the Device ID Register | |
| 371 | +Description: (Read) Print the content of the Device ID Register | |
| 372 | 372 | (0xFC8). The value is taken directly from the HW. |
| 373 | 373 | |
| 374 | 374 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcdevtype |
| 375 | 375 | Date: April 2015 |
| 376 | 376 | KernelVersion: 4.01 |
| 377 | 377 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 378 | −Description: (R) Print the content of the Device Type Register | |
| 378 | +Description: (Read) Print the content of the Device Type Register | |
| 379 | 379 | (0xFCC). The value is taken directly from the HW. |
| 380 | 380 | |
| 381 | 381 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpidr0 |
| 382 | 382 | Date: April 2015 |
| 383 | 383 | KernelVersion: 4.01 |
| 384 | 384 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 385 | −Description: (R) Print the content of the Peripheral ID0 Register | |
| 385 | +Description: (Read) Print the content of the Peripheral ID0 Register | |
| 386 | 386 | (0xFE0). The value is taken directly from the HW. |
| 387 | 387 | |
| 388 | 388 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpidr1 |
| 389 | 389 | Date: April 2015 |
| 390 | 390 | KernelVersion: 4.01 |
| 391 | 391 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 392 | −Description: (R) Print the content of the Peripheral ID1 Register | |
| 392 | +Description: (Read) Print the content of the Peripheral ID1 Register | |
| 393 | 393 | (0xFE4). The value is taken directly from the HW. |
| 394 | 394 | |
| 395 | 395 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpidr2 |
| 396 | 396 | Date: April 2015 |
| 397 | 397 | KernelVersion: 4.01 |
| 398 | 398 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 399 | −Description: (R) Print the content of the Peripheral ID2 Register | |
| 399 | +Description: (Read) Print the content of the Peripheral ID2 Register | |
| 400 | 400 | (0xFE8). The value is taken directly from the HW. |
| 401 | 401 | |
| 402 | 402 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcpidr3 |
| 403 | 403 | Date: April 2015 |
| 404 | 404 | KernelVersion: 4.01 |
| 405 | 405 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 406 | −Description: (R) Print the content of the Peripheral ID3 Register | |
| 406 | +Description: (Read) Print the content of the Peripheral ID3 Register | |
| 407 | 407 | (0xFEC). The value is taken directly from the HW. |
| 408 | 408 | |
| 409 | 409 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trcconfig |
| 410 | 410 | Date: February 2016 |
| 411 | 411 | KernelVersion: 4.07 |
| 412 | 412 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 413 | −Description: (R) Print the content of the trace configuration register | |
| 413 | +Description: (Read) Print the content of the trace configuration register | |
| 414 | 414 | (0x010) as currently set by SW. |
| 415 | 415 | |
| 416 | 416 | What: /sys/bus/coresight/devices/etm<N>/mgmt/trctraceid |
| 417 | 417 | Date: February 2016 |
| 418 | 418 | KernelVersion: 4.07 |
| 419 | 419 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 420 | −Description: (R) Print the content of the trace ID register (0x040). | |
| 420 | +Description: (Read) Print the content of the trace ID register (0x040). | |
| 421 | 421 | |
| 422 | 422 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr0 |
| 423 | 423 | Date: April 2015 |
| 424 | 424 | KernelVersion: 4.01 |
| 425 | 425 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 426 | −Description: (R) Returns the tracing capabilities of the trace unit (0x1E0). | |
| 426 | +Description: (Read) Returns the tracing capabilities of the trace unit (0x1E0). | |
| 427 | 427 | The value is taken directly from the HW. |
| 428 | 428 | |
| 429 | 429 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr1 |
| 430 | 430 | Date: April 2015 |
| 431 | 431 | KernelVersion: 4.01 |
| 432 | 432 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 433 | −Description: (R) Returns the tracing capabilities of the trace unit (0x1E4). | |
| 433 | +Description: (Read) Returns the tracing capabilities of the trace unit (0x1E4). | |
| 434 | 434 | The value is taken directly from the HW. |
| 435 | 435 | |
| 436 | 436 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr2 |
| 437 | 437 | Date: April 2015 |
| 438 | 438 | KernelVersion: 4.01 |
| 439 | 439 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 440 | −Description: (R) Returns the maximum size of the data value, data address, | |
| 440 | +Description: (Read) Returns the maximum size of the data value, data address, | |
| 441 | 441 | VMID, context ID and instuction address in the trace unit |
| 442 | 442 | (0x1E8). The value is taken directly from the HW. |
| 443 | 443 | |
| @@ -445,7 +445,7 @@ What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr3 · 1 unmodified line | ||
| 445 | 445 | Date: April 2015 |
| 446 | 446 | KernelVersion: 4.01 |
| 447 | 447 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 448 | −Description: (R) Returns the value associated with various resources | |
| 448 | +Description: (Read) Returns the value associated with various resources | |
| 449 | 449 | available to the trace unit. See the Trace Macrocell |
| 450 | 450 | architecture specification for more details (0x1E8). |
| 451 | 451 | The value is taken directly from the HW. |
| @@ -454,42 +454,42 @@ What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr4 · 2 unmodified lines | ||
| 454 | 454 | Date: April 2015 |
| 455 | 455 | KernelVersion: 4.01 |
| 456 | 456 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 457 | −Description: (R) Returns how many resources the trace unit supports (0x1F0). | |
| 457 | +Description: (Read) Returns how many resources the trace unit supports (0x1F0). | |
| 458 | 458 | The value is taken directly from the HW. |
| 459 | 459 | |
| 460 | 460 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr5 |
| 461 | 461 | Date: April 2015 |
| 462 | 462 | KernelVersion: 4.01 |
| 463 | 463 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 464 | −Description: (R) Returns how many resources the trace unit supports (0x1F4). | |
| 464 | +Description: (Read) Returns how many resources the trace unit supports (0x1F4). | |
| 465 | 465 | The value is taken directly from the HW. |
| 466 | 466 | |
| 467 | 467 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr8 |
| 468 | 468 | Date: April 2015 |
| 469 | 469 | KernelVersion: 4.01 |
| 470 | 470 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 471 | −Description: (R) Returns the maximum speculation depth of the instruction | |
| 471 | +Description: (Read) Returns the maximum speculation depth of the instruction | |
| 472 | 472 | trace stream. (0x180). The value is taken directly from the HW. |
| 473 | 473 | |
| 474 | 474 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr9 |
| 475 | 475 | Date: April 2015 |
| 476 | 476 | KernelVersion: 4.01 |
| 477 | 477 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 478 | −Description: (R) Returns the number of P0 right-hand keys that the trace unit | |
| 478 | +Description: (Read) Returns the number of P0 right-hand keys that the trace unit | |
| 479 | 479 | can use (0x184). The value is taken directly from the HW. |
| 480 | 480 | |
| 481 | 481 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr10 |
| 482 | 482 | Date: April 2015 |
| 483 | 483 | KernelVersion: 4.01 |
| 484 | 484 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 485 | −Description: (R) Returns the number of P1 right-hand keys that the trace unit | |
| 485 | +Description: (Read) Returns the number of P1 right-hand keys that the trace unit | |
| 486 | 486 | can use (0x188). The value is taken directly from the HW. |
| 487 | 487 | |
| 488 | 488 | What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr11 |
| 489 | 489 | Date: April 2015 |
| 490 | 490 | KernelVersion: 4.01 |
| 491 | 491 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 492 | −Description: (R) Returns the number of special P1 right-hand keys that the | |
| 492 | +Description: (Read) Returns the number of special P1 right-hand keys that the | |
| 493 | 493 | trace unit can use (0x18C). The value is taken directly from |
| 494 | 494 | the HW. |
| 495 | 495 | |
| @@ -497,7 +497,7 @@ What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr12 · 1 unmodified line | ||
| 497 | 497 | Date: April 2015 |
| 498 | 498 | KernelVersion: 4.01 |
| 499 | 499 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 500 | −Description: (R) Returns the number of conditional P1 right-hand keys that | |
| 500 | +Description: (Read) Returns the number of conditional P1 right-hand keys that | |
| 501 | 501 | the trace unit can use (0x190). The value is taken directly |
| 502 | 502 | from the HW. |
| 503 | 503 | |
| @@ -505,6 +505,6 @@ What: /sys/bus/coresight/devices/etm<N>/trcidr/trcidr13 · 1 unmodified line | ||
| 505 | 505 | Date: April 2015 |
| 506 | 506 | KernelVersion: 4.01 |
| 507 | 507 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 508 | −Description: (R) Returns the number of special conditional P1 right-hand keys | |
| 508 | +Description: (Read) Returns the number of special conditional P1 right-hand keys | |
| 509 | 509 | that the trace unit can use (0x194). The value is taken |
| 510 | 510 | directly from the HW. |
| @@ -42,7 +42,7 @@ What: /sys/bus/coresight/devices/<memory_map>.stm/status · 41 unmodified lines | ||
| 42 | 42 | Date: April 2016 |
| 43 | 43 | KernelVersion: 4.7 |
| 44 | 44 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 45 | −Description: (R) List various control and status registers. The specific | |
| 45 | +Description: (Read) List various control and status registers. The specific | |
| 46 | 46 | layout and content is driver specific. |
| 47 | 47 | |
| 48 | 48 | What: /sys/bus/coresight/devices/<memory_map>.stm/traceid |
| @@ -11,21 +11,21 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rsz · 10 unmodified lines | ||
| 11 | 11 | Date: March 2016 |
| 12 | 12 | KernelVersion: 4.7 |
| 13 | 13 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 14 | −Description: (R) Defines the size, in 32-bit words, of the local RAM buffer. | |
| 14 | +Description: (Read) Defines the size, in 32-bit words, of the local RAM buffer. | |
| 15 | 15 | The value is read directly from HW register RSZ, 0x004. |
| 16 | 16 | |
| 17 | 17 | What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/sts |
| 18 | 18 | Date: March 2016 |
| 19 | 19 | KernelVersion: 4.7 |
| 20 | 20 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 21 | −Description: (R) Shows the value held by the TMC status register. The value | |
| 21 | +Description: (Read) Shows the value held by the TMC status register. The value | |
| 22 | 22 | is read directly from HW register STS, 0x00C. |
| 23 | 23 | |
| 24 | 24 | What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rrp |
| 25 | 25 | Date: March 2016 |
| 26 | 26 | KernelVersion: 4.7 |
| 27 | 27 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 28 | −Description: (R) Shows the value held by the TMC RAM Read Pointer register | |
| 28 | +Description: (Read) Shows the value held by the TMC RAM Read Pointer register | |
| 29 | 29 | that is used to read entries from the Trace RAM over the APB |
| 30 | 30 | interface. The value is read directly from HW register RRP, |
| 31 | 31 | 0x014. |
| @@ -34,7 +34,7 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rwp · 2 unmodified lines | ||
| 34 | 34 | Date: March 2016 |
| 35 | 35 | KernelVersion: 4.7 |
| 36 | 36 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 37 | −Description: (R) Shows the value held by the TMC RAM Write Pointer register | |
| 37 | +Description: (Read) Shows the value held by the TMC RAM Write Pointer register | |
| 38 | 38 | that is used to sets the write pointer to write entries from |
| 39 | 39 | the CoreSight bus into the Trace RAM. The value is read directly |
| 40 | 40 | from HW register RWP, 0x018. |
| @@ -43,21 +43,21 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/trg · 2 unmodified lines | ||
| 43 | 43 | Date: March 2016 |
| 44 | 44 | KernelVersion: 4.7 |
| 45 | 45 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 46 | −Description: (R) Similar to "trigger_cntr" above except that this value is | |
| 46 | +Description: (Read) Similar to "trigger_cntr" above except that this value is | |
| 47 | 47 | read directly from HW register TRG, 0x01C. |
| 48 | 48 | |
| 49 | 49 | What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ctl |
| 50 | 50 | Date: March 2016 |
| 51 | 51 | KernelVersion: 4.7 |
| 52 | 52 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 53 | −Description: (R) Shows the value held by the TMC Control register. The value | |
| 53 | +Description: (Read) Shows the value held by the TMC Control register. The value | |
| 54 | 54 | is read directly from HW register CTL, 0x020. |
| 55 | 55 | |
| 56 | 56 | What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffsr |
| 57 | 57 | Date: March 2016 |
| 58 | 58 | KernelVersion: 4.7 |
| 59 | 59 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 60 | −Description: (R) Shows the value held by the TMC Formatter and Flush Status | |
| 60 | +Description: (Read) Shows the value held by the TMC Formatter and Flush Status | |
| 61 | 61 | register. The value is read directly from HW register FFSR, |
| 62 | 62 | 0x300. |
| 63 | 63 | |
| @@ -65,7 +65,7 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffcr · 1 unmodified line | ||
| 65 | 65 | Date: March 2016 |
| 66 | 66 | KernelVersion: 4.7 |
| 67 | 67 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 68 | −Description: (R) Shows the value held by the TMC Formatter and Flush Control | |
| 68 | +Description: (Read) Shows the value held by the TMC Formatter and Flush Control | |
| 69 | 69 | register. The value is read directly from HW register FFCR, |
| 70 | 70 | 0x304. |
| 71 | 71 | |
| @@ -73,7 +73,7 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/mode · 1 unmodified line | ||
| 73 | 73 | Date: March 2016 |
| 74 | 74 | KernelVersion: 4.7 |
| 75 | 75 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 76 | −Description: (R) Shows the value held by the TMC Mode register, which | |
| 76 | +Description: (Read) Shows the value held by the TMC Mode register, which | |
| 77 | 77 | indicate the mode the device has been configured to enact. The |
| 78 | 78 | The value is read directly from the MODE register, 0x028. |
| 79 | 79 | |
| @@ -81,7 +81,7 @@ What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/devid · 1 unmodified line | ||
| 81 | 81 | Date: March 2016 |
| 82 | 82 | KernelVersion: 4.7 |
| 83 | 83 | Contact: Mathieu Poirier <mathieu.poirier@linaro.org> |
| 84 | −Description: (R) Indicates the capabilities of the Coresight TMC. | |
| 84 | +Description: (Read) Indicates the capabilities of the Coresight TMC. | |
| 85 | 85 | The value is read directly from the DEVID register, 0xFC8, |
| 86 | 86 | |
| 87 | 87 | What: /sys/bus/coresight/devices/<memory_map>.tmc/buffer_size |
| @@ -20,6 +20,7 @@ Contact: Cornelia Huck <cornelia.huck@de.ibm.com> · 19 unmodified lines | ||
| 20 | 20 | Description: Contains the ids of the channel paths used by this |
| 21 | 21 | subchannel, as reported by the channel subsystem |
| 22 | 22 | during subchannel recognition. |
| 23 | + | |
| 23 | 24 | Note: This is an I/O-subchannel specific attribute. |
| 24 | 25 | Users: s390-tools, HAL |
| 25 | 26 | |
| @@ -31,6 +32,7 @@ Description: Contains the PIM/PAM/POM values, as reported by the · 5 unmodified lines | ||
| 31 | 32 | channel subsystem when last queried by the common I/O |
| 32 | 33 | layer (this implies that this attribute is not necessarily |
| 33 | 34 | in sync with the values current in the channel subsystem). |
| 35 | + | |
| 34 | 36 | Note: This is an I/O-subchannel specific attribute. |
| 35 | 37 | Users: s390-tools, HAL |
| 36 | 38 | |
| @@ -53,6 +55,7 @@ Description: This file allows the driver for a device to be specified. When · 16 unmodified lines | ||
| 53 | 55 | opt-out of driver binding using a driver_override name such as |
| 54 | 56 | "none". Only a single driver may be specified in the override, |
| 55 | 57 | there is no support for parsing delimiters. |
| 58 | + | |
| 56 | 59 | Note that unlike the mechanism of the same name for pci, this |
| 57 | 60 | file does not allow to override basic matching rules. I.e., |
| 58 | 61 | the driver must still match the subchannel type of the device. |
| @@ -4,6 +4,7 @@ KernelVersion: 5.10 · 3 unmodified lines | ||
| 4 | 4 | Contact: Xu Yilun <yilun.xu@intel.com> |
| 5 | 5 | Description: Read-only. It returns type of DFL FIU of the device. Now DFL |
| 6 | 6 | supports 2 FIU types, 0 for FME, 1 for PORT. |
| 7 | + | |
| 7 | 8 | Format: 0x%x |
| 8 | 9 | |
| 9 | 10 | What: /sys/bus/dfl/devices/dfl_dev.X/feature_id |
| @@ -12,4 +13,5 @@ KernelVersion: 5.10 · 2 unmodified lines | ||
| 12 | 13 | Contact: Xu Yilun <yilun.xu@intel.com> |
| 13 | 14 | Description: Read-only. It returns feature identifier local to its DFL FIU |
| 14 | 15 | type. |
| 16 | + | |
| 15 | 17 | Format: 0x%x |
| @@ -8,13 +8,13 @@ Description: Read-only. Attribute group to describe the magic bits · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | Each attribute under this group defines a bit range of the |
| 10 | 10 | perf_event_attr.config. All supported attributes are listed |
| 11 | − below. | |
| 11 | + below:: | |
| 12 | 12 | |
| 13 | 13 | event = "config:0-11" - event ID |
| 14 | 14 | evtype = "config:12-15" - event type |
| 15 | 15 | portid = "config:16-23" - event source |
| 16 | 16 | |
| 17 | − For example, | |
| 17 | + For example:: | |
| 18 | 18 | |
| 19 | 19 | fab_mmio_read = "event=0x06,evtype=0x02,portid=0xff" |
| 20 | 20 | |
| @@ -40,11 +40,11 @@ Description: Read-only. Attribute group to describe performance monitoring · 19 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | All supported performance monitoring events are listed below. |
| 42 | 42 | |
| 43 | − Basic events (evtype=0x00) | |
| 43 | + Basic events (evtype=0x00):: | |
| 44 | 44 | |
| 45 | 45 | clock = "event=0x00,evtype=0x00,portid=0xff" |
| 46 | 46 | |
| 47 | − Cache events (evtype=0x01) | |
| 47 | + Cache events (evtype=0x01):: | |
| 48 | 48 | |
| 49 | 49 | cache_read_hit = "event=0x00,evtype=0x01,portid=0xff" |
| 50 | 50 | cache_read_miss = "event=0x01,evtype=0x01,portid=0xff" |
| @@ -59,7 +59,7 @@ Description: Read-only. Attribute group to describe performance monitoring · 8 unmodified lines | ||
| 59 | 59 | cache_rx_req_stall = "event=0x09,evtype=0x01,portid=0xff" |
| 60 | 60 | cache_eviction = "event=0x0a,evtype=0x01,portid=0xff" |
| 61 | 61 | |
| 62 | − Fabric events (evtype=0x02) | |
| 62 | + Fabric events (evtype=0x02):: | |
| 63 | 63 | |
| 64 | 64 | fab_pcie0_read = "event=0x00,evtype=0x02,portid=0xff" |
| 65 | 65 | fab_pcie0_write = "event=0x01,evtype=0x02,portid=0xff" |
| @@ -78,7 +78,7 @@ Description: Read-only. Attribute group to describe performance monitoring · 12 unmodified lines | ||
| 78 | 78 | fab_port_mmio_read = "event=0x06,evtype=0x02,portid=?" |
| 79 | 79 | fab_port_mmio_write = "event=0x07,evtype=0x02,portid=?" |
| 80 | 80 | |
| 81 | − VTD events (evtype=0x03) | |
| 81 | + VTD events (evtype=0x03):: | |
| 82 | 82 | |
| 83 | 83 | vtd_port_read_transaction = "event=0x00,evtype=0x03,portid=?" |
| 84 | 84 | vtd_port_write_transaction = "event=0x01,evtype=0x03,portid=?" |
| @@ -88,7 +88,7 @@ Description: Read-only. Attribute group to describe performance monitoring · 3 unmodified lines | ||
| 88 | 88 | vtd_port_devtlb_2m_fill = "event=0x05,evtype=0x03,portid=?" |
| 89 | 89 | vtd_port_devtlb_1g_fill = "event=0x06,evtype=0x03,portid=?" |
| 90 | 90 | |
| 91 | − VTD SIP events (evtype=0x04) | |
| 91 | + VTD SIP events (evtype=0x04):: | |
| 92 | 92 | |
| 93 | 93 | vtd_sip_iotlb_4k_hit = "event=0x00,evtype=0x04,portid=0xff" |
| 94 | 94 | vtd_sip_iotlb_2m_hit = "event=0x01,evtype=0x04,portid=0xff" |
| @@ -10,7 +10,8 @@ Description: · 9 unmodified lines | ||
| 10 | 10 | name/value pairs. |
| 11 | 11 | |
| 12 | 12 | Userspace must be prepared for the possibility that attributes |
| 13 | − define overlapping bit ranges. For example: | |
| 13 | + define overlapping bit ranges. For example:: | |
| 14 | + | |
| 14 | 15 | attr1 = 'config:0-23' |
| 15 | 16 | attr2 = 'config:0-7' |
| 16 | 17 | attr3 = 'config:12-35' |
| @@ -7,7 +7,7 @@ Description: Read-only. Attribute group to describe the magic bits · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | Each attribute under this group defines a bit range of the |
| 9 | 9 | perf_event_attr.config. All supported attributes are listed |
| 10 | − below. | |
| 10 | + below:: | |
| 11 | 11 | |
| 12 | 12 | chip = "config:16-31" |
| 13 | 13 | core = "config:16-31" |
| @@ -16,9 +16,9 @@ Description: Read-only. Attribute group to describe the magic bits · 2 unmodified lines | ||
| 16 | 16 | offset = "config:32-63" |
| 17 | 17 | vcpu = "config:16-31" |
| 18 | 18 | |
| 19 | − For example, | |
| 19 | + For example:: | |
| 20 | 20 | |
| 21 | − PM_PB_CYC = "domain=1,offset=0x80,chip=?,lpar=0x0" | |
| 21 | + PM_PB_CYC = "domain=1,offset=0x80,chip=?,lpar=0x0" | |
| 22 | 22 | |
| 23 | 23 | In this event, '?' after chip specifies that |
| 24 | 24 | this value will be provided by user while running this event. |
| @@ -7,7 +7,7 @@ Description: Read-only. Attribute group to describe the magic bits · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | Each attribute under this group defines a bit range of the |
| 9 | 9 | perf_event_attr.config. All supported attributes are listed |
| 10 | − below. | |
| 10 | + below:: | |
| 11 | 11 | |
| 12 | 12 | counter_info_version = "config:16-23" |
| 13 | 13 | length = "config:24-31" |
| @@ -20,9 +20,9 @@ Description: Read-only. Attribute group to describe the magic bits · 6 unmodified lines | ||
| 20 | 20 | secondary_index = "config:0-15" |
| 21 | 21 | starting_index = "config:32-63" |
| 22 | 22 | |
| 23 | − For example, | |
| 23 | + For example:: | |
| 24 | 24 | |
| 25 | − processor_core_utilization_instructions_completed = "request=0x94, | |
| 25 | + processor_core_utilization_instructions_completed = "request=0x94, | |
| 26 | 26 | phys_processor_idx=?,counter_info_version=0x8, |
| 27 | 27 | length=8,offset=0x18" |
| 28 | 28 | |
| @@ -36,6 +36,7 @@ Description: · 7 unmodified lines | ||
| 36 | 36 | '0' if the hypervisor is configured to forbid access to event |
| 37 | 37 | counters being accumulated by other guests and to physical |
| 38 | 38 | domain event counters. |
| 39 | + | |
| 39 | 40 | '1' if that access is allowed. |
| 40 | 41 | |
| 41 | 42 | What: /sys/bus/event_source/devices/hv_gpci/interface/ga |
| @@ -3,16 +3,19 @@ Date: August 2012 · 2 unmodified lines | ||
| 3 | 3 | KernelVersion: TBD |
| 4 | 4 | Contact: Robert Love <robert.w.love@intel.com>, devel@open-fcoe.org |
| 5 | 5 | Description: The FCoE bus. Attributes in this directory are control interfaces. |
| 6 | + | |
| 6 | 7 | Attributes: |
| 7 | 8 | |
| 8 | − ctlr_create: 'FCoE Controller' instance creation interface. Writing an | |
| 9 | + ctlr_create: | |
| 10 | + 'FCoE Controller' instance creation interface. Writing an | |
| 9 | 11 | <ifname> to this file will allocate and populate sysfs with a |
| 10 | 12 | fcoe_ctlr_device (ctlr_X). The user can then configure any |
| 11 | 13 | per-port settings and finally write to the fcoe_ctlr_device's |
| 12 | 14 | 'start' attribute to begin the kernel's discovery and login |
| 13 | 15 | process. |
| 14 | 16 | |
| 15 | − ctlr_destroy: 'FCoE Controller' instance removal interface. Writing a | |
| 17 | + ctlr_destroy: | |
| 18 | + 'FCoE Controller' instance removal interface. Writing a | |
| 16 | 19 | fcoe_ctlr_device's sysfs name to this file will log the |
| 17 | 20 | fcoe_ctlr_device out of the fabric or otherwise connected |
| 18 | 21 | FCoE devices. It will also free all kernel memory allocated |
| @@ -32,11 +35,13 @@ Description: 'FCoE Controller' instances on the fcoe bus. · 13 unmodified lines | ||
| 32 | 35 | |
| 33 | 36 | Attributes: |
| 34 | 37 | |
| 35 | − fcf_dev_loss_tmo: Device loss timeout period (see below). Changing | |
| 38 | + fcf_dev_loss_tmo: | |
| 39 | + Device loss timeout period (see below). Changing | |
| 36 | 40 | this value will change the dev_loss_tmo for all |
| 37 | 41 | FCFs discovered by this controller. |
| 38 | 42 | |
| 39 | − mode: Display or change the FCoE Controller's mode. Possible | |
| 43 | + mode: | |
| 44 | + Display or change the FCoE Controller's mode. Possible | |
| 40 | 45 | modes are 'Fabric' and 'VN2VN'. If a FCoE Controller |
| 41 | 46 | is started in 'Fabric' mode then FIP FCF discovery is |
| 42 | 47 | initiated and ultimately a fabric login is attempted. |
| @@ -44,23 +49,30 @@ Attributes: · 1 unmodified line | ||
| 44 | 49 | FIP VN2VN discovery and login is performed. A FCoE |
| 45 | 50 | Controller only supports one mode at a time. |
| 46 | 51 | |
| 47 | − enabled: Whether an FCoE controller is enabled or disabled. | |
| 52 | + enabled: | |
| 53 | + Whether an FCoE controller is enabled or disabled. | |
| 48 | 54 | 0 if disabled, 1 if enabled. Writing either 0 or 1 |
| 49 | 55 | to this file will enable or disable the FCoE controller. |
| 50 | 56 | |
| 51 | − lesb/link_fail: Link Error Status Block (LESB) link failure count. | |
| 57 | + lesb/link_fail: | |
| 58 | + Link Error Status Block (LESB) link failure count. | |
| 52 | 59 | |
| 53 | − lesb/vlink_fail: Link Error Status Block (LESB) virtual link | |
| 60 | + lesb/vlink_fail: | |
| 61 | + Link Error Status Block (LESB) virtual link | |
| 54 | 62 | failure count. |
| 55 | 63 | |
| 56 | − lesb/miss_fka: Link Error Status Block (LESB) missed FCoE | |
| 64 | + lesb/miss_fka: | |
| 65 | + Link Error Status Block (LESB) missed FCoE | |
| 57 | 66 | Initialization Protocol (FIP) Keep-Alives (FKA). |
| 58 | 67 | |
| 59 | − lesb/symb_err: Link Error Status Block (LESB) symbolic error count. | |
| 68 | + lesb/symb_err: | |
| 69 | + Link Error Status Block (LESB) symbolic error count. | |
| 60 | 70 | |
| 61 | − lesb/err_block: Link Error Status Block (LESB) block error count. | |
| 71 | + lesb/err_block: | |
| 72 | + Link Error Status Block (LESB) block error count. | |
| 62 | 73 | |
| 63 | − lesb/fcs_error: Link Error Status Block (LESB) Fibre Channel | |
| 74 | + lesb/fcs_error: | |
| 75 | + Link Error Status Block (LESB) Fibre Channel | |
| 64 | 76 | Services error count. |
| 65 | 77 | |
| 66 | 78 | Notes: ctlr_X (global increment starting at 0) |
| @@ -75,31 +87,41 @@ Description: 'FCoE FCF' instances on the fcoe bus. A FCF is a Fibre Channel · 8 unmodified lines | ||
| 75 | 87 | Fibre Channel frames into a FC fabric. It can also take |
| 76 | 88 | outbound FC frames and pack them in Ethernet packets to |
| 77 | 89 | be sent to their destination on the Ethernet segment. |
| 90 | + | |
| 78 | 91 | Attributes: |
| 79 | 92 | |
| 80 | − fabric_name: Identifies the fabric that the FCF services. | |
| 93 | + fabric_name: | |
| 94 | + Identifies the fabric that the FCF services. | |
| 81 | 95 | |
| 82 | − switch_name: Identifies the FCF. | |
| 96 | + switch_name: | |
| 97 | + Identifies the FCF. | |
| 83 | 98 | |
| 84 | − priority: The switch's priority amongst other FCFs on the same | |
| 99 | + priority: | |
| 100 | + The switch's priority amongst other FCFs on the same | |
| 85 | 101 | fabric. |
| 86 | 102 | |
| 87 | − selected: 1 indicates that the switch has been selected for use; | |
| 103 | + selected: | |
| 104 | + 1 indicates that the switch has been selected for use; | |
| 88 | 105 | 0 indicates that the switch will not be used. |
| 89 | 106 | |
| 90 | − fc_map: The Fibre Channel MAP | |
| 107 | + fc_map: | |
| 108 | + The Fibre Channel MAP | |
| 91 | 109 | |
| 92 | − vfid: The Virtual Fabric ID | |
| 110 | + vfid: | |
| 111 | + The Virtual Fabric ID | |
| 93 | 112 | |
| 94 | − mac: The FCF's MAC address | |
| 113 | + mac: | |
| 114 | + The FCF's MAC address | |
| 95 | 115 | |
| 96 | − fka_period: The FIP Keep-Alive period | |
| 116 | + fka_period: | |
| 117 | + The FIP Keep-Alive period | |
| 97 | 118 | |
| 98 | 119 | fabric_state: The internal kernel state |
| 99 | − "Unknown" - Initialization value | |
| 100 | − "Disconnected" - No link to the FCF/fabric | |
| 101 | − "Connected" - Host is connected to the FCF | |
| 102 | − "Deleted" - FCF is being removed from the system | |
| 120 | + | |
| 121 | + - "Unknown" - Initialization value | |
| 122 | + - "Disconnected" - No link to the FCF/fabric | |
| 123 | + - "Connected" - Host is connected to the FCF | |
| 124 | + - "Deleted" - FCF is being removed from the system | |
| 103 | 125 | |
| 104 | 126 | dev_loss_tmo: The device loss timeout period for this FCF. |
| 105 | 127 | |
| @@ -6,8 +6,10 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | the driver to attempt to bind to the device found at |
| 7 | 7 | this location. The format for the location is Object.Id |
| 8 | 8 | and is the same as found in /sys/bus/fsl-mc/devices/. |
| 9 | − For example: | |
| 10 | − # echo dpni.2 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/bind | |
| 9 | + | |
| 10 | + For example:: | |
| 11 | + | |
| 12 | + # echo dpni.2 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/bind | |
| 11 | 13 | |
| 12 | 14 | What: /sys/bus/fsl-mc/drivers/.../unbind |
| 13 | 15 | Date: December 2016 |
| @@ -17,5 +19,7 @@ Description: · 3 unmodified lines | ||
| 17 | 19 | driver to attempt to unbind from the device found at |
| 18 | 20 | this location. The format for the location is Object.Id |
| 19 | 21 | and is the same as found in /sys/bus/fsl-mc/devices/. |
| 20 | − For example: | |
| 21 | − # echo dpni.2 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind | |
| 22 | + | |
| 23 | + For example:: | |
| 24 | + | |
| 25 | + # echo dpni.2 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind | |
| @@ -3,19 +3,25 @@ Date: February 2011 · 2 unmodified lines | ||
| 3 | 3 | Contact: Minkyu Kang <mk7.kang@samsung.com> |
| 4 | 4 | Description: |
| 5 | 5 | show what device is attached |
| 6 | − NONE - no device | |
| 7 | − USB - USB device is attached | |
| 8 | − UART - UART is attached | |
| 9 | − CHARGER - Charger is attaced | |
| 10 | − JIG - JIG is attached | |
| 6 | + | |
| 7 | + ======= ====================== | |
| 8 | + NONE no device | |
| 9 | + USB USB device is attached | |
| 10 | + UART UART is attached | |
| 11 | + CHARGER Charger is attaced | |
| 12 | + JIG JIG is attached | |
| 13 | + ======= ====================== | |
| 11 | 14 | |
| 12 | 15 | What: /sys/bus/i2c/devices/.../switch |
| 13 | 16 | Date: February 2011 |
| 14 | 17 | Contact: Minkyu Kang <mk7.kang@samsung.com> |
| 15 | 18 | Description: |
| 16 | 19 | show or set the state of manual switch |
| 17 | − VAUDIO - switch to VAUDIO path | |
| 18 | − UART - switch to UART path | |
| 19 | − AUDIO - switch to AUDIO path | |
| 20 | − DHOST - switch to DHOST path | |
| 21 | − AUTO - switch automatically by device | |
| 20 | + | |
| 21 | + ======= ============================== | |
| 22 | + VAUDIO switch to VAUDIO path | |
| 23 | + UART switch to UART path | |
| 24 | + AUDIO switch to AUDIO path | |
| 25 | + DHOST switch to DHOST path | |
| 26 | + AUTO switch automatically by device | |
| 27 | + ======= ============================== | |
| @@ -6,15 +6,18 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | Value that exists only for mux devices that can be |
| 7 | 7 | written to control the behaviour of the multiplexer on |
| 8 | 8 | idle. Possible values: |
| 9 | − -2 - disconnect on idle, i.e. deselect the last used | |
| 10 | − channel, which is useful when there is a device | |
| 11 | − with an address that conflicts with another | |
| 12 | − device on another mux on the same parent bus. | |
| 13 | − -1 - leave the mux as-is, which is the most optimal | |
| 14 | − setting in terms of I2C operations and is the | |
| 15 | − default mode. | |
| 16 | − 0..<nchans> - set the mux to a predetermined channel, | |
| 17 | − which is useful if there is one channel that is | |
| 18 | − used almost always, and you want to reduce the | |
| 19 | − latency for normal operations after rare | |
| 20 | − transactions on other channels | |
| 9 | + | |
| 10 | + =========== =============================================== | |
| 11 | + -2 disconnect on idle, i.e. deselect the last used | |
| 12 | + channel, which is useful when there is a device | |
| 13 | + with an address that conflicts with another | |
| 14 | + device on another mux on the same parent bus. | |
| 15 | + -1 leave the mux as-is, which is the most optimal | |
| 16 | + setting in terms of I2C operations and is the | |
| 17 | + default mode. | |
| 18 | + 0..<nchans> set the mux to a predetermined channel, | |
| 19 | + which is useful if there is one channel that is | |
| 20 | + used almost always, and you want to reduce the | |
| 21 | + latency for normal operations after rare | |
| 22 | + transactions on other channels | |
| 23 | + =========== =============================================== | |
| @@ -84,6 +84,7 @@ Description: · 83 unmodified lines | ||
| 84 | 84 | by space. Modes can be "hdr-ddr", "hdr-tsp" and "hdr-tsl". |
| 85 | 85 | See the I3C specification for more details about these HDR |
| 86 | 86 | modes. |
| 87 | + | |
| 87 | 88 | This entry describes the HDRCAP of the master controller |
| 88 | 89 | driving the bus. |
| 89 | 90 | |
| @@ -135,6 +136,7 @@ Description: · 45 unmodified lines | ||
| 135 | 136 | Expose the HDR (High Data Rate) capabilities of a device. |
| 136 | 137 | Returns a list of supported HDR mode, each element is separated |
| 137 | 138 | by space. Modes can be "hdr-ddr", "hdr-tsp" and "hdr-tsl". |
| 139 | + | |
| 138 | 140 | See the I3C specification for more details about these HDR |
| 139 | 141 | modes. |
| 140 | 142 | |
| @@ -15,6 +15,7 @@ Description: · 14 unmodified lines | ||
| 15 | 15 | based on hardware generated events (e.g. data ready) or |
| 16 | 16 | provided by a separate driver for other hardware (e.g. |
| 17 | 17 | periodic timer, GPIO or high resolution timer). |
| 18 | + | |
| 18 | 19 | Contains trigger type specific elements. These do not |
| 19 | 20 | generalize well and hence are not documented in this file. |
| 20 | 21 | X is the IIO index of the trigger. |
| @@ -65,6 +66,7 @@ Contact: linux-iio@vger.kernel.org · 44 unmodified lines | ||
| 65 | 66 | Description: |
| 66 | 67 | When the internal sampling clock can only take a specific set of |
| 67 | 68 | frequencies, we can specify the available values with: |
| 69 | + | |
| 68 | 70 | - a small discrete set of values like "0 2 4 6 8" |
| 69 | 71 | - a range with minimum, step and maximum frequencies like |
| 70 | 72 | "[min step max]" |
| @@ -665,6 +667,7 @@ Description: · 594 unmodified lines | ||
| 665 | 667 | <type>[Y][_name]_<raw|input>_thresh_falling_value may take |
| 666 | 668 | different values, but the device can only enable both thresholds |
| 667 | 669 | or neither. |
| 670 | + | |
| 668 | 671 | Note the driver will assume the last p events requested are |
| 669 | 672 | to be enabled where p is how many it supports (which may vary |
| 670 | 673 | depending on the exact set requested. So if you want to be |
| @@ -719,6 +722,7 @@ Description: · 48 unmodified lines | ||
| 719 | 722 | <type>[Y][_name]_<raw|input>_roc_falling_value may take |
| 720 | 723 | different values, but the device can only enable both rate of |
| 721 | 724 | change thresholds or neither. |
| 725 | + | |
| 722 | 726 | Note the driver will assume the last p events requested are |
| 723 | 727 | to be enabled where p is however many it supports (which may |
| 724 | 728 | vary depending on the exact set requested. So if you want to be |
| @@ -774,9 +778,11 @@ Description: · 49 unmodified lines | ||
| 774 | 778 | Specifies the value of threshold that the device is comparing |
| 775 | 779 | against for the events enabled by |
| 776 | 780 | <type>Y[_name]_thresh[_rising|falling]_en. |
| 781 | + | |
| 777 | 782 | If separate attributes exist for the two directions, but |
| 778 | 783 | direction is not specified for this attribute, then a single |
| 779 | 784 | threshold value applies to both directions. |
| 785 | + | |
| 780 | 786 | The raw or input element of the name indicates whether the |
| 781 | 787 | value is in raw device units or in processed units (as _raw |
| 782 | 788 | and _input do on sysfs direct channel read attributes). |
| @@ -859,6 +865,7 @@ Description: · 76 unmodified lines | ||
| 859 | 865 | If separate attributes exist for the two directions, but |
| 860 | 866 | direction is not specified for this attribute, then a single |
| 861 | 867 | hysteresis value applies to both directions. |
| 868 | + | |
| 862 | 869 | For falling events the hysteresis is added to the _value attribute for |
| 863 | 870 | this event to get the upper threshold for when the event goes back to |
| 864 | 871 | normal, for rising events the hysteresis is subtracted from the _value |
| @@ -905,6 +912,7 @@ Description: · 40 unmodified lines | ||
| 905 | 912 | Specifies the value of rate of change threshold that the |
| 906 | 913 | device is comparing against for the events enabled by |
| 907 | 914 | <type>[Y][_name]_roc[_rising|falling]_en. |
| 915 | + | |
| 908 | 916 | If separate attributes exist for the two directions, |
| 909 | 917 | but direction is not specified for this attribute, |
| 910 | 918 | then a single threshold value applies to both directions. |
| @@ -1304,6 +1312,7 @@ Description: · 393 unmodified lines | ||
| 1304 | 1312 | Proximity measurement indicating that some |
| 1305 | 1313 | object is near the sensor, usually by observing |
| 1306 | 1314 | reflectivity of infrared or ultrasound emitted. |
| 1315 | + | |
| 1307 | 1316 | Often these sensors are unit less and as such conversion |
| 1308 | 1317 | to SI units is not possible. Higher proximity measurements |
| 1309 | 1318 | indicate closer objects, and vice versa. Units after |
| @@ -1449,9 +1458,12 @@ Contact: linux-iio@vger.kernel.org · 139 unmodified lines | ||
| 1449 | 1458 | Description: |
| 1450 | 1459 | A single positive integer specifying the maximum number of scan |
| 1451 | 1460 | elements to wait for. |
| 1461 | + | |
| 1452 | 1462 | Poll will block until the watermark is reached. |
| 1463 | + | |
| 1453 | 1464 | Blocking read will wait until the minimum between the requested |
| 1454 | 1465 | read amount or the low water mark is available. |
| 1466 | + | |
| 1455 | 1467 | Non-blocking read will retrieve the available samples from the |
| 1456 | 1468 | buffer even if there are less samples then watermark level. This |
| 1457 | 1469 | allows the application to block on poll with a timeout and read |
| @@ -1480,11 +1492,13 @@ Description: · 22 unmodified lines | ||
| 1480 | 1492 | device settings allows it (e.g. if a trigger is set that samples |
| 1481 | 1493 | data differently that the hardware fifo does then hardware fifo |
| 1482 | 1494 | will not enabled). |
| 1495 | + | |
| 1483 | 1496 | If the hardware fifo is enabled and the level of the hardware |
| 1484 | 1497 | fifo reaches the hardware fifo watermark level the device will |
| 1485 | 1498 | flush its hardware fifo to the device buffer. Doing a non |
| 1486 | 1499 | blocking read on the device when no samples are present in the |
| 1487 | 1500 | device buffer will also force a flush. |
| 1501 | + | |
| 1488 | 1502 | When the hardware fifo is enabled there is no need to use a |
| 1489 | 1503 | trigger to use buffer mode since the watermark settings |
| 1490 | 1504 | guarantees that the hardware fifo is flushed to the device |
| @@ -1522,6 +1536,7 @@ Description: · 31 unmodified lines | ||
| 1522 | 1536 | A single positive integer specifying the minimum watermark level |
| 1523 | 1537 | for the hardware fifo of this device. If the device does not |
| 1524 | 1538 | have a hardware fifo this entry is not present. |
| 1539 | + | |
| 1525 | 1540 | If the user sets buffer/watermark to a value less than this one, |
| 1526 | 1541 | then the hardware watermark will remain unset. |
| 1527 | 1542 | |
| @@ -1532,6 +1547,7 @@ Description: · 4 unmodified lines | ||
| 1532 | 1547 | A single positive integer specifying the maximum watermark level |
| 1533 | 1548 | for the hardware fifo of this device. If the device does not |
| 1534 | 1549 | have a hardware fifo this entry is not present. |
| 1550 | + | |
| 1535 | 1551 | If the user sets buffer/watermark to a value greater than this |
| 1536 | 1552 | one, then the hardware watermark will be capped at this value. |
| 1537 | 1553 | |
| @@ -1543,6 +1559,7 @@ Description: · 5 unmodified lines | ||
| 1543 | 1559 | levels for the hardware fifo. This entry is optional and if it |
| 1544 | 1560 | is not present it means that all the values between |
| 1545 | 1561 | hwfifo_watermark_min and hwfifo_watermark_max are supported. |
| 1562 | + | |
| 1546 | 1563 | If the user sets buffer/watermark to a value greater than |
| 1547 | 1564 | hwfifo_watermak_min but not equal to any of the values in this |
| 1548 | 1565 | list, the driver will chose an appropriate value for the |
| @@ -1604,7 +1621,8 @@ KernelVersion: 4.1.0 · 55 unmodified lines | ||
| 1604 | 1621 | Contact: linux-iio@vger.kernel.org |
| 1605 | 1622 | Description: |
| 1606 | 1623 | '1' (enable) or '0' (disable) specifying the enable |
| 1607 | − of heater function. Same reading values apply | |
| 1624 | + of heater function. Same reading values apply. | |
| 1625 | + | |
| 1608 | 1626 | This ABI is especially applicable for humidity sensors |
| 1609 | 1627 | to heatup the device and get rid of any condensation |
| 1610 | 1628 | in some humidity environment |
| @@ -1627,17 +1645,21 @@ Description: · 16 unmodified lines | ||
| 1627 | 1645 | Mounting matrix for IIO sensors. This is a rotation matrix which |
| 1628 | 1646 | informs userspace about sensor chip's placement relative to the |
| 1629 | 1647 | main hardware it is mounted on. |
| 1648 | + | |
| 1630 | 1649 | Main hardware placement is defined according to the local |
| 1631 | 1650 | reference frame related to the physical quantity the sensor |
| 1632 | 1651 | measures. |
| 1652 | + | |
| 1633 | 1653 | Given that the rotation matrix is defined in a board specific |
| 1634 | 1654 | way (platform data and / or device-tree), the main hardware |
| 1635 | 1655 | reference frame definition is left to the implementor's choice |
| 1636 | 1656 | (see below for a magnetometer example). |
| 1657 | + | |
| 1637 | 1658 | Applications should apply this rotation matrix to samples so |
| 1638 | 1659 | that when main hardware reference frame is aligned onto local |
| 1639 | 1660 | reference frame, then sensor chip reference frame is also |
| 1640 | 1661 | perfectly aligned with it. |
| 1662 | + | |
| 1641 | 1663 | Matrix is a 3x3 unitary matrix and typically looks like |
| 1642 | 1664 | [0, 1, 0; 1, 0, 0; 0, 0, -1]. Identity matrix |
| 1643 | 1665 | [1, 0, 0; 0, 1, 0; 0, 0, 1] means sensor chip and main hardware |
| @@ -1646,8 +1668,10 @@ Description: · 2 unmodified lines | ||
| 1646 | 1668 | For example, a mounting matrix for a magnetometer sensor informs |
| 1647 | 1669 | userspace about sensor chip's ORIENTATION relative to the main |
| 1648 | 1670 | hardware. |
| 1671 | + | |
| 1649 | 1672 | More specifically, main hardware orientation is defined with |
| 1650 | 1673 | respect to the LOCAL EARTH GEOMAGNETIC REFERENCE FRAME where : |
| 1674 | + | |
| 1651 | 1675 | * Y is in the ground plane and positive towards magnetic North ; |
| 1652 | 1676 | * X is in the ground plane, perpendicular to the North axis and |
| 1653 | 1677 | positive towards the East ; |
| @@ -1656,13 +1680,16 @@ Description: · 2 unmodified lines | ||
| 1656 | 1680 | An implementor might consider that for a hand-held device, a |
| 1657 | 1681 | 'natural' orientation would be 'front facing camera at the top'. |
| 1658 | 1682 | The main hardware reference frame could then be described as : |
| 1683 | + | |
| 1659 | 1684 | * Y is in the plane of the screen and is positive towards the |
| 1660 | 1685 | top of the screen ; |
| 1661 | 1686 | * X is in the plane of the screen, perpendicular to Y axis, and |
| 1662 | 1687 | positive towards the right hand side of the screen ; |
| 1663 | 1688 | * Z is perpendicular to the screen plane and positive out of the |
| 1664 | 1689 | screen. |
| 1690 | + | |
| 1665 | 1691 | Another example for a quadrotor UAV might be : |
| 1692 | + | |
| 1666 | 1693 | * Y is in the plane of the propellers and positive towards the |
| 1667 | 1694 | front-view camera; |
| 1668 | 1695 | * X is in the plane of the propellers, perpendicular to Y axis, |
| @@ -1704,6 +1731,7 @@ Description: · 35 unmodified lines | ||
| 1704 | 1731 | This interface is deprecated; please use the Counter subsystem. |
| 1705 | 1732 | |
| 1706 | 1733 | A list of possible counting directions which are: |
| 1734 | + | |
| 1707 | 1735 | - "up" : counter device is increasing. |
| 1708 | 1736 | - "down": counter device is decreasing. |
| 1709 | 1737 | |
| @@ -5,7 +5,8 @@ Contact: Peter Rosin <peda@axentia.se> · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | The DAC is used to find the peak level of an alternating |
| 7 | 7 | voltage input signal by a binary search using the output |
| 8 | − of a comparator wired to an interrupt pin. Like so: | |
| 8 | + of a comparator wired to an interrupt pin. Like so:: | |
| 9 | + | |
| 9 | 10 | _ |
| 10 | 11 | | \ |
| 11 | 12 | input +------>-------|+ \ |
| @@ -19,10 +20,12 @@ Description: · 7 unmodified lines | ||
| 19 | 20 | | irq|------<-------' |
| 20 | 21 | | | |
| 21 | 22 | '-------' |
| 23 | + | |
| 22 | 24 | The boolean invert attribute (0/1) should be set when the |
| 23 | 25 | input signal is centered around the maximum value of the |
| 24 | 26 | dac instead of zero. The envelope detector will search |
| 25 | 27 | from below in this case and will also invert the result. |
| 28 | + | |
| 26 | 29 | The edge/level of the interrupt is also switched to its |
| 27 | 30 | opposite value. |
| 28 | 31 | |
| @@ -19,9 +19,11 @@ Description: · 18 unmodified lines | ||
| 19 | 19 | is separately set for "GND-Open" and "Supply-Open" modes. |
| 20 | 20 | Channels 0..31 have common low threshold values, but could have different |
| 21 | 21 | sensing_modes. |
| 22 | + | |
| 22 | 23 | The low voltage threshold range is between 2..21V. |
| 23 | 24 | Hysteresis between low and high thresholds can not be lower then 2 and |
| 24 | 25 | can not be odd. |
| 26 | + | |
| 25 | 27 | If falling threshold results hysteresis to odd value then rising |
| 26 | 28 | threshold is automatically subtracted by one. |
| 27 | 29 | |
| @@ -34,10 +36,13 @@ Description: · 6 unmodified lines | ||
| 34 | 36 | this value then the threshold rising event is pushed. |
| 35 | 37 | Depending on in_voltageY_sensing_mode the high voltage threshold |
| 36 | 38 | is separately set for "GND-Open" and "Supply-Open" modes. |
| 39 | + | |
| 37 | 40 | Channels 0..31 have common high threshold values, but could have different |
| 38 | 41 | sensing_modes. |
| 42 | + | |
| 39 | 43 | The high voltage threshold range is between 3..22V. |
| 40 | 44 | Hysteresis between low and high thresholds can not be lower then 2 and |
| 41 | 45 | can not be odd. |
| 46 | + | |
| 42 | 47 | If rising threshold results hysteresis to odd value then falling |
| 43 | 48 | threshold is automatically appended by one. |
| @@ -5,10 +5,13 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | The STM32 ADC can be configured to use external trigger sources |
| 6 | 6 | (e.g. timers, pwm or exti gpio). Then, it can be tuned to start |
| 7 | 7 | conversions on external trigger by either: |
| 8 | + | |
| 8 | 9 | - "rising-edge" |
| 9 | 10 | - "falling-edge" |
| 10 | 11 | - "both-edges". |
| 12 | + | |
| 11 | 13 | Reading returns current trigger polarity. |
| 14 | + | |
| 12 | 15 | Writing value before enabling conversions sets trigger polarity. |
| 13 | 16 | |
| 14 | 17 | What: /sys/bus/iio/devices/triggerX/trigger_polarity_available |
| @@ -4,7 +4,7 @@ KernelVersion: 4.7 · 3 unmodified lines | ||
| 4 | 4 | Contact: linux-iio@vger.kernel.org |
| 5 | 5 | Description: |
| 6 | 6 | Writing '1' will perform a FOC (Fast Online Calibration). The |
| 7 | − corresponding calibration offsets can be read from *_calibbias | |
| 7 | + corresponding calibration offsets can be read from `*_calibbias` | |
| 8 | 8 | entries. |
| 9 | 9 | |
| 10 | 10 | What: /sys/bus/iio/devices/iio:deviceX/location |
| @@ -3,14 +3,20 @@ KernelVersion: 4.14 · 2 unmodified lines | ||
| 3 | 3 | Contact: arnaud.pouliquen@st.com |
| 4 | 4 | Description: |
| 5 | 5 | For audio purpose only. |
| 6 | + | |
| 6 | 7 | Used by audio driver to set/get the spi input frequency. |
| 8 | + | |
| 7 | 9 | This is mandatory if DFSDM is slave on SPI bus, to |
| 8 | 10 | provide information on the SPI clock frequency during runtime |
| 9 | 11 | Notice that the SPI frequency should be a multiple of sample |
| 10 | 12 | frequency to ensure the precision. |
| 11 | − if DFSDM input is SPI master | |
| 13 | + | |
| 14 | + if DFSDM input is SPI master: | |
| 15 | + | |
| 12 | 16 | Reading SPI clkout frequency, |
| 13 | 17 | error on writing |
| 18 | + | |
| 14 | 19 | If DFSDM input is SPI Slave: |
| 20 | + | |
| 15 | 21 | Reading returns value previously set. |
| 16 | 22 | Writing value before starting conversions. |
| @@ -15,8 +15,11 @@ Description: · 14 unmodified lines | ||
| 15 | 15 | first object echoed in meters. Default value is 6.020. |
| 16 | 16 | This setting limits the time the driver is waiting for a |
| 17 | 17 | echo. |
| 18 | + | |
| 18 | 19 | Showing the range of available values is represented as the |
| 19 | 20 | minimum value, the step and the maximum value, all enclosed |
| 20 | 21 | in square brackets. |
| 21 | − Example: | |
| 22 | − [0.043 0.043 11.008] | |
| 22 | + | |
| 23 | + Example:: | |
| 24 | + | |
| 25 | + [0.043 0.043 11.008] | |
| @@ -8,7 +8,9 @@ KernelVersion: 3.4.0 · 7 unmodified lines | ||
| 8 | 8 | Contact: linux-iio@vger.kernel.org |
| 9 | 9 | Description: |
| 10 | 10 | Reading returns either '1' or '0'. |
| 11 | + | |
| 11 | 12 | '1' means that the clock in question is present. |
| 13 | + | |
| 12 | 14 | '0' means that the clock is missing. |
| 13 | 15 | |
| 14 | 16 | What: /sys/bus/iio/devices/iio:deviceX/pllY_locked |
| @@ -27,12 +27,12 @@ What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_name · 26 unmodified lines | ||
| 27 | 27 | KernelVersion: |
| 28 | 28 | Contact: linux-iio@vger.kernel.org |
| 29 | 29 | Description: |
| 30 | − Reading returns the datasheet name for channel Y: | |
| 30 | + Reading returns the datasheet name for channel Y:: | |
| 31 | 31 | |
| 32 | − out_altvoltage0_name: RF8x | |
| 33 | − out_altvoltage1_name: RFAUX8x | |
| 34 | − out_altvoltage2_name: RF16x | |
| 35 | − out_altvoltage3_name: RF32x | |
| 32 | + out_altvoltage0_name: RF8x | |
| 33 | + out_altvoltage1_name: RFAUX8x | |
| 34 | + out_altvoltage2_name: RF16x | |
| 35 | + out_altvoltage3_name: RF32x | |
| 36 | 36 | |
| 37 | 37 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown |
| 38 | 38 | KernelVersion: |
| @@ -6,10 +6,14 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | Get measured values from the ADC for these stages. Y is the |
| 7 | 7 | specific stage number corresponding to datasheet stage names |
| 8 | 8 | as follows: |
| 9 | − 1 -> LED2 | |
| 10 | − 2 -> ALED2/LED3 | |
| 11 | − 3 -> LED1 | |
| 12 | − 4 -> ALED1/LED4 | |
| 9 | + | |
| 10 | + == ========== | |
| 11 | + 1 LED2 | |
| 12 | + 2 ALED2/LED3 | |
| 13 | + 3 LED1 | |
| 14 | + 4 ALED1/LED4 | |
| 15 | + == ========== | |
| 16 | + | |
| 13 | 17 | Note that channels 5 and 6 represent LED2-ALED2 and LED1-ALED1 |
| 14 | 18 | respectively which simply helper channels containing the |
| 15 | 19 | calculated difference in the value of stage 1 - 2 and 3 - 4. |
| @@ -15,5 +15,7 @@ Description: · 14 unmodified lines | ||
| 15 | 15 | Scheme 0 has wider dynamic range, Scheme 1 proximity detection |
| 16 | 16 | is less affected by the ambient IR noise variation. |
| 17 | 17 | |
| 18 | − 0 Sensing IR from LED and ambient | |
| 19 | − 1 Sensing IR from LED with ambient IR rejection | |
| 18 | + == ============================================= | |
| 19 | + 0 Sensing IR from LED and ambient | |
| 20 | + 1 Sensing IR from LED with ambient IR rejection | |
| 21 | + == ============================================= | |
| @@ -17,9 +17,11 @@ KernelVersion: 4.13 · 16 unmodified lines | ||
| 17 | 17 | Contact: fabrice.gasnier@st.com |
| 18 | 18 | Description: |
| 19 | 19 | Configure the device counter quadrature modes: |
| 20 | + | |
| 20 | 21 | - non-quadrature: |
| 21 | 22 | Encoder IN1 input servers as the count input (up |
| 22 | 23 | direction). |
| 24 | + | |
| 23 | 25 | - quadrature: |
| 24 | 26 | Encoder IN1 and IN2 inputs are mixed to get direction |
| 25 | 27 | and count. |
| @@ -35,23 +37,26 @@ KernelVersion: 4.13 · 9 unmodified lines | ||
| 35 | 37 | Contact: fabrice.gasnier@st.com |
| 36 | 38 | Description: |
| 37 | 39 | Configure the device encoder/counter active edge: |
| 40 | + | |
| 38 | 41 | - rising-edge |
| 39 | 42 | - falling-edge |
| 40 | 43 | - both-edges |
| 41 | 44 | |
| 42 | 45 | In non-quadrature mode, device counts up on active edge. |
| 46 | + | |
| 43 | 47 | In quadrature mode, encoder counting scenarios are as follows: |
| 44 | − ---------------------------------------------------------------- | |
| 48 | + | |
| 49 | + +---------+----------+--------------------+--------------------+ | |
| 45 | 50 | | Active | Level on | IN1 signal | IN2 signal | |
| 46 | − | edge | opposite |------------------------------------------ | |
| 51 | + | edge | opposite +----------+---------+----------+---------+ | |
| 47 | 52 | | | signal | Rising | Falling | Rising | Falling | |
| 48 | − ---------------------------------------------------------------- | |
| 49 | − | Rising | High -> | Down | - | Up | - | | |
| 50 | − | edge | Low -> | Up | - | Down | - | | |
| 51 | − ---------------------------------------------------------------- | |
| 52 | − | Falling | High -> | - | Up | - | Down | | |
| 53 | − | edge | Low -> | - | Down | - | Up | | |
| 54 | − ---------------------------------------------------------------- | |
| 55 | − | Both | High -> | Down | Up | Up | Down | | |
| 56 | − | edges | Low -> | Up | Down | Down | Up | | |
| 57 | − ---------------------------------------------------------------- | |
| 53 | + +---------+----------+----------+---------+----------+---------+ | |
| 54 | + | Rising | High -> | Down | - | Up | - | | |
| 55 | + | edge | Low -> | Up | - | Down | - | | |
| 56 | + +---------+----------+----------+---------+----------+---------+ | |
| 57 | + | Falling | High -> | - | Up | - | Down | | |
| 58 | + | edge | Low -> | - | Down | - | Up | | |
| 59 | + +---------+----------+----------+---------+----------+---------+ | |
| 60 | + | Both | High -> | Down | Up | Up | Down | | |
| 61 | + | edges | Low -> | Up | Down | Down | Up | | |
| 62 | + +---------+----------+----------+---------+----------+---------+ | |
| @@ -5,11 +5,16 @@ Contact: linux-iio@vger.kernel.org · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | Current configuration and available configurations |
| 7 | 7 | for the bias current. |
| 8 | − normal - Normal measurement configurations (default) | |
| 9 | − positivebias - Positive bias configuration | |
| 10 | − negativebias - Negative bias configuration | |
| 11 | − disabled - Only available on HMC5983. Disables magnetic | |
| 8 | + | |
| 9 | + ============ ============================================ | |
| 10 | + normal Normal measurement configurations (default) | |
| 11 | + positivebias Positive bias configuration | |
| 12 | + negativebias Negative bias configuration | |
| 13 | + disabled Only available on HMC5983. Disables magnetic | |
| 12 | 14 | sensor and enables temperature sensor. |
| 13 | − Note: The effect of this configuration may vary | |
| 14 | − according to the device. For exact documentation | |
| 15 | − check the device's datasheet. | |
| 15 | + ============ ============================================ | |
| 16 | + | |
| 17 | + Note: | |
| 18 | + The effect of this configuration may vary | |
| 19 | + according to the device. For exact documentation | |
| 20 | + check the device's datasheet. | |
| @@ -5,9 +5,12 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | Open-circuit fault. The detection of open-circuit faults, |
| 6 | 6 | such as those caused by broken thermocouple wires. |
| 7 | 7 | Reading returns either '1' or '0'. |
| 8 | − '1' = An open circuit such as broken thermocouple wires | |
| 9 | − has been detected. | |
| 10 | − '0' = No open circuit or broken thermocouple wires are detected | |
| 8 | + | |
| 9 | + === ======================================================= | |
| 10 | + '1' An open circuit such as broken thermocouple wires | |
| 11 | + has been detected. | |
| 12 | + '0' No open circuit or broken thermocouple wires are detected | |
| 13 | + === ======================================================= | |
| 11 | 14 | |
| 12 | 15 | What: /sys/bus/iio/devices/iio:deviceX/fault_ovuv |
| 13 | 16 | KernelVersion: 5.1 |
| @@ -18,7 +21,11 @@ Description: · 4 unmodified lines | ||
| 18 | 21 | cables by integrated MOSFETs at the T+ and T- inputs, and the |
| 19 | 22 | BIAS output. These MOSFETs turn off when the input voltage is |
| 20 | 23 | negative or greater than VDD. |
| 24 | + | |
| 21 | 25 | Reading returns either '1' or '0'. |
| 22 | − '1' = The input voltage is negative or greater than VDD. | |
| 23 | − '0' = The input voltage is positive and less than VDD (normal | |
| 24 | − state). | |
| 26 | + | |
| 27 | + === ======================================================= | |
| 28 | + '1' The input voltage is negative or greater than VDD. | |
| 29 | + '0' The input voltage is positive and less than VDD (normal | |
| 30 | + state). | |
| 31 | + === ======================================================= | |
| @@ -3,67 +3,85 @@ KernelVersion: 4.11 · 2 unmodified lines | ||
| 3 | 3 | Contact: benjamin.gaignard@st.com |
| 4 | 4 | Description: |
| 5 | 5 | Reading returns the list possible master modes which are: |
| 6 | − - "reset" : The UG bit from the TIMx_EGR register is | |
| 6 | + | |
| 7 | + | |
| 8 | + - "reset" | |
| 9 | + The UG bit from the TIMx_EGR register is | |
| 7 | 10 | used as trigger output (TRGO). |
| 8 | − - "enable" : The Counter Enable signal CNT_EN is used | |
| 11 | + - "enable" | |
| 12 | + The Counter Enable signal CNT_EN is used | |
| 9 | 13 | as trigger output. |
| 10 | − - "update" : The update event is selected as trigger output. | |
| 14 | + - "update" | |
| 15 | + The update event is selected as trigger output. | |
| 11 | 16 | For instance a master timer can then be used |
| 12 | 17 | as a prescaler for a slave timer. |
| 13 | − - "compare_pulse" : The trigger output send a positive pulse | |
| 14 | − when the CC1IF flag is to be set. | |
| 15 | − - "OC1REF" : OC1REF signal is used as trigger output. | |
| 16 | − - "OC2REF" : OC2REF signal is used as trigger output. | |
| 17 | − - "OC3REF" : OC3REF signal is used as trigger output. | |
| 18 | − - "OC4REF" : OC4REF signal is used as trigger output. | |
| 18 | + - "compare_pulse" | |
| 19 | + The trigger output send a positive pulse | |
| 20 | + when the CC1IF flag is to be set. | |
| 21 | + - "OC1REF" | |
| 22 | + OC1REF signal is used as trigger output. | |
| 23 | + - "OC2REF" | |
| 24 | + OC2REF signal is used as trigger output. | |
| 25 | + - "OC3REF" | |
| 26 | + OC3REF signal is used as trigger output. | |
| 27 | + - "OC4REF" | |
| 28 | + OC4REF signal is used as trigger output. | |
| 29 | + | |
| 19 | 30 | Additional modes (on TRGO2 only): |
| 20 | − - "OC5REF" : OC5REF signal is used as trigger output. | |
| 21 | − - "OC6REF" : OC6REF signal is used as trigger output. | |
| 31 | + | |
| 32 | + - "OC5REF" | |
| 33 | + OC5REF signal is used as trigger output. | |
| 34 | + - "OC6REF" | |
| 35 | + OC6REF signal is used as trigger output. | |
| 22 | 36 | - "compare_pulse_OC4REF": |
| 23 | − OC4REF rising or falling edges generate pulses. | |
| 37 | + OC4REF rising or falling edges generate pulses. | |
| 24 | 38 | - "compare_pulse_OC6REF": |
| 25 | − OC6REF rising or falling edges generate pulses. | |
| 39 | + OC6REF rising or falling edges generate pulses. | |
| 26 | 40 | - "compare_pulse_OC4REF_r_or_OC6REF_r": |
| 27 | − OC4REF or OC6REF rising edges generate pulses. | |
| 41 | + OC4REF or OC6REF rising edges generate pulses. | |
| 28 | 42 | - "compare_pulse_OC4REF_r_or_OC6REF_f": |
| 29 | − OC4REF rising or OC6REF falling edges generate pulses. | |
| 43 | + OC4REF rising or OC6REF falling edges generate | |
| 44 | + pulses. | |
| 30 | 45 | - "compare_pulse_OC5REF_r_or_OC6REF_r": |
| 31 | − OC5REF or OC6REF rising edges generate pulses. | |
| 46 | + OC5REF or OC6REF rising edges generate pulses. | |
| 32 | 47 | - "compare_pulse_OC5REF_r_or_OC6REF_f": |
| 33 | − OC5REF rising or OC6REF falling edges generate pulses. | |
| 34 | − | |
| 35 | − +-----------+ +-------------+ +---------+ | |
| 36 | − | Prescaler +-> | Counter | +-> | Master | TRGO(2) | |
| 37 | − +-----------+ +--+--------+-+ |-> | Control +--> | |
| 38 | − | | || +---------+ | |
| 39 | − +--v--------+-+ OCxREF || +---------+ | |
| 40 | − | Chx compare +----------> | Output | ChX | |
| 41 | − +-----------+-+ | | Control +--> | |
| 42 | − . | | +---------+ | |
| 43 | − . | | . | |
| 44 | − +-----------v-+ OC6REF | . | |
| 45 | − | Ch6 compare +---------+> | |
| 46 | − +-------------+ | |
| 47 | − | |
| 48 | − Example with: "compare_pulse_OC4REF_r_or_OC6REF_r": | |
| 49 | − | |
| 50 | − X | |
| 51 | − X X | |
| 52 | − X . . X | |
| 53 | − X . . X | |
| 54 | − X . . X | |
| 55 | − count X . . . . X | |
| 56 | − . . . . | |
| 57 | − . . . . | |
| 58 | − +---------------+ | |
| 59 | − OC4REF | . . | | |
| 60 | − +-+ . . +-+ | |
| 61 | − . +---+ . | |
| 62 | − OC6REF . | | . | |
| 63 | − +-------+ +-------+ | |
| 64 | − +-+ +-+ | |
| 65 | − TRGO2 | | | | | |
| 66 | − +-+ +---+ +---------+ | |
| 48 | + OC5REF rising or OC6REF falling edges generate | |
| 49 | + pulses. | |
| 50 | + | |
| 51 | + :: | |
| 52 | + | |
| 53 | + +-----------+ +-------------+ +---------+ | |
| 54 | + | Prescaler +-> | Counter | +-> | Master | TRGO(2) | |
| 55 | + +-----------+ +--+--------+-+ |-> | Control +--> | |
| 56 | + | | || +---------+ | |
| 57 | + +--v--------+-+ OCxREF || +---------+ | |
| 58 | + | Chx compare +----------> | Output | ChX | |
| 59 | + +-----------+-+ | | Control +--> | |
| 60 | + . | | +---------+ | |
| 61 | + . | | . | |
| 62 | + +-----------v-+ OC6REF | . | |
| 63 | + | Ch6 compare +---------+> | |
| 64 | + +-------------+ | |
| 65 | + | |
| 66 | + Example with: "compare_pulse_OC4REF_r_or_OC6REF_r":: | |
| 67 | + | |
| 68 | + X | |
| 69 | + X X | |
| 70 | + X . . X | |
| 71 | + X . . X | |
| 72 | + X . . X | |
| 73 | + count X . . . . X | |
| 74 | + . . . . | |
| 75 | + . . . . | |
| 76 | + +---------------+ | |
| 77 | + OC4REF | . . | | |
| 78 | + +-+ . . +-+ | |
| 79 | + . +---+ . | |
| 80 | + OC6REF . | | . | |
| 81 | + +-------+ +-------+ | |
| 82 | + +-+ +-+ | |
| 83 | + TRGO2 | | | | | |
| 84 | + +-+ +---+ +---------+ | |
| 67 | 85 | |
| 68 | 86 | What: /sys/bus/iio/devices/triggerX/master_mode |
| 69 | 87 | KernelVersion: 4.11 |
| @@ -91,6 +109,30 @@ Description: · 21 unmodified lines | ||
| 91 | 109 | When counting down the counter start from preset value |
| 92 | 110 | and fire event when reach 0. |
| 93 | 111 | |
| 112 | +What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available | |
| 113 | +KernelVersion: 4.12 | |
| 114 | +Contact: benjamin.gaignard@st.com | |
| 115 | +Description: | |
| 116 | + Reading returns the list possible quadrature modes. | |
| 117 | + | |
| 118 | +What: /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode | |
| 119 | +KernelVersion: 4.12 | |
| 120 | +Contact: benjamin.gaignard@st.com | |
| 121 | +Description: | |
| 122 | + Configure the device counter quadrature modes: | |
| 123 | + | |
| 124 | + channel_A: | |
| 125 | + Encoder A input servers as the count input and B as | |
| 126 | + the UP/DOWN direction control input. | |
| 127 | + | |
| 128 | + channel_B: | |
| 129 | + Encoder B input serves as the count input and A as | |
| 130 | + the UP/DOWN direction control input. | |
| 131 | + | |
| 132 | + quadrature: | |
| 133 | + Encoder A and B inputs are mixed to get direction | |
| 134 | + and count with a scale of 0.25. | |
| 135 | + | |
| 94 | 136 | What: /sys/bus/iio/devices/iio:deviceX/in_count_enable_mode_available |
| 95 | 137 | KernelVersion: 4.12 |
| 96 | 138 | Contact: benjamin.gaignard@st.com |
| @@ -104,6 +146,7 @@ Description: · 7 unmodified lines | ||
| 104 | 146 | Configure the device counter enable modes, in all case |
| 105 | 147 | counting direction is set by in_count0_count_direction |
| 106 | 148 | attribute and the counter is clocked by the internal clock. |
| 149 | + | |
| 107 | 150 | always: |
| 108 | 151 | Counter is always ON. |
| 109 | 152 | |
| @@ -10,10 +10,13 @@ Date: June 2015 · 9 unmodified lines | ||
| 10 | 10 | KernelVersion: 4.3 |
| 11 | 11 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| 12 | 12 | Description: (RO) Output port type: |
| 13 | − 0: not present, | |
| 14 | − 1: MSU (Memory Storage Unit) | |
| 15 | − 2: CTP (Common Trace Port) | |
| 16 | − 4: PTI (MIPI PTI). | |
| 13 | + | |
| 14 | + == ========================= | |
| 15 | + 0 not present, | |
| 16 | + 1 MSU (Memory Storage Unit) | |
| 17 | + 2 CTP (Common Trace Port) | |
| 18 | + 4 PTI (MIPI PTI). | |
| 19 | + == ========================= | |
| 17 | 20 | |
| 18 | 21 | What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_drop |
| 19 | 22 | Date: June 2015 |
| @@ -9,11 +9,13 @@ Date: June 2015 · 8 unmodified lines | ||
| 9 | 9 | KernelVersion: 4.3 |
| 10 | 10 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| 11 | 11 | Description: (RW) Configure MSC operating mode: |
| 12 | + | |
| 12 | 13 | - "single", for contiguous buffer mode (high-order alloc); |
| 13 | 14 | - "multi", for multiblock mode; |
| 14 | 15 | - "ExI", for DCI handler mode; |
| 15 | 16 | - "debug", for debug mode; |
| 16 | 17 | - any of the currently loaded buffer sinks. |
| 18 | + | |
| 17 | 19 | If operating mode changes, existing buffer is deallocated, |
| 18 | 20 | provided there are no active users and tracing is not enabled, |
| 19 | 21 | otherwise the write will fail. |
| @@ -23,10 +25,12 @@ Date: June 2015 · 3 unmodified lines | ||
| 23 | 25 | KernelVersion: 4.3 |
| 24 | 26 | Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| 25 | 27 | Description: (RW) Configure MSC buffer size for "single" or "multi" modes. |
| 28 | + | |
| 26 | 29 | In single mode, this is a single number of pages, has to be |
| 27 | 30 | power of 2. In multiblock mode, this is a comma-separated list |
| 28 | 31 | of numbers of pages for each window to be allocated. Number of |
| 29 | 32 | windows is not limited. |
| 33 | + | |
| 30 | 34 | Writing to this file deallocates existing buffer (provided |
| 31 | 35 | there are no active users and tracing is not enabled) and then |
| 32 | 36 | allocates a new one. |
| @@ -235,7 +235,8 @@ KernelVersion: 4.15 · 234 unmodified lines | ||
| 235 | 235 | Contact: Christian Gromm <christian.gromm@microchip.com> |
| 236 | 236 | Description: |
| 237 | 237 | This is to read back the configured direction of the channel. |
| 238 | − The following strings will be accepted: | |
| 238 | + The following strings will be accepted:: | |
| 239 | + | |
| 239 | 240 | 'tx', |
| 240 | 241 | 'rx' |
| 241 | 242 | Users: |
| @@ -246,7 +247,8 @@ KernelVersion: 4.15 · 4 unmodified lines | ||
| 246 | 247 | Contact: Christian Gromm <christian.gromm@microchip.com> |
| 247 | 248 | Description: |
| 248 | 249 | This is to read back the configured data type of the channel. |
| 249 | − The following strings will be accepted: | |
| 250 | + The following strings will be accepted:: | |
| 251 | + | |
| 250 | 252 | 'control', |
| 251 | 253 | 'async', |
| 252 | 254 | 'sync', |
| @@ -2,16 +2,16 @@ What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_description · 1 unmodified line | ||
| 2 | 2 | Date: March 2019 |
| 3 | 3 | KernelVersion: 5.3 |
| 4 | 4 | Contact: Marek Behún <marek.behun@nic.cz> |
| 5 | −Description: (R) Moxtet module description. Format: string | |
| 5 | +Description: (Read) Moxtet module description. Format: string | |
| 6 | 6 | |
| 7 | 7 | What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_id |
| 8 | 8 | Date: March 2019 |
| 9 | 9 | KernelVersion: 5.3 |
| 10 | 10 | Contact: Marek Behún <marek.behun@nic.cz> |
| 11 | −Description: (R) Moxtet module ID. Format: %x | |
| 11 | +Description: (Read) Moxtet module ID. Format: %x | |
| 12 | 12 | |
| 13 | 13 | What: /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_name |
| 14 | 14 | Date: March 2019 |
| 15 | 15 | KernelVersion: 5.3 |
| 16 | 16 | Contact: Marek Behún <marek.behun@nic.cz> |
| 17 | −Description: (R) Moxtet module name. Format: string | |
| 17 | +Description: (Read) Moxtet module name. Format: string | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −For all of the nmem device attributes under nfit/*, see the 'NVDIMM Firmware | |
| 1 | +For all of the nmem device attributes under ``nfit/*``, see the 'NVDIMM Firmware | |
| 2 | 2 | Interface Table (NFIT)' section in the ACPI specification |
| 3 | 3 | (http://www.uefi.org/specifications) for more details. |
| 4 | 4 | |
| @@ -1,2 +1,8 @@ | ||
| 1 | +What: nvdimm | |
| 2 | +Date: July 2020 | |
| 3 | +KernelVersion: 5.8 | |
| 4 | +Contact: Dan Williams <dan.j.williams@intel.com> | |
| 5 | +Description: | |
| 6 | + | |
| 1 | 7 | The libnvdimm sub-system implements a common sysfs interface for |
| 2 | 8 | platform nvdimm resources. See Documentation/driver-api/nvdimm/. |
| @@ -11,19 +11,26 @@ Description: · 10 unmodified lines | ||
| 11 | 11 | at 'Documentation/powerpc/papr_hcalls.rst' . Below are |
| 12 | 12 | the flags reported in this sysfs file: |
| 13 | 13 | |
| 14 | − * "not_armed" : Indicates that NVDIMM contents will not | |
| 14 | + * "not_armed" | |
| 15 | + Indicates that NVDIMM contents will not | |
| 15 | 16 | survive a power cycle. |
| 16 | − * "flush_fail" : Indicates that NVDIMM contents | |
| 17 | + * "flush_fail" | |
| 18 | + Indicates that NVDIMM contents | |
| 17 | 19 | couldn't be flushed during last |
| 18 | 20 | shut-down event. |
| 19 | − * "restore_fail": Indicates that NVDIMM contents | |
| 21 | + * "restore_fail" | |
| 22 | + Indicates that NVDIMM contents | |
| 20 | 23 | couldn't be restored during NVDIMM |
| 21 | 24 | initialization. |
| 22 | − * "encrypted" : NVDIMM contents are encrypted. | |
| 23 | − * "smart_notify": There is health event for the NVDIMM. | |
| 24 | − * "scrubbed" : Indicating that contents of the | |
| 25 | + * "encrypted" | |
| 26 | + NVDIMM contents are encrypted. | |
| 27 | + * "smart_notify" | |
| 28 | + There is health event for the NVDIMM. | |
| 29 | + * "scrubbed" | |
| 30 | + Indicating that contents of the | |
| 25 | 31 | NVDIMM have been scrubbed. |
| 26 | − * "locked" : Indicating that NVDIMM contents cant | |
| 32 | + * "locked" | |
| 33 | + Indicating that NVDIMM contents cant | |
| 27 | 34 | be modified until next power cycle. |
| 28 | 35 | |
| 29 | 36 | What: /sys/bus/nd/devices/nmemX/papr/perf_stats |
| @@ -51,4 +58,4 @@ Description: · 21 unmodified lines | ||
| 51 | 58 | * "MedWDur " : Media Write Duration |
| 52 | 59 | * "CchRHCnt" : Cache Read Hit Count |
| 53 | 60 | * "CchWHCnt" : Cache Write Hit Count |
| 54 | − * "FastWCnt" : Fast Write Count | |
| 61 | + * "FastWCnt" : Fast Write Count | |
| @@ -7,8 +7,10 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | this location. This is useful for overriding default |
| 8 | 8 | bindings. The format for the location is: DDDD:BB:DD.F. |
| 9 | 9 | That is Domain:Bus:Device.Function and is the same as |
| 10 | − found in /sys/bus/pci/devices/. For example: | |
| 11 | − # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind | |
| 10 | + found in /sys/bus/pci/devices/. For example:: | |
| 11 | + | |
| 12 | + # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind | |
| 13 | + | |
| 12 | 14 | (Note: kernels before 2.6.28 may require echo -n). |
| 13 | 15 | |
| 14 | 16 | What: /sys/bus/pci/drivers/.../unbind |
| @@ -20,8 +22,10 @@ Description: · 5 unmodified lines | ||
| 20 | 22 | this location. This may be useful when overriding default |
| 21 | 23 | bindings. The format for the location is: DDDD:BB:DD.F. |
| 22 | 24 | That is Domain:Bus:Device.Function and is the same as |
| 23 | − found in /sys/bus/pci/devices/. For example: | |
| 24 | − # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind | |
| 25 | + found in /sys/bus/pci/devices/. For example:: | |
| 26 | + | |
| 27 | + # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind | |
| 28 | + | |
| 25 | 29 | (Note: kernels before 2.6.28 may require echo -n). |
| 26 | 30 | |
| 27 | 31 | What: /sys/bus/pci/drivers/.../new_id |
| @@ -38,8 +42,9 @@ Description: · 10 unmodified lines | ||
| 38 | 42 | Class, Class Mask, and Private Driver Data. The Vendor ID |
| 39 | 43 | and Device ID fields are required, the rest are optional. |
| 40 | 44 | Upon successfully adding an ID, the driver will probe |
| 41 | − for the device and attempt to bind to it. For example: | |
| 42 | − # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id | |
| 45 | + for the device and attempt to bind to it. For example:: | |
| 46 | + | |
| 47 | + # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id | |
| 43 | 48 | |
| 44 | 49 | What: /sys/bus/pci/drivers/.../remove_id |
| 45 | 50 | Date: February 2009 |
| @@ -54,8 +59,9 @@ Description: · 8 unmodified lines | ||
| 54 | 59 | required, the rest are optional. After successfully |
| 55 | 60 | removing an ID, the driver will no longer support the |
| 56 | 61 | device. This is useful to ensure auto probing won't |
| 57 | − match the driver to the device. For example: | |
| 58 | − # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id | |
| 62 | + match the driver to the device. For example:: | |
| 63 | + | |
| 64 | + # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id | |
| 59 | 65 | |
| 60 | 66 | What: /sys/bus/pci/rescan |
| 61 | 67 | Date: January 2009 |
| @@ -1,6 +1,6 @@ | ||
| 1 | −========================== | |
| 2 | 1 | PCIe Device AER statistics |
| 3 | −========================== | |
| 2 | +-------------------------- | |
| 3 | + | |
| 4 | 4 | These attributes show up under all the devices that are AER capable. These |
| 5 | 5 | statistical counters indicate the errors "as seen/reported by the device". |
| 6 | 6 | Note that this may mean that if an endpoint is causing problems, the AER |
| @@ -17,19 +17,18 @@ Description: List of correctable errors seen and reported by this · 10 unmodified lines | ||
| 17 | 17 | PCI device using ERR_COR. Note that since multiple errors may |
| 18 | 18 | be reported using a single ERR_COR message, thus |
| 19 | 19 | TOTAL_ERR_COR at the end of the file may not match the actual |
| 20 | − total of all the errors in the file. Sample output: | |
| 21 | −------------------------------------------------------------------------- | |
| 22 | −localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_correctable | |
| 23 | −Receiver Error 2 | |
| 24 | −Bad TLP 0 | |
| 25 | −Bad DLLP 0 | |
| 26 | −RELAY_NUM Rollover 0 | |
| 27 | −Replay Timer Timeout 0 | |
| 28 | −Advisory Non-Fatal 0 | |
| 29 | −Corrected Internal Error 0 | |
| 30 | −Header Log Overflow 0 | |
| 31 | −TOTAL_ERR_COR 2 | |
| 32 | −------------------------------------------------------------------------- | |
| 20 | + total of all the errors in the file. Sample output:: | |
| 21 | + | |
| 22 | + localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_correctable | |
| 23 | + Receiver Error 2 | |
| 24 | + Bad TLP 0 | |
| 25 | + Bad DLLP 0 | |
| 26 | + RELAY_NUM Rollover 0 | |
| 27 | + Replay Timer Timeout 0 | |
| 28 | + Advisory Non-Fatal 0 | |
| 29 | + Corrected Internal Error 0 | |
| 30 | + Header Log Overflow 0 | |
| 31 | + TOTAL_ERR_COR 2 | |
| 33 | 32 | |
| 34 | 33 | What: /sys/bus/pci/devices/<dev>/aer_dev_fatal |
| 35 | 34 | Date: July 2018 |
| @@ -39,28 +38,27 @@ Description: List of uncorrectable fatal errors seen and reported by this · 3 unmodified lines | ||
| 39 | 38 | PCI device using ERR_FATAL. Note that since multiple errors may |
| 40 | 39 | be reported using a single ERR_FATAL message, thus |
| 41 | 40 | TOTAL_ERR_FATAL at the end of the file may not match the actual |
| 42 | − total of all the errors in the file. Sample output: | |
| 43 | −------------------------------------------------------------------------- | |
| 44 | −localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_fatal | |
| 45 | −Undefined 0 | |
| 46 | −Data Link Protocol 0 | |
| 47 | −Surprise Down Error 0 | |
| 48 | −Poisoned TLP 0 | |
| 49 | −Flow Control Protocol 0 | |
| 50 | −Completion Timeout 0 | |
| 51 | −Completer Abort 0 | |
| 52 | −Unexpected Completion 0 | |
| 53 | −Receiver Overflow 0 | |
| 54 | −Malformed TLP 0 | |
| 55 | −ECRC 0 | |
| 56 | −Unsupported Request 0 | |
| 57 | −ACS Violation 0 | |
| 58 | −Uncorrectable Internal Error 0 | |
| 59 | −MC Blocked TLP 0 | |
| 60 | −AtomicOp Egress Blocked 0 | |
| 61 | −TLP Prefix Blocked Error 0 | |
| 62 | −TOTAL_ERR_FATAL 0 | |
| 63 | −------------------------------------------------------------------------- | |
| 41 | + total of all the errors in the file. Sample output:: | |
| 42 | + | |
| 43 | + localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_fatal | |
| 44 | + Undefined 0 | |
| 45 | + Data Link Protocol 0 | |
| 46 | + Surprise Down Error 0 | |
| 47 | + Poisoned TLP 0 | |
| 48 | + Flow Control Protocol 0 | |
| 49 | + Completion Timeout 0 | |
| 50 | + Completer Abort 0 | |
| 51 | + Unexpected Completion 0 | |
| 52 | + Receiver Overflow 0 | |
| 53 | + Malformed TLP 0 | |
| 54 | + ECRC 0 | |
| 55 | + Unsupported Request 0 | |
| 56 | + ACS Violation 0 | |
| 57 | + Uncorrectable Internal Error 0 | |
| 58 | + MC Blocked TLP 0 | |
| 59 | + AtomicOp Egress Blocked 0 | |
| 60 | + TLP Prefix Blocked Error 0 | |
| 61 | + TOTAL_ERR_FATAL 0 | |
| 64 | 62 | |
| 65 | 63 | What: /sys/bus/pci/devices/<dev>/aer_dev_nonfatal |
| 66 | 64 | Date: July 2018 |
| @@ -70,32 +68,31 @@ Description: List of uncorrectable nonfatal errors seen and reported by this · 3 unmodified lines | ||
| 70 | 68 | PCI device using ERR_NONFATAL. Note that since multiple errors |
| 71 | 69 | may be reported using a single ERR_FATAL message, thus |
| 72 | 70 | TOTAL_ERR_NONFATAL at the end of the file may not match the |
| 73 | − actual total of all the errors in the file. Sample output: | |
| 74 | −------------------------------------------------------------------------- | |
| 75 | −localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_nonfatal | |
| 76 | −Undefined 0 | |
| 77 | −Data Link Protocol 0 | |
| 78 | −Surprise Down Error 0 | |
| 79 | −Poisoned TLP 0 | |
| 80 | −Flow Control Protocol 0 | |
| 81 | −Completion Timeout 0 | |
| 82 | −Completer Abort 0 | |
| 83 | −Unexpected Completion 0 | |
| 84 | −Receiver Overflow 0 | |
| 85 | −Malformed TLP 0 | |
| 86 | −ECRC 0 | |
| 87 | −Unsupported Request 0 | |
| 88 | −ACS Violation 0 | |
| 89 | −Uncorrectable Internal Error 0 | |
| 90 | −MC Blocked TLP 0 | |
| 91 | −AtomicOp Egress Blocked 0 | |
| 92 | −TLP Prefix Blocked Error 0 | |
| 93 | −TOTAL_ERR_NONFATAL 0 | |
| 94 | −------------------------------------------------------------------------- | |
| 71 | + actual total of all the errors in the file. Sample output:: | |
| 72 | + | |
| 73 | + localhost /sys/devices/pci0000:00/0000:00:1c.0 # cat aer_dev_nonfatal | |
| 74 | + Undefined 0 | |
| 75 | + Data Link Protocol 0 | |
| 76 | + Surprise Down Error 0 | |
| 77 | + Poisoned TLP 0 | |
| 78 | + Flow Control Protocol 0 | |
| 79 | + Completion Timeout 0 | |
| 80 | + Completer Abort 0 | |
| 81 | + Unexpected Completion 0 | |
| 82 | + Receiver Overflow 0 | |
| 83 | + Malformed TLP 0 | |
| 84 | + ECRC 0 | |
| 85 | + Unsupported Request 0 | |
| 86 | + ACS Violation 0 | |
| 87 | + Uncorrectable Internal Error 0 | |
| 88 | + MC Blocked TLP 0 | |
| 89 | + AtomicOp Egress Blocked 0 | |
| 90 | + TLP Prefix Blocked Error 0 | |
| 91 | + TOTAL_ERR_NONFATAL 0 | |
| 95 | 92 | |
| 96 | −============================ | |
| 97 | 93 | PCIe Rootport AER statistics |
| 98 | −============================ | |
| 94 | +---------------------------- | |
| 95 | + | |
| 99 | 96 | These attributes show up under only the rootports (or root complex event |
| 100 | 97 | collectors) that are AER capable. These indicate the number of error messages as |
| 101 | 98 | "reported to" the rootport. Please note that the rootports also transmit |
| @@ -4,6 +4,7 @@ Contact: Cezary Rojewski <cezary.rojewski@intel.com> · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | Version of AudioDSP firmware ASoC catpt driver is |
| 6 | 6 | communicating with. |
| 7 | + | |
| 7 | 8 | Format: %d.%d.%d.%d, type:major:minor:build. |
| 8 | 9 | |
| 9 | 10 | What: /sys/devices/pci0000:00/<dev>/fw_info |
| @@ -21,11 +21,11 @@ Description: · 20 unmodified lines | ||
| 21 | 21 | number returns the port to normal operation. |
| 22 | 22 | |
| 23 | 23 | For example: To force the high-speed device attached to |
| 24 | − port 4 on bus 2 to run at full speed: | |
| 24 | + port 4 on bus 2 to run at full speed:: | |
| 25 | 25 | |
| 26 | 26 | echo 4 >/sys/bus/usb/devices/usb2/../companion |
| 27 | 27 | |
| 28 | − To return the port to high-speed operation: | |
| 28 | + To return the port to high-speed operation:: | |
| 29 | 29 | |
| 30 | 30 | echo -4 >/sys/bus/usb/devices/usb2/../companion |
| 31 | 31 | |
| @@ -4,24 +4,27 @@ Description: · 3 unmodified lines | ||
| 4 | 4 | an individual subdirectory with the following name format of |
| 5 | 5 | device_name "nn:d:iiii", where: |
| 6 | 6 | |
| 7 | − nn - two-digit hexadecimal ID of RapidIO network where the | |
| 7 | + ==== ======================================================== | |
| 8 | + nn two-digit hexadecimal ID of RapidIO network where the | |
| 8 | 9 | device resides |
| 9 | − d - device type: 'e' - for endpoint or 's' - for switch | |
| 10 | − iiii - four-digit device destID for endpoints, or switchID for | |
| 10 | + d device type: 'e' - for endpoint or 's' - for switch | |
| 11 | + iiii four-digit device destID for endpoints, or switchID for | |
| 11 | 12 | switches |
| 13 | + ==== ======================================================== | |
| 12 | 14 | |
| 13 | 15 | For example, below is a list of device directories that |
| 14 | 16 | represents a typical RapidIO network with one switch, one host, |
| 15 | 17 | and two agent endpoints, as it is seen by the enumerating host |
| 16 | − (with destID = 1): | |
| 18 | + (with destID = 1):: | |
| 17 | 19 | |
| 18 | − /sys/bus/rapidio/devices/00:e:0000 | |
| 19 | − /sys/bus/rapidio/devices/00:e:0002 | |
| 20 | − /sys/bus/rapidio/devices/00:s:0001 | |
| 20 | + /sys/bus/rapidio/devices/00:e:0000 | |
| 21 | + /sys/bus/rapidio/devices/00:e:0002 | |
| 22 | + /sys/bus/rapidio/devices/00:s:0001 | |
| 21 | 23 | |
| 22 | − NOTE: An enumerating or discovering endpoint does not create a | |
| 23 | − sysfs entry for itself, this is why an endpoint with destID=1 is | |
| 24 | − not shown in the list. | |
| 24 | + NOTE: | |
| 25 | + An enumerating or discovering endpoint does not create a | |
| 26 | + sysfs entry for itself, this is why an endpoint with destID=1 | |
| 27 | + is not shown in the list. | |
| 25 | 28 | |
| 26 | 29 | Attributes Common for All RapidIO Devices |
| 27 | 30 | ----------------------------------------- |
| @@ -7,6 +7,8 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | Usage: <mon ip addr> <options> <pool name> <rbd image name> [<snap name>] |
| 9 | 9 | |
| 10 | + Example:: | |
| 11 | + | |
| 10 | 12 | $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add |
| 11 | 13 | |
| 12 | 14 | The snapshot name can be "-" or omitted to map the image |
| @@ -23,6 +25,8 @@ Description: · 10 unmodified lines | ||
| 23 | 25 | |
| 24 | 26 | Usage: <dev-id> [force] |
| 25 | 27 | |
| 28 | + Example:: | |
| 29 | + | |
| 26 | 30 | $ echo 2 > /sys/bus/rbd/remove |
| 27 | 31 | |
| 28 | 32 | Optional "force" argument which when passed will wait for |
| @@ -80,26 +84,29 @@ Date: Oct, 2010 · 51 unmodified lines | ||
| 80 | 84 | KernelVersion: v2.6.37 |
| 81 | 85 | Contact: Sage Weil <sage@newdream.net> |
| 82 | 86 | Description: |
| 83 | − size: (RO) The size (in bytes) of the mapped block | |
| 87 | + | |
| 88 | + ============== ================================================ | |
| 89 | + size (RO) The size (in bytes) of the mapped block | |
| 84 | 90 | device. |
| 85 | 91 | |
| 86 | − major: (RO) The block device major number. | |
| 92 | + major (RO) The block device major number. | |
| 87 | 93 | |
| 88 | − client_id: (RO) The ceph unique client id that was assigned | |
| 94 | + client_id (RO) The ceph unique client id that was assigned | |
| 89 | 95 | for this specific session. |
| 90 | 96 | |
| 91 | − pool: (RO) The name of the storage pool where this rbd | |
| 97 | + pool (RO) The name of the storage pool where this rbd | |
| 92 | 98 | image resides. An rbd image name is unique |
| 93 | 99 | within its pool. |
| 94 | 100 | |
| 95 | − name: (RO) The name of the rbd image. | |
| 101 | + name (RO) The name of the rbd image. | |
| 96 | 102 | |
| 97 | − refresh: (WO) Writing to this file will reread the image | |
| 103 | + refresh (WO) Writing to this file will reread the image | |
| 98 | 104 | header data and set all relevant data structures |
| 99 | 105 | accordingly. |
| 100 | 106 | |
| 101 | − current_snap: (RO) The current snapshot for which the device | |
| 107 | + current_snap (RO) The current snapshot for which the device | |
| 102 | 108 | is mapped. |
| 109 | + ============== ================================================ | |
| 103 | 110 | |
| 104 | 111 | |
| 105 | 112 | What: /sys/bus/rbd/devices/<dev-id>/pool_id |
| @@ -117,11 +124,13 @@ Date: Oct, 2012 · 11 unmodified lines | ||
| 117 | 124 | KernelVersion: v3.7 |
| 118 | 125 | Contact: Sage Weil <sage@newdream.net> |
| 119 | 126 | Description: |
| 120 | − image_id: (RO) The unique id for the rbd image. (For rbd | |
| 127 | + ========= =============================================== | |
| 128 | + image_id (RO) The unique id for the rbd image. (For rbd | |
| 121 | 129 | image format 1 this is empty.) |
| 122 | 130 | |
| 123 | − features: (RO) A hexadecimal encoding of the feature bits | |
| 131 | + features (RO) A hexadecimal encoding of the feature bits | |
| 124 | 132 | for this image. |
| 133 | + ========= =============================================== | |
| 125 | 134 | |
| 126 | 135 | |
| 127 | 136 | What: /sys/bus/rbd/devices/<dev-id>/parent |
| @@ -149,14 +158,16 @@ Date: Aug, 2016 · 21 unmodified lines | ||
| 149 | 158 | KernelVersion: v4.9 |
| 150 | 159 | Contact: Sage Weil <sage@newdream.net> |
| 151 | 160 | Description: |
| 152 | − snap_id: (RO) The current snapshot's id. | |
| 161 | + ============ ================================================ | |
| 162 | + snap_id (RO) The current snapshot's id. | |
| 153 | 163 | |
| 154 | − config_info: (RO) The string written into | |
| 164 | + config_info (RO) The string written into | |
| 155 | 165 | /sys/bus/rbd/add{,_single_major}. |
| 156 | 166 | |
| 157 | − cluster_fsid: (RO) The ceph cluster UUID. | |
| 167 | + cluster_fsid (RO) The ceph cluster UUID. | |
| 158 | 168 | |
| 159 | − client_addr: (RO) The ceph unique client | |
| 169 | + client_addr (RO) The ceph unique client | |
| 160 | 170 | entity_addr_t (address + nonce). The format is |
| 161 | 171 | <address>:<port>/<nonce>: '1.2.3.4:1234/5678' or |
| 162 | 172 | '[1:2:3:4:5:6:7:8]:1234/5678'. |
| 173 | + ============ ================================================ | |
| @@ -8,6 +8,7 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | When the file contains a "1" the bus is operated and periodically |
| 9 | 9 | does a push-pull cycle to write and read data from the |
| 10 | 10 | connected devices. |
| 11 | + | |
| 11 | 12 | When writing a "0" or "1" the bus moves to the described state. |
| 12 | 13 | |
| 13 | 14 | What: /sys/bus/siox/devices/siox-X/device_add |
| @@ -21,8 +22,10 @@ Description: · 7 unmodified lines | ||
| 21 | 22 | to add a new device dynamically. <type> is the name that is used to match |
| 22 | 23 | to a driver (similar to the platform bus). <inbytes> and <outbytes> define |
| 23 | 24 | the length of the input and output shift register in bytes respectively. |
| 25 | + | |
| 24 | 26 | <statustype> defines the 4 bit device type that is check to identify connection |
| 25 | 27 | problems. |
| 28 | + | |
| 26 | 29 | The new device is added to the end of the existing chain. |
| 27 | 30 | |
| 28 | 31 | What: /sys/bus/siox/devices/siox-X/device_remove |
| @@ -37,16 +37,18 @@ Contact: thunderbolt-software@lists.01.org · 36 unmodified lines | ||
| 37 | 37 | Description: This attribute holds current Thunderbolt security level |
| 38 | 38 | set by the system BIOS. Possible values are: |
| 39 | 39 | |
| 40 | − none: All devices are automatically authorized | |
| 41 | − user: Devices are only authorized based on writing | |
| 42 | − appropriate value to the authorized attribute | |
| 43 | − secure: Require devices that support secure connect at | |
| 44 | − minimum. User needs to authorize each device. | |
| 45 | − dponly: Automatically tunnel Display port (and USB). No | |
| 46 | − PCIe tunnels are created. | |
| 47 | − usbonly: Automatically tunnel USB controller of the | |
| 40 | + ======= ================================================== | |
| 41 | + none All devices are automatically authorized | |
| 42 | + user Devices are only authorized based on writing | |
| 43 | + appropriate value to the authorized attribute | |
| 44 | + secure Require devices that support secure connect at | |
| 45 | + minimum. User needs to authorize each device. | |
| 46 | + dponly Automatically tunnel Display port (and USB). No | |
| 47 | + PCIe tunnels are created. | |
| 48 | + usbonly Automatically tunnel USB controller of the | |
| 48 | 49 | connected Thunderbolt dock (and Display Port). All |
| 49 | 50 | PCIe links downstream of the dock are removed. |
| 51 | + ======= ================================================== | |
| 50 | 52 | |
| 51 | 53 | What: /sys/bus/thunderbolt/devices/.../authorized |
| 52 | 54 | Date: Sep 2017 |
| @@ -61,17 +63,23 @@ Description: This attribute is used to authorize Thunderbolt devices · 8 unmodified lines | ||
| 61 | 63 | yet authorized. |
| 62 | 64 | |
| 63 | 65 | Possible values are supported: |
| 64 | − 1: The device will be authorized and connected | |
| 66 | + | |
| 67 | + == =========================================== | |
| 68 | + 1 The device will be authorized and connected | |
| 69 | + == =========================================== | |
| 65 | 70 | |
| 66 | 71 | When key attribute contains 32 byte hex string the possible |
| 67 | 72 | values are: |
| 68 | − 1: The 32 byte hex string is added to the device NVM and | |
| 69 | − the device is authorized. | |
| 70 | − 2: Send a challenge based on the 32 byte hex string. If the | |
| 71 | − challenge response from device is valid, the device is | |
| 72 | − authorized. In case of failure errno will be ENOKEY if | |
| 73 | − the device did not contain a key at all, and | |
| 74 | − EKEYREJECTED if the challenge response did not match. | |
| 73 | + | |
| 74 | + == ======================================================== | |
| 75 | + 1 The 32 byte hex string is added to the device NVM and | |
| 76 | + the device is authorized. | |
| 77 | + 2 Send a challenge based on the 32 byte hex string. If the | |
| 78 | + challenge response from device is valid, the device is | |
| 79 | + authorized. In case of failure errno will be ENOKEY if | |
| 80 | + the device did not contain a key at all, and | |
| 81 | + EKEYREJECTED if the challenge response did not match. | |
| 82 | + == ======================================================== | |
| 75 | 83 | |
| 76 | 84 | What: /sys/bus/thunderbolt/devices/.../boot |
| 77 | 85 | Date: Jun 2018 |
| @@ -185,10 +193,11 @@ Description: When new NVM image is written to the non-active NVM · 107 unmodified lines | ||
| 185 | 193 | verification fails an error code is returned instead. |
| 186 | 194 | |
| 187 | 195 | This file will accept writing values "1" or "2" |
| 196 | + | |
| 188 | 197 | - Writing "1" will flush the image to the storage |
| 189 | − area and authenticate the image in one action. | |
| 198 | + area and authenticate the image in one action. | |
| 190 | 199 | - Writing "2" will run some basic validation on the image |
| 191 | − and flush it to the storage area. | |
| 200 | + and flush it to the storage area. | |
| 192 | 201 | |
| 193 | 202 | When read holds status of the last authentication |
| 194 | 203 | operation if an error occurred during the process. This |
| @@ -205,9 +214,11 @@ Description: This contains name of the property directory the XDomain · 10 unmodified lines | ||
| 205 | 214 | question. Following directories are already reserved by |
| 206 | 215 | the Apple XDomain specification: |
| 207 | 216 | |
| 208 | − network: IP/ethernet over Thunderbolt | |
| 209 | − targetdm: Target disk mode protocol over Thunderbolt | |
| 210 | − extdisp: External display mode protocol over Thunderbolt | |
| 217 | + ======== =============================================== | |
| 218 | + network IP/ethernet over Thunderbolt | |
| 219 | + targetdm Target disk mode protocol over Thunderbolt | |
| 220 | + extdisp External display mode protocol over Thunderbolt | |
| 221 | + ======== =============================================== | |
| 211 | 222 | |
| 212 | 223 | What: /sys/bus/thunderbolt/devices/<xdomain>.<service>/modalias |
| 213 | 224 | Date: Jan 2018 |
| @@ -285,7 +296,8 @@ Description: For supported devices, automatically authenticate the new Thunderbo · 71 unmodified lines | ||
| 285 | 296 | image when the device is disconnected from the host system. |
| 286 | 297 | |
| 287 | 298 | This file will accept writing values "1" or "2" |
| 299 | + | |
| 288 | 300 | - Writing "1" will flush the image to the storage |
| 289 | − area and prepare the device for authentication on disconnect. | |
| 301 | + area and prepare the device for authentication on disconnect. | |
| 290 | 302 | - Writing "2" will run some basic validation on the image |
| 291 | − and flush it to the storage area. | |
| 303 | + and flush it to the storage area. | |
| @@ -9,6 +9,7 @@ Description: · 8 unmodified lines | ||
| 9 | 9 | by writing INTERFACE to /sys/bus/usb/drivers_probe |
| 10 | 10 | This allows to avoid side-effects with drivers |
| 11 | 11 | that need multiple interfaces. |
| 12 | + | |
| 12 | 13 | A deauthorized interface cannot be probed or claimed. |
| 13 | 14 | |
| 14 | 15 | What: /sys/bus/usb/devices/usbX/interface_authorized_default |
| @@ -72,24 +73,27 @@ Description: · 57 unmodified lines | ||
| 72 | 73 | table at compile time. The format for the device ID is: |
| 73 | 74 | idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct |
| 74 | 75 | The vendor ID and device ID fields are required, the |
| 75 | − rest is optional. The Ref* tuple can be used to tell the | |
| 76 | + rest is optional. The `Ref*` tuple can be used to tell the | |
| 76 | 77 | driver to use the same driver_data for the new device as |
| 77 | 78 | it is used for the reference device. |
| 78 | 79 | Upon successfully adding an ID, the driver will probe |
| 79 | − for the device and attempt to bind to it. For example: | |
| 80 | − # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id | |
| 80 | + for the device and attempt to bind to it. For example:: | |
| 81 | + | |
| 82 | + # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id | |
| 81 | 83 | |
| 82 | 84 | Here add a new device (0458:7045) using driver_data from |
| 83 | − an already supported device (0458:704c): | |
| 84 | − # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id | |
| 85 | + an already supported device (0458:704c):: | |
| 86 | + | |
| 87 | + # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id | |
| 85 | 88 | |
| 86 | 89 | Reading from this file will list all dynamically added |
| 87 | 90 | device IDs in the same format, with one entry per |
| 88 | − line. For example: | |
| 89 | − # cat /sys/bus/usb/drivers/foo/new_id | |
| 90 | − 8086 10f5 | |
| 91 | − dead beef 06 | |
| 92 | − f00d cafe | |
| 91 | + line. For example:: | |
| 92 | + | |
| 93 | + # cat /sys/bus/usb/drivers/foo/new_id | |
| 94 | + 8086 10f5 | |
| 95 | + dead beef 06 | |
| 96 | + f00d cafe | |
| 93 | 97 | |
| 94 | 98 | The list will be truncated at PAGE_SIZE bytes due to |
| 95 | 99 | sysfs restrictions. |
| @@ -209,9 +213,11 @@ Description: · 113 unmodified lines | ||
| 209 | 213 | advance, and behaves well according to the specification. |
| 210 | 214 | This attribute is a bit-field that controls the behavior of |
| 211 | 215 | a specific port: |
| 216 | + | |
| 212 | 217 | - Bit 0 of this field selects the "old" enumeration scheme, |
| 213 | 218 | as it is considerably faster (it only causes one USB reset |
| 214 | 219 | instead of 2). |
| 220 | + | |
| 215 | 221 | The old enumeration scheme can also be selected globally |
| 216 | 222 | using /sys/module/usbcore/parameters/old_scheme_first, but |
| 217 | 223 | it is often not desirable as the new scheme was introduced to |
| @@ -233,10 +239,10 @@ Description: · 15 unmodified lines | ||
| 233 | 239 | poll() for monitoring changes to this value in user space. |
| 234 | 240 | |
| 235 | 241 | Any time this value changes the corresponding hub device will send a |
| 236 | − udev event with the following attributes: | |
| 242 | + udev event with the following attributes:: | |
| 237 | 243 | |
| 238 | − OVER_CURRENT_PORT=/sys/bus/usb/devices/.../(hub interface)/portX | |
| 239 | − OVER_CURRENT_COUNT=[current value of this sysfs attribute] | |
| 244 | + OVER_CURRENT_PORT=/sys/bus/usb/devices/.../(hub interface)/portX | |
| 245 | + OVER_CURRENT_COUNT=[current value of this sysfs attribute] | |
| 240 | 246 | |
| 241 | 247 | What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit |
| 242 | 248 | Date: November 2015 |
| @@ -12,8 +12,11 @@ KernelVersion: 2.6.26 · 11 unmodified lines | ||
| 12 | 12 | Contact: Harrison Metzger <harrisonmetz@gmail.com> |
| 13 | 13 | Description: Controls the devices display mode. |
| 14 | 14 | For a 6 character display the values are |
| 15 | + | |
| 15 | 16 | MSB 0x06; LSB 0x3F, and |
| 17 | + | |
| 16 | 18 | for an 8 character display the values are |
| 19 | + | |
| 17 | 20 | MSB 0x08; LSB 0xFF. |
| 18 | 21 | |
| 19 | 22 | What: /sys/bus/usb/.../textmode |
| @@ -37,7 +40,7 @@ KernelVersion: 2.6.26 · 17 unmodified lines | ||
| 37 | 40 | Contact: Harrison Metzger <harrisonmetz@gmail.com> |
| 38 | 41 | Description: Controls the decimal places on the device. |
| 39 | 42 | To set the nth decimal place, give this field |
| 40 | − the value of 10 ** n. Assume this field has | |
| 43 | + the value of ``10 ** n``. Assume this field has | |
| 41 | 44 | the value k and has 1 or more decimal places set, |
| 42 | 45 | to set the mth place (where m is not already set), |
| 43 | − change this fields value to k + 10 ** m. | |
| 46 | + change this fields value to ``k + 10 ** m``. | |
| @@ -28,8 +28,9 @@ Description: · 27 unmodified lines | ||
| 28 | 28 | Writing UUID to this file will create mediated device of |
| 29 | 29 | type <type-id> for parent device <device>. This is a |
| 30 | 30 | write-only file. |
| 31 | − For example: | |
| 32 | − # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \ | |
| 31 | + For example:: | |
| 32 | + | |
| 33 | + # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \ | |
| 33 | 34 | /sys/devices/foo/mdev_supported_types/foo-1/create |
| 34 | 35 | |
| 35 | 36 | What: /sys/.../mdev_supported_types/<type-id>/devices/ |
| @@ -107,5 +108,6 @@ Description: · 71 unmodified lines | ||
| 107 | 108 | Writing '1' to this file destroys the mediated device. The |
| 108 | 109 | vendor driver can fail the remove() callback if that device |
| 109 | 110 | is active and the vendor driver doesn't support hot unplug. |
| 110 | − Example: | |
| 111 | − # echo 1 > /sys/bus/mdev/devices/<UUID>/remove | |
| 111 | + Example:: | |
| 112 | + | |
| 113 | + # echo 1 > /sys/bus/mdev/devices/<UUID>/remove | |
| @@ -66,13 +66,6 @@ Description: · 65 unmodified lines | ||
| 66 | 66 | the "erase" command on the on-board flash of the connected |
| 67 | 67 | micro. |
| 68 | 68 | |
| 69 | −What: /sys/class/c2port/c2portX/flash_erase | |
| 70 | −Date: October 2008 | |
| 71 | −Contact: Rodolfo Giometti <giometti@linux.it> | |
| 72 | −Description: | |
| 73 | − The /sys/class/c2port/c2portX/flash_erase file show the | |
| 74 | − on-board flash size of the connected micro. | |
| 75 | − | |
| 76 | 69 | What: /sys/class/c2port/c2portX/reset |
| 77 | 70 | Date: October 2008 |
| 78 | 71 | Contact: Rodolfo Giometti <giometti@linux.it> |
| @@ -24,3 +24,63 @@ Description: · 23 unmodified lines | ||
| 24 | 24 | non-linear |
| 25 | 25 | The brightness changes non-linearly with each step. Brightness |
| 26 | 26 | controls should use a linear mapping for a linear perception. |
| 27 | + | |
| 28 | +What: /sys/class/backlight/<backlight>/ambient_light_level | |
| 29 | +Date: Apr, 2010 | |
| 30 | +KernelVersion: v2.6.35 | |
| 31 | +Contact: Michael Hennerich <michael.hennerich@analog.com> | |
| 32 | +Description: | |
| 33 | + (RO) Get conversion value of the light sensor. | |
| 34 | + | |
| 35 | + The value is automatically updated every 80 ms when the | |
| 36 | + light sensor is enabled. | |
| 37 | + | |
| 38 | + The value range is device-driver specific: | |
| 39 | + | |
| 40 | + For ADP8870: | |
| 41 | + | |
| 42 | + It returns integer between 0 (dark) and 8000 (max ambient | |
| 43 | + brightness). | |
| 44 | + | |
| 45 | + For ADP8860: | |
| 46 | + | |
| 47 | + It returns a 13-bits integer. | |
| 48 | + | |
| 49 | +What: /sys/class/backlight/<backlight>/ambient_light_zone | |
| 50 | +Date: Apr, 2010 | |
| 51 | +KernelVersion: v2.6.35 | |
| 52 | +Contact: Michael Hennerich <michael.hennerich@analog.com>, | |
| 53 | + device-drivers-devel@blackfin.uclinux.org | |
| 54 | + | |
| 55 | +Description: | |
| 56 | + (RW) Read or write the specific brightness level at which the | |
| 57 | + backlight operates. | |
| 58 | + | |
| 59 | + The value meaning is device-driver specific: | |
| 60 | + | |
| 61 | + For ADP8860: | |
| 62 | + | |
| 63 | + == ========================== | |
| 64 | + 0 Off: Backlight set to 0 mA | |
| 65 | + 1 Level 1: daylight | |
| 66 | + 2 Level 2: bright | |
| 67 | + 3 Level 3: dark | |
| 68 | + == ========================== | |
| 69 | + | |
| 70 | + For ADP8870: | |
| 71 | + | |
| 72 | + == ========================== | |
| 73 | + 0 Off: Backlight set to 0 mA | |
| 74 | + 1 Level 1: daylight | |
| 75 | + 2 Level 2: bright | |
| 76 | + 3 Level 3: office | |
| 77 | + 4 Level 4: indoor | |
| 78 | + 5 Level 5: dark | |
| 79 | + == ========================== | |
| 80 | + | |
| 81 | + Writing 0 returns to normal/automatic ambient light level | |
| 82 | + operation. | |
| 83 | + | |
| 84 | + It can be enabled by writing the value stored in | |
| 85 | + /sys/class/backlight/<backlight>/max_brightness to | |
| 86 | + /sys/class/backlight/<backlight>/brightness. | |
| @@ -6,25 +6,8 @@ adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and · 5 unmodified lines | ||
| 6 | 6 | dark (level 3). By default the brightness operates at the daylight brightness |
| 7 | 7 | level. |
| 8 | 8 | |
| 9 | −What: /sys/class/backlight/<backlight>/ambient_light_level | |
| 10 | −Date: Apr, 2010 | |
| 11 | −KernelVersion: v2.6.35 | |
| 12 | −Contact: Michael Hennerich <michael.hennerich@analog.com> | |
| 13 | −Description: | |
| 14 | − (RO) 13-bit conversion value for the first light sensor—high | |
| 15 | − byte (Bit 12 to Bit 8). The value is updated every 80 ms (when | |
| 16 | − the light sensor is enabled). | |
| 17 | − | |
| 18 | − | |
| 19 | −What: /sys/class/backlight/<backlight>/ambient_light_zone | |
| 20 | −Date: Apr, 2010 | |
| 21 | −KernelVersion: v2.6.35 | |
| 22 | −Contact: Michael Hennerich <michael.hennerich@analog.com> | |
| 23 | −Description: | |
| 24 | − (RW) Read or write the specific level at which the backlight | |
| 25 | − operates. Value "0" enables automatic ambient light sensing, and | |
| 26 | − values "1", "2" or "3" set the control to daylight, office or | |
| 27 | − dark respectively. | |
| 9 | +See also /sys/class/backlight/<backlight>/ambient_light_level and | |
| 10 | +/sys/class/backlight/<backlight>/ambient_light_zone. | |
| 28 | 11 | |
| 29 | 12 | |
| 30 | 13 | What: /sys/class/backlight/<backlight>/l1_daylight_max |
| @@ -1,3 +1,6 @@ | ||
| 1 | +See also /sys/class/backlight/<backlight>/ambient_light_level and | |
| 2 | +/sys/class/backlight/<backlight>/ambient_light_zone. | |
| 3 | + | |
| 1 | 4 | What: /sys/class/backlight/<backlight>/<ambient light zone>_max |
| 2 | 5 | What: /sys/class/backlight/<backlight>/l1_daylight_max |
| 3 | 6 | What: /sys/class/backlight/<backlight>/l2_bright_max |
| @@ -27,30 +30,3 @@ Description: · 23 unmodified lines | ||
| 27 | 30 | set to 0. Full off when the backlight is disabled. |
| 28 | 31 | This file will also show the dim brightness level stored for |
| 29 | 32 | this <ambient light zone>. |
| 30 | − | |
| 31 | −What: /sys/class/backlight/<backlight>/ambient_light_level | |
| 32 | −Date: May 2011 | |
| 33 | −KernelVersion: 3.0 | |
| 34 | −Contact: device-drivers-devel@blackfin.uclinux.org | |
| 35 | −Description: | |
| 36 | − Get conversion value of the light sensor. | |
| 37 | − This value is updated every 80 ms (when the light sensor | |
| 38 | − is enabled). Returns integer between 0 (dark) and | |
| 39 | − 8000 (max ambient brightness) | |
| 40 | − | |
| 41 | −What: /sys/class/backlight/<backlight>/ambient_light_zone | |
| 42 | −Date: May 2011 | |
| 43 | −KernelVersion: 3.0 | |
| 44 | −Contact: device-drivers-devel@blackfin.uclinux.org | |
| 45 | −Description: | |
| 46 | − Get/Set current ambient light zone. Reading returns | |
| 47 | − integer between 1..5 (1 = daylight, 2 = bright, ..., 5 = dark). | |
| 48 | − Writing a value between 1..5 forces the backlight controller | |
| 49 | − to enter the corresponding ambient light zone. | |
| 50 | − Writing 0 returns to normal/automatic ambient light level | |
| 51 | − operation. The ambient light sensing feature on these devices | |
| 52 | − is an extension to the API documented in | |
| 53 | − Documentation/ABI/stable/sysfs-class-backlight. | |
| 54 | − It can be enabled by writing the value stored in | |
| 55 | − /sys/class/backlight/<backlight>/max_brightness to | |
| 56 | − /sys/class/backlight/<backlight>/brightness. | |
| @@ -6,8 +6,10 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | Get the ALS output channel used as input in |
| 7 | 7 | ALS-current-control mode (0, 1), where: |
| 8 | 8 | |
| 9 | − 0 - out_current0 (backlight 0) | |
| 10 | − 1 - out_current1 (backlight 1) | |
| 9 | + == ========================== | |
| 10 | + 0 out_current0 (backlight 0) | |
| 11 | + 1 out_current1 (backlight 1) | |
| 12 | + == ========================== | |
| 11 | 13 | |
| 12 | 14 | What: /sys/class/backlight/<backlight>/als_en |
| 13 | 15 | Date: May 2012 |
| @@ -30,8 +32,10 @@ Contact: Johan Hovold <jhovold@gmail.com> · 16 unmodified lines | ||
| 30 | 32 | Description: |
| 31 | 33 | Set the brightness-mapping mode (0, 1), where: |
| 32 | 34 | |
| 33 | − 0 - exponential mode | |
| 34 | − 1 - linear mode | |
| 35 | + == ================ | |
| 36 | + 0 exponential mode | |
| 37 | + 1 linear mode | |
| 38 | + == ================ | |
| 35 | 39 | |
| 36 | 40 | What: /sys/class/backlight/<backlight>/pwm |
| 37 | 41 | Date: April 2012 |
| @@ -40,9 +44,11 @@ Contact: Johan Hovold <jhovold@gmail.com> · 2 unmodified lines | ||
| 40 | 44 | Description: |
| 41 | 45 | Set the PWM-input control mask (5 bits), where: |
| 42 | 46 | |
| 43 | − bit 5 - PWM-input enabled in Zone 4 | |
| 44 | − bit 4 - PWM-input enabled in Zone 3 | |
| 45 | − bit 3 - PWM-input enabled in Zone 2 | |
| 46 | − bit 2 - PWM-input enabled in Zone 1 | |
| 47 | − bit 1 - PWM-input enabled in Zone 0 | |
| 48 | − bit 0 - PWM-input enabled | |
| 47 | + ===== =========================== | |
| 48 | + bit 5 PWM-input enabled in Zone 4 | |
| 49 | + bit 4 PWM-input enabled in Zone 3 | |
| 50 | + bit 3 PWM-input enabled in Zone 2 | |
| 51 | + bit 2 PWM-input enabled in Zone 1 | |
| 52 | + bit 1 PWM-input enabled in Zone 0 | |
| 53 | + bit 0 PWM-input enabled | |
| 54 | + ===== =========================== | |
| @@ -24,7 +24,6 @@ default · 23 unmodified lines | ||
| 24 | 24 | filesystems which do not provide their own BDI. |
| 25 | 25 | |
| 26 | 26 | Files under /sys/class/bdi/<bdi>/ |
| 27 | −--------------------------------- | |
| 28 | 27 | |
| 29 | 28 | read_ahead_kb (read-write) |
| 30 | 29 | |
| @@ -17,13 +17,14 @@ Date: August 2015 · 16 unmodified lines | ||
| 17 | 17 | KernelVersion: 4.2 |
| 18 | 18 | Description: |
| 19 | 19 | Tell the EC to reboot in various ways. Options are: |
| 20 | − "cancel": Cancel a pending reboot. | |
| 21 | − "ro": Jump to RO without rebooting. | |
| 22 | − "rw": Jump to RW without rebooting. | |
| 23 | − "cold": Cold reboot. | |
| 24 | − "disable-jump": Disable jump until next reboot. | |
| 25 | − "hibernate": Hibernate the EC. | |
| 26 | − "at-shutdown": Reboot after an AP shutdown. | |
| 20 | + | |
| 21 | + - "cancel": Cancel a pending reboot. | |
| 22 | + - "ro": Jump to RO without rebooting. | |
| 23 | + - "rw": Jump to RW without rebooting. | |
| 24 | + - "cold": Cold reboot. | |
| 25 | + - "disable-jump": Disable jump until next reboot. | |
| 26 | + - "hibernate": Hibernate the EC. | |
| 27 | + - "at-shutdown": Reboot after an AP shutdown. | |
| 27 | 28 | |
| 28 | 29 | What: /sys/class/chromeos/<ec-device-name>/version |
| 29 | 30 | Date: August 2015 |
| @@ -72,11 +72,16 @@ Description: read/write · 71 unmodified lines | ||
| 72 | 72 | when performing the START_WORK ioctl. Only applicable when |
| 73 | 73 | running under hashed page table mmu. |
| 74 | 74 | Possible values: |
| 75 | − none: No prefaulting (default) | |
| 76 | − work_element_descriptor: Treat the work element | |
| 77 | − descriptor as an effective address and | |
| 78 | − prefault what it points to. | |
| 79 | − all: all segments process calling START_WORK maps. | |
| 75 | + | |
| 76 | + ======================= ====================================== | |
| 77 | + none No prefaulting (default) | |
| 78 | + work_element_descriptor Treat the work element | |
| 79 | + descriptor as an effective address and | |
| 80 | + prefault what it points to. | |
| 81 | + all all segments process calling | |
| 82 | + START_WORK maps. | |
| 83 | + ======================= ====================================== | |
| 84 | + | |
| 80 | 85 | Users: https://github.com/ibm-capi/libcxl |
| 81 | 86 | |
| 82 | 87 | What: /sys/class/cxl/<afu>/reset |
| @@ -212,6 +217,7 @@ Description: read/write · 129 unmodified lines | ||
| 212 | 217 | card. A power cycle is required to load the image. |
| 213 | 218 | "none" could be useful for debugging because the trace arrays |
| 214 | 219 | are preserved. |
| 220 | + | |
| 215 | 221 | "user" and "factory" means PERST will cause either the user or |
| 216 | 222 | user or factory image to be loaded. |
| 217 | 223 | Default is to reload on PERST whichever image the card has |
| @@ -235,8 +241,11 @@ Contact: linuxppc-dev@lists.ozlabs.org · 17 unmodified lines | ||
| 235 | 241 | Description: read/write |
| 236 | 242 | Trust that when an image is reloaded via PERST, it will not |
| 237 | 243 | have changed. |
| 238 | − 0 = don't trust, the image may be different (default) | |
| 239 | − 1 = trust that the image will not change. | |
| 244 | + | |
| 245 | + == ================================================= | |
| 246 | + 0 don't trust, the image may be different (default) | |
| 247 | + 1 trust that the image will not change. | |
| 248 | + == ================================================= | |
| 240 | 249 | Users: https://github.com/ibm-capi/libcxl |
| 241 | 250 | |
| 242 | 251 | What: /sys/class/cxl/<card>/psl_timebase_synced |
| @@ -62,7 +62,8 @@ Description: · 61 unmodified lines | ||
| 62 | 62 | driver should provide the list of available frequencies |
| 63 | 63 | with its profile. If need to reset the statistics of devfreq |
| 64 | 64 | behavior on a specific device, enter 0(zero) to 'trans_stat' |
| 65 | − as following: | |
| 65 | + as following:: | |
| 66 | + | |
| 66 | 67 | echo 0 > /sys/class/devfreq/.../trans_stat |
| 67 | 68 | |
| 68 | 69 | What: /sys/class/devfreq/.../userspace/set_freq |
| @@ -117,6 +118,7 @@ Description: · 48 unmodified lines | ||
| 117 | 118 | This work timer is used by devfreq workqueue in order to |
| 118 | 119 | monitor the device status such as utilization. The user |
| 119 | 120 | can change the work timer on runtime according to their demand |
| 120 | − as following: | |
| 121 | + as following:: | |
| 122 | + | |
| 121 | 123 | echo deferrable > /sys/class/devfreq/.../timer |
| 122 | 124 | echo delayed > /sys/class/devfreq/.../timer |
| @@ -18,9 +18,9 @@ Description: · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | This will be one of the following strings: |
| 20 | 20 | |
| 21 | − 'consumer unbind' | |
| 22 | − 'supplier unbind' | |
| 23 | − 'never' | |
| 21 | + - 'consumer unbind' | |
| 22 | + - 'supplier unbind' | |
| 23 | + - 'never' | |
| 24 | 24 | |
| 25 | 25 | 'consumer unbind' means the device link will be removed when |
| 26 | 26 | the consumer's driver is unbound from the consumer device. |
| @@ -49,8 +49,10 @@ Description: · 22 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | This will be one of the following strings: |
| 51 | 51 | |
| 52 | − '0' - Does not affect runtime power management | |
| 53 | − '1' - Affects runtime power management | |
| 52 | + === ======================================== | |
| 53 | + '0' Does not affect runtime power management | |
| 54 | + '1' Affects runtime power management | |
| 55 | + === ======================================== | |
| 54 | 56 | |
| 55 | 57 | What: /sys/class/devlink/.../status |
| 56 | 58 | Date: May 2020 |
| @@ -68,13 +70,13 @@ Description: · 11 unmodified lines | ||
| 68 | 70 | |
| 69 | 71 | This will be one of the following strings: |
| 70 | 72 | |
| 71 | − 'not tracked' | |
| 72 | − 'dormant' | |
| 73 | − 'available' | |
| 74 | − 'consumer probing' | |
| 75 | − 'active' | |
| 76 | − 'supplier unbinding' | |
| 77 | − 'unknown' | |
| 73 | + - 'not tracked' | |
| 74 | + - 'dormant' | |
| 75 | + - 'available' | |
| 76 | + - 'consumer probing' | |
| 77 | + - 'active' | |
| 78 | + - 'supplier unbinding' | |
| 79 | + - 'unknown' | |
| 78 | 80 | |
| 79 | 81 | 'not tracked' means this device link does not track the status |
| 80 | 82 | and has no impact on the binding, unbinding and syncing the |
| @@ -114,8 +116,10 @@ Description: · 33 unmodified lines | ||
| 114 | 116 | |
| 115 | 117 | This will be one of the following strings: |
| 116 | 118 | |
| 119 | + === ================================ | |
| 117 | 120 | '0' |
| 118 | − '1' - Affects runtime power management | |
| 121 | + '1' Affects runtime power management | |
| 122 | + === ================================ | |
| 119 | 123 | |
| 120 | 124 | '0' means the device link can affect other device behaviors |
| 121 | 125 | like binding/unbinding, suspend/resume, runtime power |
| @@ -39,19 +39,22 @@ Description: · 38 unmodified lines | ||
| 39 | 39 | callback. |
| 40 | 40 | |
| 41 | 41 | If the default callback for showing function is used, the |
| 42 | − format is like this: | |
| 43 | − # cat state | |
| 44 | − USB_OTG=1 | |
| 45 | − HDMI=0 | |
| 46 | − TA=1 | |
| 47 | − EAR_JACK=0 | |
| 48 | − # | |
| 42 | + format is like this:: | |
| 43 | + | |
| 44 | + # cat state | |
| 45 | + USB_OTG=1 | |
| 46 | + HDMI=0 | |
| 47 | + TA=1 | |
| 48 | + EAR_JACK=0 | |
| 49 | + # | |
| 50 | + | |
| 49 | 51 | In this example, the extcon device has USB_OTG and TA |
| 50 | 52 | cables attached and HDMI and EAR_JACK cables detached. |
| 51 | 53 | |
| 52 | 54 | In order to update the state of an extcon device, enter a hex |
| 53 | − state number starting with 0x: | |
| 54 | − # echo 0xHEX > state | |
| 55 | + state number starting with 0x:: | |
| 56 | + | |
| 57 | + # echo 0xHEX > state | |
| 55 | 58 | |
| 56 | 59 | This updates the whole state of the extcon device. |
| 57 | 60 | Inputs of all the methods are required to meet the |
| @@ -84,12 +87,13 @@ Contact: MyungJoo Ham <myungjoo.ham@samsung.com> · 26 unmodified lines | ||
| 84 | 87 | Description: |
| 85 | 88 | Shows the relations of mutually exclusiveness. For example, |
| 86 | 89 | if the mutually_exclusive array of extcon device is |
| 87 | − {0x3, 0x5, 0xC, 0x0}, then the output is: | |
| 88 | − # ls mutually_exclusive/ | |
| 89 | − 0x3 | |
| 90 | − 0x5 | |
| 91 | − 0xc | |
| 92 | − # | |
| 90 | + {0x3, 0x5, 0xC, 0x0}, then the output is:: | |
| 91 | + | |
| 92 | + # ls mutually_exclusive/ | |
| 93 | + 0x3 | |
| 94 | + 0x5 | |
| 95 | + 0xc | |
| 96 | + # | |
| 93 | 97 | |
| 94 | 98 | Note that mutually_exclusive is a sub-directory of the extcon |
| 95 | 99 | device and the file names under the mutually_exclusive |
| @@ -28,8 +28,7 @@ Description: Read fpga manager state as a string. · 27 unmodified lines | ||
| 28 | 28 | * firmware request = firmware class request in progress |
| 29 | 29 | * firmware request error = firmware request failed |
| 30 | 30 | * write init = preparing FPGA for programming |
| 31 | − * write init error = Error while preparing FPGA for | |
| 32 | − programming | |
| 31 | + * write init error = Error while preparing FPGA for programming | |
| 33 | 32 | * write = FPGA ready to receive image data |
| 34 | 33 | * write error = Error while programming |
| 35 | 34 | * write complete = Doing post programming steps |
| @@ -47,7 +46,7 @@ Description: Read fpga manager status as a string. · 11 unmodified lines | ||
| 47 | 46 | programming errors to userspace. This is a list of strings for |
| 48 | 47 | the supported status. |
| 49 | 48 | |
| 50 | − * reconfig operation error - invalid operations detected by | |
| 49 | + * reconfig operation error - invalid operations detected by | |
| 51 | 50 | reconfiguration hardware. |
| 52 | 51 | e.g. start reconfiguration |
| 53 | 52 | with errors not cleared |
| @@ -6,9 +6,11 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | The GNSS receiver type. The currently identified types reflect |
| 7 | 7 | the protocol(s) supported by the receiver: |
| 8 | 8 | |
| 9 | + ====== =========== | |
| 9 | 10 | "NMEA" NMEA 0183 |
| 10 | 11 | "SiRF" SiRF Binary |
| 11 | 12 | "UBX" UBX |
| 13 | + ====== =========== | |
| 12 | 14 | |
| 13 | 15 | Note that also non-"NMEA" type receivers typically support a |
| 14 | 16 | subset of NMEA 0183 with vendor extensions (e.g. to allow |
| @@ -3,9 +3,26 @@ Date: March 2006 · 2 unmodified lines | ||
| 3 | 3 | KernelVersion: 2.6.17 |
| 4 | 4 | Contact: Richard Purdie <rpurdie@rpsys.net> |
| 5 | 5 | Description: |
| 6 | − Set the brightness of the LED. Most LEDs don't | |
| 7 | − have hardware brightness support, so will just be turned on for | |
| 8 | − non-zero brightness settings. The value is between 0 and | |
| 6 | + Set the brightness of the LED. | |
| 7 | + | |
| 8 | + Most LEDs don't have hardware brightness support, so will | |
| 9 | + just be turned on for non-zero brightness settings. | |
| 10 | + | |
| 11 | + .. Note:: | |
| 12 | + | |
| 13 | + For multicolor LEDs, writing to this file will update all | |
| 14 | + LEDs within the group to a calculated percentage of what | |
| 15 | + each color LED intensity is set to. | |
| 16 | + | |
| 17 | + The percentage is calculated for each grouped LED via | |
| 18 | + the equation below:: | |
| 19 | + | |
| 20 | + led_brightness = brightness * multi_intensity/max_brightness | |
| 21 | + | |
| 22 | + For additional details please refer to | |
| 23 | + Documentation/leds/leds-class-multicolor.rst. | |
| 24 | + | |
| 25 | + The value is between 0 and | |
| 9 | 26 | /sys/class/leds/<led>/max_brightness. |
| 10 | 27 | |
| 11 | 28 | Writing 0 to this file clears active trigger. |
| @@ -13,6 +30,8 @@ Description: · 1 unmodified line | ||
| 13 | 30 | Writing non-zero to this file while trigger is active changes the |
| 14 | 31 | top brightness trigger is going to use. |
| 15 | 32 | |
| 33 | + | |
| 34 | + | |
| 16 | 35 | What: /sys/class/leds/<led>/max_brightness |
| 17 | 36 | Date: March 2006 |
| 18 | 37 | KernelVersion: 2.6.17 |
| @@ -47,10 +66,11 @@ Contact: Richard Purdie <rpurdie@rpsys.net> · 28 unmodified lines | ||
| 47 | 66 | Description: |
| 48 | 67 | Set the trigger for this LED. A trigger is a kernel based source |
| 49 | 68 | of LED events. |
| 69 | + | |
| 50 | 70 | You can change triggers in a similar manner to the way an IO |
| 51 | 71 | scheduler is chosen. Trigger specific parameters can appear in |
| 52 | 72 | /sys/class/leds/<led> once a given trigger is selected. For |
| 53 | − their documentation see sysfs-class-led-trigger-*. | |
| 73 | + their documentation see `sysfs-class-led-trigger-*`. | |
| 54 | 74 | |
| 55 | 75 | What: /sys/class/leds/<led>/inverted |
| 56 | 76 | Date: January 2011 |
| @@ -1,133 +1,3 @@ | ||
| 1 | −What: /sys/class/leds/<led>/hw_pattern | |
| 2 | −Date: September 2019 | |
| 3 | −KernelVersion: 5.5 | |
| 4 | −Description: | |
| 5 | − Specify a hardware pattern for the EL15203000 LED. | |
| 6 | − The LEDs board supports only predefined patterns by firmware | |
| 7 | − for specific LEDs. | |
| 8 | − | |
| 9 | − Breathing mode for Screen frame light tube: | |
| 10 | − "0 4000 1 4000" | |
| 11 | − | |
| 12 | − ^ | |
| 13 | − | | |
| 14 | − Max-| --- | |
| 15 | − | / \ | |
| 16 | − | / \ | |
| 17 | − | / \ / | |
| 18 | − | / \ / | |
| 19 | − Min-|- --- | |
| 20 | − | | |
| 21 | − 0------4------8--> time (sec) | |
| 22 | − | |
| 23 | − Cascade mode for Pipe LED: | |
| 24 | − "1 800 2 800 4 800 8 800 16 800" | |
| 25 | − | |
| 26 | − ^ | |
| 27 | − | | |
| 28 | − 0 On -|----+ +----+ +--- | |
| 29 | − | | | | | | |
| 30 | − Off-| +-------------------+ +-------------------+ | |
| 31 | − | | |
| 32 | − 1 On -| +----+ +----+ | |
| 33 | − | | | | | | |
| 34 | − Off |----+ +-------------------+ +------------------ | |
| 35 | − | | |
| 36 | − 2 On -| +----+ +----+ | |
| 37 | − | | | | | | |
| 38 | − Off-|---------+ +-------------------+ +------------- | |
| 39 | − | | |
| 40 | − 3 On -| +----+ +----+ | |
| 41 | − | | | | | | |
| 42 | − Off-|--------------+ +-------------------+ +-------- | |
| 43 | − | | |
| 44 | − 4 On -| +----+ +----+ | |
| 45 | − | | | | | | |
| 46 | − Off-|-------------------+ +-------------------+ +--- | |
| 47 | − | | |
| 48 | − 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 49 | − | |
| 50 | − Inverted cascade mode for Pipe LED: | |
| 51 | − "30 800 29 800 27 800 23 800 15 800" | |
| 52 | − | |
| 53 | − ^ | |
| 54 | − | | |
| 55 | − 0 On -| +-------------------+ +-------------------+ | |
| 56 | − | | | | | | |
| 57 | − Off-|----+ +----+ +--- | |
| 58 | − | | |
| 59 | − 1 On -|----+ +-------------------+ +------------------ | |
| 60 | − | | | | | | |
| 61 | − Off | +----+ +----+ | |
| 62 | − | | |
| 63 | − 2 On -|---------+ +-------------------+ +------------- | |
| 64 | − | | | | | | |
| 65 | − Off-| +----+ +----+ | |
| 66 | − | | |
| 67 | − 3 On -|--------------+ +-------------------+ +-------- | |
| 68 | − | | | | | | |
| 69 | − Off-| +----+ +----+ | |
| 70 | − | | |
| 71 | − 4 On -|-------------------+ +-------------------+ +--- | |
| 72 | − | | | | | | |
| 73 | − Off-| +----+ +----+ | |
| 74 | − | | |
| 75 | − 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 76 | − | |
| 77 | − Bounce mode for Pipe LED: | |
| 78 | − "1 800 2 800 4 800 8 800 16 800 16 800 8 800 4 800 2 800 1 800" | |
| 79 | − | |
| 80 | − ^ | |
| 81 | − | | |
| 82 | − 0 On -|----+ +-------- | |
| 83 | − | | | | |
| 84 | − Off-| +---------------------------------------+ | |
| 85 | − | | |
| 86 | − 1 On -| +----+ +----+ | |
| 87 | − | | | | | | |
| 88 | − Off |----+ +-----------------------------+ +-------- | |
| 89 | − | | |
| 90 | − 2 On -| +----+ +----+ | |
| 91 | − | | | | | | |
| 92 | − Off-|---------+ +-------------------+ +------------- | |
| 93 | − | | |
| 94 | − 3 On -| +----+ +----+ | |
| 95 | − | | | | | | |
| 96 | − Off-|--------------+ +---------+ +------------------ | |
| 97 | − | | |
| 98 | − 4 On -| +---------+ | |
| 99 | − | | | | |
| 100 | − Off-|-------------------+ +----------------------- | |
| 101 | − | | |
| 102 | − 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 103 | − | |
| 104 | − Inverted bounce mode for Pipe LED: | |
| 105 | − "30 800 29 800 27 800 23 800 15 800 15 800 23 800 27 800 29 800 30 800" | |
| 106 | − | |
| 107 | − ^ | |
| 108 | − | | |
| 109 | − 0 On -| +---------------------------------------+ | |
| 110 | − | | | | |
| 111 | − Off-|----+ +-------- | |
| 112 | − | | |
| 113 | − 1 On -|----+ +-----------------------------+ +-------- | |
| 114 | − | | | | | | |
| 115 | − Off | +----+ +----+ | |
| 116 | − | | |
| 117 | − 2 On -|---------+ +-------------------+ +------------- | |
| 118 | − | | | | | | |
| 119 | − Off-| +----+ +----+ | |
| 120 | − | | |
| 121 | − 3 On -|--------------+ +---------+ +------------------ | |
| 122 | − | | | | | | |
| 123 | − Off-| +----+ +----+ | |
| 124 | − | | |
| 125 | − 4 On -|-------------------+ +----------------------- | |
| 126 | − | | | | |
| 127 | − Off-| +---------+ | |
| 128 | − | | |
| 129 | − 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 130 | − | |
| 131 | 1 | What: /sys/class/leds/<led>/repeat |
| 132 | 2 | Date: September 2019 |
| 133 | 3 | KernelVersion: 5.5 |
| @@ -6,8 +6,10 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | Set the ALS output channel to use as input in |
| 7 | 7 | ALS-current-control mode (1, 2), where: |
| 8 | 8 | |
| 9 | − 1 - out_current1 | |
| 10 | − 2 - out_current2 | |
| 9 | + == ============ | |
| 10 | + 1 out_current1 | |
| 11 | + 2 out_current2 | |
| 12 | + == ============ | |
| 11 | 13 | |
| 12 | 14 | What: /sys/class/leds/<led>/als_en |
| 13 | 15 | Date: May 2012 |
| @@ -24,14 +26,16 @@ Contact: Johan Hovold <jhovold@gmail.com> · 10 unmodified lines | ||
| 24 | 26 | Description: |
| 25 | 27 | Set the pattern generator fall and rise times (0..7), where: |
| 26 | 28 | |
| 27 | − 0 - 2048 us | |
| 28 | − 1 - 262 ms | |
| 29 | − 2 - 524 ms | |
| 30 | − 3 - 1.049 s | |
| 31 | − 4 - 2.097 s | |
| 32 | − 5 - 4.194 s | |
| 33 | − 6 - 8.389 s | |
| 34 | − 7 - 16.78 s | |
| 29 | + == ======= | |
| 30 | + 0 2048 us | |
| 31 | + 1 262 ms | |
| 32 | + 2 524 ms | |
| 33 | + 3 1.049 s | |
| 34 | + 4 2.097 s | |
| 35 | + 5 4.194 s | |
| 36 | + 6 8.389 s | |
| 37 | + 7 16.78 s | |
| 38 | + == ======= | |
| 35 | 39 | |
| 36 | 40 | What: /sys/class/leds/<led>/id |
| 37 | 41 | Date: April 2012 |
| @@ -47,8 +51,10 @@ Contact: Johan Hovold <jhovold@gmail.com> · 9 unmodified lines | ||
| 47 | 51 | Description: |
| 48 | 52 | Set the brightness-mapping mode (0, 1), where: |
| 49 | 53 | |
| 50 | − 0 - exponential mode | |
| 51 | − 1 - linear mode | |
| 54 | + == ================ | |
| 55 | + 0 exponential mode | |
| 56 | + 1 linear mode | |
| 57 | + == ================ | |
| 52 | 58 | |
| 53 | 59 | What: /sys/class/leds/<led>/pwm |
| 54 | 60 | Date: April 2012 |
| @@ -57,9 +63,11 @@ Contact: Johan Hovold <jhovold@gmail.com> · 2 unmodified lines | ||
| 57 | 63 | Description: |
| 58 | 64 | Set the PWM-input control mask (5 bits), where: |
| 59 | 65 | |
| 60 | − bit 5 - PWM-input enabled in Zone 4 | |
| 61 | − bit 4 - PWM-input enabled in Zone 3 | |
| 62 | − bit 3 - PWM-input enabled in Zone 2 | |
| 63 | − bit 2 - PWM-input enabled in Zone 1 | |
| 64 | − bit 1 - PWM-input enabled in Zone 0 | |
| 65 | − bit 0 - PWM-input enabled | |
| 66 | + ===== =========================== | |
| 67 | + bit 5 PWM-input enabled in Zone 4 | |
| 68 | + bit 4 PWM-input enabled in Zone 3 | |
| 69 | + bit 3 PWM-input enabled in Zone 2 | |
| 70 | + bit 2 PWM-input enabled in Zone 1 | |
| 71 | + bit 1 PWM-input enabled in Zone 0 | |
| 72 | + bit 0 PWM-input enabled | |
| 73 | + ===== =========================== | |
| @@ -1,22 +0,0 @@ | ||
| 1 | −What: /sys/class/leds/<led>/hw_pattern | |
| 2 | −Date: September 2018 | |
| 3 | −KernelVersion: 4.20 | |
| 4 | −Description: | |
| 5 | − Specify a hardware pattern for the SC27XX LED. For the SC27XX | |
| 6 | − LED controller, it only supports 4 stages to make a single | |
| 7 | − hardware pattern, which is used to configure the rise time, | |
| 8 | − high time, fall time and low time for the breathing mode. | |
| 9 | − | |
| 10 | − For the breathing mode, the SC27XX LED only expects one brightness | |
| 11 | − for the high stage. To be compatible with the hardware pattern | |
| 12 | − format, we should set brightness as 0 for rise stage, fall | |
| 13 | − stage and low stage. | |
| 14 | − | |
| 15 | − Min stage duration: 125 ms | |
| 16 | − Max stage duration: 31875 ms | |
| 17 | − | |
| 18 | − Since the stage duration step is 125 ms, the duration should be | |
| 19 | − a multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms. | |
| 20 | − | |
| 21 | − Thus the format of the hardware pattern values should be: | |
| 22 | − "0 rise_duration brightness high_duration 0 fall_duration 0 low_duration". | |
| @@ -55,26 +55,35 @@ Description: read only · 54 unmodified lines | ||
| 55 | 55 | Flash faults are re-read after strobing the flash. Possible |
| 56 | 56 | flash faults: |
| 57 | 57 | |
| 58 | − * led-over-voltage - flash controller voltage to the flash LED | |
| 58 | + * led-over-voltage | |
| 59 | + flash controller voltage to the flash LED | |
| 59 | 60 | has exceeded the limit specific to the flash controller |
| 60 | − * flash-timeout-exceeded - the flash strobe was still on when | |
| 61 | + * flash-timeout-exceeded | |
| 62 | + the flash strobe was still on when | |
| 61 | 63 | the timeout set by the user has expired; not all flash |
| 62 | 64 | controllers may set this in all such conditions |
| 63 | − * controller-over-temperature - the flash controller has | |
| 65 | + * controller-over-temperature | |
| 66 | + the flash controller has | |
| 64 | 67 | overheated |
| 65 | − * controller-short-circuit - the short circuit protection | |
| 68 | + * controller-short-circuit | |
| 69 | + the short circuit protection | |
| 66 | 70 | of the flash controller has been triggered |
| 67 | − * led-power-supply-over-current - current in the LED power | |
| 71 | + * led-power-supply-over-current | |
| 72 | + current in the LED power | |
| 68 | 73 | supply has exceeded the limit specific to the flash |
| 69 | 74 | controller |
| 70 | − * indicator-led-fault - the flash controller has detected | |
| 75 | + * indicator-led-fault | |
| 76 | + the flash controller has detected | |
| 71 | 77 | a short or open circuit condition on the indicator LED |
| 72 | − * led-under-voltage - flash controller voltage to the flash | |
| 78 | + * led-under-voltage | |
| 79 | + flash controller voltage to the flash | |
| 73 | 80 | LED has been below the minimum limit specific to |
| 74 | 81 | the flash |
| 75 | − * controller-under-voltage - the input voltage of the flash | |
| 82 | + * controller-under-voltage | |
| 83 | + the input voltage of the flash | |
| 76 | 84 | controller is below the limit under which strobing the |
| 77 | 85 | flash at full current will not be possible; |
| 78 | 86 | the condition persists until this flag is no longer set |
| 79 | − * led-over-temperature - the temperature of the LED has exceeded | |
| 87 | + * led-over-temperature | |
| 88 | + the temperature of the LED has exceeded | |
| 80 | 89 | its allowed upper limit |
| @@ -1,20 +1,3 @@ | ||
| 1 | −What: /sys/class/leds/<led>/brightness | |
| 2 | −Date: March 2020 | |
| 3 | −KernelVersion: 5.9 | |
| 4 | −Contact: Dan Murphy <dmurphy@ti.com> | |
| 5 | −Description: read/write | |
| 6 | − Writing to this file will update all LEDs within the group to a | |
| 7 | − calculated percentage of what each color LED intensity is set | |
| 8 | − to. The percentage is calculated for each grouped LED via the | |
| 9 | − equation below: | |
| 10 | − | |
| 11 | − led_brightness = brightness * multi_intensity/max_brightness | |
| 12 | − | |
| 13 | − For additional details please refer to | |
| 14 | − Documentation/leds/leds-class-multicolor.rst. | |
| 15 | − | |
| 16 | − The value of the LED is from 0 to | |
| 17 | − /sys/class/leds/<led>/max_brightness. | |
| 18 | 1 | |
| 19 | 2 | What: /sys/class/leds/<led>/multi_index |
| 20 | 3 | Date: March 2020 |
| @@ -25,6 +8,9 @@ Description: read · 4 unmodified lines | ||
| 25 | 8 | as an array of strings as they are indexed in the |
| 26 | 9 | multi_intensity file. |
| 27 | 10 | |
| 11 | + For additional details please refer to | |
| 12 | + Documentation/leds/leds-class-multicolor.rst. | |
| 13 | + | |
| 28 | 14 | What: /sys/class/leds/<led>/multi_intensity |
| 29 | 15 | Date: March 2020 |
| 30 | 16 | KernelVersion: 5.9 |
| @@ -33,3 +19,6 @@ Description: read/write · 2 unmodified lines | ||
| 33 | 19 | This file contains array of integers. Order of components is |
| 34 | 20 | described by the multi_index array. The maximum intensity should |
| 35 | 21 | not exceed /sys/class/leds/<led>/max_brightness. |
| 22 | + | |
| 23 | + For additional details please refer to | |
| 24 | + Documentation/leds/leds-class-multicolor.rst. | |
| @@ -19,18 +19,23 @@ KernelVersion: 4.16 · 18 unmodified lines | ||
| 19 | 19 | Contact: linux-leds@vger.kernel.org |
| 20 | 20 | Description: |
| 21 | 21 | Signal the link state of the named network device. |
| 22 | + | |
| 22 | 23 | If set to 0 (default), the LED's normal state is off. |
| 24 | + | |
| 23 | 25 | If set to 1, the LED's normal state reflects the link state |
| 24 | 26 | of the named network device. |
| 25 | 27 | Setting this value also immediately changes the LED state. |
| 26 | 28 | |
| 29 | + | |
| 27 | 30 | What: /sys/class/leds/<led>/tx |
| 28 | 31 | Date: Dec 2017 |
| 29 | 32 | KernelVersion: 4.16 |
| 30 | 33 | Contact: linux-leds@vger.kernel.org |
| 31 | 34 | Description: |
| 32 | 35 | Signal transmission of data on the named network device. |
| 36 | + | |
| 33 | 37 | If set to 0 (default), the LED will not blink on transmission. |
| 38 | + | |
| 34 | 39 | If set to 1, the LED will blink for the milliseconds specified |
| 35 | 40 | in interval to signal transmission. |
| 36 | 41 | |
| @@ -40,6 +45,8 @@ KernelVersion: 4.16 · 3 unmodified lines | ||
| 40 | 45 | Contact: linux-leds@vger.kernel.org |
| 41 | 46 | Description: |
| 42 | 47 | Signal reception of data on the named network device. |
| 48 | + | |
| 43 | 49 | If set to 0 (default), the LED will not blink on reception. |
| 50 | + | |
| 44 | 51 | If set to 1, the LED will blink for the milliseconds specified |
| 45 | 52 | in interval to signal reception. |
| @@ -23,8 +23,8 @@ Description: · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | Since different LED hardware can have different semantics of |
| 25 | 25 | hardware patterns, each driver is expected to provide its own |
| 26 | − description for the hardware patterns in their ABI documentation | |
| 27 | − file. | |
| 26 | + description for the hardware patterns in their documentation | |
| 27 | + file at Documentation/leds/. | |
| 28 | 28 | |
| 29 | 29 | What: /sys/class/leds/<led>/repeat |
| 30 | 30 | Date: September 2018 |
| @@ -8,5 +8,6 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | selected for the USB port trigger. Selecting ports makes trigger |
| 9 | 9 | observing them for any connected devices and lighting on LED if |
| 10 | 10 | there are any. |
| 11 | + | |
| 11 | 12 | Echoing "1" value selects USB port. Echoing "0" unselects it. |
| 12 | 13 | Current state can be also read. |
| @@ -7,9 +7,11 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | of one LED will update the mode of its two sibling devices as |
| 8 | 8 | well. Possible values are: |
| 9 | 9 | |
| 10 | − 0 - normal | |
| 11 | − 1 - audio | |
| 12 | − 2 - breathing | |
| 10 | + == ========= | |
| 11 | + 0 normal | |
| 12 | + 1 audio | |
| 13 | + 2 breathing | |
| 14 | + == ========= | |
| 13 | 15 | |
| 14 | 16 | Normal: LEDs are fully on when enabled |
| 15 | 17 | Audio: LEDs brightness depends on sound level |
| @@ -41,24 +41,33 @@ Description: · 40 unmodified lines | ||
| 41 | 41 | When read, this entry provides the current state of an Intel |
| 42 | 42 | MIC device in the context of the card OS. Possible values that |
| 43 | 43 | will be read are: |
| 44 | − "ready" - The MIC device is ready to boot the card OS. On | |
| 45 | − reading this entry after an OSPM resume, a "boot" has to be | |
| 46 | − written to this entry if the card was previously shutdown | |
| 47 | − during OSPM suspend. | |
| 48 | − "booting" - The MIC device has initiated booting a card OS. | |
| 49 | − "online" - The MIC device has completed boot and is online | |
| 50 | − "shutting_down" - The card OS is shutting down. | |
| 51 | − "resetting" - A reset has been initiated for the MIC device | |
| 52 | − "reset_failed" - The MIC device has failed to reset. | |
| 44 | + | |
| 45 | + | |
| 46 | + =============== =============================================== | |
| 47 | + "ready" The MIC device is ready to boot the card OS. | |
| 48 | + On reading this entry after an OSPM resume, | |
| 49 | + a "boot" has to be written to this entry if | |
| 50 | + the card was previously shutdown during OSPM | |
| 51 | + suspend. | |
| 52 | + "booting" The MIC device has initiated booting a card OS. | |
| 53 | + "online" The MIC device has completed boot and is online | |
| 54 | + "shutting_down" The card OS is shutting down. | |
| 55 | + "resetting" A reset has been initiated for the MIC device | |
| 56 | + "reset_failed" The MIC device has failed to reset. | |
| 57 | + =============== =============================================== | |
| 53 | 58 | |
| 54 | 59 | When written, this sysfs entry triggers different state change |
| 55 | 60 | operations depending upon the current state of the card OS. |
| 56 | 61 | Acceptable values are: |
| 57 | − "boot" - Boot the card OS image specified by the combination | |
| 58 | − of firmware, ramdisk, cmdline and bootmode | |
| 59 | − sysfs entries. | |
| 60 | − "reset" - Initiates device reset. | |
| 61 | − "shutdown" - Initiates card OS shutdown. | |
| 62 | + | |
| 63 | + | |
| 64 | + ========== =================================================== | |
| 65 | + "boot" Boot the card OS image specified by the combination | |
| 66 | + of firmware, ramdisk, cmdline and bootmode | |
| 67 | + sysfs entries. | |
| 68 | + "reset" Initiates device reset. | |
| 69 | + "shutdown" Initiates card OS shutdown. | |
| 70 | + ========== =================================================== | |
| 62 | 71 | |
| 63 | 72 | What: /sys/class/mic/mic(x)/shutdown_status |
| 64 | 73 | Date: October 2013 |
| @@ -69,12 +78,15 @@ Description: · 4 unmodified lines | ||
| 69 | 78 | OS can shutdown because of various reasons. When read, this |
| 70 | 79 | entry provides the status on why the card OS was shutdown. |
| 71 | 80 | Possible values are: |
| 72 | − "nop" - shutdown status is not applicable, when the card OS is | |
| 73 | − "online" | |
| 74 | − "crashed" - Shutdown because of a HW or SW crash. | |
| 75 | − "halted" - Shutdown because of a halt command. | |
| 76 | − "poweroff" - Shutdown because of a poweroff command. | |
| 77 | − "restart" - Shutdown because of a restart command. | |
| 81 | + | |
| 82 | + ========== =================================================== | |
| 83 | + "nop" shutdown status is not applicable, when the card OS | |
| 84 | + is "online" | |
| 85 | + "crashed" Shutdown because of a HW or SW crash. | |
| 86 | + "halted" Shutdown because of a halt command. | |
| 87 | + "poweroff" Shutdown because of a poweroff command. | |
| 88 | + "restart" Shutdown because of a restart command. | |
| 89 | + ========== =================================================== | |
| 78 | 90 | |
| 79 | 91 | What: /sys/class/mic/mic(x)/cmdline |
| 80 | 92 | Date: October 2013 |
| @@ -4,10 +4,13 @@ KernelVersion: 3.17 · 3 unmodified lines | ||
| 4 | 4 | Contact: netdev@vger.kernel.org |
| 5 | 5 | Description: |
| 6 | 6 | Indicates the name assignment type. Possible values are: |
| 7 | − 1: enumerated by the kernel, possibly in an unpredictable way | |
| 8 | − 2: predictably named by the kernel | |
| 9 | − 3: named by userspace | |
| 10 | − 4: renamed | |
| 7 | + | |
| 8 | + == ========================================================== | |
| 9 | + 1 enumerated by the kernel, possibly in an unpredictable way | |
| 10 | + 2 predictably named by the kernel | |
| 11 | + 3 named by userspace | |
| 12 | + 4 renamed | |
| 13 | + == ========================================================== | |
| 11 | 14 | |
| 12 | 15 | What: /sys/class/net/<iface>/addr_assign_type |
| 13 | 16 | Date: July 2010 |
| @@ -15,10 +18,13 @@ KernelVersion: 3.2 · 1 unmodified line | ||
| 15 | 18 | Contact: netdev@vger.kernel.org |
| 16 | 19 | Description: |
| 17 | 20 | Indicates the address assignment type. Possible values are: |
| 18 | − 0: permanent address | |
| 19 | − 1: randomly generated | |
| 20 | − 2: stolen from another device | |
| 21 | − 3: set using dev_set_mac_address | |
| 21 | + | |
| 22 | + == ============================= | |
| 23 | + 0 permanent address | |
| 24 | + 1 randomly generated | |
| 25 | + 2 stolen from another device | |
| 26 | + 3 set using dev_set_mac_address | |
| 27 | + == ============================= | |
| 22 | 28 | |
| 23 | 29 | What: /sys/class/net/<iface>/addr_len |
| 24 | 30 | Date: April 2005 |
| @@ -51,9 +57,12 @@ Description: · 26 unmodified lines | ||
| 51 | 57 | Default value 0 does not forward any link local frames. |
| 52 | 58 | |
| 53 | 59 | Restricted bits: |
| 54 | − 0: 01-80-C2-00-00-00 Bridge Group Address used for STP | |
| 55 | − 1: 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE | |
| 56 | − 2: 01-80-C2-00-00-02 (Link Aggregation) 802.3ad | |
| 60 | + | |
| 61 | + == ======================================================== | |
| 62 | + 0 01-80-C2-00-00-00 Bridge Group Address used for STP | |
| 63 | + 1 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE | |
| 64 | + 2 01-80-C2-00-00-02 (Link Aggregation) 802.3ad | |
| 65 | + == ======================================================== | |
| 57 | 66 | |
| 58 | 67 | Any values not setting these bits can be used. Take special |
| 59 | 68 | care when forwarding control frames e.g. 802.1X-PAE or LLDP. |
| @@ -74,8 +83,11 @@ Contact: netdev@vger.kernel.org · 14 unmodified lines | ||
| 74 | 83 | Description: |
| 75 | 84 | Indicates the current physical link state of the interface. |
| 76 | 85 | Posssible values are: |
| 77 | − 0: physical link is down | |
| 78 | − 1: physical link is up | |
| 86 | + | |
| 87 | + == ===================== | |
| 88 | + 0 physical link is down | |
| 89 | + 1 physical link is up | |
| 90 | + == ===================== | |
| 79 | 91 | |
| 80 | 92 | Note: some special devices, e.g: bonding and team drivers will |
| 81 | 93 | allow this attribute to be written to force a link state for |
| @@ -131,8 +143,11 @@ Contact: netdev@vger.kernel.org · 49 unmodified lines | ||
| 131 | 143 | Description: |
| 132 | 144 | Indicates whether the interface is under test. Possible |
| 133 | 145 | values are: |
| 134 | − 0: interface is not being tested | |
| 135 | − 1: interface is being tested | |
| 146 | + | |
| 147 | + == ============================= | |
| 148 | + 0 interface is not being tested | |
| 149 | + 1 interface is being tested | |
| 150 | + == ============================= | |
| 136 | 151 | |
| 137 | 152 | When an interface is under test, it cannot be expected |
| 138 | 153 | to pass packets as normal. |
| @@ -144,8 +159,11 @@ Contact: netdev@vger.kernel.org · 5 unmodified lines | ||
| 144 | 159 | Description: |
| 145 | 160 | Indicates the interface latest or current duplex value. Possible |
| 146 | 161 | values are: |
| 147 | − half: half duplex | |
| 148 | − full: full duplex | |
| 162 | + | |
| 163 | + ==== =========== | |
| 164 | + half half duplex | |
| 165 | + full full duplex | |
| 166 | + ==== =========== | |
| 149 | 167 | |
| 150 | 168 | Note: This attribute is only valid for interfaces that implement |
| 151 | 169 | the ethtool get_link_ksettings method (mostly Ethernet). |
| @@ -196,8 +214,11 @@ Description: · 44 unmodified lines | ||
| 196 | 214 | Indicates the interface link mode, as a decimal number. This |
| 197 | 215 | attribute should be used in conjunction with 'dormant' attribute |
| 198 | 216 | to determine the interface usability. Possible values: |
| 199 | − 0: default link mode | |
| 200 | − 1: dormant link mode | |
| 217 | + | |
| 218 | + == ================= | |
| 219 | + 0 default link mode | |
| 220 | + 1 dormant link mode | |
| 221 | + == ================= | |
| 201 | 222 | |
| 202 | 223 | What: /sys/class/net/<iface>/mtu |
| 203 | 224 | Date: April 2005 |
| @@ -226,7 +247,9 @@ KernelVersion: 2.6.17 · 22 unmodified lines | ||
| 226 | 247 | Contact: netdev@vger.kernel.org |
| 227 | 248 | Description: |
| 228 | 249 | Indicates the interface RFC2863 operational state as a string. |
| 250 | + | |
| 229 | 251 | Possible values are: |
| 252 | + | |
| 230 | 253 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", |
| 231 | 254 | "dormant", "up". |
| 232 | 255 | |
| @@ -91,9 +91,9 @@ Date: May 2014 · 90 unmodified lines | ||
| 91 | 91 | KernelVersion: 3.16 |
| 92 | 92 | Contact: Bjørn Mork <bjorn@mork.no> |
| 93 | 93 | Description: |
| 94 | − Bit 0: 16-bit NTB supported (set to 1) | |
| 95 | − Bit 1: 32-bit NTB supported | |
| 96 | − Bits 2 – 15: reserved (reset to zero; must be ignored by host) | |
| 94 | + - Bit 0: 16-bit NTB supported (set to 1) | |
| 95 | + - Bit 1: 32-bit NTB supported | |
| 96 | + - Bits 2 – 15: reserved (reset to zero; must be ignored by host) | |
| 97 | 97 | |
| 98 | 98 | What: /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize |
| 99 | 99 | Date: May 2014 |
| @@ -35,7 +35,9 @@ Description: · 34 unmodified lines | ||
| 35 | 35 | Ethernet driver during bus enumeration, encoded in string. |
| 36 | 36 | This interface mode is used to configure the Ethernet MAC with the |
| 37 | 37 | appropriate mode for its data lines to the PHY hardware. |
| 38 | + | |
| 38 | 39 | Possible values are: |
| 40 | + | |
| 39 | 41 | <empty> (not available), mii, gmii, sgmii, tbi, rev-mii, |
| 40 | 42 | rmii, rgmii, rgmii-id, rgmii-rxid, rgmii-txid, rtbi, smii |
| 41 | 43 | xgmii, moca, qsgmii, trgmii, 1000base-x, 2500base-x, rxaui, |
| @@ -11,8 +11,11 @@ Contact: linuxppc-dev@lists.ozlabs.org · 10 unmodified lines | ||
| 11 | 11 | Description: read only |
| 12 | 12 | Number of contexts for the AFU, in the format <n>/<max> |
| 13 | 13 | where: |
| 14 | − n: number of currently active contexts, for debug | |
| 15 | − max: maximum number of contexts supported by the AFU | |
| 14 | + | |
| 15 | + ==== =============================================== | |
| 16 | + n number of currently active contexts, for debug | |
| 17 | + max maximum number of contexts supported by the AFU | |
| 18 | + ==== =============================================== | |
| 16 | 19 | |
| 17 | 20 | What: /sys/class/ocxl/<afu name>/pp_mmio_size |
| 18 | 21 | Date: January 2018 |
| @@ -40,7 +43,9 @@ Contact: linuxppc-dev@lists.ozlabs.org · 21 unmodified lines | ||
| 40 | 43 | Description: read/write |
| 41 | 44 | Control whether the FPGA is reloaded on a link reset. Enabled |
| 42 | 45 | through a vendor-specific logic block on the FPGA. |
| 43 | − 0 Do not reload FPGA image from flash | |
| 44 | − 1 Reload FPGA image from flash | |
| 45 | − unavailable | |
| 46 | − The device does not support this capability | |
| 46 | + | |
| 47 | + =========== =========================================== | |
| 48 | + 0 Do not reload FPGA image from flash | |
| 49 | + 1 Reload FPGA image from flash | |
| 50 | + unavailable The device does not support this capability | |
| 51 | + =========== =========================================== | |
| @@ -11,15 +11,17 @@ KernelVersion: 2.6.20 · 10 unmodified lines | ||
| 11 | 11 | Contact: Thomas Maier <balagi@justmail.de> |
| 12 | 12 | Description: |
| 13 | 13 | |
| 14 | − add: (WO) Write a block device id (major:minor) to | |
| 14 | + ========== ============================================== | |
| 15 | + add (WO) Write a block device id (major:minor) to | |
| 15 | 16 | create a new pktcdvd device and map it to the |
| 16 | 17 | block device. |
| 17 | 18 | |
| 18 | − remove: (WO) Write the pktcdvd device id (major:minor) | |
| 19 | + remove (WO) Write the pktcdvd device id (major:minor) | |
| 19 | 20 | to remove the pktcdvd device. |
| 20 | 21 | |
| 21 | − device_map: (RO) Shows the device mapping in format: | |
| 22 | + device_map (RO) Shows the device mapping in format: | |
| 22 | 23 | pktcdvd[0-7] <pktdevid> <blkdevid> |
| 24 | + ========== ============================================== | |
| 23 | 25 | |
| 24 | 26 | |
| 25 | 27 | What: /sys/class/pktcdvd/pktcdvd[0-7]/dev |
| @@ -65,29 +67,31 @@ Date: Oct. 2006 · 39 unmodified lines | ||
| 65 | 67 | KernelVersion: 2.6.20 |
| 66 | 68 | Contact: Thomas Maier <balagi@justmail.de> |
| 67 | 69 | Description: |
| 68 | − size: (RO) Contains the size of the bio write queue. | |
| 70 | + ============== ================================================ | |
| 71 | + size (RO) Contains the size of the bio write queue. | |
| 69 | 72 | |
| 70 | − congestion_off: (RW) If bio write queue size is below this mark, | |
| 73 | + congestion_off (RW) If bio write queue size is below this mark, | |
| 71 | 74 | accept new bio requests from the block layer. |
| 72 | 75 | |
| 73 | − congestion_on: (RW) If bio write queue size is higher as this | |
| 76 | + congestion_on (RW) If bio write queue size is higher as this | |
| 74 | 77 | mark, do no longer accept bio write requests |
| 75 | 78 | from the block layer and wait till the pktcdvd |
| 76 | 79 | device has processed enough bio's so that bio |
| 77 | 80 | write queue size is below congestion off mark. |
| 78 | 81 | A value of <= 0 disables congestion control. |
| 82 | + ============== ================================================ | |
| 79 | 83 | |
| 80 | 84 | |
| 81 | 85 | Example: |
| 82 | 86 | -------- |
| 83 | −To use the pktcdvd sysfs interface directly, you can do: | |
| 84 | − | |
| 85 | −# create a new pktcdvd device mapped to /dev/hdc | |
| 86 | −echo "22:0" >/sys/class/pktcdvd/add | |
| 87 | −cat /sys/class/pktcdvd/device_map | |
| 88 | −# assuming device pktcdvd0 was created, look at stat's | |
| 89 | −cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written | |
| 90 | −# print the device id of the mapped block device | |
| 91 | −fgrep pktcdvd0 /sys/class/pktcdvd/device_map | |
| 92 | −# remove device, using pktcdvd0 device id 253:0 | |
| 93 | −echo "253:0" >/sys/class/pktcdvd/remove | |
| 87 | +To use the pktcdvd sysfs interface directly, you can do:: | |
| 88 | + | |
| 89 | + # create a new pktcdvd device mapped to /dev/hdc | |
| 90 | + echo "22:0" >/sys/class/pktcdvd/add | |
| 91 | + cat /sys/class/pktcdvd/device_map | |
| 92 | + # assuming device pktcdvd0 was created, look at stat's | |
| 93 | + cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written | |
| 94 | + # print the device id of the mapped block device | |
| 95 | + fgrep pktcdvd0 /sys/class/pktcdvd/device_map | |
| 96 | + # remove device, using pktcdvd0 device id 253:0 | |
| 97 | + echo "253:0" >/sys/class/pktcdvd/remove | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −===== General Properties ===== | |
| 1 | +**General Properties** | |
| 2 | 2 | |
| 3 | 3 | What: /sys/class/power_supply/<supply_name>/manufacturer |
| 4 | 4 | Date: May 2007 |
| @@ -36,14 +36,238 @@ Description: · 31 unmodified lines | ||
| 36 | 36 | Access: Read |
| 37 | 37 | Valid values: "Battery", "UPS", "Mains", "USB", "Wireless" |
| 38 | 38 | |
| 39 | −===== Battery Properties ===== | |
| 39 | +**Battery and USB properties** | |
| 40 | + | |
| 41 | +What: /sys/class/power_supply/<supply_name>/current_avg | |
| 42 | +Date: May 2007 | |
| 43 | +Contact: linux-pm@vger.kernel.org | |
| 44 | +Description: | |
| 45 | + Battery: | |
| 46 | + | |
| 47 | + Reports an average IBAT current reading for the battery, over | |
| 48 | + a fixed period. Normally devices will provide a fixed interval | |
| 49 | + in which they average readings to smooth out the reported | |
| 50 | + value. | |
| 51 | + | |
| 52 | + USB: | |
| 53 | + | |
| 54 | + Reports an average IBUS current reading over a fixed period. | |
| 55 | + Normally devices will provide a fixed interval in which they | |
| 56 | + average readings to smooth out the reported value. | |
| 57 | + | |
| 58 | + Access: Read | |
| 59 | + | |
| 60 | + Valid values: Represented in microamps. Negative values are | |
| 61 | + used for discharging batteries, positive values for charging | |
| 62 | + batteries and for USB IBUS current. | |
| 63 | + | |
| 64 | +What: /sys/class/power_supply/<supply_name>/current_max | |
| 65 | +Date: October 2010 | |
| 66 | +Contact: linux-pm@vger.kernel.org | |
| 67 | +Description: | |
| 68 | + Battery: | |
| 69 | + | |
| 70 | + Reports the maximum IBAT current allowed into the battery. | |
| 71 | + | |
| 72 | + USB: | |
| 73 | + | |
| 74 | + Reports the maximum IBUS current the supply can support. | |
| 75 | + | |
| 76 | + Access: Read | |
| 77 | + Valid values: Represented in microamps | |
| 78 | + | |
| 79 | +What: /sys/class/power_supply/<supply_name>/current_now | |
| 80 | +Date: May 2007 | |
| 81 | +Contact: linux-pm@vger.kernel.org | |
| 82 | +Description: | |
| 83 | + | |
| 84 | + Battery: | |
| 85 | + | |
| 86 | + Reports an instant, single IBAT current reading for the | |
| 87 | + battery. This value is not averaged/smoothed. | |
| 88 | + | |
| 89 | + Access: Read | |
| 90 | + | |
| 91 | + USB: | |
| 92 | + | |
| 93 | + Reports the IBUS current supplied now. This value is generally | |
| 94 | + read-only reporting, unless the 'online' state of the supply | |
| 95 | + is set to be programmable, in which case this value can be set | |
| 96 | + within the reported min/max range. | |
| 97 | + | |
| 98 | + Access: Read, Write | |
| 99 | + | |
| 100 | + Valid values: Represented in microamps. Negative values are | |
| 101 | + used for discharging batteries, positive values for charging | |
| 102 | + batteries and for USB IBUS current. | |
| 103 | + | |
| 104 | +What: /sys/class/power_supply/<supply_name>/temp | |
| 105 | +Date: May 2007 | |
| 106 | +Contact: linux-pm@vger.kernel.org | |
| 107 | +Description: | |
| 108 | + Battery: | |
| 109 | + | |
| 110 | + Reports the current TBAT battery temperature reading. | |
| 111 | + | |
| 112 | + USB: | |
| 113 | + | |
| 114 | + Reports the current supply temperature reading. This would | |
| 115 | + normally be the internal temperature of the device itself | |
| 116 | + (e.g TJUNC temperature of an IC) | |
| 117 | + | |
| 118 | + Access: Read | |
| 119 | + | |
| 120 | + Valid values: Represented in 1/10 Degrees Celsius | |
| 121 | + | |
| 122 | +What: /sys/class/power_supply/<supply_name>/temp_alert_max | |
| 123 | +Date: July 2012 | |
| 124 | +Contact: linux-pm@vger.kernel.org | |
| 125 | +Description: | |
| 126 | + Battery: | |
| 127 | + | |
| 128 | + Maximum TBAT temperature trip-wire value where the supply will | |
| 129 | + notify user-space of the event. | |
| 130 | + | |
| 131 | + USB: | |
| 132 | + | |
| 133 | + Maximum supply temperature trip-wire value where the supply | |
| 134 | + will notify user-space of the event. | |
| 135 | + | |
| 136 | + This is normally used for the charging scenario where | |
| 137 | + user-space needs to know if the temperature has crossed an | |
| 138 | + upper threshold so it can take appropriate action (e.g. warning | |
| 139 | + user that the temperature is critically high, and charging has | |
| 140 | + stopped). | |
| 141 | + | |
| 142 | + Access: Read | |
| 143 | + | |
| 144 | + Valid values: Represented in 1/10 Degrees Celsius | |
| 145 | + | |
| 146 | +What: /sys/class/power_supply/<supply_name>/temp_alert_min | |
| 147 | +Date: July 2012 | |
| 148 | +Contact: linux-pm@vger.kernel.org | |
| 149 | +Description: | |
| 150 | + | |
| 151 | + Battery: | |
| 152 | + | |
| 153 | + Minimum TBAT temperature trip-wire value where the supply will | |
| 154 | + notify user-space of the event. | |
| 155 | + | |
| 156 | + USB: | |
| 157 | + | |
| 158 | + Minimum supply temperature trip-wire value where the supply | |
| 159 | + will notify user-space of the event. | |
| 160 | + | |
| 161 | + This is normally used for the charging scenario where user-space | |
| 162 | + needs to know if the temperature has crossed a lower threshold | |
| 163 | + so it can take appropriate action (e.g. warning user that | |
| 164 | + temperature level is high, and charging current has been | |
| 165 | + reduced accordingly to remedy the situation). | |
| 166 | + | |
| 167 | + Access: Read | |
| 168 | + | |
| 169 | + Valid values: Represented in 1/10 Degrees Celsius | |
| 170 | + | |
| 171 | +What: /sys/class/power_supply/<supply_name>/temp_max | |
| 172 | +Date: July 2014 | |
| 173 | +Contact: linux-pm@vger.kernel.org | |
| 174 | +Description: | |
| 175 | + Battery: | |
| 176 | + | |
| 177 | + Reports the maximum allowed TBAT battery temperature for | |
| 178 | + charging. | |
| 179 | + | |
| 180 | + USB: | |
| 181 | + | |
| 182 | + Reports the maximum allowed supply temperature for operation. | |
| 183 | + | |
| 184 | + Access: Read | |
| 185 | + | |
| 186 | + Valid values: Represented in 1/10 Degrees Celsius | |
| 187 | + | |
| 188 | +What: /sys/class/power_supply/<supply_name>/temp_min | |
| 189 | +Date: July 2014 | |
| 190 | +Contact: linux-pm@vger.kernel.org | |
| 191 | +Description: | |
| 192 | + Battery: | |
| 193 | + | |
| 194 | + Reports the minimum allowed TBAT battery temperature for | |
| 195 | + charging. | |
| 196 | + | |
| 197 | + USB: | |
| 198 | + | |
| 199 | + Reports the minimum allowed supply temperature for operation. | |
| 200 | + | |
| 201 | + Access: Read | |
| 202 | + | |
| 203 | + Valid values: Represented in 1/10 Degrees Celsius | |
| 204 | + | |
| 205 | +What: /sys/class/power_supply/<supply_name>/voltage_max, | |
| 206 | +Date: January 2008 | |
| 207 | +Contact: linux-pm@vger.kernel.org | |
| 208 | +Description: | |
| 209 | + Battery: | |
| 210 | + | |
| 211 | + Reports the maximum safe VBAT voltage permitted for the | |
| 212 | + battery, during charging. | |
| 213 | + | |
| 214 | + USB: | |
| 215 | + | |
| 216 | + Reports the maximum VBUS voltage the supply can support. | |
| 217 | + | |
| 218 | + Access: Read | |
| 219 | + | |
| 220 | + Valid values: Represented in microvolts | |
| 221 | + | |
| 222 | +What: /sys/class/power_supply/<supply_name>/voltage_min, | |
| 223 | +Date: January 2008 | |
| 224 | +Contact: linux-pm@vger.kernel.org | |
| 225 | +Description: | |
| 226 | + Battery: | |
| 227 | + | |
| 228 | + Reports the minimum safe VBAT voltage permitted for the | |
| 229 | + battery, during discharging. | |
| 230 | + | |
| 231 | + USB: | |
| 232 | + | |
| 233 | + Reports the minimum VBUS voltage the supply can support. | |
| 234 | + | |
| 235 | + Access: Read | |
| 236 | + | |
| 237 | + Valid values: Represented in microvolts | |
| 238 | + | |
| 239 | +What: /sys/class/power_supply/<supply_name>/voltage_now, | |
| 240 | +Date: May 2007 | |
| 241 | +Contact: linux-pm@vger.kernel.org | |
| 242 | +Description: | |
| 243 | + Battery: | |
| 244 | + | |
| 245 | + Reports an instant, single VBAT voltage reading for the | |
| 246 | + battery. This value is not averaged/smoothed. | |
| 247 | + | |
| 248 | + Access: Read | |
| 249 | + | |
| 250 | + USB: | |
| 251 | + | |
| 252 | + Reports the VBUS voltage supplied now. This value is generally | |
| 253 | + read-only reporting, unless the 'online' state of the supply | |
| 254 | + is set to be programmable, in which case this value can be set | |
| 255 | + within the reported min/max range. | |
| 256 | + | |
| 257 | + Access: Read, Write | |
| 258 | + | |
| 259 | + Valid values: Represented in microvolts | |
| 260 | + | |
| 261 | +**Battery Properties** | |
| 40 | 262 | |
| 41 | 263 | What: /sys/class/power_supply/<supply_name>/capacity |
| 42 | 264 | Date: May 2007 |
| 43 | 265 | Contact: linux-pm@vger.kernel.org |
| 44 | 266 | Description: |
| 45 | 267 | Fine grain representation of battery capacity. |
| 268 | + | |
| 46 | 269 | Access: Read |
| 270 | + | |
| 47 | 271 | Valid values: 0 - 100 (percent) |
| 48 | 272 | |
| 49 | 273 | What: /sys/class/power_supply/<supply_name>/capacity_alert_max |
| @@ -58,6 +282,7 @@ Description: · 8 unmodified lines | ||
| 58 | 282 | low). |
| 59 | 283 | |
| 60 | 284 | Access: Read, Write |
| 285 | + | |
| 61 | 286 | Valid values: 0 - 100 (percent) |
| 62 | 287 | |
| 63 | 288 | What: /sys/class/power_supply/<supply_name>/capacity_alert_min |
| @@ -72,6 +297,7 @@ Description: · 8 unmodified lines | ||
| 72 | 297 | critically low). |
| 73 | 298 | |
| 74 | 299 | Access: Read, Write |
| 300 | + | |
| 75 | 301 | Valid values: 0 - 100 (percent) |
| 76 | 302 | |
| 77 | 303 | What: /sys/class/power_supply/<supply_name>/capacity_error_margin |
| @@ -87,6 +313,7 @@ Description: · 9 unmodified lines | ||
| 87 | 313 | completely useless. |
| 88 | 314 | |
| 89 | 315 | Access: Read |
| 316 | + | |
| 90 | 317 | Valid values: 0 - 100 (percent) |
| 91 | 318 | |
| 92 | 319 | What: /sys/class/power_supply/<supply_name>/capacity_level |
| @@ -96,40 +323,10 @@ Description: · 3 unmodified lines | ||
| 96 | 323 | Coarse representation of battery capacity. |
| 97 | 324 | |
| 98 | 325 | Access: Read |
| 99 | − Valid values: "Unknown", "Critical", "Low", "Normal", "High", | |
| 100 | − "Full" | |
| 101 | − | |
| 102 | −What: /sys/class/power_supply/<supply_name>/current_avg | |
| 103 | −Date: May 2007 | |
| 104 | −Contact: linux-pm@vger.kernel.org | |
| 105 | −Description: | |
| 106 | − Reports an average IBAT current reading for the battery, over a | |
| 107 | − fixed period. Normally devices will provide a fixed interval in | |
| 108 | − which they average readings to smooth out the reported value. | |
| 109 | − | |
| 110 | − Access: Read | |
| 111 | − Valid values: Represented in microamps. Negative values are used | |
| 112 | − for discharging batteries, positive values for charging batteries. | |
| 113 | 326 | |
| 114 | −What: /sys/class/power_supply/<supply_name>/current_max | |
| 115 | −Date: October 2010 | |
| 116 | −Contact: linux-pm@vger.kernel.org | |
| 117 | −Description: | |
| 118 | − Reports the maximum IBAT current allowed into the battery. | |
| 119 | − | |
| 120 | − Access: Read | |
| 121 | − Valid values: Represented in microamps | |
| 122 | − | |
| 123 | −What: /sys/class/power_supply/<supply_name>/current_now | |
| 124 | −Date: May 2007 | |
| 125 | −Contact: linux-pm@vger.kernel.org | |
| 126 | −Description: | |
| 127 | − Reports an instant, single IBAT current reading for the battery. | |
| 128 | − This value is not averaged/smoothed. | |
| 129 | − | |
| 130 | − Access: Read | |
| 131 | − Valid values: Represented in microamps. Negative values are used | |
| 132 | − for discharging batteries, positive values for charging batteries. | |
| 327 | + Valid values: | |
| 328 | + "Unknown", "Critical", "Low", "Normal", "High", | |
| 329 | + "Full" | |
| 133 | 330 | |
| 134 | 331 | What: /sys/class/power_supply/<supply_name>/charge_control_limit |
| 135 | 332 | Date: Oct 2012 |
| @@ -139,6 +336,7 @@ Description: · 3 unmodified lines | ||
| 139 | 336 | throttling for thermal cooling or improving battery health. |
| 140 | 337 | |
| 141 | 338 | Access: Read, Write |
| 339 | + | |
| 142 | 340 | Valid values: Represented in microamps |
| 143 | 341 | |
| 144 | 342 | What: /sys/class/power_supply/<supply_name>/charge_control_limit_max |
| @@ -148,6 +346,7 @@ Description: · 3 unmodified lines | ||
| 148 | 346 | Maximum legal value for the charge_control_limit property. |
| 149 | 347 | |
| 150 | 348 | Access: Read |
| 349 | + | |
| 151 | 350 | Valid values: Represented in microamps |
| 152 | 351 | |
| 153 | 352 | What: /sys/class/power_supply/<supply_name>/charge_control_start_threshold |
| @@ -168,6 +367,7 @@ Description: · 14 unmodified lines | ||
| 168 | 367 | stop. |
| 169 | 368 | |
| 170 | 369 | Access: Read, Write |
| 370 | + | |
| 171 | 371 | Valid values: 0 - 100 (percent) |
| 172 | 372 | |
| 173 | 373 | What: /sys/class/power_supply/<supply_name>/charge_type |
| @@ -183,7 +383,9 @@ Description: · 9 unmodified lines | ||
| 183 | 383 | different algorithm. |
| 184 | 384 | |
| 185 | 385 | Access: Read, Write |
| 186 | − Valid values: "Unknown", "N/A", "Trickle", "Fast", "Standard", | |
| 386 | + | |
| 387 | + Valid values: | |
| 388 | + "Unknown", "N/A", "Trickle", "Fast", "Standard", | |
| 187 | 389 | "Adaptive", "Custom" |
| 188 | 390 | |
| 189 | 391 | What: /sys/class/power_supply/<supply_name>/charge_term_current |
| @@ -194,6 +396,7 @@ Description: · 4 unmodified lines | ||
| 194 | 396 | when the battery is considered full and charging should end. |
| 195 | 397 | |
| 196 | 398 | Access: Read |
| 399 | + | |
| 197 | 400 | Valid values: Represented in microamps |
| 198 | 401 | |
| 199 | 402 | What: /sys/class/power_supply/<supply_name>/health |
| @@ -204,7 +407,9 @@ Description: · 4 unmodified lines | ||
| 204 | 407 | functionality. |
| 205 | 408 | |
| 206 | 409 | Access: Read |
| 207 | − Valid values: "Unknown", "Good", "Overheat", "Dead", | |
| 410 | + | |
| 411 | + Valid values: | |
| 412 | + "Unknown", "Good", "Overheat", "Dead", | |
| 208 | 413 | "Over voltage", "Unspecified failure", "Cold", |
| 209 | 414 | "Watchdog timer expire", "Safety timer expire", |
| 210 | 415 | "Over current", "Calibration required", "Warm", |
| @@ -218,6 +423,7 @@ Description: · 7 unmodified lines | ||
| 218 | 423 | for a battery charge cycle. |
| 219 | 424 | |
| 220 | 425 | Access: Read |
| 426 | + | |
| 221 | 427 | Valid values: Represented in microamps |
| 222 | 428 | |
| 223 | 429 | What: /sys/class/power_supply/<supply_name>/present |
| @@ -227,9 +433,13 @@ Description: · 3 unmodified lines | ||
| 227 | 433 | Reports whether a battery is present or not in the system. |
| 228 | 434 | |
| 229 | 435 | Access: Read |
| 436 | + | |
| 230 | 437 | Valid values: |
| 438 | + | |
| 439 | + == ======= | |
| 231 | 440 | 0: Absent |
| 232 | 441 | 1: Present |
| 442 | + == ======= | |
| 233 | 443 | |
| 234 | 444 | What: /sys/class/power_supply/<supply_name>/status |
| 235 | 445 | Date: May 2007 |
| @@ -240,7 +450,9 @@ Description: · 4 unmodified lines | ||
| 240 | 450 | used to enable/disable charging to the battery. |
| 241 | 451 | |
| 242 | 452 | Access: Read, Write |
| 243 | − Valid values: "Unknown", "Charging", "Discharging", | |
| 453 | + | |
| 454 | + Valid values: | |
| 455 | + "Unknown", "Charging", "Discharging", | |
| 244 | 456 | "Not charging", "Full" |
| 245 | 457 | |
| 246 | 458 | What: /sys/class/power_supply/<supply_name>/technology |
| @@ -250,66 +462,11 @@ Description: · 3 unmodified lines | ||
| 250 | 462 | Describes the battery technology supported by the supply. |
| 251 | 463 | |
| 252 | 464 | Access: Read |
| 253 | − Valid values: "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", | |
| 254 | − "NiCd", "LiMn" | |
| 255 | − | |
| 256 | −What: /sys/class/power_supply/<supply_name>/temp | |
| 257 | −Date: May 2007 | |
| 258 | −Contact: linux-pm@vger.kernel.org | |
| 259 | −Description: | |
| 260 | − Reports the current TBAT battery temperature reading. | |
| 261 | − | |
| 262 | − Access: Read | |
| 263 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 264 | − | |
| 265 | −What: /sys/class/power_supply/<supply_name>/temp_alert_max | |
| 266 | −Date: July 2012 | |
| 267 | −Contact: linux-pm@vger.kernel.org | |
| 268 | −Description: | |
| 269 | − Maximum TBAT temperature trip-wire value where the supply will | |
| 270 | − notify user-space of the event. This is normally used for the | |
| 271 | − battery charging scenario where user-space needs to know the | |
| 272 | − battery temperature has crossed an upper threshold so it can | |
| 273 | − take appropriate action (e.g. warning user that battery level is | |
| 274 | − critically high, and charging has stopped). | |
| 275 | − | |
| 276 | − Access: Read | |
| 277 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 278 | − | |
| 279 | −What: /sys/class/power_supply/<supply_name>/temp_alert_min | |
| 280 | −Date: July 2012 | |
| 281 | −Contact: linux-pm@vger.kernel.org | |
| 282 | −Description: | |
| 283 | − Minimum TBAT temperature trip-wire value where the supply will | |
| 284 | − notify user-space of the event. This is normally used for the | |
| 285 | − battery charging scenario where user-space needs to know the | |
| 286 | − battery temperature has crossed a lower threshold so it can take | |
| 287 | − appropriate action (e.g. warning user that battery level is | |
| 288 | − high, and charging current has been reduced accordingly to | |
| 289 | − remedy the situation). | |
| 290 | − | |
| 291 | − Access: Read | |
| 292 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 293 | − | |
| 294 | −What: /sys/class/power_supply/<supply_name>/temp_max | |
| 295 | −Date: July 2014 | |
| 296 | −Contact: linux-pm@vger.kernel.org | |
| 297 | −Description: | |
| 298 | − Reports the maximum allowed TBAT battery temperature for | |
| 299 | − charging. | |
| 300 | − | |
| 301 | − Access: Read | |
| 302 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 303 | 465 | |
| 304 | −What: /sys/class/power_supply/<supply_name>/temp_min | |
| 305 | −Date: July 2014 | |
| 306 | −Contact: linux-pm@vger.kernel.org | |
| 307 | −Description: | |
| 308 | − Reports the minimum allowed TBAT battery temperature for | |
| 309 | − charging. | |
| 466 | + Valid values: | |
| 467 | + "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", | |
| 468 | + "NiCd", "LiMn" | |
| 310 | 469 | |
| 311 | − Access: Read | |
| 312 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 313 | 470 | |
| 314 | 471 | What: /sys/class/power_supply/<supply_name>/voltage_avg, |
| 315 | 472 | Date: May 2007 |
| @@ -320,72 +477,10 @@ Description: · 4 unmodified lines | ||
| 320 | 477 | which they average readings to smooth out the reported value. |
| 321 | 478 | |
| 322 | 479 | Access: Read |
| 323 | − Valid values: Represented in microvolts | |
| 324 | − | |
| 325 | −What: /sys/class/power_supply/<supply_name>/voltage_max, | |
| 326 | −Date: January 2008 | |
| 327 | −Contact: linux-pm@vger.kernel.org | |
| 328 | −Description: | |
| 329 | − Reports the maximum safe VBAT voltage permitted for the battery, | |
| 330 | − during charging. | |
| 331 | − | |
| 332 | − Access: Read | |
| 333 | − Valid values: Represented in microvolts | |
| 334 | − | |
| 335 | −What: /sys/class/power_supply/<supply_name>/voltage_min, | |
| 336 | −Date: January 2008 | |
| 337 | −Contact: linux-pm@vger.kernel.org | |
| 338 | −Description: | |
| 339 | − Reports the minimum safe VBAT voltage permitted for the battery, | |
| 340 | − during discharging. | |
| 341 | 480 | |
| 342 | − Access: Read | |
| 343 | 481 | Valid values: Represented in microvolts |
| 344 | 482 | |
| 345 | −What: /sys/class/power_supply/<supply_name>/voltage_now, | |
| 346 | −Date: May 2007 | |
| 347 | −Contact: linux-pm@vger.kernel.org | |
| 348 | −Description: | |
| 349 | − Reports an instant, single VBAT voltage reading for the battery. | |
| 350 | − This value is not averaged/smoothed. | |
| 351 | − | |
| 352 | − Access: Read | |
| 353 | − Valid values: Represented in microvolts | |
| 354 | − | |
| 355 | −===== USB Properties ===== | |
| 356 | − | |
| 357 | −What: /sys/class/power_supply/<supply_name>/current_avg | |
| 358 | −Date: May 2007 | |
| 359 | −Contact: linux-pm@vger.kernel.org | |
| 360 | −Description: | |
| 361 | − Reports an average IBUS current reading over a fixed period. | |
| 362 | − Normally devices will provide a fixed interval in which they | |
| 363 | − average readings to smooth out the reported value. | |
| 364 | − | |
| 365 | − Access: Read | |
| 366 | − Valid values: Represented in microamps | |
| 367 | − | |
| 368 | − | |
| 369 | −What: /sys/class/power_supply/<supply_name>/current_max | |
| 370 | −Date: October 2010 | |
| 371 | −Contact: linux-pm@vger.kernel.org | |
| 372 | −Description: | |
| 373 | − Reports the maximum IBUS current the supply can support. | |
| 374 | − | |
| 375 | − Access: Read | |
| 376 | − Valid values: Represented in microamps | |
| 377 | − | |
| 378 | −What: /sys/class/power_supply/<supply_name>/current_now | |
| 379 | −Date: May 2007 | |
| 380 | −Contact: linux-pm@vger.kernel.org | |
| 381 | −Description: | |
| 382 | − Reports the IBUS current supplied now. This value is generally | |
| 383 | − read-only reporting, unless the 'online' state of the supply | |
| 384 | − is set to be programmable, in which case this value can be set | |
| 385 | − within the reported min/max range. | |
| 386 | − | |
| 387 | − Access: Read, Write | |
| 388 | − Valid values: Represented in microamps | |
| 483 | +**USB Properties** | |
| 389 | 484 | |
| 390 | 485 | What: /sys/class/power_supply/<supply_name>/input_current_limit |
| 391 | 486 | Date: July 2014 |
| @@ -399,6 +494,7 @@ Description: · 7 unmodified lines | ||
| 399 | 494 | solved using power limit use input_current_limit. |
| 400 | 495 | |
| 401 | 496 | Access: Read, Write |
| 497 | + | |
| 402 | 498 | Valid values: Represented in microamps |
| 403 | 499 | |
| 404 | 500 | What: /sys/class/power_supply/<supply_name>/input_voltage_limit |
| @@ -416,6 +512,7 @@ Description: · 11 unmodified lines | ||
| 416 | 512 | solved using power limit use input_voltage_limit. |
| 417 | 513 | |
| 418 | 514 | Access: Read, Write |
| 515 | + | |
| 419 | 516 | Valid values: Represented in microvolts |
| 420 | 517 | |
| 421 | 518 | What: /sys/class/power_supply/<supply_name>/input_power_limit |
| @@ -429,6 +526,7 @@ Description: · 7 unmodified lines | ||
| 429 | 526 | limit only for problems that can be solved using power limit. |
| 430 | 527 | |
| 431 | 528 | Access: Read, Write |
| 529 | + | |
| 432 | 530 | Valid values: Represented in microwatts |
| 433 | 531 | |
| 434 | 532 | What: /sys/class/power_supply/<supply_name>/online, |
| @@ -441,69 +539,14 @@ Description: · 6 unmodified lines | ||
| 441 | 539 | USB supply so voltage and current can be controlled). |
| 442 | 540 | |
| 443 | 541 | Access: Read, Write |
| 542 | + | |
| 444 | 543 | Valid values: |
| 544 | + | |
| 545 | + == ================================================== | |
| 445 | 546 | 0: Offline |
| 446 | 547 | 1: Online Fixed - Fixed Voltage Supply |
| 447 | 548 | 2: Online Programmable - Programmable Voltage Supply |
| 448 | − | |
| 449 | −What: /sys/class/power_supply/<supply_name>/temp | |
| 450 | −Date: May 2007 | |
| 451 | −Contact: linux-pm@vger.kernel.org | |
| 452 | −Description: | |
| 453 | − Reports the current supply temperature reading. This would | |
| 454 | − normally be the internal temperature of the device itself (e.g | |
| 455 | − TJUNC temperature of an IC) | |
| 456 | − | |
| 457 | − Access: Read | |
| 458 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 459 | − | |
| 460 | −What: /sys/class/power_supply/<supply_name>/temp_alert_max | |
| 461 | −Date: July 2012 | |
| 462 | −Contact: linux-pm@vger.kernel.org | |
| 463 | −Description: | |
| 464 | − Maximum supply temperature trip-wire value where the supply will | |
| 465 | − notify user-space of the event. This is normally used for the | |
| 466 | − charging scenario where user-space needs to know the supply | |
| 467 | − temperature has crossed an upper threshold so it can take | |
| 468 | − appropriate action (e.g. warning user that the supply | |
| 469 | − temperature is critically high, and charging has stopped to | |
| 470 | − remedy the situation). | |
| 471 | − | |
| 472 | − Access: Read | |
| 473 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 474 | − | |
| 475 | −What: /sys/class/power_supply/<supply_name>/temp_alert_min | |
| 476 | −Date: July 2012 | |
| 477 | −Contact: linux-pm@vger.kernel.org | |
| 478 | −Description: | |
| 479 | − Minimum supply temperature trip-wire value where the supply will | |
| 480 | − notify user-space of the event. This is normally used for the | |
| 481 | − charging scenario where user-space needs to know the supply | |
| 482 | − temperature has crossed a lower threshold so it can take | |
| 483 | − appropriate action (e.g. warning user that the supply | |
| 484 | − temperature is high, and charging current has been reduced | |
| 485 | − accordingly to remedy the situation). | |
| 486 | − | |
| 487 | − Access: Read | |
| 488 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 489 | − | |
| 490 | −What: /sys/class/power_supply/<supply_name>/temp_max | |
| 491 | −Date: July 2014 | |
| 492 | −Contact: linux-pm@vger.kernel.org | |
| 493 | −Description: | |
| 494 | − Reports the maximum allowed supply temperature for operation. | |
| 495 | − | |
| 496 | − Access: Read | |
| 497 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 498 | − | |
| 499 | −What: /sys/class/power_supply/<supply_name>/temp_min | |
| 500 | −Date: July 2014 | |
| 501 | −Contact: linux-pm@vger.kernel.org | |
| 502 | −Description: | |
| 503 | − Reports the mainimum allowed supply temperature for operation. | |
| 504 | − | |
| 505 | − Access: Read | |
| 506 | − Valid values: Represented in 1/10 Degrees Celsius | |
| 549 | + == ================================================== | |
| 507 | 550 | |
| 508 | 551 | What: /sys/class/power_supply/<supply_name>/usb_type |
| 509 | 552 | Date: March 2018 |
| @@ -514,40 +557,12 @@ Description: · 4 unmodified lines | ||
| 514 | 557 | is attached. |
| 515 | 558 | |
| 516 | 559 | Access: Read-Only |
| 517 | − Valid values: "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD", | |
| 518 | − "PD_DRP", "PD_PPS", "BrickID" | |
| 519 | − | |
| 520 | −What: /sys/class/power_supply/<supply_name>/voltage_max | |
| 521 | −Date: January 2008 | |
| 522 | −Contact: linux-pm@vger.kernel.org | |
| 523 | −Description: | |
| 524 | − Reports the maximum VBUS voltage the supply can support. | |
| 525 | − | |
| 526 | − Access: Read | |
| 527 | − Valid values: Represented in microvolts | |
| 528 | − | |
| 529 | −What: /sys/class/power_supply/<supply_name>/voltage_min | |
| 530 | −Date: January 2008 | |
| 531 | −Contact: linux-pm@vger.kernel.org | |
| 532 | −Description: | |
| 533 | − Reports the minimum VBUS voltage the supply can support. | |
| 534 | 560 | |
| 535 | − Access: Read | |
| 536 | − Valid values: Represented in microvolts | |
| 537 | − | |
| 538 | −What: /sys/class/power_supply/<supply_name>/voltage_now | |
| 539 | −Date: May 2007 | |
| 540 | −Contact: linux-pm@vger.kernel.org | |
| 541 | −Description: | |
| 542 | − Reports the VBUS voltage supplied now. This value is generally | |
| 543 | − read-only reporting, unless the 'online' state of the supply | |
| 544 | − is set to be programmable, in which case this value can be set | |
| 545 | − within the reported min/max range. | |
| 546 | − | |
| 547 | − Access: Read, Write | |
| 548 | − Valid values: Represented in microvolts | |
| 561 | + Valid values: | |
| 562 | + "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD", | |
| 563 | + "PD_DRP", "PD_PPS", "BrickID" | |
| 549 | 564 | |
| 550 | −===== Device Specific Properties ===== | |
| 565 | +**Device Specific Properties** | |
| 551 | 566 | |
| 552 | 567 | What: /sys/class/power/ds2760-battery.*/charge_now |
| 553 | 568 | Date: May 2010 |
| @@ -581,6 +596,7 @@ Description: · 27 unmodified lines | ||
| 581 | 596 | will drop to 0 A) and will trigger interrupt. |
| 582 | 597 | |
| 583 | 598 | Valid values: |
| 599 | + | |
| 584 | 600 | - 5, 6 or 7 (hours), |
| 585 | 601 | - 0: disabled. |
| 586 | 602 | |
| @@ -595,6 +611,7 @@ Description: · 8 unmodified lines | ||
| 595 | 611 | will drop to 0 A) and will trigger interrupt. |
| 596 | 612 | |
| 597 | 613 | Valid values: |
| 614 | + | |
| 598 | 615 | - 4 - 16 (hours), step by 2 (rounded down) |
| 599 | 616 | - 0: disabled. |
| 600 | 617 | |
| @@ -609,6 +626,7 @@ Description: · 8 unmodified lines | ||
| 609 | 626 | interrupt and start top-off charging mode. |
| 610 | 627 | |
| 611 | 628 | Valid values: |
| 629 | + | |
| 612 | 630 | - 100000 - 200000 (microamps), step by 25000 (rounded down) |
| 613 | 631 | - 200000 - 350000 (microamps), step by 50000 (rounded down) |
| 614 | 632 | - 0: disabled. |
| @@ -624,6 +642,7 @@ Description: · 9 unmodified lines | ||
| 624 | 642 | will drop to 0 A) and will trigger interrupt. |
| 625 | 643 | |
| 626 | 644 | Valid values: |
| 645 | + | |
| 627 | 646 | - 0 - 70 (minutes), step by 10 (rounded down) |
| 628 | 647 | |
| 629 | 648 | What: /sys/class/power_supply/bq24257-charger/ovp_voltage |
| @@ -637,6 +656,7 @@ Description: · 7 unmodified lines | ||
| 637 | 656 | device datasheet for details. |
| 638 | 657 | |
| 639 | 658 | Valid values: |
| 659 | + | |
| 640 | 660 | - 6000000, 6500000, 7000000, 8000000, 9000000, 9500000, 10000000, |
| 641 | 661 | 10500000 (all uV) |
| 642 | 662 | |
| @@ -652,6 +672,7 @@ Description: · 9 unmodified lines | ||
| 652 | 672 | lower than the set value. See device datasheet for details. |
| 653 | 673 | |
| 654 | 674 | Valid values: |
| 675 | + | |
| 655 | 676 | - 4200000, 4280000, 4360000, 4440000, 4520000, 4600000, 4680000, |
| 656 | 677 | 4760000 (all uV) |
| 657 | 678 | |
| @@ -666,6 +687,7 @@ Description: · 8 unmodified lines | ||
| 666 | 687 | the charger operates normally. See device datasheet for details. |
| 667 | 688 | |
| 668 | 689 | Valid values: |
| 690 | + | |
| 669 | 691 | - 1: enabled |
| 670 | 692 | - 0: disabled |
| 671 | 693 | |
| @@ -681,6 +703,7 @@ Description: · 9 unmodified lines | ||
| 681 | 703 | from the system. See device datasheet for details. |
| 682 | 704 | |
| 683 | 705 | Valid values: |
| 706 | + | |
| 684 | 707 | - 1: enabled |
| 685 | 708 | - 0: disabled |
| 686 | 709 | |
| @@ -692,6 +715,7 @@ Description: · 5 unmodified lines | ||
| 692 | 715 | manufactured. |
| 693 | 716 | |
| 694 | 717 | Access: Read |
| 718 | + | |
| 695 | 719 | Valid values: Reported as integer |
| 696 | 720 | |
| 697 | 721 | What: /sys/class/power_supply/<supply_name>/manufacture_month |
| @@ -701,6 +725,7 @@ Description: · 3 unmodified lines | ||
| 701 | 725 | Reports the month when the device has been manufactured. |
| 702 | 726 | |
| 703 | 727 | Access: Read |
| 728 | + | |
| 704 | 729 | Valid values: 1-12 |
| 705 | 730 | |
| 706 | 731 | What: /sys/class/power_supply/<supply_name>/manufacture_day |
| @@ -5,4 +5,5 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | Represents a battery impedance compensation to accelerate charging. |
| 6 | 6 | |
| 7 | 7 | Access: Read, Write |
| 8 | + | |
| 8 | 9 | Valid values: Represented in milli-ohms. Valid range is [0, 140]. |
| @@ -4,18 +4,20 @@ Description: · 3 unmodified lines | ||
| 4 | 4 | Writing to this can disable charging. |
| 5 | 5 | |
| 6 | 6 | Possible values are: |
| 7 | − "auto" - draw power as appropriate for detected | |
| 8 | − power source and battery status. | |
| 9 | − "off" - do not draw any power. | |
| 10 | − "continuous" | |
| 11 | − - activate mode described as "linear" in | |
| 12 | − TWL data sheets. This uses whatever | |
| 13 | − current is available and doesn't switch off | |
| 14 | − when voltage drops. | |
| 15 | 7 | |
| 16 | − This is useful for unstable power sources | |
| 17 | − such as bicycle dynamo, but care should | |
| 18 | − be taken that battery is not over-charged. | |
| 8 | + ============= =========================================== | |
| 9 | + "auto" draw power as appropriate for detected | |
| 10 | + power source and battery status. | |
| 11 | + "off" do not draw any power. | |
| 12 | + "continuous" activate mode described as "linear" in | |
| 13 | + TWL data sheets. This uses whatever | |
| 14 | + current is available and doesn't switch off | |
| 15 | + when voltage drops. | |
| 16 | + | |
| 17 | + This is useful for unstable power sources | |
| 18 | + such as bicycle dynamo, but care should | |
| 19 | + be taken that battery is not over-charged. | |
| 20 | + ============= =========================================== | |
| 19 | 21 | |
| 20 | 22 | What: /sys/class/power_supply/twl4030_ac/mode |
| 21 | 23 | Description: |
| @@ -23,6 +25,9 @@ Description: · 1 unmodified line | ||
| 23 | 25 | Writing to this can disable charging. |
| 24 | 26 | |
| 25 | 27 | Possible values are: |
| 26 | − "auto" - draw power as appropriate for detected | |
| 27 | − power source and battery status. | |
| 28 | − "off" - do not draw any power. | |
| 28 | + | |
| 29 | + ====== =========================================== | |
| 30 | + "auto" draw power as appropriate for detected | |
| 31 | + power source and battery status. | |
| 32 | + "off" do not draw any power. | |
| 33 | + ====== =========================================== | |
| @@ -4,17 +4,23 @@ KernelVersion: 5.2 · 3 unmodified lines | ||
| 4 | 4 | Description: |
| 5 | 5 | What charging algorithm to use: |
| 6 | 6 | |
| 7 | − Standard: Fully charges battery at a standard rate. | |
| 8 | − Adaptive: Battery settings adaptively optimized based on | |
| 7 | + Standard: | |
| 8 | + Fully charges battery at a standard rate. | |
| 9 | + Adaptive: | |
| 10 | + Battery settings adaptively optimized based on | |
| 9 | 11 | typical battery usage pattern. |
| 10 | − Fast: Battery charges over a shorter period. | |
| 11 | − Trickle: Extends battery lifespan, intended for users who | |
| 12 | + Fast: | |
| 13 | + Battery charges over a shorter period. | |
| 14 | + Trickle: | |
| 15 | + Extends battery lifespan, intended for users who | |
| 12 | 16 | primarily use their Chromebook while connected to AC. |
| 13 | − Custom: A low and high threshold percentage is specified. | |
| 17 | + Custom: | |
| 18 | + A low and high threshold percentage is specified. | |
| 14 | 19 | Charging begins when level drops below |
| 15 | 20 | charge_control_start_threshold, and ceases when |
| 16 | 21 | level is above charge_control_end_threshold. |
| 17 | − Long Life: Customized charge rate for last longer battery life. | |
| 22 | + Long Life: | |
| 23 | + Customized charge rate for last longer battery life. | |
| 18 | 24 | On Wilco device this mode is pre-configured in the factory |
| 19 | 25 | through EC's private PID. Swiching to a different mode will |
| 20 | 26 | be denied by Wilco EC when Long Life mode is enabled. |
| @@ -6,6 +6,7 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | The /sys/class/rapidio_port subdirectory contains individual |
| 7 | 7 | subdirectories named as "rapidioN" where N = mport ID registered |
| 8 | 8 | with RapidIO subsystem. |
| 9 | + | |
| 9 | 10 | NOTE: An mport ID is not a RapidIO destination ID assigned to a |
| 10 | 11 | given local mport device. |
| 11 | 12 | |
| @@ -16,7 +17,9 @@ Contact: Matt Porter <mporter@kernel.crashing.org>, · 4 unmodified lines | ||
| 16 | 17 | Alexandre Bounine <alexandre.bounine@idt.com> |
| 17 | 18 | Description: |
| 18 | 19 | (RO) reports RapidIO common transport system size: |
| 20 | + | |
| 19 | 21 | 0 = small (8-bit destination ID, max. 256 devices), |
| 22 | + | |
| 20 | 23 | 1 = large (16-bit destination ID, max. 65536 devices). |
| 21 | 24 | |
| 22 | 25 | What: /sys/class/rapidio_port/rapidioN/port_destid |
| @@ -25,31 +28,32 @@ KernelVersion: v3.15 · 2 unmodified lines | ||
| 25 | 28 | Contact: Matt Porter <mporter@kernel.crashing.org>, |
| 26 | 29 | Alexandre Bounine <alexandre.bounine@idt.com> |
| 27 | 30 | Description: |
| 28 | − (RO) reports RapidIO destination ID assigned to the given | |
| 29 | − RapidIO mport device. If value 0xFFFFFFFF is returned this means | |
| 30 | − that no valid destination ID have been assigned to the mport | |
| 31 | − (yet). Normally, before enumeration/discovery have been executed | |
| 32 | − only fabric enumerating mports have a valid destination ID | |
| 33 | − assigned to them using "hdid=..." rapidio module parameter. | |
| 31 | + | |
| 32 | +(RO) reports RapidIO destination ID assigned to the given | |
| 33 | +RapidIO mport device. If value 0xFFFFFFFF is returned this means | |
| 34 | +that no valid destination ID have been assigned to the mport | |
| 35 | +(yet). Normally, before enumeration/discovery have been executed | |
| 36 | +only fabric enumerating mports have a valid destination ID | |
| 37 | +assigned to them using "hdid=..." rapidio module parameter. | |
| 34 | 38 | |
| 35 | 39 | After enumeration or discovery was performed for a given mport device, |
| 36 | 40 | the corresponding subdirectory will also contain subdirectories for each |
| 37 | 41 | child RapidIO device connected to the mport. |
| 38 | 42 | |
| 39 | 43 | The example below shows mport device subdirectory with several child RapidIO |
| 40 | −devices attached to it. | |
| 41 | − | |
| 42 | −[rio@rapidio ~]$ ls /sys/class/rapidio_port/rapidio0/ -l | |
| 43 | −total 0 | |
| 44 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0001 | |
| 45 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0004 | |
| 46 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0007 | |
| 47 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0002 | |
| 48 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0003 | |
| 49 | −drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0005 | |
| 50 | −lrwxrwxrwx 1 root root 0 Feb 11 15:11 device -> ../../../0000:01:00.0 | |
| 51 | −-r--r--r-- 1 root root 4096 Feb 11 15:11 port_destid | |
| 52 | −drwxr-xr-x 2 root root 0 Feb 11 15:11 power | |
| 53 | −lrwxrwxrwx 1 root root 0 Feb 11 15:04 subsystem -> ../../../../../../class/rapidio_port | |
| 54 | −-r--r--r-- 1 root root 4096 Feb 11 15:11 sys_size | |
| 55 | −-rw-r--r-- 1 root root 4096 Feb 11 15:04 uevent | |
| 44 | +devices attached to it:: | |
| 45 | + | |
| 46 | + [rio@rapidio ~]$ ls /sys/class/rapidio_port/rapidio0/ -l | |
| 47 | + total 0 | |
| 48 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0001 | |
| 49 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0004 | |
| 50 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:e:0007 | |
| 51 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0002 | |
| 52 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0003 | |
| 53 | + drwxr-xr-x 3 root root 0 Feb 11 15:10 00:s:0005 | |
| 54 | + lrwxrwxrwx 1 root root 0 Feb 11 15:11 device -> ../../../0000:01:00.0 | |
| 55 | + -r--r--r-- 1 root root 4096 Feb 11 15:11 port_destid | |
| 56 | + drwxr-xr-x 2 root root 0 Feb 11 15:11 power | |
| 57 | + lrwxrwxrwx 1 root root 0 Feb 11 15:04 subsystem -> ../../../../../../class/rapidio_port | |
| 58 | + -r--r--r-- 1 root root 4096 Feb 11 15:11 sys_size | |
| 59 | + -rw-r--r-- 1 root root 4096 Feb 11 15:04 uevent | |
| @@ -21,15 +21,22 @@ KernelVersion: 2.6.36 · 20 unmodified lines | ||
| 21 | 21 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 22 | 22 | Description: |
| 23 | 23 | Reading this file returns a list of available protocols, |
| 24 | − something like: | |
| 24 | + something like:: | |
| 25 | + | |
| 25 | 26 | "rc5 [rc6] nec jvc [sony]" |
| 27 | + | |
| 26 | 28 | Enabled protocols are shown in [] brackets. |
| 29 | + | |
| 27 | 30 | Writing "+proto" will add a protocol to the list of enabled |
| 28 | 31 | protocols. |
| 32 | + | |
| 29 | 33 | Writing "-proto" will remove a protocol from the list of enabled |
| 30 | 34 | protocols. |
| 35 | + | |
| 31 | 36 | Writing "proto" will enable only "proto". |
| 37 | + | |
| 32 | 38 | Writing "none" will disable all protocols. |
| 39 | + | |
| 33 | 40 | Write fails with EINVAL if an invalid protocol combination or |
| 34 | 41 | unknown protocol name is used. |
| 35 | 42 | |
| @@ -39,11 +46,13 @@ KernelVersion: 3.15 · 3 unmodified lines | ||
| 39 | 46 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 40 | 47 | Description: |
| 41 | 48 | Sets the scancode filter expected value. |
| 49 | + | |
| 42 | 50 | Use in combination with /sys/class/rc/rcN/filter_mask to set the |
| 43 | 51 | expected value of the bits set in the filter mask. |
| 44 | 52 | If the hardware supports it then scancodes which do not match |
| 45 | 53 | the filter will be ignored. Otherwise the write will fail with |
| 46 | 54 | an error. |
| 55 | + | |
| 47 | 56 | This value may be reset to 0 if the current protocol is altered. |
| 48 | 57 | |
| 49 | 58 | What: /sys/class/rc/rcN/filter_mask |
| @@ -56,9 +65,11 @@ Description: · 6 unmodified lines | ||
| 56 | 65 | of the scancode which should be compared against the expected |
| 57 | 66 | value. A value of 0 disables the filter to allow all valid |
| 58 | 67 | scancodes to be processed. |
| 68 | + | |
| 59 | 69 | If the hardware supports it then scancodes which do not match |
| 60 | 70 | the filter will be ignored. Otherwise the write will fail with |
| 61 | 71 | an error. |
| 72 | + | |
| 62 | 73 | This value may be reset to 0 if the current protocol is altered. |
| 63 | 74 | |
| 64 | 75 | What: /sys/class/rc/rcN/wakeup_protocols |
| @@ -67,15 +78,22 @@ KernelVersion: 4.11 · 2 unmodified lines | ||
| 67 | 78 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 68 | 79 | Description: |
| 69 | 80 | Reading this file returns a list of available protocols to use |
| 70 | − for the wakeup filter, something like: | |
| 81 | + for the wakeup filter, something like:: | |
| 82 | + | |
| 71 | 83 | "rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce" |
| 84 | + | |
| 72 | 85 | Note that protocol variants are listed, so "nec", "sony", |
| 73 | 86 | "rc-5", "rc-6" have their different bit length encodings |
| 74 | 87 | listed if available. |
| 88 | + | |
| 75 | 89 | The enabled wakeup protocol is shown in [] brackets. |
| 90 | + | |
| 76 | 91 | Only one protocol can be selected at a time. |
| 92 | + | |
| 77 | 93 | Writing "proto" will use "proto" for wakeup events. |
| 94 | + | |
| 78 | 95 | Writing "none" will disable wakeup. |
| 96 | + | |
| 79 | 97 | Write fails with EINVAL if an invalid protocol combination or |
| 80 | 98 | unknown protocol name is used, or if wakeup is not supported by |
| 81 | 99 | the hardware. |
| @@ -86,13 +104,17 @@ KernelVersion: 3.15 · 4 unmodified lines | ||
| 86 | 104 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 87 | 105 | Description: |
| 88 | 106 | Sets the scancode wakeup filter expected value. |
| 107 | + | |
| 89 | 108 | Use in combination with /sys/class/rc/rcN/wakeup_filter_mask to |
| 90 | 109 | set the expected value of the bits set in the wakeup filter mask |
| 91 | 110 | to trigger a system wake event. |
| 111 | + | |
| 92 | 112 | If the hardware supports it and wakeup_filter_mask is not 0 then |
| 93 | 113 | scancodes which match the filter will wake the system from e.g. |
| 94 | 114 | suspend to RAM or power off. |
| 115 | + | |
| 95 | 116 | Otherwise the write will fail with an error. |
| 117 | + | |
| 96 | 118 | This value may be reset to 0 if the wakeup protocol is altered. |
| 97 | 119 | |
| 98 | 120 | What: /sys/class/rc/rcN/wakeup_filter_mask |
| @@ -101,11 +123,15 @@ KernelVersion: 3.15 · 2 unmodified lines | ||
| 101 | 123 | Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| 102 | 124 | Description: |
| 103 | 125 | Sets the scancode wakeup filter mask of bits to compare. |
| 126 | + | |
| 104 | 127 | Use in combination with /sys/class/rc/rcN/wakeup_filter to set |
| 105 | 128 | the bits of the scancode which should be compared against the |
| 106 | 129 | expected value to trigger a system wake event. |
| 130 | + | |
| 107 | 131 | If the hardware supports it and wakeup_filter_mask is not 0 then |
| 108 | 132 | scancodes which match the filter will wake the system from e.g. |
| 109 | 133 | suspend to RAM or power off. |
| 134 | + | |
| 110 | 135 | Otherwise the write will fail with an error. |
| 136 | + | |
| 111 | 137 | This value may be reset to 0 if the wakeup protocol is altered. |
| @@ -35,13 +35,13 @@ Description: · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | This will be one of the following strings: |
| 37 | 37 | |
| 38 | − off | |
| 39 | − on | |
| 40 | − error | |
| 41 | − fast | |
| 42 | − normal | |
| 43 | − idle | |
| 44 | − standby | |
| 38 | + - off | |
| 39 | + - on | |
| 40 | + - error | |
| 41 | + - fast | |
| 42 | + - normal | |
| 43 | + - idle | |
| 44 | + - standby | |
| 45 | 45 | |
| 46 | 46 | "off" means the regulator is not supplying power to the |
| 47 | 47 | system. |
| @@ -74,9 +74,9 @@ Description: · 26 unmodified lines | ||
| 74 | 74 | |
| 75 | 75 | This will be one of the following strings: |
| 76 | 76 | |
| 77 | − 'voltage' | |
| 78 | − 'current' | |
| 79 | − 'unknown' | |
| 77 | + - 'voltage' | |
| 78 | + - 'current' | |
| 79 | + - 'unknown' | |
| 80 | 80 | |
| 81 | 81 | 'voltage' means the regulator output voltage can be controlled |
| 82 | 82 | by software. |
| @@ -129,11 +129,11 @@ Description: · 46 unmodified lines | ||
| 129 | 129 | |
| 130 | 130 | The opmode value can be one of the following strings: |
| 131 | 131 | |
| 132 | − 'fast' | |
| 133 | − 'normal' | |
| 134 | − 'idle' | |
| 135 | − 'standby' | |
| 136 | − 'unknown' | |
| 132 | + - 'fast' | |
| 133 | + - 'normal' | |
| 134 | + - 'idle' | |
| 135 | + - 'standby' | |
| 136 | + - 'unknown' | |
| 137 | 137 | |
| 138 | 138 | The modes are described in include/linux/regulator/consumer.h |
| 139 | 139 | |
| @@ -360,9 +360,9 @@ Description: · 220 unmodified lines | ||
| 360 | 360 | |
| 361 | 361 | This will be one of the following strings: |
| 362 | 362 | |
| 363 | − 'enabled' | |
| 364 | − 'disabled' | |
| 365 | − 'unknown' | |
| 363 | + - 'enabled' | |
| 364 | + - 'disabled' | |
| 365 | + - 'unknown' | |
| 366 | 366 | |
| 367 | 367 | 'enabled' means the regulator is in bypass mode. |
| 368 | 368 | |
| @@ -16,11 +16,11 @@ Description: Remote processor state · 15 unmodified lines | ||
| 16 | 16 | |
| 17 | 17 | Reports the state of the remote processor, which will be one of: |
| 18 | 18 | |
| 19 | − "offline" | |
| 20 | − "suspended" | |
| 21 | − "running" | |
| 22 | − "crashed" | |
| 23 | − "invalid" | |
| 19 | + - "offline" | |
| 20 | + - "suspended" | |
| 21 | + - "running" | |
| 22 | + - "crashed" | |
| 23 | + - "invalid" | |
| 24 | 24 | |
| 25 | 25 | "offline" means the remote processor is powered off. |
| 26 | 26 | |
| @@ -38,8 +38,8 @@ Description: Remote processor state · 11 unmodified lines | ||
| 38 | 38 | Writing this file controls the state of the remote processor. |
| 39 | 39 | The following states can be written: |
| 40 | 40 | |
| 41 | − "start" | |
| 42 | − "stop" | |
| 41 | + - "start" | |
| 42 | + - "stop" | |
| 43 | 43 | |
| 44 | 44 | Writing "start" will attempt to start the processor running the |
| 45 | 45 | firmware indicated by, or written to, |
| @@ -5,62 +5,70 @@ Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud · 4 unmodified lines | ||
| 5 | 5 | Description: Provide information about RNBD-client. |
| 6 | 6 | All sysfs files that are not read-only provide the usage information on read: |
| 7 | 7 | |
| 8 | − Example: | |
| 9 | − # cat /sys/class/rnbd-client/ctl/map_device | |
| 8 | + Example:: | |
| 10 | 9 | |
| 11 | − > Usage: echo "sessname=<name of the rtrs session> path=<[srcaddr,]dstaddr> | |
| 12 | − > [path=<[srcaddr,]dstaddr>] device_path=<full path on remote side> | |
| 13 | − > [access_mode=<ro|rw|migration>] > map_device | |
| 14 | − > | |
| 15 | − > addr ::= [ ip:<ipv4> | ip:<ipv6> | gid:<gid> ] | |
| 10 | + # cat /sys/class/rnbd-client/ctl/map_device | |
| 11 | + | |
| 12 | + > Usage: echo "sessname=<name of the rtrs session> path=<[srcaddr,]dstaddr> | |
| 13 | + > [path=<[srcaddr,]dstaddr>] device_path=<full path on remote side> | |
| 14 | + > [access_mode=<ro|rw|migration>] > map_device | |
| 15 | + > | |
| 16 | + > addr ::= [ ip:<ipv4> | ip:<ipv6> | gid:<gid> ] | |
| 16 | 17 | |
| 17 | 18 | What: /sys/class/rnbd-client/ctl/map_device |
| 18 | 19 | Date: Feb 2020 |
| 19 | 20 | KernelVersion: 5.7 |
| 20 | 21 | Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com> |
| 21 | −Description: Expected format is the following: | |
| 22 | +Description: Expected format is the following:: | |
| 22 | 23 | |
| 23 | − sessname=<name of the rtrs session> | |
| 24 | − path=<[srcaddr,]dstaddr> [path=<[srcaddr,]dstaddr> ...] | |
| 25 | − device_path=<full path on remote side> | |
| 26 | − [access_mode=<ro|rw|migration>] | |
| 24 | + sessname=<name of the rtrs session> | |
| 25 | + path=<[srcaddr,]dstaddr> [path=<[srcaddr,]dstaddr> ...] | |
| 26 | + device_path=<full path on remote side> | |
| 27 | + [access_mode=<ro|rw|migration>] | |
| 27 | 28 | |
| 28 | 29 | Where: |
| 29 | 30 | |
| 30 | − sessname: accepts a string not bigger than 256 chars, which identifies | |
| 31 | − a given session on the client and on the server. | |
| 32 | − I.e. "clt_hostname-srv_hostname" could be a natural choice. | |
| 31 | + sessname: | |
| 32 | + accepts a string not bigger than 256 chars, which identifies | |
| 33 | + a given session on the client and on the server. | |
| 34 | + I.e. "clt_hostname-srv_hostname" could be a natural choice. | |
| 35 | + | |
| 36 | + path: | |
| 37 | + describes a connection between the client and the server by | |
| 38 | + specifying destination and, when required, the source address. | |
| 39 | + The addresses are to be provided in the following format:: | |
| 33 | 40 | |
| 34 | − path: describes a connection between the client and the server by | |
| 35 | − specifying destination and, when required, the source address. | |
| 36 | − The addresses are to be provided in the following format: | |
| 41 | + ip:<IPv6> | |
| 42 | + ip:<IPv4> | |
| 43 | + gid:<GID> | |
| 37 | 44 | |
| 38 | − ip:<IPv6> | |
| 39 | − ip:<IPv4> | |
| 40 | − gid:<GID> | |
| 45 | + for example:: | |
| 41 | 46 | |
| 42 | − for example: | |
| 47 | + path=ip:10.0.0.66 | |
| 43 | 48 | |
| 44 | − path=ip:10.0.0.66 | |
| 45 | 49 | The single addr is treated as the destination. |
| 46 | 50 | The connection will be established to this server from any client IP address. |
| 47 | 51 | |
| 48 | − path=ip:10.0.0.66,ip:10.0.1.66 | |
| 52 | + :: | |
| 53 | + | |
| 54 | + path=ip:10.0.0.66,ip:10.0.1.66 | |
| 55 | + | |
| 49 | 56 | First addr is the source address and the second is the destination. |
| 50 | 57 | |
| 51 | 58 | If multiple "path=" options are specified multiple connection |
| 52 | 59 | will be established and data will be sent according to |
| 53 | 60 | the selected multipath policy (see RTRS mp_policy sysfs entry description). |
| 54 | 61 | |
| 55 | − device_path: Path to the block device on the server side. Path is specified | |
| 56 | − relative to the directory on server side configured in the | |
| 57 | − 'dev_search_path' module parameter of the rnbd_server. | |
| 58 | − The rnbd_server prepends the <device_path> received from client | |
| 59 | − with <dev_search_path> and tries to open the | |
| 60 | − <dev_search_path>/<device_path> block device. On success, | |
| 61 | − a /dev/rnbd<N> device file, a /sys/block/rnbd_client/rnbd<N>/ | |
| 62 | − directory and an entry in /sys/class/rnbd-client/ctl/devices | |
| 63 | − will be created. | |
| 62 | + device_path: | |
| 63 | + Path to the block device on the server side. Path is specified | |
| 64 | + relative to the directory on server side configured in the | |
| 65 | + 'dev_search_path' module parameter of the rnbd_server. | |
| 66 | + The rnbd_server prepends the <device_path> received from client | |
| 67 | + with <dev_search_path> and tries to open the | |
| 68 | + <dev_search_path>/<device_path> block device. On success, | |
| 69 | + a /dev/rnbd<N> device file, a /sys/block/rnbd_client/rnbd<N>/ | |
| 70 | + directory and an entry in /sys/class/rnbd-client/ctl/devices | |
| 71 | + will be created. | |
| 64 | 72 | |
| 65 | 73 | If 'dev_search_path' contains '%SESSNAME%', then each session can |
| 66 | 74 | have different devices namespace, e.g. server was configured with |
| @@ -68,11 +76,12 @@ Description: Expected format is the following: · 1 unmodified line | ||
| 68 | 76 | client has this string "sessname=blya device_path=sda", then server |
| 69 | 77 | will try to open: /run/rnbd-devs/blya/sda. |
| 70 | 78 | |
| 71 | − access_mode: the access_mode parameter specifies if the device is to be | |
| 72 | − mapped as "ro" read-only or "rw" read-write. The server allows | |
| 73 | − a device to be exported in rw mode only once. The "migration" | |
| 74 | − access mode has to be specified if a second mapping in read-write | |
| 75 | − mode is desired. | |
| 79 | + access_mode: | |
| 80 | + the access_mode parameter specifies if the device is to be | |
| 81 | + mapped as "ro" read-only or "rw" read-write. The server allows | |
| 82 | + a device to be exported in rw mode only once. The "migration" | |
| 83 | + access mode has to be specified if a second mapping in read-write | |
| 84 | + mode is desired. | |
| 76 | 85 | |
| 77 | 86 | By default "rw" is used. |
| 78 | 87 | |
| @@ -91,7 +100,7 @@ Description: Expected format is the following: · 12 unmodified lines | ||
| 91 | 100 | is the same as the device name. By extracting the last part of the |
| 92 | 101 | path the path to the device /dev/<dev-name> can be build. |
| 93 | 102 | |
| 94 | − o /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>/dev) | |
| 103 | + * /dev/block/$(cat /sys/class/rnbd-client/ctl/devices/<device_id>/dev) | |
| 95 | 104 | |
| 96 | 105 | How to find the <device_id> of the device is described on the next |
| 97 | 106 | section. |
| @@ -106,6 +115,6 @@ Description: For each device mapped on the client a new symbolic link is created · 8 unmodified lines | ||
| 106 | 115 | The <device_id> of each device is created as follows: |
| 107 | 116 | |
| 108 | 117 | - If the 'device_path' provided during mapping contains slashes ("/"), |
| 109 | − they are replaced by exclamation mark ("!") and used as as the | |
| 110 | − <device_id>. Otherwise, the <device_id> will be the same as the | |
| 111 | − "device_path" provided. | |
| 118 | + they are replaced by exclamation mark ("!") and used as as the | |
| 119 | + <device_id>. Otherwise, the <device_id> will be the same as the | |
| 120 | + "device_path" provided. | |
| @@ -7,6 +7,7 @@ Description: Attribute for calibrating ST-Ericsson AB8500 Real Time Clock · 6 unmodified lines | ||
| 7 | 7 | calibrate the AB8500.s 32KHz Real Time Clock. |
| 8 | 8 | Every 60 seconds the AB8500 will correct the RTC's value |
| 9 | 9 | by adding to it the value of this attribute. |
| 10 | + | |
| 10 | 11 | The range of the attribute is -127 to +127 in units of |
| 11 | 12 | 30.5 micro-seconds (half-parts-per-million of the 32KHz clock) |
| 12 | 13 | Users: The /vendor/st-ericsson/base_utilities/core/rtc_calibration |
| @@ -10,10 +10,10 @@ Date: Feb 2020 · 9 unmodified lines | ||
| 10 | 10 | KernelVersion: 5.7 |
| 11 | 11 | Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com> |
| 12 | 12 | Description: RW, adds a new path (connection) to an existing session. Expected format is the |
| 13 | − following: | |
| 13 | + following:: | |
| 14 | 14 | |
| 15 | − <[source addr,]destination addr> | |
| 16 | − *addr ::= [ ip:<ipv4|ipv6> | gid:<gid> ] | |
| 15 | + <[source addr,]destination addr> | |
| 16 | + *addr ::= [ ip:<ipv4|ipv6> | gid:<gid> ] | |
| 17 | 17 | |
| 18 | 18 | What: /sys/class/rtrs-client/<session-name>/max_reconnect_attempts |
| 19 | 19 | Date: Feb 2020 |
| @@ -29,10 +29,10 @@ Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud · 9 unmodified lines | ||
| 29 | 29 | Description: Multipath policy specifies which path should be selected on each IO: |
| 30 | 30 | |
| 31 | 31 | round-robin (0): |
| 32 | − select path in per CPU round-robin manner. | |
| 32 | + select path in per CPU round-robin manner. | |
| 33 | 33 | |
| 34 | 34 | min-inflight (1): |
| 35 | − select path with minimum inflights. | |
| 35 | + select path with minimum inflights. | |
| 36 | 36 | |
| 37 | 37 | What: /sys/class/rtrs-client/<session-name>/paths/ |
| 38 | 38 | Date: Feb 2020 |
| @@ -109,8 +109,11 @@ Description: RTRS expects that each HCA IRQ is pinned to a separate CPU. If it's · 70 unmodified lines | ||
| 109 | 109 | not the case, the processing of an I/O response could be processed on a |
| 110 | 110 | different CPU than where it was originally submitted. This file shows |
| 111 | 111 | how many interrupts where generated on a non expected CPU. |
| 112 | − "from:" is the CPU on which the IRQ was expected, but not generated. | |
| 113 | − "to:" is the CPU on which the IRQ was generated, but not expected. | |
| 112 | + | |
| 113 | + "from:" | |
| 114 | + is the CPU on which the IRQ was expected, but not generated. | |
| 115 | + "to:" | |
| 116 | + is the CPU on which the IRQ was generated, but not expected. | |
| 114 | 117 | |
| 115 | 118 | What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reconnects |
| 116 | 119 | Date: Feb 2020 |
| @@ -125,7 +128,7 @@ Date: Feb 2020 · 8 unmodified lines | ||
| 125 | 128 | KernelVersion: 5.7 |
| 126 | 129 | Contact: Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com> |
| 127 | 130 | Description: Contains statistics regarding rdma operations and inflight operations. |
| 128 | − The output consists of 6 values: | |
| 131 | + The output consists of 6 values:: | |
| 129 | 132 | |
| 130 | − <read-count> <read-total-size> <write-count> <write-total-size> \ | |
| 131 | − <inflights> <failovered> | |
| 133 | + <read-count> <read-total-size> <write-count> \ | |
| 134 | + <write-total-size> <inflights> <failovered> | |
| @@ -56,8 +56,9 @@ Description: · 55 unmodified lines | ||
| 56 | 56 | management) on top, which makes it match the Windows IRST (Intel |
| 57 | 57 | Rapid Storage Technology) driver settings. This setting is also |
| 58 | 58 | close to min_power, except that: |
| 59 | + | |
| 59 | 60 | a) It does not use host-initiated slumber mode, but it does |
| 60 | − allow device-initiated slumber | |
| 61 | + allow device-initiated slumber | |
| 61 | 62 | b) It does not enable low power device sleep mode (DevSlp). |
| 62 | 63 | |
| 63 | 64 | What: /sys/class/scsi_host/hostX/em_message |
| @@ -70,8 +71,8 @@ Description: · 6 unmodified lines | ||
| 70 | 71 | protocol, writes and reads correspond to the LED message format |
| 71 | 72 | as defined in the AHCI spec. |
| 72 | 73 | |
| 73 | − The user must turn sw_activity (under /sys/block/*/device/) OFF | |
| 74 | − it they wish to control the activity LED via the em_message | |
| 74 | + The user must turn sw_activity (under `/sys/block/*/device/`) | |
| 75 | + OFF it they wish to control the activity LED via the em_message | |
| 75 | 76 | file. |
| 76 | 77 | |
| 77 | 78 | em_message_type: (RO) Displays the current enclosure management |
| @@ -40,10 +40,13 @@ Description: · 39 unmodified lines | ||
| 40 | 40 | attribute will not return until the operation has finished. |
| 41 | 41 | |
| 42 | 42 | Valid values: |
| 43 | − - source (The port will behave as source only DFP port) | |
| 44 | − - sink (The port will behave as sink only UFP port) | |
| 45 | − - dual (The port will behave as dual-role-data and | |
| 43 | + | |
| 44 | + ====== ============================================== | |
| 45 | + source (The port will behave as source only DFP port) | |
| 46 | + sink (The port will behave as sink only UFP port) | |
| 47 | + dual (The port will behave as dual-role-data and | |
| 46 | 48 | dual-role-power port) |
| 49 | + ====== ============================================== | |
| 47 | 50 | |
| 48 | 51 | What: /sys/class/typec/<port>/vconn_source |
| 49 | 52 | Date: April 2017 |
| @@ -59,6 +62,7 @@ Description: · 9 unmodified lines | ||
| 59 | 62 | generates uevent KOBJ_CHANGE. |
| 60 | 63 | |
| 61 | 64 | Valid values: |
| 65 | + | |
| 62 | 66 | - "no" when the port is not the VCONN Source |
| 63 | 67 | - "yes" when the port is the VCONN Source |
| 64 | 68 | |
| @@ -72,6 +76,7 @@ Description: · 7 unmodified lines | ||
| 72 | 76 | power operation mode should show "usb_power_delivery". |
| 73 | 77 | |
| 74 | 78 | Valid values: |
| 79 | + | |
| 75 | 80 | - default |
| 76 | 81 | - 1.5A |
| 77 | 82 | - 3.0A |
| @@ -191,6 +196,7 @@ Date: April 2017 · 113 unmodified lines | ||
| 191 | 196 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
| 192 | 197 | Description: |
| 193 | 198 | Shows type of the plug on the cable: |
| 199 | + | |
| 194 | 200 | - type-a - Standard A |
| 195 | 201 | - type-b - Standard B |
| 196 | 202 | - type-c |
| @@ -66,11 +66,14 @@ Description: · 65 unmodified lines | ||
| 66 | 66 | <channel> <type> [<bpst offset>] |
| 67 | 67 | |
| 68 | 68 | to start (or stop) scanning on a channel. <type> is one of: |
| 69 | − 0 - scan | |
| 70 | − 1 - scan outside BP | |
| 71 | − 2 - scan while inactive | |
| 72 | − 3 - scanning disabled | |
| 73 | − 4 - scan (with start time of <bpst offset>) | |
| 69 | + | |
| 70 | + == ======================================= | |
| 71 | + 0 scan | |
| 72 | + 1 scan outside BP | |
| 73 | + 2 scan while inactive | |
| 74 | + 3 scanning disabled | |
| 75 | + 4 scan (with start time of <bpst offset>) | |
| 76 | + == ======================================= | |
| 74 | 77 | |
| 75 | 78 | What: /sys/class/uwb_rc/uwbN/mac_address |
| 76 | 79 | Date: July 2008 |
| @@ -91,10 +91,13 @@ Description: · 90 unmodified lines | ||
| 91 | 91 | h/w strapping (for WDT2 only). |
| 92 | 92 | |
| 93 | 93 | At alternate flash the 'access_cs0' sysfs node provides: |
| 94 | − ast2400: a way to get access to the primary SPI flash | |
| 94 | + | |
| 95 | + ast2400: | |
| 96 | + a way to get access to the primary SPI flash | |
| 95 | 97 | chip at CS0 after booting from the alternate |
| 96 | 98 | chip at CS1. |
| 97 | − ast2500: a way to restore the normal address mapping | |
| 99 | + ast2500: | |
| 100 | + a way to restore the normal address mapping | |
| 98 | 101 | from (CS0->CS1, CS1->CS0) to (CS0->CS0, |
| 99 | 102 | CS1->CS1). |
| 100 | 103 | |
| @@ -9,9 +9,10 @@ Description: The /sys/dev tree provides a method to look up the sysfs · 8 unmodified lines | ||
| 9 | 9 | the form "<major>:<minor>". These links point to the |
| 10 | 10 | corresponding sysfs path for the given device. |
| 11 | 11 | |
| 12 | − Example: | |
| 13 | − $ readlink /sys/dev/block/8:32 | |
| 14 | − ../../block/sdc | |
| 12 | + Example:: | |
| 13 | + | |
| 14 | + $ readlink /sys/dev/block/8:32 | |
| 15 | + ../../block/sdc | |
| 15 | 16 | |
| 16 | 17 | Entries in /sys/dev/char and /sys/dev/block will be |
| 17 | 18 | dynamically created and destroyed as devices enter and |
| @@ -8,26 +8,27 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | block. |
| 9 | 9 | For example, on 4-die Xeon platform with up to 6 IIO stacks per |
| 10 | 10 | die and, therefore, 6 IIO PMON blocks per die, the mapping of |
| 11 | − IIO PMON block 0 exposes as the following: | |
| 11 | + IIO PMON block 0 exposes as the following:: | |
| 12 | 12 | |
| 13 | − $ ls /sys/devices/uncore_iio_0/die* | |
| 14 | − -r--r--r-- /sys/devices/uncore_iio_0/die0 | |
| 15 | − -r--r--r-- /sys/devices/uncore_iio_0/die1 | |
| 16 | − -r--r--r-- /sys/devices/uncore_iio_0/die2 | |
| 17 | − -r--r--r-- /sys/devices/uncore_iio_0/die3 | |
| 13 | + $ ls /sys/devices/uncore_iio_0/die* | |
| 14 | + -r--r--r-- /sys/devices/uncore_iio_0/die0 | |
| 15 | + -r--r--r-- /sys/devices/uncore_iio_0/die1 | |
| 16 | + -r--r--r-- /sys/devices/uncore_iio_0/die2 | |
| 17 | + -r--r--r-- /sys/devices/uncore_iio_0/die3 | |
| 18 | 18 | |
| 19 | − $ tail /sys/devices/uncore_iio_0/die* | |
| 20 | − ==> /sys/devices/uncore_iio_0/die0 <== | |
| 21 | − 0000:00 | |
| 22 | − ==> /sys/devices/uncore_iio_0/die1 <== | |
| 23 | − 0000:40 | |
| 24 | − ==> /sys/devices/uncore_iio_0/die2 <== | |
| 25 | − 0000:80 | |
| 26 | − ==> /sys/devices/uncore_iio_0/die3 <== | |
| 27 | − 0000:c0 | |
| 19 | + $ tail /sys/devices/uncore_iio_0/die* | |
| 20 | + ==> /sys/devices/uncore_iio_0/die0 <== | |
| 21 | + 0000:00 | |
| 22 | + ==> /sys/devices/uncore_iio_0/die1 <== | |
| 23 | + 0000:40 | |
| 24 | + ==> /sys/devices/uncore_iio_0/die2 <== | |
| 25 | + 0000:80 | |
| 26 | + ==> /sys/devices/uncore_iio_0/die3 <== | |
| 27 | + 0000:c0 | |
| 28 | 28 | |
| 29 | − Which means: | |
| 30 | − IIO PMU 0 on die 0 belongs to PCI RP on bus 0x00, domain 0x0000 | |
| 31 | − IIO PMU 0 on die 1 belongs to PCI RP on bus 0x40, domain 0x0000 | |
| 32 | − IIO PMU 0 on die 2 belongs to PCI RP on bus 0x80, domain 0x0000 | |
| 33 | − IIO PMU 0 on die 3 belongs to PCI RP on bus 0xc0, domain 0x0000 | |
| 29 | + Which means:: | |
| 30 | + | |
| 31 | + IIO PMU 0 on die 0 belongs to PCI RP on bus 0x00, domain 0x0000 | |
| 32 | + IIO PMU 0 on die 1 belongs to PCI RP on bus 0x40, domain 0x0000 | |
| 33 | + IIO PMU 0 on die 2 belongs to PCI RP on bus 0x80, domain 0x0000 | |
| 34 | + IIO PMU 0 on die 3 belongs to PCI RP on bus 0xc0, domain 0x0000 | |
| @@ -47,16 +47,19 @@ Description: · 46 unmodified lines | ||
| 47 | 47 | online/offline state of the memory section. When written, |
| 48 | 48 | root can toggle the the online/offline state of a removable |
| 49 | 49 | memory section (see removable file description above) |
| 50 | − using the following commands. | |
| 51 | − # echo online > /sys/devices/system/memory/memoryX/state | |
| 52 | − # echo offline > /sys/devices/system/memory/memoryX/state | |
| 50 | + using the following commands:: | |
| 51 | + | |
| 52 | + # echo online > /sys/devices/system/memory/memoryX/state | |
| 53 | + # echo offline > /sys/devices/system/memory/memoryX/state | |
| 53 | 54 | |
| 54 | 55 | For example, if /sys/devices/system/memory/memory22/removable |
| 55 | 56 | contains a value of 1 and |
| 56 | 57 | /sys/devices/system/memory/memory22/state contains the |
| 57 | 58 | string "online" the following command can be executed by |
| 58 | − by root to offline that section. | |
| 59 | − # echo offline > /sys/devices/system/memory/memory22/state | |
| 59 | + by root to offline that section:: | |
| 60 | + | |
| 61 | + # echo offline > /sys/devices/system/memory/memory22/state | |
| 62 | + | |
| 60 | 63 | Users: hotplug memory remove tools |
| 61 | 64 | http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils |
| 62 | 65 | |
| @@ -78,6 +81,7 @@ Description: · 15 unmodified lines | ||
| 78 | 81 | |
| 79 | 82 | For example, the following symbolic link is created for |
| 80 | 83 | memory section 9 on node0: |
| 84 | + | |
| 81 | 85 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 |
| 82 | 86 | |
| 83 | 87 | |
| @@ -90,4 +94,5 @@ Description: · 6 unmodified lines | ||
| 90 | 94 | points to the corresponding /sys/devices/system/memory/memoryY |
| 91 | 95 | memory section directory. For example, the following symbolic |
| 92 | 96 | link is created for memory section 9 on node0. |
| 97 | + | |
| 93 | 98 | /sys/devices/system/node/node0/memory9 -> ../../memory/memory9 |
| @@ -7,6 +7,7 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | (RO) Hexadecimal bitmask of the TAD attributes are reported by |
| 8 | 8 | the platform firmware (see ACPI 6.2, section 9.18.2): |
| 9 | 9 | |
| 10 | + ======= ====================================================== | |
| 10 | 11 | BIT(0): AC wakeup implemented if set |
| 11 | 12 | BIT(1): DC wakeup implemented if set |
| 12 | 13 | BIT(2): Get/set real time features implemented if set |
| @@ -16,6 +17,7 @@ Description: · 3 unmodified lines | ||
| 16 | 17 | BIT(6): The AC timer wakes up from S5 if set |
| 17 | 18 | BIT(7): The DC timer wakes up from S4 if set |
| 18 | 19 | BIT(8): The DC timer wakes up from S5 if set |
| 20 | + ======= ====================================================== | |
| 19 | 21 | |
| 20 | 22 | The other bits are reserved. |
| 21 | 23 | |
| @@ -62,9 +64,11 @@ Description: · 40 unmodified lines | ||
| 62 | 64 | timer status with the following meaning of bits (see ACPI 6.2, |
| 63 | 65 | Section 9.18.5): |
| 64 | 66 | |
| 67 | + ======= ====================================================== | |
| 65 | 68 | Bit(0): The timer has expired if set. |
| 66 | 69 | Bit(1): The timer has woken up the system from a sleep state |
| 67 | 70 | (S3 or S4/S5 if supported) if set. |
| 71 | + ======= ====================================================== | |
| 68 | 72 | |
| 69 | 73 | The other bits are reserved. |
| 70 | 74 | |
| @@ -3,8 +3,9 @@ Date: April 2010 · 2 unmodified lines | ||
| 3 | 3 | Contact: Fabien Chouteau <fabien.chouteau@barco.com> |
| 4 | 4 | Description: |
| 5 | 5 | Show the suspend state of an USB composite gadget. |
| 6 | − 1 -> suspended | |
| 7 | − 0 -> resumed | |
| 6 | + | |
| 7 | + - 1 -> suspended | |
| 8 | + - 0 -> resumed | |
| 8 | 9 | |
| 9 | 10 | (_UDC_ is the name of the USB Device Controller driver) |
| 10 | 11 | |
| @@ -17,5 +18,6 @@ Description: · 6 unmodified lines | ||
| 17 | 18 | Storage mode. |
| 18 | 19 | |
| 19 | 20 | Possible values are: |
| 20 | − 1 -> ignore the FUA flag | |
| 21 | − 0 -> obey the FUA flag | |
| 21 | + | |
| 22 | + - 1 -> ignore the FUA flag | |
| 23 | + - 0 -> obey the FUA flag | |
| @@ -9,8 +9,10 @@ Description: · 8 unmodified lines | ||
| 9 | 9 | The protection has information embedded whether it blocks reads, |
| 10 | 10 | writes or both. |
| 11 | 11 | The result is: |
| 12 | − 0 -> the DPS is not keylocked | |
| 13 | − 1 -> the DPS is keylocked | |
| 12 | + | |
| 13 | + - 0 -> the DPS is not keylocked | |
| 14 | + - 1 -> the DPS is keylocked | |
| 15 | + | |
| 14 | 16 | Users: None identified so far. |
| 15 | 17 | |
| 16 | 18 | What: /sys/devices/platform/docg3/f[0-3]_dps[01]_protection_key |
| @@ -27,8 +29,12 @@ Description: · 10 unmodified lines | ||
| 27 | 29 | Entering the correct value toggle the lock, and can be observed |
| 28 | 30 | through f[0-3]_dps[01]_is_keylocked. |
| 29 | 31 | Possible values are: |
| 32 | + | |
| 30 | 33 | - 8 bytes |
| 34 | + | |
| 31 | 35 | Typical values are: |
| 36 | + | |
| 32 | 37 | - "00000000" |
| 33 | 38 | - "12345678" |
| 39 | + | |
| 34 | 40 | Users: None identified so far. |
| @@ -123,38 +123,40 @@ KernelVersion: v4.15 · 122 unmodified lines | ||
| 123 | 123 | Contact: openipmi-developer@lists.sourceforge.net |
| 124 | 124 | Description: |
| 125 | 125 | |
| 126 | − idles: (RO) Number of times the interface was | |
| 126 | + ====================== ======================================== | |
| 127 | + idles (RO) Number of times the interface was | |
| 127 | 128 | idle while being polled. |
| 128 | 129 | |
| 129 | − watchdog_pretimeouts: (RO) Number of watchdog pretimeouts. | |
| 130 | + watchdog_pretimeouts (RO) Number of watchdog pretimeouts. | |
| 130 | 131 | |
| 131 | − complete_transactions: (RO) Number of completed messages. | |
| 132 | + complete_transactions (RO) Number of completed messages. | |
| 132 | 133 | |
| 133 | − events: (RO) Number of IPMI events received from | |
| 134 | + events (RO) Number of IPMI events received from | |
| 134 | 135 | the hardware. |
| 135 | 136 | |
| 136 | − interrupts: (RO) Number of interrupts the driver | |
| 137 | + interrupts (RO) Number of interrupts the driver | |
| 137 | 138 | handled. |
| 138 | 139 | |
| 139 | − hosed_count: (RO) Number of times the hardware didn't | |
| 140 | + hosed_count (RO) Number of times the hardware didn't | |
| 140 | 141 | follow the state machine. |
| 141 | 142 | |
| 142 | − long_timeouts: (RO) Number of times the driver | |
| 143 | + long_timeouts (RO) Number of times the driver | |
| 143 | 144 | requested a timer while nothing was in |
| 144 | 145 | progress. |
| 145 | 146 | |
| 146 | − flag_fetches: (RO) Number of times the driver | |
| 147 | + flag_fetches (RO) Number of times the driver | |
| 147 | 148 | requested flags from the hardware. |
| 148 | 149 | |
| 149 | − attentions: (RO) Number of time the driver got an | |
| 150 | + attentions (RO) Number of time the driver got an | |
| 150 | 151 | ATTN from the hardware. |
| 151 | 152 | |
| 152 | − incoming_messages: (RO) Number of asynchronous messages | |
| 153 | + incoming_messages (RO) Number of asynchronous messages | |
| 153 | 154 | received. |
| 154 | 155 | |
| 155 | − short_timeouts: (RO) Number of times the driver | |
| 156 | + short_timeouts (RO) Number of times the driver | |
| 156 | 157 | requested a timer while an operation was |
| 157 | 158 | in progress. |
| 159 | + ====================== ======================================== | |
| 158 | 160 | |
| 159 | 161 | |
| 160 | 162 | What: /sys/devices/platform/ipmi_si.*/interrupts_enabled |
| @@ -201,38 +203,40 @@ Date: Sep, 2017 · 40 unmodified lines | ||
| 201 | 203 | KernelVersion: v4.15 |
| 202 | 204 | Contact: openipmi-developer@lists.sourceforge.net |
| 203 | 205 | Description: |
| 204 | − hosed: (RO) Number of times the hardware didn't | |
| 206 | + ====================== ======================================== | |
| 207 | + hosed (RO) Number of times the hardware didn't | |
| 205 | 208 | follow the state machine. |
| 206 | 209 | |
| 207 | − alerts: (RO) Number of alerts received. | |
| 210 | + alerts (RO) Number of alerts received. | |
| 208 | 211 | |
| 209 | − sent_messages: (RO) Number of total messages sent. | |
| 212 | + sent_messages (RO) Number of total messages sent. | |
| 210 | 213 | |
| 211 | − sent_message_parts: (RO) Number of message parts sent. | |
| 214 | + sent_message_parts (RO) Number of message parts sent. | |
| 212 | 215 | Messages may be broken into parts if |
| 213 | 216 | they are long. |
| 214 | 217 | |
| 215 | − received_messages: (RO) Number of message responses | |
| 218 | + received_messages (RO) Number of message responses | |
| 216 | 219 | received. |
| 217 | 220 | |
| 218 | − received_message_parts: (RO) Number of message fragments | |
| 221 | + received_message_parts (RO) Number of message fragments | |
| 219 | 222 | received. |
| 220 | 223 | |
| 221 | − events: (RO) Number of received events. | |
| 224 | + events (RO) Number of received events. | |
| 222 | 225 | |
| 223 | − watchdog_pretimeouts: (RO) Number of watchdog pretimeouts. | |
| 226 | + watchdog_pretimeouts (RO) Number of watchdog pretimeouts. | |
| 224 | 227 | |
| 225 | − flag_fetches: (RO) Number of times a flag fetch was | |
| 228 | + flag_fetches (RO) Number of times a flag fetch was | |
| 226 | 229 | requested. |
| 227 | 230 | |
| 228 | − send_retries: (RO) Number of time a message was | |
| 231 | + send_retries (RO) Number of time a message was | |
| 229 | 232 | retried. |
| 230 | 233 | |
| 231 | − receive_retries: (RO) Number of times the receive of a | |
| 234 | + receive_retries (RO) Number of times the receive of a | |
| 232 | 235 | message was retried. |
| 233 | 236 | |
| 234 | − send_errors: (RO) Number of times the send of a | |
| 237 | + send_errors (RO) Number of times the send of a | |
| 235 | 238 | message failed. |
| 236 | 239 | |
| 237 | − receive_errors: (RO) Number of errors in receiving | |
| 240 | + receive_errors (RO) Number of errors in receiving | |
| 238 | 241 | messages. |
| 242 | + ====================== ======================================== | |
| @@ -17,10 +17,10 @@ Description: · 16 unmodified lines | ||
| 17 | 17 | to overlay planes. |
| 18 | 18 | |
| 19 | 19 | Selects the composition mode for the overlay. Possible values |
| 20 | − are | |
| 20 | + are: | |
| 21 | 21 | |
| 22 | − 0 - Alpha Blending | |
| 23 | − 1 - ROP3 | |
| 22 | + - 0 - Alpha Blending | |
| 23 | + - 1 - ROP3 | |
| 24 | 24 | |
| 25 | 25 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_position |
| 26 | 26 | Date: May 2012 |
| @@ -30,7 +30,7 @@ Description: · 3 unmodified lines | ||
| 30 | 30 | to overlay planes. |
| 31 | 31 | |
| 32 | 32 | Stores the x,y overlay position on the display in pixels. The |
| 33 | − position format is `[0-9]+,[0-9]+'. | |
| 33 | + position format is `[0-9]+,[0-9]+`. | |
| 34 | 34 | |
| 35 | 35 | What: /sys/devices/platform/sh_mobile_lcdc_fb.[0-3]/graphics/fb[0-9]/ovl_rop3 |
| 36 | 36 | Date: May 2012 |
| @@ -102,6 +102,8 @@ Description: · 101 unmodified lines | ||
| 102 | 102 | b[15:0] |
| 103 | 103 | inform firmware the current software execution |
| 104 | 104 | stage. |
| 105 | + | |
| 106 | + == =========================================== | |
| 105 | 107 | 0 the first stage bootloader didn't run or |
| 106 | 108 | didn't reach the point of launching second |
| 107 | 109 | stage bootloader. |
| @@ -111,21 +113,29 @@ Description: · 3 unmodified lines | ||
| 111 | 113 | 2 both first and second stage bootloader ran |
| 112 | 114 | and the operating system launch was |
| 113 | 115 | attempted. |
| 116 | + == =========================================== | |
| 114 | 117 | |
| 115 | 118 | b[16] |
| 119 | + == =========================================== | |
| 116 | 120 | 1 firmware to reset current image retry |
| 117 | 121 | counter. |
| 118 | 122 | 0 no action. |
| 123 | + == =========================================== | |
| 119 | 124 | |
| 120 | 125 | b[17] |
| 126 | + == =========================================== | |
| 121 | 127 | 1 firmware to clear RSU log |
| 122 | 128 | 0 no action. |
| 129 | + == =========================================== | |
| 123 | 130 | |
| 124 | 131 | b[18] |
| 125 | 132 | this is negative logic |
| 133 | + | |
| 134 | + == =========================================== | |
| 126 | 135 | 1 no action |
| 127 | 136 | 0 firmware record the notify code defined |
| 128 | 137 | in b[15:0]. |
| 138 | + == =========================================== | |
| 129 | 139 | |
| 130 | 140 | What: /sys/devices/platform/stratix10-rsu.0/dcmf0 |
| 131 | 141 | Date: June 2020 |
| @@ -151,23 +151,28 @@ Description: · 150 unmodified lines | ||
| 151 | 151 | The processor idle states which are available for use have the |
| 152 | 152 | following attributes: |
| 153 | 153 | |
| 154 | − name: (RO) Name of the idle state (string). | |
| 154 | + ======== ==== ================================================= | |
| 155 | + name: (RO) Name of the idle state (string). | |
| 155 | 156 | |
| 156 | 157 | latency: (RO) The latency to exit out of this idle state (in |
| 157 | − microseconds). | |
| 158 | + microseconds). | |
| 158 | 159 | |
| 159 | − power: (RO) The power consumed while in this idle state (in | |
| 160 | − milliwatts). | |
| 160 | + power: (RO) The power consumed while in this idle state (in | |
| 161 | + milliwatts). | |
| 161 | 162 | |
| 162 | − time: (RO) The total time spent in this idle state (in microseconds). | |
| 163 | + time: (RO) The total time spent in this idle state | |
| 164 | + (in microseconds). | |
| 163 | 165 | |
| 164 | − usage: (RO) Number of times this state was entered (a count). | |
| 166 | + usage: (RO) Number of times this state was entered (a count). | |
| 165 | 167 | |
| 166 | − above: (RO) Number of times this state was entered, but the | |
| 167 | − observed CPU idle duration was too short for it (a count). | |
| 168 | + above: (RO) Number of times this state was entered, but the | |
| 169 | + observed CPU idle duration was too short for it | |
| 170 | + (a count). | |
| 168 | 171 | |
| 169 | − below: (RO) Number of times this state was entered, but the | |
| 170 | − observed CPU idle duration was too long for it (a count). | |
| 172 | + below: (RO) Number of times this state was entered, but the | |
| 173 | + observed CPU idle duration was too long for it | |
| 174 | + (a count). | |
| 175 | + ======== ==== ================================================= | |
| 171 | 176 | |
| 172 | 177 | What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc |
| 173 | 178 | Date: February 2008 |
| @@ -290,6 +295,7 @@ Description: Processor frequency boosting control · 116 unmodified lines | ||
| 290 | 295 | This switch controls the boost setting for the whole system. |
| 291 | 296 | Boosting allows the CPU and the firmware to run at a frequency |
| 292 | 297 | beyound it's nominal limit. |
| 298 | + | |
| 293 | 299 | More details can be found in |
| 294 | 300 | Documentation/admin-guide/pm/cpufreq.rst |
| 295 | 301 | |
| @@ -337,43 +343,57 @@ Contact: Sudeep Holla <sudeep.holla@arm.com> · 41 unmodified lines | ||
| 337 | 343 | Description: Parameters for the CPU cache attributes |
| 338 | 344 | |
| 339 | 345 | allocation_policy: |
| 340 | − - WriteAllocate: allocate a memory location to a cache line | |
| 341 | − on a cache miss because of a write | |
| 342 | − - ReadAllocate: allocate a memory location to a cache line | |
| 346 | + - WriteAllocate: | |
| 347 | + allocate a memory location to a cache line | |
| 348 | + on a cache miss because of a write | |
| 349 | + - ReadAllocate: | |
| 350 | + allocate a memory location to a cache line | |
| 343 | 351 | on a cache miss because of a read |
| 344 | − - ReadWriteAllocate: both writeallocate and readallocate | |
| 352 | + - ReadWriteAllocate: | |
| 353 | + both writeallocate and readallocate | |
| 345 | 354 | |
| 346 | − attributes: LEGACY used only on IA64 and is same as write_policy | |
| 355 | + attributes: | |
| 356 | + LEGACY used only on IA64 and is same as write_policy | |
| 347 | 357 | |
| 348 | − coherency_line_size: the minimum amount of data in bytes that gets | |
| 358 | + coherency_line_size: | |
| 359 | + the minimum amount of data in bytes that gets | |
| 349 | 360 | transferred from memory to cache |
| 350 | 361 | |
| 351 | − level: the cache hierarchy in the multi-level cache configuration | |
| 362 | + level: | |
| 363 | + the cache hierarchy in the multi-level cache configuration | |
| 352 | 364 | |
| 353 | − number_of_sets: total number of sets in the cache, a set is a | |
| 365 | + number_of_sets: | |
| 366 | + total number of sets in the cache, a set is a | |
| 354 | 367 | collection of cache lines with the same cache index |
| 355 | 368 | |
| 356 | − physical_line_partition: number of physical cache line per cache tag | |
| 369 | + physical_line_partition: | |
| 370 | + number of physical cache line per cache tag | |
| 357 | 371 | |
| 358 | − shared_cpu_list: the list of logical cpus sharing the cache | |
| 372 | + shared_cpu_list: | |
| 373 | + the list of logical cpus sharing the cache | |
| 359 | 374 | |
| 360 | − shared_cpu_map: logical cpu mask containing the list of cpus sharing | |
| 375 | + shared_cpu_map: | |
| 376 | + logical cpu mask containing the list of cpus sharing | |
| 361 | 377 | the cache |
| 362 | 378 | |
| 363 | − size: the total cache size in kB | |
| 379 | + size: | |
| 380 | + the total cache size in kB | |
| 364 | 381 | |
| 365 | 382 | type: |
| 366 | 383 | - Instruction: cache that only holds instructions |
| 367 | 384 | - Data: cache that only caches data |
| 368 | 385 | - Unified: cache that holds both data and instructions |
| 369 | 386 | |
| 370 | − ways_of_associativity: degree of freedom in placing a particular block | |
| 371 | − of memory in the cache | |
| 387 | + ways_of_associativity: | |
| 388 | + degree of freedom in placing a particular block | |
| 389 | + of memory in the cache | |
| 372 | 390 | |
| 373 | 391 | write_policy: |
| 374 | − - WriteThrough: data is written to both the cache line | |
| 392 | + - WriteThrough: | |
| 393 | + data is written to both the cache line | |
| 375 | 394 | and to the block in the lower-level memory |
| 376 | − - WriteBack: data is written only to the cache line and | |
| 395 | + - WriteBack: | |
| 396 | + data is written only to the cache line and | |
| 377 | 397 | the modified cache line is written to main |
| 378 | 398 | memory only when it is replaced |
| 379 | 399 | |
| @@ -414,30 +434,30 @@ Description: POWERNV CPUFreq driver's frequency throttle stats directory and · 34 unmodified lines | ||
| 414 | 434 | throttle attributes exported in the 'throttle_stats' directory: |
| 415 | 435 | |
| 416 | 436 | - turbo_stat : This file gives the total number of times the max |
| 417 | − frequency is throttled to lower frequency in turbo (at and above | |
| 418 | − nominal frequency) range of frequencies. | |
| 437 | + frequency is throttled to lower frequency in turbo (at and above | |
| 438 | + nominal frequency) range of frequencies. | |
| 419 | 439 | |
| 420 | 440 | - sub_turbo_stat : This file gives the total number of times the |
| 421 | − max frequency is throttled to lower frequency in sub-turbo(below | |
| 422 | − nominal frequency) range of frequencies. | |
| 441 | + max frequency is throttled to lower frequency in sub-turbo(below | |
| 442 | + nominal frequency) range of frequencies. | |
| 423 | 443 | |
| 424 | 444 | - unthrottle : This file gives the total number of times the max |
| 425 | − frequency is unthrottled after being throttled. | |
| 445 | + frequency is unthrottled after being throttled. | |
| 426 | 446 | |
| 427 | 447 | - powercap : This file gives the total number of times the max |
| 428 | − frequency is throttled due to 'Power Capping'. | |
| 448 | + frequency is throttled due to 'Power Capping'. | |
| 429 | 449 | |
| 430 | 450 | - overtemp : This file gives the total number of times the max |
| 431 | − frequency is throttled due to 'CPU Over Temperature'. | |
| 451 | + frequency is throttled due to 'CPU Over Temperature'. | |
| 432 | 452 | |
| 433 | 453 | - supply_fault : This file gives the total number of times the |
| 434 | − max frequency is throttled due to 'Power Supply Failure'. | |
| 454 | + max frequency is throttled due to 'Power Supply Failure'. | |
| 435 | 455 | |
| 436 | 456 | - overcurrent : This file gives the total number of times the |
| 437 | − max frequency is throttled due to 'Overcurrent'. | |
| 457 | + max frequency is throttled due to 'Overcurrent'. | |
| 438 | 458 | |
| 439 | 459 | - occ_reset : This file gives the total number of times the max |
| 440 | − frequency is throttled due to 'OCC Reset'. | |
| 460 | + frequency is throttled due to 'OCC Reset'. | |
| 441 | 461 | |
| 442 | 462 | The sysfs attributes representing different throttle reasons like |
| 443 | 463 | powercap, overtemp, supply_fault, overcurrent and occ_reset map to |
| @@ -469,8 +489,9 @@ What: /sys/devices/system/cpu/cpuX/regs/ · 25 unmodified lines | ||
| 469 | 489 | Date: June 2016 |
| 470 | 490 | Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org> |
| 471 | 491 | Description: AArch64 CPU registers |
| 492 | + | |
| 472 | 493 | 'identification' directory exposes the CPU ID registers for |
| 473 | − identifying model and revision of the CPU. | |
| 494 | + identifying model and revision of the CPU. | |
| 474 | 495 | |
| 475 | 496 | What: /sys/devices/system/cpu/cpu#/cpu_capacity |
| 476 | 497 | Date: December 2016 |
| @@ -497,9 +518,11 @@ Description: Information about CPU vulnerabilities · 20 unmodified lines | ||
| 497 | 518 | vulnerabilities. The output of those files reflects the |
| 498 | 519 | state of the CPUs in the system. Possible output values: |
| 499 | 520 | |
| 521 | + ================ ============================================== | |
| 500 | 522 | "Not affected" CPU is not affected by the vulnerability |
| 501 | 523 | "Vulnerable" CPU is affected and no mitigation in effect |
| 502 | 524 | "Mitigation: $M" CPU is affected and mitigation $M is in effect |
| 525 | + ================ ============================================== | |
| 503 | 526 | |
| 504 | 527 | See also: Documentation/admin-guide/hw-vuln/index.rst |
| 505 | 528 | |
| @@ -515,12 +538,14 @@ Description: Control Symetric Multi Threading (SMT) · 9 unmodified lines | ||
| 515 | 538 | control: Read/write interface to control SMT. Possible |
| 516 | 539 | values: |
| 517 | 540 | |
| 541 | + ================ ========================================= | |
| 518 | 542 | "on" SMT is enabled |
| 519 | 543 | "off" SMT is disabled |
| 520 | 544 | "forceoff" SMT is force disabled. Cannot be changed. |
| 521 | 545 | "notsupported" SMT is not supported by the CPU |
| 522 | 546 | "notimplemented" SMT runtime toggling is not |
| 523 | 547 | implemented for the architecture |
| 548 | + ================ ========================================= | |
| 524 | 549 | |
| 525 | 550 | If control status is "forceoff" or "notsupported" writes |
| 526 | 551 | are rejected. |
| @@ -576,7 +601,7 @@ Description: Secure Virtual Machine · 49 unmodified lines | ||
| 576 | 601 | Facility in POWER9 and newer processors. i.e., it is a Secure |
| 577 | 602 | Virtual Machine. |
| 578 | 603 | |
| 579 | −What: /sys/devices/system/cpu/cpuX/purr | |
| 604 | +What: /sys/devices/system/cpu/cpuX/purr | |
| 580 | 605 | Date: Apr 2005 |
| 581 | 606 | Contact: Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org> |
| 582 | 607 | Description: PURR ticks for this CPU since the system boot. |
| @@ -5,8 +5,10 @@ Contact: Vernon Mauery <vernux@us.ibm.com> · 4 unmodified lines | ||
| 5 | 5 | Description: The state file allows a means by which to change in and |
| 6 | 6 | out of Premium Real-Time Mode (PRTM), as well as the |
| 7 | 7 | ability to query the current state. |
| 8 | − 0 => PRTM off | |
| 9 | − 1 => PRTM enabled | |
| 8 | + | |
| 9 | + - 0 => PRTM off | |
| 10 | + - 1 => PRTM enabled | |
| 11 | + | |
| 10 | 12 | Users: The ibm-prtm userspace daemon uses this interface. |
| 11 | 13 | |
| 12 | 14 | |
| @@ -6,11 +6,13 @@ Description: Read/write the current state of DDR Backup Mode, which controls · 5 unmodified lines | ||
| 6 | 6 | if DDR power rails will be kept powered during system suspend. |
| 7 | 7 | ("on"/"1" = enabled, "off"/"0" = disabled). |
| 8 | 8 | Two types of power switches (or control signals) can be used: |
| 9 | + | |
| 9 | 10 | A. With a momentary power switch (or pulse signal), DDR |
| 10 | 11 | Backup Mode is enabled by default when available, as the |
| 11 | 12 | PMIC will be configured only during system suspend. |
| 12 | 13 | B. With a toggle power switch (or level signal), the |
| 13 | 14 | following steps must be followed exactly: |
| 15 | + | |
| 14 | 16 | 1. Configure PMIC for backup mode, to change the role of |
| 15 | 17 | the accessory power switch from a power switch to a |
| 16 | 18 | wake-up switch, |
| @@ -20,8 +22,10 @@ Description: Read/write the current state of DDR Backup Mode, which controls · 3 unmodified lines | ||
| 20 | 22 | 3. Suspend system, |
| 21 | 23 | 4. Switch accessory power switch on, to resume the |
| 22 | 24 | system. |
| 25 | + | |
| 23 | 26 | DDR Backup Mode must be explicitly enabled by the user, |
| 24 | 27 | to invoke step 1. |
| 28 | + | |
| 25 | 29 | See also Documentation/devicetree/bindings/mfd/bd9571mwv.txt. |
| 26 | 30 | Users: User space applications for embedded boards equipped with a |
| 27 | 31 | BD9571MWV PMIC. |
| @@ -29,8 +29,12 @@ What: /sys/class/genwqe/genwqe<n>_card/reload_bitstream · 28 unmodified lines | ||
| 29 | 29 | Date: May 2014 |
| 30 | 30 | Contact: klebers@linux.vnet.ibm.com |
| 31 | 31 | Description: Interface to trigger a PCIe card reset to reload the bitstream. |
| 32 | + | |
| 33 | + :: | |
| 34 | + | |
| 32 | 35 | sudo sh -c 'echo 1 > \ |
| 33 | 36 | /sys/class/genwqe/genwqe0_card/reload_bitstream' |
| 37 | + | |
| 34 | 38 | If successfully, the card will come back with the bitstream set |
| 35 | 39 | on 'next_bitstream'. |
| 36 | 40 | |
| @@ -64,8 +68,11 @@ Description: Base clock frequency of the card. · 27 unmodified lines | ||
| 64 | 68 | What: /sys/class/genwqe/genwqe<n>_card/device/sriov_numvfs |
| 65 | 69 | Date: Oct 2013 |
| 66 | 70 | Contact: haver@linux.vnet.ibm.com |
| 67 | −Description: Enable VFs (1..15): | |
| 71 | +Description: Enable VFs (1..15):: | |
| 72 | + | |
| 68 | 73 | sudo sh -c 'echo 15 > \ |
| 69 | 74 | /sys/bus/pci/devices/0000\:1b\:00.0/sriov_numvfs' |
| 70 | − Disable VFs: | |
| 75 | + | |
| 76 | + Disable VFs:: | |
| 77 | + | |
| 71 | 78 | Write a 0 into the same sysfs entry. |
| @@ -3,14 +3,18 @@ Date: July 2011 · 2 unmodified lines | ||
| 3 | 3 | Contact: linux-input@vger.kernel.org |
| 4 | 4 | Description: This controls if mouse clicks should be generated if the trackpoint is quickly pressed. How fast this press has to be |
| 5 | 5 | is being controlled by press_speed. |
| 6 | + | |
| 6 | 7 | Values are 0 or 1. |
| 8 | + | |
| 7 | 9 | Applies to Thinkpad USB Keyboard with TrackPoint. |
| 8 | 10 | |
| 9 | 11 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/dragging |
| 10 | 12 | Date: July 2011 |
| 11 | 13 | Contact: linux-input@vger.kernel.org |
| 12 | 14 | Description: If this setting is enabled, it is possible to do dragging by pressing the trackpoint. This requires press_to_select to be enabled. |
| 15 | + | |
| 13 | 16 | Values are 0 or 1. |
| 17 | + | |
| 14 | 18 | Applies to Thinkpad USB Keyboard with TrackPoint. |
| 15 | 19 | |
| 16 | 20 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/release_to_select |
| @@ -25,7 +29,9 @@ Date: July 2011 · 8 unmodified lines | ||
| 25 | 29 | Contact: linux-input@vger.kernel.org |
| 26 | 30 | Description: This setting controls if the mouse click events generated by pressing the trackpoint (if press_to_select is enabled) generate |
| 27 | 31 | a left or right mouse button click. |
| 32 | + | |
| 28 | 33 | Values are 0 or 1. |
| 34 | + | |
| 29 | 35 | Applies to Thinkpad USB Keyboard with TrackPoint. |
| 30 | 36 | |
| 31 | 37 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/sensitivity |
| @@ -39,12 +45,16 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- · 7 unmodified lines | ||
| 39 | 45 | Date: July 2011 |
| 40 | 46 | Contact: linux-input@vger.kernel.org |
| 41 | 47 | Description: This setting controls how fast the trackpoint needs to be pressed to generate a mouse click if press_to_select is enabled. |
| 48 | + | |
| 42 | 49 | Values are decimal integers from 1 (slowest) to 255 (fastest). |
| 50 | + | |
| 43 | 51 | Applies to Thinkpad USB Keyboard with TrackPoint. |
| 44 | 52 | |
| 45 | 53 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/fn_lock |
| 46 | 54 | Date: July 2014 |
| 47 | 55 | Contact: linux-input@vger.kernel.org |
| 48 | 56 | Description: This setting controls whether Fn Lock is enabled on the keyboard (i.e. if F1 is Mute or F1) |
| 57 | + | |
| 49 | 58 | Values are 0 or 1 |
| 59 | + | |
| 50 | 60 | Applies to ThinkPad Compact (USB|Bluetooth) Keyboard with TrackPoint. |
| @@ -12,7 +12,9 @@ KernelVersion: 4.1 · 11 unmodified lines | ||
| 12 | 12 | Contact: Michal Malý <madcatxster@devoid-pointer.net> |
| 13 | 13 | Description: Displays a set of alternate modes supported by a wheel. Each |
| 14 | 14 | mode is listed as follows: |
| 15 | + | |
| 15 | 16 | Tag: Mode Name |
| 17 | + | |
| 16 | 18 | Currently active mode is marked with an asterisk. List also |
| 17 | 19 | contains an abstract item "native" which always denotes the |
| 18 | 20 | native mode of the wheel. Echoing the mode tag switches the |
| @@ -24,24 +26,30 @@ Description: Displays a set of alternate modes supported by a wheel. Each · 5 unmodified lines | ||
| 24 | 26 | This entry is not created for devices that have only one mode. |
| 25 | 27 | |
| 26 | 28 | Currently supported mode switches: |
| 27 | − Driving Force Pro: | |
| 29 | + | |
| 30 | + Driving Force Pro:: | |
| 31 | + | |
| 28 | 32 | DF-EX --> DFP |
| 29 | 33 | |
| 30 | − G25: | |
| 34 | + G25:: | |
| 35 | + | |
| 31 | 36 | DF-EX --> DFP --> G25 |
| 32 | 37 | |
| 33 | − G27: | |
| 38 | + G27:: | |
| 39 | + | |
| 34 | 40 | DF-EX <*> DFP <-> G25 <-> G27 |
| 35 | 41 | DF-EX <*--------> G25 <-> G27 |
| 36 | 42 | DF-EX <*----------------> G27 |
| 37 | 43 | |
| 38 | − G29: | |
| 44 | + G29:: | |
| 45 | + | |
| 39 | 46 | DF-EX <*> DFP <-> G25 <-> G27 <-> G29 |
| 40 | 47 | DF-EX <*--------> G25 <-> G27 <-> G29 |
| 41 | 48 | DF-EX <*----------------> G27 <-> G29 |
| 42 | 49 | DF-EX <*------------------------> G29 |
| 43 | 50 | |
| 44 | − DFGT: | |
| 51 | + DFGT:: | |
| 52 | + | |
| 45 | 53 | DF-EX <*> DFP <-> DFGT |
| 46 | 54 | DF-EX <*--------> DFGT |
| 47 | 55 | |
| @@ -29,12 +29,13 @@ Contact: linux-input@vger.kernel.org · 28 unmodified lines | ||
| 29 | 29 | Description: |
| 30 | 30 | Threholds to override activation slack. |
| 31 | 31 | |
| 32 | − activation_width: (RW) Width threshold to immediately | |
| 32 | + ================= ===================================== | |
| 33 | + activation_width (RW) Width threshold to immediately | |
| 33 | 34 | start processing touch events. |
| 34 | 35 | |
| 35 | − activation_height: (RW) Height threshold to immediately | |
| 36 | + activation_height (RW) Height threshold to immediately | |
| 36 | 37 | start processing touch events. |
| 37 | − | |
| 38 | + ================= ===================================== | |
| 38 | 39 | |
| 39 | 40 | What: /sys/bus/hid/drivers/ntrig/<dev>/min_width |
| 40 | 41 | What: /sys/bus/hid/drivers/ntrig/<dev>/min_height |
| @@ -44,11 +45,13 @@ Contact: linux-input@vger.kernel.org · 3 unmodified lines | ||
| 44 | 45 | Description: |
| 45 | 46 | Minimum size contact accepted. |
| 46 | 47 | |
| 47 | − min_width: (RW) Minimum touch contact width to decide | |
| 48 | + ========== =========================================== | |
| 49 | + min_width (RW) Minimum touch contact width to decide | |
| 48 | 50 | activation and activity. |
| 49 | 51 | |
| 50 | − min_height: (RW) Minimum touch contact height to decide | |
| 52 | + min_height (RW) Minimum touch contact height to decide | |
| 51 | 53 | activation and activity. |
| 54 | + ========== =========================================== | |
| 52 | 55 | |
| 53 | 56 | |
| 54 | 57 | What: /sys/bus/hid/drivers/ntrig/<dev>/sensor_physical_width |
| @@ -3,17 +3,21 @@ Date: March 2010 · 2 unmodified lines | ||
| 3 | 3 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 4 | 4 | Description: It is possible to switch the dpi setting of the mouse with the |
| 5 | 5 | press of a button. |
| 6 | + | |
| 6 | 7 | When read, this file returns the raw number of the actual dpi |
| 7 | 8 | setting reported by the mouse. This number has to be further |
| 8 | 9 | processed to receive the real dpi value: |
| 9 | 10 | |
| 11 | + ===== ===== | |
| 10 | 12 | VALUE DPI |
| 13 | + ===== ===== | |
| 11 | 14 | 1 800 |
| 12 | 15 | 2 1200 |
| 13 | 16 | 3 1600 |
| 14 | 17 | 4 2000 |
| 15 | 18 | 5 2400 |
| 16 | 19 | 6 3200 |
| 20 | + ===== ===== | |
| 17 | 21 | |
| 18 | 22 | This file is readonly. |
| 19 | 23 | Users: http://roccat.sourceforge.net |
| @@ -22,6 +26,7 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- · 2 unmodified lines | ||
| 22 | 26 | Date: March 2010 |
| 23 | 27 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 24 | 28 | Description: When read, this file returns the number of the actual profile. |
| 29 | + | |
| 25 | 30 | This file is readonly. |
| 26 | 31 | Users: http://roccat.sourceforge.net |
| 27 | 32 | |
| @@ -33,6 +38,7 @@ Description: When read, this file returns the raw integer version number of the · 5 unmodified lines | ||
| 33 | 38 | further usage in other programs. To receive the real version |
| 34 | 39 | number the decimal point has to be shifted 2 positions to the |
| 35 | 40 | left. E.g. a returned value of 138 means 1.38 |
| 41 | + | |
| 36 | 42 | This file is readonly. |
| 37 | 43 | Users: http://roccat.sourceforge.net |
| 38 | 44 | |
| @@ -43,10 +49,13 @@ Description: The mouse can store 5 profiles which can be switched by the · 4 unmodified lines | ||
| 43 | 49 | press of a button. A profile holds information like button |
| 44 | 50 | mappings, sensitivity, the colors of the 5 leds and light |
| 45 | 51 | effects. |
| 52 | + | |
| 46 | 53 | When read, these files return the respective profile. The |
| 47 | 54 | returned data is 975 bytes in size. |
| 55 | + | |
| 48 | 56 | When written, this file lets one write the respective profile |
| 49 | 57 | data back to the mouse. The data has to be 975 bytes long. |
| 58 | + | |
| 50 | 59 | The mouse will reject invalid data, whereas the profile number |
| 51 | 60 | stored in the profile doesn't need to fit the number of the |
| 52 | 61 | store. |
| @@ -58,6 +67,7 @@ Contact: Stefan Achatz <erazor_de@users.sourceforge.net> · 5 unmodified lines | ||
| 58 | 67 | Description: When read, this file returns the settings stored in the mouse. |
| 59 | 68 | The size of the data is 36 bytes and holds information like the |
| 60 | 69 | startup_profile, tcu state and calibration_data. |
| 70 | + | |
| 61 | 71 | When written, this file lets write settings back to the mouse. |
| 62 | 72 | The data has to be 36 bytes long. The mouse will reject invalid |
| 63 | 73 | data. |
| @@ -67,8 +77,10 @@ What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid- · 3 unmodified lines | ||
| 67 | 77 | Date: March 2010 |
| 68 | 78 | Contact: Stefan Achatz <erazor_de@users.sourceforge.net> |
| 69 | 79 | Description: The integer value of this attribute ranges from 1 to 5. |
| 80 | + | |
| 70 | 81 | When read, this attribute returns the number of the profile |
| 71 | 82 | that's active when the mouse is powered on. |
| 83 | + | |
| 72 | 84 | When written, this file sets the number of the startup profile |
| 73 | 85 | and the mouse activates this profile immediately. |
| 74 | 86 | Users: http://roccat.sourceforge.net |
| @@ -80,9 +92,12 @@ Description: The mouse has a "Tracking Control Unit" which lets the user · 5 unmodified lines | ||
| 80 | 92 | calibrate the laser power to fit the mousepad surface. |
| 81 | 93 | When read, this file returns the current state of the TCU, |
| 82 | 94 | where 0 means off and 1 means on. |
| 95 | + | |
| 83 | 96 | Writing 0 in this file will switch the TCU off. |
| 97 | + | |
| 84 | 98 | Writing 1 in this file will start the calibration which takes |
| 85 | 99 | around 6 seconds to complete and activates the TCU. |
| 100 | + | |
| 86 | 101 | Users: http://roccat.sourceforge.net |
| 87 | 102 | |
| 88 | 103 | What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kone/roccatkone<minor>/weight |
| @@ -93,14 +108,18 @@ Description: The mouse can be equipped with one of four supplied weights · 4 unmodified lines | ||
| 93 | 108 | and its value can be read out. When read, this file returns the |
| 94 | 109 | raw value returned by the mouse which eases further processing |
| 95 | 110 | in other software. |
| 111 | + | |
| 96 | 112 | The values map to the weights as follows: |
| 97 | 113 | |
| 114 | + ===== ====== | |
| 98 | 115 | VALUE WEIGHT |
| 116 | + ===== ====== | |
| 99 | 117 | 0 none |
| 100 | 118 | 1 5g |
| 101 | 119 | 2 10g |
| 102 | 120 | 3 15g |
| 103 | 121 | 4 20g |
| 122 | + ===== ====== | |
| 104 | 123 | |
| 105 | 124 | This file is readonly. |
| 106 | 125 | Users: http://roccat.sourceforge.net |
| @@ -20,6 +20,7 @@ Description: This file contains the currently connected and initialized · 19 unmodified lines | ||
| 20 | 20 | the official Nintendo Nunchuck extension and classic is the |
| 21 | 21 | Nintendo Classic Controller extension. The motionp extension can |
| 22 | 22 | be combined with the other two. |
| 23 | + | |
| 23 | 24 | Starting with kernel-version 3.11 Motion Plus hotplugging is |
| 24 | 25 | supported and if detected, it's no longer reported as static |
| 25 | 26 | extension. You will get uevent notifications for the motion-plus |
| @@ -39,9 +40,13 @@ Description: While a device is initialized by the wiimote driver, we perform · 13 unmodified lines | ||
| 39 | 40 | Other strings for each device-type are available and may be |
| 40 | 41 | added if new device-specific detections are added. |
| 41 | 42 | Currently supported are: |
| 42 | − gen10: First Wii Remote generation | |
| 43 | − gen20: Second Wii Remote Plus generation (builtin MP) | |
| 43 | + | |
| 44 | + ============= ======================================= | |
| 45 | + gen10: First Wii Remote generation | |
| 46 | + gen20: Second Wii Remote Plus generation | |
| 47 | + (builtin MP) | |
| 44 | 48 | balanceboard: Wii Balance Board |
| 49 | + ============= ======================================= | |
| 45 | 50 | |
| 46 | 51 | What: /sys/bus/hid/drivers/wiimote/<dev>/bboard_calib |
| 47 | 52 | Date: May 2013 |
| @@ -54,6 +59,7 @@ Description: This attribute is only provided if the device was detected as a · 6 unmodified lines | ||
| 54 | 59 | First, 0kg values for all 4 sensors are written, followed by the |
| 55 | 60 | 17kg values for all 4 sensors and last the 34kg values for all 4 |
| 56 | 61 | sensors. |
| 62 | + | |
| 57 | 63 | Calibration data is already applied by the kernel to all input |
| 58 | 64 | values but may be used by user-space to perform other |
| 59 | 65 | transformations. |
| @@ -68,9 +74,11 @@ Description: This attribute is only provided if the device was detected as a · 8 unmodified lines | ||
| 68 | 74 | is prefixed with a +/-. Each value is a signed 16bit number. |
| 69 | 75 | Data is encoded as decimal numbers and specifies the offsets of |
| 70 | 76 | the analog sticks of the pro-controller. |
| 77 | + | |
| 71 | 78 | Calibration data is already applied by the kernel to all input |
| 72 | 79 | values but may be used by user-space to perform other |
| 73 | 80 | transformations. |
| 81 | + | |
| 74 | 82 | Calibration data is detected by the kernel during device setup. |
| 75 | 83 | You can write "scan\n" into this file to re-trigger calibration. |
| 76 | 84 | You can also write data directly in the form "x1:y1 x2:y2" to |
| @@ -4,6 +4,7 @@ Contact: linux-input@vger.kernel.org · 3 unmodified lines | ||
| 4 | 4 | Description: Reports the firmware version provided by the touchscreen, for example "00_T6" on a EXC80H60 |
| 5 | 5 | |
| 6 | 6 | Access: Read |
| 7 | + | |
| 7 | 8 | Valid values: Represented as string |
| 8 | 9 | |
| 9 | 10 | What: /sys/bus/i2c/devices/xxx/model |
| @@ -12,4 +13,5 @@ Contact: linux-input@vger.kernel.org · 2 unmodified lines | ||
| 12 | 13 | Description: Reports the model identification provided by the touchscreen, for example "Orion_1320" on a EXC80H60 |
| 13 | 14 | |
| 14 | 15 | Access: Read |
| 16 | + | |
| 15 | 17 | Valid values: Represented as string |
| @@ -4,7 +4,9 @@ Contact: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> · 3 unmodified lines | ||
| 4 | 4 | Description: read-only access to the efuse on the Ingenic JZ4780 SoC |
| 5 | 5 | The SoC has a one time programmable 8K efuse that is |
| 6 | 6 | split into segments. The driver supports read only. |
| 7 | − The segments are | |
| 7 | + The segments are: | |
| 8 | + | |
| 9 | + ===== ======== ================= | |
| 8 | 10 | 0x000 64 bit Random Number |
| 9 | 11 | 0x008 128 bit Ingenic Chip ID |
| 10 | 12 | 0x018 128 bit Customer ID |
| @@ -12,5 +14,7 @@ Description: read-only access to the efuse on the Ingenic JZ4780 SoC · 1 unmodified line | ||
| 12 | 14 | 0x1E0 8 bit Protect Segment |
| 13 | 15 | 0x1E1 2296 bit HDMI Key |
| 14 | 16 | 0x300 2048 bit Security boot key |
| 17 | + ===== ======== ================= | |
| 18 | + | |
| 15 | 19 | Users: any user space application which wants to read the Chip |
| 16 | 20 | and Customer ID |
| @@ -7,8 +7,10 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | the format of DDDD:BB:DD.F-REG:SIZE:MASK will allow the guest |
| 8 | 8 | to write and read from the PCI device. That is Domain:Bus: |
| 9 | 9 | Device.Function-Register:Size:Mask (Domain is optional). |
| 10 | − For example: | |
| 11 | − #echo 00:19.0-E0:2:FF > /sys/bus/pci/drivers/pciback/quirks | |
| 10 | + For example:: | |
| 11 | + | |
| 12 | + #echo 00:19.0-E0:2:FF > /sys/bus/pci/drivers/pciback/quirks | |
| 13 | + | |
| 12 | 14 | will allow the guest to read and write to the configuration |
| 13 | 15 | register 0x0E. |
| 14 | 16 | |
| @@ -9,10 +9,12 @@ Description: Some Samsung laptops have different "performance levels" · 8 unmodified lines | ||
| 9 | 9 | their fans quiet at all costs. Reading from this file |
| 10 | 10 | will show the current performance level. Writing to the |
| 11 | 11 | file can change this value. |
| 12 | + | |
| 12 | 13 | Valid options: |
| 13 | − "silent" | |
| 14 | − "normal" | |
| 15 | − "overclock" | |
| 14 | + - "silent" | |
| 15 | + - "normal" | |
| 16 | + - "overclock" | |
| 17 | + | |
| 16 | 18 | Note that not all laptops support all of these options. |
| 17 | 19 | Specifically, not all support the "overclock" option, |
| 18 | 20 | and it's still unknown if this value even changes |
| @@ -25,8 +27,9 @@ Contact: Corentin Chary <corentin.chary@gmail.com> · 6 unmodified lines | ||
| 25 | 27 | Description: Max battery charge level can be modified, battery cycle |
| 26 | 28 | life can be extended by reducing the max battery charge |
| 27 | 29 | level. |
| 28 | − 0 means normal battery mode (100% charge) | |
| 29 | − 1 means battery life extender mode (80% charge) | |
| 30 | + | |
| 31 | + - 0 means normal battery mode (100% charge) | |
| 32 | + - 1 means battery life extender mode (80% charge) | |
| 30 | 33 | |
| 31 | 34 | What: /sys/devices/platform/samsung/usb_charge |
| 32 | 35 | Date: December 1, 2011 |
| @@ -4,10 +4,12 @@ KernelVersion: 3.15 · 3 unmodified lines | ||
| 4 | 4 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 5 | 5 | Description: This file controls the keyboard backlight operation mode, valid |
| 6 | 6 | values are: |
| 7 | + | |
| 7 | 8 | * 0x1 -> FN-Z |
| 8 | 9 | * 0x2 -> AUTO (also called TIMER) |
| 9 | 10 | * 0x8 -> ON |
| 10 | 11 | * 0x10 -> OFF |
| 12 | + | |
| 11 | 13 | Note that from kernel 3.16 onwards this file accepts all listed |
| 12 | 14 | parameters, kernel 3.15 only accepts the first two (FN-Z and |
| 13 | 15 | AUTO). |
| @@ -41,8 +43,10 @@ KernelVersion: 3.15 · 27 unmodified lines | ||
| 41 | 43 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 42 | 44 | Description: This files controls the status of the touchpad and pointing |
| 43 | 45 | stick (if available), valid values are: |
| 46 | + | |
| 44 | 47 | * 0 -> OFF |
| 45 | 48 | * 1 -> ON |
| 49 | + | |
| 46 | 50 | Users: KToshiba |
| 47 | 51 | |
| 48 | 52 | What: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS{1900,620{0,7,8}}:00/available_kbd_modes |
| @@ -51,10 +55,12 @@ KernelVersion: 3.16 · 2 unmodified lines | ||
| 51 | 55 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 52 | 56 | Description: This file shows the supported keyboard backlight modes |
| 53 | 57 | the system supports, which can be: |
| 58 | + | |
| 54 | 59 | * 0x1 -> FN-Z |
| 55 | 60 | * 0x2 -> AUTO (also called TIMER) |
| 56 | 61 | * 0x8 -> ON |
| 57 | 62 | * 0x10 -> OFF |
| 63 | + | |
| 58 | 64 | Note that not all keyboard types support the listed modes. |
| 59 | 65 | See the entry named "available_kbd_modes" |
| 60 | 66 | Users: KToshiba |
| @@ -65,6 +71,7 @@ KernelVersion: 3.16 · 4 unmodified lines | ||
| 65 | 71 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 66 | 72 | Description: This file shows the current keyboard backlight type, |
| 67 | 73 | which can be: |
| 74 | + | |
| 68 | 75 | * 1 -> Type 1, supporting modes FN-Z and AUTO |
| 69 | 76 | * 2 -> Type 2, supporting modes TIMER, ON and OFF |
| 70 | 77 | Users: KToshiba |
| @@ -75,10 +82,12 @@ KernelVersion: 4.0 · 4 unmodified lines | ||
| 75 | 82 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 76 | 83 | Description: This file controls the USB Sleep & Charge charging mode, which |
| 77 | 84 | can be: |
| 85 | + | |
| 78 | 86 | * 0 -> Disabled (0x00) |
| 79 | 87 | * 1 -> Alternate (0x09) |
| 80 | 88 | * 2 -> Auto (0x21) |
| 81 | 89 | * 3 -> Typical (0x11) |
| 90 | + | |
| 82 | 91 | Note that from kernel 4.1 onwards this file accepts all listed |
| 83 | 92 | values, kernel 4.0 only supports the first three. |
| 84 | 93 | Note that this feature only works when connected to power, if |
| @@ -93,8 +102,10 @@ Contact: Azael Avalos <coproscefalo@gmail.com> · 8 unmodified lines | ||
| 93 | 102 | Description: This file controls the USB Sleep Functions under battery, and |
| 94 | 103 | set the level at which point they will be disabled, accepted |
| 95 | 104 | values can be: |
| 105 | + | |
| 96 | 106 | * 0 -> Disabled |
| 97 | 107 | * 1-100 -> Battery level to disable sleep functions |
| 108 | + | |
| 98 | 109 | Currently it prints two values, the first one indicates if the |
| 99 | 110 | feature is enabled or disabled, while the second one shows the |
| 100 | 111 | current battery level set. |
| @@ -107,8 +118,10 @@ Date: January 23, 2015 · 6 unmodified lines | ||
| 107 | 118 | KernelVersion: 4.0 |
| 108 | 119 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 109 | 120 | Description: This file controls the USB Rapid Charge state, which can be: |
| 121 | + | |
| 110 | 122 | * 0 -> Disabled |
| 111 | 123 | * 1 -> Enabled |
| 124 | + | |
| 112 | 125 | Note that toggling this value requires a reboot for changes to |
| 113 | 126 | take effect. |
| 114 | 127 | Users: KToshiba |
| @@ -118,8 +131,10 @@ Date: January 23, 2015 · 3 unmodified lines | ||
| 118 | 131 | KernelVersion: 4.0 |
| 119 | 132 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 120 | 133 | Description: This file controls the Sleep & Music state, which values can be: |
| 134 | + | |
| 121 | 135 | * 0 -> Disabled |
| 122 | 136 | * 1 -> Enabled |
| 137 | + | |
| 123 | 138 | Note that this feature only works when connected to power, if |
| 124 | 139 | you want to use it under battery, see the entry named |
| 125 | 140 | "sleep_functions_on_battery" |
| @@ -138,6 +153,7 @@ KernelVersion: 4.0 · 12 unmodified lines | ||
| 138 | 153 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 139 | 154 | Description: This file controls the state of the internal fan, valid |
| 140 | 155 | values are: |
| 156 | + | |
| 141 | 157 | * 0 -> OFF |
| 142 | 158 | * 1 -> ON |
| 143 | 159 | |
| @@ -147,8 +163,10 @@ KernelVersion: 4.0 · 3 unmodified lines | ||
| 147 | 163 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 148 | 164 | Description: This file controls the Special Functions (hotkeys) operation |
| 149 | 165 | mode, valid values are: |
| 166 | + | |
| 150 | 167 | * 0 -> Normal Operation |
| 151 | 168 | * 1 -> Special Functions |
| 169 | + | |
| 152 | 170 | In the "Normal Operation" mode, the F{1-12} keys are as usual |
| 153 | 171 | and the hotkeys are accessed via FN-F{1-12}. |
| 154 | 172 | In the "Special Functions" mode, the F{1-12} keys trigger the |
| @@ -163,8 +181,10 @@ KernelVersion: 4.0 · 8 unmodified lines | ||
| 163 | 181 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 164 | 182 | Description: This file controls whether the laptop should turn ON whenever |
| 165 | 183 | the LID is opened, valid values are: |
| 184 | + | |
| 166 | 185 | * 0 -> Disabled |
| 167 | 186 | * 1 -> Enabled |
| 187 | + | |
| 168 | 188 | Note that toggling this value requires a reboot for changes to |
| 169 | 189 | take effect. |
| 170 | 190 | Users: KToshiba |
| @@ -174,8 +194,10 @@ Date: February 12, 2015 · 3 unmodified lines | ||
| 174 | 194 | KernelVersion: 4.0 |
| 175 | 195 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 176 | 196 | Description: This file controls the USB 3 functionality, valid values are: |
| 197 | + | |
| 177 | 198 | * 0 -> Disabled (Acts as a regular USB 2) |
| 178 | 199 | * 1 -> Enabled (Full USB 3 functionality) |
| 200 | + | |
| 179 | 201 | Note that toggling this value requires a reboot for changes to |
| 180 | 202 | take effect. |
| 181 | 203 | Users: KToshiba |
| @@ -188,10 +210,14 @@ Description: This file controls the Cooling Method feature. · 6 unmodified lines | ||
| 188 | 210 | Reading this file prints two values, the first is the actual cooling method |
| 189 | 211 | and the second is the maximum cooling method supported. |
| 190 | 212 | When the maximum cooling method is ONE, valid values are: |
| 213 | + | |
| 191 | 214 | * 0 -> Maximum Performance |
| 192 | 215 | * 1 -> Battery Optimized |
| 216 | + | |
| 193 | 217 | When the maximum cooling method is TWO, valid values are: |
| 218 | + | |
| 194 | 219 | * 0 -> Maximum Performance |
| 195 | 220 | * 1 -> Performance |
| 196 | 221 | * 2 -> Battery Optimized |
| 222 | + | |
| 197 | 223 | Users: KToshiba |
| @@ -4,10 +4,12 @@ KernelVersion: 3.17 · 3 unmodified lines | ||
| 4 | 4 | Contact: Azael Avalos <coproscefalo@gmail.com> |
| 5 | 5 | Description: This file controls the built-in accelerometer protection level, |
| 6 | 6 | valid values are: |
| 7 | + | |
| 7 | 8 | * 0 -> Disabled |
| 8 | 9 | * 1 -> Low |
| 9 | 10 | * 2 -> Medium |
| 10 | 11 | * 3 -> High |
| 12 | + | |
| 11 | 13 | The default potection value is set to 2 (Medium). |
| 12 | 14 | Users: KToshiba |
| 13 | 15 | |
| @@ -18,6 +18,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 17 unmodified lines | ||
| 18 | 18 | Description: This file shows the device type. This is one of the UFS |
| 19 | 19 | device descriptor parameters. The full information about |
| 20 | 20 | the descriptor could be found at UFS specifications 2.1. |
| 21 | + | |
| 21 | 22 | The file is read only. |
| 22 | 23 | |
| 23 | 24 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_class |
| @@ -26,6 +27,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 26 | 27 | Description: This file shows the device class. This is one of the UFS |
| 27 | 28 | device descriptor parameters. The full information about |
| 28 | 29 | the descriptor could be found at UFS specifications 2.1. |
| 30 | + | |
| 29 | 31 | The file is read only. |
| 30 | 32 | |
| 31 | 33 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_sub_class |
| @@ -34,6 +36,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 34 | 36 | Description: This file shows the UFS storage subclass. This is one of |
| 35 | 37 | the UFS device descriptor parameters. The full information |
| 36 | 38 | about the descriptor could be found at UFS specifications 2.1. |
| 39 | + | |
| 37 | 40 | The file is read only. |
| 38 | 41 | |
| 39 | 42 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/protocol |
| @@ -43,6 +46,7 @@ Description: This file shows the protocol supported by an UFS device. · 3 unmodified lines | ||
| 43 | 46 | This is one of the UFS device descriptor parameters. |
| 44 | 47 | The full information about the descriptor could be found |
| 45 | 48 | at UFS specifications 2.1. |
| 49 | + | |
| 46 | 50 | The file is read only. |
| 47 | 51 | |
| 48 | 52 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_luns |
| @@ -51,6 +55,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 51 | 55 | Description: This file shows number of logical units. This is one of |
| 52 | 56 | the UFS device descriptor parameters. The full information |
| 53 | 57 | about the descriptor could be found at UFS specifications 2.1. |
| 58 | + | |
| 54 | 59 | The file is read only. |
| 55 | 60 | |
| 56 | 61 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_wluns |
| @@ -60,6 +65,7 @@ Description: This file shows number of well known logical units. · 3 unmodified lines | ||
| 60 | 65 | This is one of the UFS device descriptor parameters. |
| 61 | 66 | The full information about the descriptor could be found |
| 62 | 67 | at UFS specifications 2.1. |
| 68 | + | |
| 63 | 69 | The file is read only. |
| 64 | 70 | |
| 65 | 71 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/boot_enable |
| @@ -69,6 +75,7 @@ Description: This file shows value that indicates whether the device is · 3 unmodified lines | ||
| 69 | 75 | enabled for boot. This is one of the UFS device descriptor |
| 70 | 76 | parameters. The full information about the descriptor could |
| 71 | 77 | be found at UFS specifications 2.1. |
| 78 | + | |
| 72 | 79 | The file is read only. |
| 73 | 80 | |
| 74 | 81 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/descriptor_access_enable |
| @@ -79,6 +86,7 @@ Description: This file shows value that indicates whether the device · 4 unmodified lines | ||
| 79 | 86 | of the boot sequence. This is one of the UFS device descriptor |
| 80 | 87 | parameters. The full information about the descriptor could |
| 81 | 88 | be found at UFS specifications 2.1. |
| 89 | + | |
| 82 | 90 | The file is read only. |
| 83 | 91 | |
| 84 | 92 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/initial_power_mode |
| @@ -88,6 +96,7 @@ Description: This file shows value that defines the power mode after · 3 unmodified lines | ||
| 88 | 96 | device initialization or hardware reset. This is one of |
| 89 | 97 | the UFS device descriptor parameters. The full information |
| 90 | 98 | about the descriptor could be found at UFS specifications 2.1. |
| 99 | + | |
| 91 | 100 | The file is read only. |
| 92 | 101 | |
| 93 | 102 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/high_priority_lun |
| @@ -96,6 +105,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 96 | 105 | Description: This file shows the high priority lun. This is one of |
| 97 | 106 | the UFS device descriptor parameters. The full information |
| 98 | 107 | about the descriptor could be found at UFS specifications 2.1. |
| 108 | + | |
| 99 | 109 | The file is read only. |
| 100 | 110 | |
| 101 | 111 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/secure_removal_type |
| @@ -104,6 +114,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 104 | 114 | Description: This file shows the secure removal type. This is one of |
| 105 | 115 | the UFS device descriptor parameters. The full information |
| 106 | 116 | about the descriptor could be found at UFS specifications 2.1. |
| 117 | + | |
| 107 | 118 | The file is read only. |
| 108 | 119 | |
| 109 | 120 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/support_security_lun |
| @@ -113,6 +124,7 @@ Description: This file shows whether the security lun is supported. · 3 unmodified lines | ||
| 113 | 124 | This is one of the UFS device descriptor parameters. |
| 114 | 125 | The full information about the descriptor could be found |
| 115 | 126 | at UFS specifications 2.1. |
| 127 | + | |
| 116 | 128 | The file is read only. |
| 117 | 129 | |
| 118 | 130 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/bkops_termination_latency |
| @@ -122,6 +134,7 @@ Description: This file shows the background operations termination · 3 unmodified lines | ||
| 122 | 134 | latency. This is one of the UFS device descriptor parameters. |
| 123 | 135 | The full information about the descriptor could be found |
| 124 | 136 | at UFS specifications 2.1. |
| 137 | + | |
| 125 | 138 | The file is read only. |
| 126 | 139 | |
| 127 | 140 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/initial_active_icc_level |
| @@ -130,6 +143,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 130 | 143 | Description: This file shows the initial active ICC level. This is one |
| 131 | 144 | of the UFS device descriptor parameters. The full information |
| 132 | 145 | about the descriptor could be found at UFS specifications 2.1. |
| 146 | + | |
| 133 | 147 | The file is read only. |
| 134 | 148 | |
| 135 | 149 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/specification_version |
| @@ -138,6 +152,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 138 | 152 | Description: This file shows the specification version. This is one |
| 139 | 153 | of the UFS device descriptor parameters. The full information |
| 140 | 154 | about the descriptor could be found at UFS specifications 2.1. |
| 155 | + | |
| 141 | 156 | The file is read only. |
| 142 | 157 | |
| 143 | 158 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/manufacturing_date |
| @@ -147,6 +162,7 @@ Description: This file shows the manufacturing date in BCD format. · 3 unmodified lines | ||
| 147 | 162 | This is one of the UFS device descriptor parameters. |
| 148 | 163 | The full information about the descriptor could be found |
| 149 | 164 | at UFS specifications 2.1. |
| 165 | + | |
| 150 | 166 | The file is read only. |
| 151 | 167 | |
| 152 | 168 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/manufacturer_id |
| @@ -155,6 +171,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 155 | 171 | Description: This file shows the manufacturee ID. This is one of the |
| 156 | 172 | UFS device descriptor parameters. The full information about |
| 157 | 173 | the descriptor could be found at UFS specifications 2.1. |
| 174 | + | |
| 158 | 175 | The file is read only. |
| 159 | 176 | |
| 160 | 177 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/rtt_capability |
| @@ -164,6 +181,7 @@ Description: This file shows the maximum number of outstanding RTTs · 3 unmodified lines | ||
| 164 | 181 | supported by the device. This is one of the UFS device |
| 165 | 182 | descriptor parameters. The full information about |
| 166 | 183 | the descriptor could be found at UFS specifications 2.1. |
| 184 | + | |
| 167 | 185 | The file is read only. |
| 168 | 186 | |
| 169 | 187 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/rtc_update |
| @@ -173,6 +191,7 @@ Description: This file shows the frequency and method of the realtime · 3 unmodified lines | ||
| 173 | 191 | clock update. This is one of the UFS device descriptor |
| 174 | 192 | parameters. The full information about the descriptor |
| 175 | 193 | could be found at UFS specifications 2.1. |
| 194 | + | |
| 176 | 195 | The file is read only. |
| 177 | 196 | |
| 178 | 197 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/ufs_features |
| @@ -182,6 +201,7 @@ Description: This file shows which features are supported by the device. · 3 unmodified lines | ||
| 182 | 201 | This is one of the UFS device descriptor parameters. |
| 183 | 202 | The full information about the descriptor could be |
| 184 | 203 | found at UFS specifications 2.1. |
| 204 | + | |
| 185 | 205 | The file is read only. |
| 186 | 206 | |
| 187 | 207 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/ffu_timeout |
| @@ -190,6 +210,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 190 | 210 | Description: This file shows the FFU timeout. This is one of the |
| 191 | 211 | UFS device descriptor parameters. The full information |
| 192 | 212 | about the descriptor could be found at UFS specifications 2.1. |
| 213 | + | |
| 193 | 214 | The file is read only. |
| 194 | 215 | |
| 195 | 216 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/queue_depth |
| @@ -198,6 +219,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 198 | 219 | Description: This file shows the device queue depth. This is one of the |
| 199 | 220 | UFS device descriptor parameters. The full information |
| 200 | 221 | about the descriptor could be found at UFS specifications 2.1. |
| 222 | + | |
| 201 | 223 | The file is read only. |
| 202 | 224 | |
| 203 | 225 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_version |
| @@ -206,6 +228,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 206 | 228 | Description: This file shows the device version. This is one of the |
| 207 | 229 | UFS device descriptor parameters. The full information |
| 208 | 230 | about the descriptor could be found at UFS specifications 2.1. |
| 231 | + | |
| 209 | 232 | The file is read only. |
| 210 | 233 | |
| 211 | 234 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/number_of_secure_wpa |
| @@ -215,6 +238,7 @@ Description: This file shows number of secure write protect areas · 3 unmodified lines | ||
| 215 | 238 | supported by the device. This is one of the UFS device |
| 216 | 239 | descriptor parameters. The full information about |
| 217 | 240 | the descriptor could be found at UFS specifications 2.1. |
| 241 | + | |
| 218 | 242 | The file is read only. |
| 219 | 243 | |
| 220 | 244 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/psa_max_data_size |
| @@ -225,6 +249,7 @@ Description: This file shows the maximum amount of data that may be · 4 unmodified lines | ||
| 225 | 249 | This is one of the UFS device descriptor parameters. |
| 226 | 250 | The full information about the descriptor could be found |
| 227 | 251 | at UFS specifications 2.1. |
| 252 | + | |
| 228 | 253 | The file is read only. |
| 229 | 254 | |
| 230 | 255 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/psa_state_timeout |
| @@ -234,6 +259,7 @@ Description: This file shows the command maximum timeout for a change · 3 unmodified lines | ||
| 234 | 259 | in PSA state. This is one of the UFS device descriptor |
| 235 | 260 | parameters. The full information about the descriptor could |
| 236 | 261 | be found at UFS specifications 2.1. |
| 262 | + | |
| 237 | 263 | The file is read only. |
| 238 | 264 | |
| 239 | 265 | |
| @@ -244,6 +270,7 @@ Description: This file shows the MIPI UniPro version number in BCD format. · 4 unmodified lines | ||
| 244 | 270 | This is one of the UFS interconnect descriptor parameters. |
| 245 | 271 | The full information about the descriptor could be found at |
| 246 | 272 | UFS specifications 2.1. |
| 273 | + | |
| 247 | 274 | The file is read only. |
| 248 | 275 | |
| 249 | 276 | What: /sys/bus/platform/drivers/ufshcd/*/interconnect_descriptor/mphy_version |
| @@ -253,6 +280,7 @@ Description: This file shows the MIPI M-PHY version number in BCD format. · 3 unmodified lines | ||
| 253 | 280 | This is one of the UFS interconnect descriptor parameters. |
| 254 | 281 | The full information about the descriptor could be found at |
| 255 | 282 | UFS specifications 2.1. |
| 283 | + | |
| 256 | 284 | The file is read only. |
| 257 | 285 | |
| 258 | 286 | |
| @@ -264,6 +292,7 @@ Description: This file shows the total memory quantity available to · 5 unmodified lines | ||
| 264 | 292 | of the UFS geometry descriptor parameters. The full |
| 265 | 293 | information about the descriptor could be found at |
| 266 | 294 | UFS specifications 2.1. |
| 295 | + | |
| 267 | 296 | The file is read only. |
| 268 | 297 | |
| 269 | 298 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_number_of_luns |
| @@ -273,6 +302,7 @@ Description: This file shows the maximum number of logical units · 3 unmodified lines | ||
| 273 | 302 | supported by the UFS device. This is one of the UFS |
| 274 | 303 | geometry descriptor parameters. The full information about |
| 275 | 304 | the descriptor could be found at UFS specifications 2.1. |
| 305 | + | |
| 276 | 306 | The file is read only. |
| 277 | 307 | |
| 278 | 308 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/segment_size |
| @@ -281,6 +311,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 281 | 311 | Description: This file shows the segment size. This is one of the UFS |
| 282 | 312 | geometry descriptor parameters. The full information about |
| 283 | 313 | the descriptor could be found at UFS specifications 2.1. |
| 314 | + | |
| 284 | 315 | The file is read only. |
| 285 | 316 | |
| 286 | 317 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/allocation_unit_size |
| @@ -289,6 +320,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 289 | 320 | Description: This file shows the allocation unit size. This is one of |
| 290 | 321 | the UFS geometry descriptor parameters. The full information |
| 291 | 322 | about the descriptor could be found at UFS specifications 2.1. |
| 323 | + | |
| 292 | 324 | The file is read only. |
| 293 | 325 | |
| 294 | 326 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/min_addressable_block_size |
| @@ -298,6 +330,7 @@ Description: This file shows the minimum addressable block size. This · 3 unmodified lines | ||
| 298 | 330 | is one of the UFS geometry descriptor parameters. The full |
| 299 | 331 | information about the descriptor could be found at UFS |
| 300 | 332 | specifications 2.1. |
| 333 | + | |
| 301 | 334 | The file is read only. |
| 302 | 335 | |
| 303 | 336 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/optimal_read_block_size |
| @@ -307,6 +340,7 @@ Description: This file shows the optimal read block size. This is one · 3 unmodified lines | ||
| 307 | 340 | of the UFS geometry descriptor parameters. The full |
| 308 | 341 | information about the descriptor could be found at UFS |
| 309 | 342 | specifications 2.1. |
| 343 | + | |
| 310 | 344 | The file is read only. |
| 311 | 345 | |
| 312 | 346 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/optimal_write_block_size |
| @@ -316,6 +350,7 @@ Description: This file shows the optimal write block size. This is one · 3 unmodified lines | ||
| 316 | 350 | of the UFS geometry descriptor parameters. The full |
| 317 | 351 | information about the descriptor could be found at UFS |
| 318 | 352 | specifications 2.1. |
| 353 | + | |
| 319 | 354 | The file is read only. |
| 320 | 355 | |
| 321 | 356 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_in_buffer_size |
| @@ -325,6 +360,7 @@ Description: This file shows the maximum data-in buffer size. This · 3 unmodified lines | ||
| 325 | 360 | is one of the UFS geometry descriptor parameters. The full |
| 326 | 361 | information about the descriptor could be found at UFS |
| 327 | 362 | specifications 2.1. |
| 363 | + | |
| 328 | 364 | The file is read only. |
| 329 | 365 | |
| 330 | 366 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_out_buffer_size |
| @@ -334,6 +370,7 @@ Description: This file shows the maximum data-out buffer size. This · 3 unmodified lines | ||
| 334 | 370 | is one of the UFS geometry descriptor parameters. The full |
| 335 | 371 | information about the descriptor could be found at UFS |
| 336 | 372 | specifications 2.1. |
| 373 | + | |
| 337 | 374 | The file is read only. |
| 338 | 375 | |
| 339 | 376 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/rpmb_rw_size |
| @@ -343,6 +380,7 @@ Description: This file shows the maximum number of RPMB frames allowed · 3 unmodified lines | ||
| 343 | 380 | in Security Protocol In/Out. This is one of the UFS geometry |
| 344 | 381 | descriptor parameters. The full information about the |
| 345 | 382 | descriptor could be found at UFS specifications 2.1. |
| 383 | + | |
| 346 | 384 | The file is read only. |
| 347 | 385 | |
| 348 | 386 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/dyn_capacity_resource_policy |
| @@ -352,6 +390,7 @@ Description: This file shows the dynamic capacity resource policy. This · 3 unmodified lines | ||
| 352 | 390 | is one of the UFS geometry descriptor parameters. The full |
| 353 | 391 | information about the descriptor could be found at |
| 354 | 392 | UFS specifications 2.1. |
| 393 | + | |
| 355 | 394 | The file is read only. |
| 356 | 395 | |
| 357 | 396 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/data_ordering |
| @@ -361,6 +400,7 @@ Description: This file shows support for out-of-order data transfer. · 3 unmodified lines | ||
| 361 | 400 | This is one of the UFS geometry descriptor parameters. |
| 362 | 401 | The full information about the descriptor could be found at |
| 363 | 402 | UFS specifications 2.1. |
| 403 | + | |
| 364 | 404 | The file is read only. |
| 365 | 405 | |
| 366 | 406 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/max_number_of_contexts |
| @@ -370,6 +410,7 @@ Description: This file shows maximum available number of contexts which · 3 unmodified lines | ||
| 370 | 410 | are supported by the device. This is one of the UFS geometry |
| 371 | 411 | descriptor parameters. The full information about the |
| 372 | 412 | descriptor could be found at UFS specifications 2.1. |
| 413 | + | |
| 373 | 414 | The file is read only. |
| 374 | 415 | |
| 375 | 416 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/sys_data_tag_unit_size |
| @@ -378,6 +419,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 378 | 419 | Description: This file shows system data tag unit size. This is one of |
| 379 | 420 | the UFS geometry descriptor parameters. The full information |
| 380 | 421 | about the descriptor could be found at UFS specifications 2.1. |
| 422 | + | |
| 381 | 423 | The file is read only. |
| 382 | 424 | |
| 383 | 425 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/sys_data_tag_resource_size |
| @@ -388,6 +430,7 @@ Description: This file shows maximum storage area size allocated by · 4 unmodified lines | ||
| 388 | 430 | This is one of the UFS geometry descriptor parameters. |
| 389 | 431 | The full information about the descriptor could be found at |
| 390 | 432 | UFS specifications 2.1. |
| 433 | + | |
| 391 | 434 | The file is read only. |
| 392 | 435 | |
| 393 | 436 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/secure_removal_types |
| @@ -397,6 +440,7 @@ Description: This file shows supported secure removal types. This is · 3 unmodified lines | ||
| 397 | 440 | one of the UFS geometry descriptor parameters. The full |
| 398 | 441 | information about the descriptor could be found at |
| 399 | 442 | UFS specifications 2.1. |
| 443 | + | |
| 400 | 444 | The file is read only. |
| 401 | 445 | |
| 402 | 446 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/memory_types |
| @@ -406,6 +450,7 @@ Description: This file shows supported memory types. This is one of · 3 unmodified lines | ||
| 406 | 450 | the UFS geometry descriptor parameters. The full |
| 407 | 451 | information about the descriptor could be found at |
| 408 | 452 | UFS specifications 2.1. |
| 453 | + | |
| 409 | 454 | The file is read only. |
| 410 | 455 | |
| 411 | 456 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/*_memory_max_alloc_units |
| @@ -416,6 +461,7 @@ Description: This file shows the maximum number of allocation units for · 4 unmodified lines | ||
| 416 | 461 | enhanced type 1-4). This is one of the UFS geometry |
| 417 | 462 | descriptor parameters. The full information about the |
| 418 | 463 | descriptor could be found at UFS specifications 2.1. |
| 464 | + | |
| 419 | 465 | The file is read only. |
| 420 | 466 | |
| 421 | 467 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/*_memory_capacity_adjustment_factor |
| @@ -426,6 +472,7 @@ Description: This file shows the memory capacity adjustment factor for · 4 unmodified lines | ||
| 426 | 472 | enhanced type 1-4). This is one of the UFS geometry |
| 427 | 473 | descriptor parameters. The full information about the |
| 428 | 474 | descriptor could be found at UFS specifications 2.1. |
| 475 | + | |
| 429 | 476 | The file is read only. |
| 430 | 477 | |
| 431 | 478 | |
| @@ -436,6 +483,7 @@ Description: This file shows preend of life information. This is one · 4 unmodified lines | ||
| 436 | 483 | of the UFS health descriptor parameters. The full |
| 437 | 484 | information about the descriptor could be found at |
| 438 | 485 | UFS specifications 2.1. |
| 486 | + | |
| 439 | 487 | The file is read only. |
| 440 | 488 | |
| 441 | 489 | What: /sys/bus/platform/drivers/ufshcd/*/health_descriptor/life_time_estimation_a |
| @@ -445,6 +493,7 @@ Description: This file shows indication of the device life time · 3 unmodified lines | ||
| 445 | 493 | (method a). This is one of the UFS health descriptor |
| 446 | 494 | parameters. The full information about the descriptor |
| 447 | 495 | could be found at UFS specifications 2.1. |
| 496 | + | |
| 448 | 497 | The file is read only. |
| 449 | 498 | |
| 450 | 499 | What: /sys/bus/platform/drivers/ufshcd/*/health_descriptor/life_time_estimation_b |
| @@ -454,6 +503,7 @@ Description: This file shows indication of the device life time · 3 unmodified lines | ||
| 454 | 503 | (method b). This is one of the UFS health descriptor |
| 455 | 504 | parameters. The full information about the descriptor |
| 456 | 505 | could be found at UFS specifications 2.1. |
| 506 | + | |
| 457 | 507 | The file is read only. |
| 458 | 508 | |
| 459 | 509 | |
| @@ -464,6 +514,7 @@ Description: This file shows maximum VCC, VCCQ and VCCQ2 value for · 4 unmodified lines | ||
| 464 | 514 | active ICC levels from 0 to 15. This is one of the UFS |
| 465 | 515 | power descriptor parameters. The full information about |
| 466 | 516 | the descriptor could be found at UFS specifications 2.1. |
| 517 | + | |
| 467 | 518 | The file is read only. |
| 468 | 519 | |
| 469 | 520 | |
| @@ -473,6 +524,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 3 unmodified lines | ||
| 473 | 524 | Description: This file contains a device manufactureer name string. |
| 474 | 525 | The full information about the descriptor could be found at |
| 475 | 526 | UFS specifications 2.1. |
| 527 | + | |
| 476 | 528 | The file is read only. |
| 477 | 529 | |
| 478 | 530 | What: /sys/bus/platform/drivers/ufshcd/*/string_descriptors/product_name |
| @@ -480,6 +532,7 @@ Date: February 2018 · 1 unmodified line | ||
| 480 | 532 | Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> |
| 481 | 533 | Description: This file contains a product name string. The full information |
| 482 | 534 | about the descriptor could be found at UFS specifications 2.1. |
| 535 | + | |
| 483 | 536 | The file is read only. |
| 484 | 537 | |
| 485 | 538 | What: /sys/bus/platform/drivers/ufshcd/*/string_descriptors/oem_id |
| @@ -487,6 +540,7 @@ Date: February 2018 · 1 unmodified line | ||
| 487 | 540 | Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> |
| 488 | 541 | Description: This file contains a OEM ID string. The full information |
| 489 | 542 | about the descriptor could be found at UFS specifications 2.1. |
| 543 | + | |
| 490 | 544 | The file is read only. |
| 491 | 545 | |
| 492 | 546 | What: /sys/bus/platform/drivers/ufshcd/*/string_descriptors/serial_number |
| @@ -495,6 +549,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 495 | 549 | Description: This file contains a device serial number string. The full |
| 496 | 550 | information about the descriptor could be found at |
| 497 | 551 | UFS specifications 2.1. |
| 552 | + | |
| 498 | 553 | The file is read only. |
| 499 | 554 | |
| 500 | 555 | What: /sys/bus/platform/drivers/ufshcd/*/string_descriptors/product_revision |
| @@ -503,6 +558,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 503 | 558 | Description: This file contains a product revision string. The full |
| 504 | 559 | information about the descriptor could be found at |
| 505 | 560 | UFS specifications 2.1. |
| 561 | + | |
| 506 | 562 | The file is read only. |
| 507 | 563 | |
| 508 | 564 | |
| @@ -512,6 +568,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 3 unmodified lines | ||
| 512 | 568 | Description: This file shows boot LUN information. This is one of |
| 513 | 569 | the UFS unit descriptor parameters. The full information |
| 514 | 570 | about the descriptor could be found at UFS specifications 2.1. |
| 571 | + | |
| 515 | 572 | The file is read only. |
| 516 | 573 | |
| 517 | 574 | What: /sys/class/scsi_device/*/device/unit_descriptor/lun_write_protect |
| @@ -520,6 +577,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 520 | 577 | Description: This file shows LUN write protection status. This is one of |
| 521 | 578 | the UFS unit descriptor parameters. The full information |
| 522 | 579 | about the descriptor could be found at UFS specifications 2.1. |
| 580 | + | |
| 523 | 581 | The file is read only. |
| 524 | 582 | |
| 525 | 583 | What: /sys/class/scsi_device/*/device/unit_descriptor/lun_queue_depth |
| @@ -528,6 +586,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 528 | 586 | Description: This file shows LUN queue depth. This is one of the UFS |
| 529 | 587 | unit descriptor parameters. The full information about |
| 530 | 588 | the descriptor could be found at UFS specifications 2.1. |
| 589 | + | |
| 531 | 590 | The file is read only. |
| 532 | 591 | |
| 533 | 592 | What: /sys/class/scsi_device/*/device/unit_descriptor/psa_sensitive |
| @@ -536,6 +595,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 536 | 595 | Description: This file shows PSA sensitivity. This is one of the UFS |
| 537 | 596 | unit descriptor parameters. The full information about |
| 538 | 597 | the descriptor could be found at UFS specifications 2.1. |
| 598 | + | |
| 539 | 599 | The file is read only. |
| 540 | 600 | |
| 541 | 601 | What: /sys/class/scsi_device/*/device/unit_descriptor/lun_memory_type |
| @@ -544,6 +604,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 544 | 604 | Description: This file shows LUN memory type. This is one of the UFS |
| 545 | 605 | unit descriptor parameters. The full information about |
| 546 | 606 | the descriptor could be found at UFS specifications 2.1. |
| 607 | + | |
| 547 | 608 | The file is read only. |
| 548 | 609 | |
| 549 | 610 | What: /sys/class/scsi_device/*/device/unit_descriptor/data_reliability |
| @@ -553,6 +614,7 @@ Description: This file defines the device behavior when a power failure · 3 unmodified lines | ||
| 553 | 614 | occurs during a write operation. This is one of the UFS |
| 554 | 615 | unit descriptor parameters. The full information about |
| 555 | 616 | the descriptor could be found at UFS specifications 2.1. |
| 617 | + | |
| 556 | 618 | The file is read only. |
| 557 | 619 | |
| 558 | 620 | What: /sys/class/scsi_device/*/device/unit_descriptor/logical_block_size |
| @@ -562,6 +624,7 @@ Description: This file shows the size of addressable logical blocks · 3 unmodified lines | ||
| 562 | 624 | (calculated as an exponent with base 2). This is one of |
| 563 | 625 | the UFS unit descriptor parameters. The full information about |
| 564 | 626 | the descriptor could be found at UFS specifications 2.1. |
| 627 | + | |
| 565 | 628 | The file is read only. |
| 566 | 629 | |
| 567 | 630 | What: /sys/class/scsi_device/*/device/unit_descriptor/logical_block_count |
| @@ -571,6 +634,7 @@ Description: This file shows total number of addressable logical blocks. · 3 unmodified lines | ||
| 571 | 634 | This is one of the UFS unit descriptor parameters. The full |
| 572 | 635 | information about the descriptor could be found at |
| 573 | 636 | UFS specifications 2.1. |
| 637 | + | |
| 574 | 638 | The file is read only. |
| 575 | 639 | |
| 576 | 640 | What: /sys/class/scsi_device/*/device/unit_descriptor/erase_block_size |
| @@ -579,6 +643,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 579 | 643 | Description: This file shows the erase block size. This is one of |
| 580 | 644 | the UFS unit descriptor parameters. The full information |
| 581 | 645 | about the descriptor could be found at UFS specifications 2.1. |
| 646 | + | |
| 582 | 647 | The file is read only. |
| 583 | 648 | |
| 584 | 649 | What: /sys/class/scsi_device/*/device/unit_descriptor/provisioning_type |
| @@ -587,6 +652,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 587 | 652 | Description: This file shows the thin provisioning type. This is one of |
| 588 | 653 | the UFS unit descriptor parameters. The full information |
| 589 | 654 | about the descriptor could be found at UFS specifications 2.1. |
| 655 | + | |
| 590 | 656 | The file is read only. |
| 591 | 657 | |
| 592 | 658 | What: /sys/class/scsi_device/*/device/unit_descriptor/physical_memory_resourse_count |
| @@ -595,6 +661,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 595 | 661 | Description: This file shows the total physical memory resources. This is |
| 596 | 662 | one of the UFS unit descriptor parameters. The full information |
| 597 | 663 | about the descriptor could be found at UFS specifications 2.1. |
| 664 | + | |
| 598 | 665 | The file is read only. |
| 599 | 666 | |
| 600 | 667 | What: /sys/class/scsi_device/*/device/unit_descriptor/context_capabilities |
| @@ -603,6 +670,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 603 | 670 | Description: This file shows the context capabilities. This is one of |
| 604 | 671 | the UFS unit descriptor parameters. The full information |
| 605 | 672 | about the descriptor could be found at UFS specifications 2.1. |
| 673 | + | |
| 606 | 674 | The file is read only. |
| 607 | 675 | |
| 608 | 676 | What: /sys/class/scsi_device/*/device/unit_descriptor/large_unit_granularity |
| @@ -611,6 +679,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 611 | 679 | Description: This file shows the granularity of the LUN. This is one of |
| 612 | 680 | the UFS unit descriptor parameters. The full information |
| 613 | 681 | about the descriptor could be found at UFS specifications 2.1. |
| 682 | + | |
| 614 | 683 | The file is read only. |
| 615 | 684 | |
| 616 | 685 | |
| @@ -619,6 +688,7 @@ Date: February 2018 · 2 unmodified lines | ||
| 619 | 688 | Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> |
| 620 | 689 | Description: This file shows the device init status. The full information |
| 621 | 690 | about the flag could be found at UFS specifications 2.1. |
| 691 | + | |
| 622 | 692 | The file is read only. |
| 623 | 693 | |
| 624 | 694 | What: /sys/bus/platform/drivers/ufshcd/*/flags/permanent_wpe |
| @@ -627,6 +697,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 627 | 697 | Description: This file shows whether permanent write protection is enabled. |
| 628 | 698 | The full information about the flag could be found at |
| 629 | 699 | UFS specifications 2.1. |
| 700 | + | |
| 630 | 701 | The file is read only. |
| 631 | 702 | |
| 632 | 703 | What: /sys/bus/platform/drivers/ufshcd/*/flags/power_on_wpe |
| @@ -636,6 +707,7 @@ Description: This file shows whether write protection is enabled on all · 3 unmodified lines | ||
| 636 | 707 | logical units configured as power on write protected. The |
| 637 | 708 | full information about the flag could be found at |
| 638 | 709 | UFS specifications 2.1. |
| 710 | + | |
| 639 | 711 | The file is read only. |
| 640 | 712 | |
| 641 | 713 | What: /sys/bus/platform/drivers/ufshcd/*/flags/bkops_enable |
| @@ -644,6 +716,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 644 | 716 | Description: This file shows whether the device background operations are |
| 645 | 717 | enabled. The full information about the flag could be |
| 646 | 718 | found at UFS specifications 2.1. |
| 719 | + | |
| 647 | 720 | The file is read only. |
| 648 | 721 | |
| 649 | 722 | What: /sys/bus/platform/drivers/ufshcd/*/flags/life_span_mode_enable |
| @@ -652,6 +725,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 652 | 725 | Description: This file shows whether the device life span mode is enabled. |
| 653 | 726 | The full information about the flag could be found at |
| 654 | 727 | UFS specifications 2.1. |
| 728 | + | |
| 655 | 729 | The file is read only. |
| 656 | 730 | |
| 657 | 731 | What: /sys/bus/platform/drivers/ufshcd/*/flags/phy_resource_removal |
| @@ -660,6 +734,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 660 | 734 | Description: This file shows whether physical resource removal is enable. |
| 661 | 735 | The full information about the flag could be found at |
| 662 | 736 | UFS specifications 2.1. |
| 737 | + | |
| 663 | 738 | The file is read only. |
| 664 | 739 | |
| 665 | 740 | What: /sys/bus/platform/drivers/ufshcd/*/flags/busy_rtc |
| @@ -668,6 +743,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 668 | 743 | Description: This file shows whether the device is executing internal |
| 669 | 744 | operation related to real time clock. The full information |
| 670 | 745 | about the flag could be found at UFS specifications 2.1. |
| 746 | + | |
| 671 | 747 | The file is read only. |
| 672 | 748 | |
| 673 | 749 | What: /sys/bus/platform/drivers/ufshcd/*/flags/disable_fw_update |
| @@ -676,6 +752,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 676 | 752 | Description: This file shows whether the device FW update is permanently |
| 677 | 753 | disabled. The full information about the flag could be found |
| 678 | 754 | at UFS specifications 2.1. |
| 755 | + | |
| 679 | 756 | The file is read only. |
| 680 | 757 | |
| 681 | 758 | |
| @@ -685,6 +762,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 3 unmodified lines | ||
| 685 | 762 | Description: This file provides the boot lun enabled UFS device attribute. |
| 686 | 763 | The full information about the attribute could be found at |
| 687 | 764 | UFS specifications 2.1. |
| 765 | + | |
| 688 | 766 | The file is read only. |
| 689 | 767 | |
| 690 | 768 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/current_power_mode |
| @@ -693,6 +771,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 693 | 771 | Description: This file provides the current power mode UFS device attribute. |
| 694 | 772 | The full information about the attribute could be found at |
| 695 | 773 | UFS specifications 2.1. |
| 774 | + | |
| 696 | 775 | The file is read only. |
| 697 | 776 | |
| 698 | 777 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/active_icc_level |
| @@ -701,6 +780,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 701 | 780 | Description: This file provides the active icc level UFS device attribute. |
| 702 | 781 | The full information about the attribute could be found at |
| 703 | 782 | UFS specifications 2.1. |
| 783 | + | |
| 704 | 784 | The file is read only. |
| 705 | 785 | |
| 706 | 786 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/ooo_data_enabled |
| @@ -709,6 +789,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 709 | 789 | Description: This file provides the out of order data transfer enabled UFS |
| 710 | 790 | device attribute. The full information about the attribute |
| 711 | 791 | could be found at UFS specifications 2.1. |
| 792 | + | |
| 712 | 793 | The file is read only. |
| 713 | 794 | |
| 714 | 795 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/bkops_status |
| @@ -717,6 +798,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 717 | 798 | Description: This file provides the background operations status UFS device |
| 718 | 799 | attribute. The full information about the attribute could |
| 719 | 800 | be found at UFS specifications 2.1. |
| 801 | + | |
| 720 | 802 | The file is read only. |
| 721 | 803 | |
| 722 | 804 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/purge_status |
| @@ -725,6 +807,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 725 | 807 | Description: This file provides the purge operation status UFS device |
| 726 | 808 | attribute. The full information about the attribute could |
| 727 | 809 | be found at UFS specifications 2.1. |
| 810 | + | |
| 728 | 811 | The file is read only. |
| 729 | 812 | |
| 730 | 813 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_in_size |
| @@ -733,6 +816,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 733 | 816 | Description: This file shows the maximum data size in a DATA IN |
| 734 | 817 | UPIU. The full information about the attribute could |
| 735 | 818 | be found at UFS specifications 2.1. |
| 819 | + | |
| 736 | 820 | The file is read only. |
| 737 | 821 | |
| 738 | 822 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_out_size |
| @@ -741,6 +825,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 741 | 825 | Description: This file shows the maximum number of bytes that can be |
| 742 | 826 | requested with a READY TO TRANSFER UPIU. The full information |
| 743 | 827 | about the attribute could be found at UFS specifications 2.1. |
| 828 | + | |
| 744 | 829 | The file is read only. |
| 745 | 830 | |
| 746 | 831 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/reference_clock_frequency |
| @@ -749,6 +834,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 749 | 834 | Description: This file provides the reference clock frequency UFS device |
| 750 | 835 | attribute. The full information about the attribute could |
| 751 | 836 | be found at UFS specifications 2.1. |
| 837 | + | |
| 752 | 838 | The file is read only. |
| 753 | 839 | |
| 754 | 840 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/configuration_descriptor_lock |
| @@ -765,6 +851,7 @@ Description: This file provides the maximum current number of · 10 unmodified lines | ||
| 765 | 851 | outstanding RTTs in device that is allowed. The full |
| 766 | 852 | information about the attribute could be found at |
| 767 | 853 | UFS specifications 2.1. |
| 854 | + | |
| 768 | 855 | The file is read only. |
| 769 | 856 | |
| 770 | 857 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/exception_event_control |
| @@ -773,6 +860,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 773 | 860 | Description: This file provides the exception event control UFS device |
| 774 | 861 | attribute. The full information about the attribute could |
| 775 | 862 | be found at UFS specifications 2.1. |
| 863 | + | |
| 776 | 864 | The file is read only. |
| 777 | 865 | |
| 778 | 866 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/exception_event_status |
| @@ -781,6 +869,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 781 | 869 | Description: This file provides the exception event status UFS device |
| 782 | 870 | attribute. The full information about the attribute could |
| 783 | 871 | be found at UFS specifications 2.1. |
| 872 | + | |
| 784 | 873 | The file is read only. |
| 785 | 874 | |
| 786 | 875 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/ffu_status |
| @@ -789,6 +878,7 @@ Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> · 2 unmodified lines | ||
| 789 | 878 | Description: This file provides the ffu status UFS device attribute. |
| 790 | 879 | The full information about the attribute could be found at |
| 791 | 880 | UFS specifications 2.1. |
| 881 | + | |
| 792 | 882 | The file is read only. |
| 793 | 883 | |
| 794 | 884 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/psa_state |
| @@ -796,6 +886,7 @@ Date: February 2018 · 1 unmodified line | ||
| 796 | 886 | Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> |
| 797 | 887 | Description: This file show the PSA feature status. The full information |
| 798 | 888 | about the attribute could be found at UFS specifications 2.1. |
| 889 | + | |
| 799 | 890 | The file is read only. |
| 800 | 891 | |
| 801 | 892 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/psa_data_size |
| @@ -805,6 +896,7 @@ Description: This file shows the amount of data that the host plans to · 3 unmodified lines | ||
| 805 | 896 | load to all logical units in pre-soldering state. |
| 806 | 897 | The full information about the attribute could be found at |
| 807 | 898 | UFS specifications 2.1. |
| 899 | + | |
| 808 | 900 | The file is read only. |
| 809 | 901 | |
| 810 | 902 | |
| @@ -815,6 +907,7 @@ Description: This file shows the The amount of physical memory needed · 4 unmodified lines | ||
| 815 | 907 | to be removed from the physical memory resources pool of |
| 816 | 908 | the particular logical unit. The full information about |
| 817 | 909 | the attribute could be found at UFS specifications 2.1. |
| 910 | + | |
| 818 | 911 | The file is read only. |
| 819 | 912 | |
| 820 | 913 | |
| @@ -824,24 +917,28 @@ Contact: Subhash Jadavani <subhashj@codeaurora.org> · 3 unmodified lines | ||
| 824 | 917 | Description: This entry could be used to set or show the UFS device |
| 825 | 918 | runtime power management level. The current driver |
| 826 | 919 | implementation supports 6 levels with next target states: |
| 827 | − 0 - an UFS device will stay active, an UIC link will | |
| 828 | − stay active | |
| 829 | − 1 - an UFS device will stay active, an UIC link will | |
| 830 | − hibernate | |
| 831 | − 2 - an UFS device will moved to sleep, an UIC link will | |
| 832 | − stay active | |
| 833 | − 3 - an UFS device will moved to sleep, an UIC link will | |
| 834 | − hibernate | |
| 835 | − 4 - an UFS device will be powered off, an UIC link will | |
| 836 | − hibernate | |
| 837 | − 5 - an UFS device will be powered off, an UIC link will | |
| 838 | − be powered off | |
| 920 | + | |
| 921 | + == ==================================================== | |
| 922 | + 0 an UFS device will stay active, an UIC link will | |
| 923 | + stay active | |
| 924 | + 1 an UFS device will stay active, an UIC link will | |
| 925 | + hibernate | |
| 926 | + 2 an UFS device will moved to sleep, an UIC link will | |
| 927 | + stay active | |
| 928 | + 3 an UFS device will moved to sleep, an UIC link will | |
| 929 | + hibernate | |
| 930 | + 4 an UFS device will be powered off, an UIC link will | |
| 931 | + hibernate | |
| 932 | + 5 an UFS device will be powered off, an UIC link will | |
| 933 | + be powered off | |
| 934 | + == ==================================================== | |
| 839 | 935 | |
| 840 | 936 | What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_dev_state |
| 841 | 937 | Date: February 2018 |
| 842 | 938 | Contact: Subhash Jadavani <subhashj@codeaurora.org> |
| 843 | 939 | Description: This entry shows the target power mode of an UFS device |
| 844 | 940 | for the chosen runtime power management level. |
| 941 | + | |
| 845 | 942 | The file is read only. |
| 846 | 943 | |
| 847 | 944 | What: /sys/bus/platform/drivers/ufshcd/*/rpm_target_link_state |
| @@ -849,6 +946,7 @@ Date: February 2018 · 1 unmodified line | ||
| 849 | 946 | Contact: Subhash Jadavani <subhashj@codeaurora.org> |
| 850 | 947 | Description: This entry shows the target state of an UFS UIC link |
| 851 | 948 | for the chosen runtime power management level. |
| 949 | + | |
| 852 | 950 | The file is read only. |
| 853 | 951 | |
| 854 | 952 | What: /sys/bus/platform/drivers/ufshcd/*/spm_lvl |
| @@ -857,24 +955,28 @@ Contact: Subhash Jadavani <subhashj@codeaurora.org> · 2 unmodified lines | ||
| 857 | 955 | Description: This entry could be used to set or show the UFS device |
| 858 | 956 | system power management level. The current driver |
| 859 | 957 | implementation supports 6 levels with next target states: |
| 860 | − 0 - an UFS device will stay active, an UIC link will | |
| 861 | − stay active | |
| 862 | − 1 - an UFS device will stay active, an UIC link will | |
| 863 | − hibernate | |
| 864 | − 2 - an UFS device will moved to sleep, an UIC link will | |
| 865 | − stay active | |
| 866 | − 3 - an UFS device will moved to sleep, an UIC link will | |
| 867 | − hibernate | |
| 868 | − 4 - an UFS device will be powered off, an UIC link will | |
| 869 | − hibernate | |
| 870 | − 5 - an UFS device will be powered off, an UIC link will | |
| 871 | − be powered off | |
| 958 | + | |
| 959 | + == ==================================================== | |
| 960 | + 0 an UFS device will stay active, an UIC link will | |
| 961 | + stay active | |
| 962 | + 1 an UFS device will stay active, an UIC link will | |
| 963 | + hibernate | |
| 964 | + 2 an UFS device will moved to sleep, an UIC link will | |
| 965 | + stay active | |
| 966 | + 3 an UFS device will moved to sleep, an UIC link will | |
| 967 | + hibernate | |
| 968 | + 4 an UFS device will be powered off, an UIC link will | |
| 969 | + hibernate | |
| 970 | + 5 an UFS device will be powered off, an UIC link will | |
| 971 | + be powered off | |
| 972 | + == ==================================================== | |
| 872 | 973 | |
| 873 | 974 | What: /sys/bus/platform/drivers/ufshcd/*/spm_target_dev_state |
| 874 | 975 | Date: February 2018 |
| 875 | 976 | Contact: Subhash Jadavani <subhashj@codeaurora.org> |
| 876 | 977 | Description: This entry shows the target power mode of an UFS device |
| 877 | 978 | for the chosen system power management level. |
| 979 | + | |
| 878 | 980 | The file is read only. |
| 879 | 981 | |
| 880 | 982 | What: /sys/bus/platform/drivers/ufshcd/*/spm_target_link_state |
| @@ -882,18 +984,21 @@ Date: February 2018 · 1 unmodified line | ||
| 882 | 984 | Contact: Subhash Jadavani <subhashj@codeaurora.org> |
| 883 | 985 | Description: This entry shows the target state of an UFS UIC link |
| 884 | 986 | for the chosen system power management level. |
| 987 | + | |
| 885 | 988 | The file is read only. |
| 886 | 989 | |
| 887 | 990 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en |
| 888 | 991 | Date: June 2020 |
| 889 | 992 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 890 | 993 | Description: This entry shows if preserve user-space was configured |
| 994 | + | |
| 891 | 995 | The file is read only. |
| 892 | 996 | |
| 893 | 997 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units |
| 894 | 998 | Date: June 2020 |
| 895 | 999 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 896 | 1000 | Description: This entry shows the shared allocated units of WB buffer |
| 1001 | + | |
| 897 | 1002 | The file is read only. |
| 898 | 1003 | |
| 899 | 1004 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type |
| @@ -901,6 +1006,7 @@ Date: June 2020 · 1 unmodified line | ||
| 901 | 1006 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 902 | 1007 | Description: This entry shows the configured WB type. |
| 903 | 1008 | 0x1 for shared buffer mode. 0x0 for dedicated buffer mode. |
| 1009 | + | |
| 904 | 1010 | The file is read only. |
| 905 | 1011 | |
| 906 | 1012 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj |
| @@ -910,6 +1016,7 @@ Description: This entry shows the total user-space decrease in shared · 3 unmodified lines | ||
| 910 | 1016 | buffer mode. |
| 911 | 1017 | The value of this parameter is 3 for TLC NAND when SLC mode |
| 912 | 1018 | is used as WriteBooster Buffer. 2 for MLC NAND. |
| 1019 | + | |
| 913 | 1020 | The file is read only. |
| 914 | 1021 | |
| 915 | 1022 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units |
| @@ -917,6 +1024,7 @@ Date: June 2020 · 1 unmodified line | ||
| 917 | 1024 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 918 | 1025 | Description: This entry shows the Maximum total WriteBooster Buffer size |
| 919 | 1026 | which is supported by the entire device. |
| 1027 | + | |
| 920 | 1028 | The file is read only. |
| 921 | 1029 | |
| 922 | 1030 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns |
| @@ -924,6 +1032,7 @@ Date: June 2020 · 1 unmodified line | ||
| 924 | 1032 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 925 | 1033 | Description: This entry shows the maximum number of luns that can support |
| 926 | 1034 | WriteBooster. |
| 1035 | + | |
| 927 | 1036 | The file is read only. |
| 928 | 1037 | |
| 929 | 1038 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type |
| @@ -937,46 +1046,59 @@ Description: The supportability of user space reduction mode · 7 unmodified lines | ||
| 937 | 1046 | preserve user space type. |
| 938 | 1047 | 02h: Device can be configured in either user space |
| 939 | 1048 | reduction type or preserve user space type. |
| 1049 | + | |
| 940 | 1050 | The file is read only. |
| 941 | 1051 | |
| 942 | 1052 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type |
| 943 | 1053 | Date: June 2020 |
| 944 | 1054 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 945 | 1055 | Description: The supportability of WriteBooster Buffer type. |
| 946 | − 00h: LU based WriteBooster Buffer configuration | |
| 947 | − 01h: Single shared WriteBooster Buffer | |
| 948 | − configuration | |
| 949 | − 02h: Supporting both LU based WriteBooster | |
| 950 | − Buffer and Single shared WriteBooster Buffer | |
| 951 | − configuration | |
| 1056 | + | |
| 1057 | + === ========================================================== | |
| 1058 | + 00h LU based WriteBooster Buffer configuration | |
| 1059 | + 01h Single shared WriteBooster Buffer configuration | |
| 1060 | + 02h Supporting both LU based WriteBooster. | |
| 1061 | + Buffer and Single shared WriteBooster Buffer configuration | |
| 1062 | + === ========================================================== | |
| 1063 | + | |
| 952 | 1064 | The file is read only. |
| 953 | 1065 | |
| 954 | 1066 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable |
| 955 | 1067 | Date: June 2020 |
| 956 | 1068 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 957 | 1069 | Description: This entry shows the status of WriteBooster. |
| 958 | − 0: WriteBooster is not enabled. | |
| 959 | − 1: WriteBooster is enabled | |
| 1070 | + | |
| 1071 | + == ============================ | |
| 1072 | + 0 WriteBooster is not enabled. | |
| 1073 | + 1 WriteBooster is enabled | |
| 1074 | + == ============================ | |
| 1075 | + | |
| 960 | 1076 | The file is read only. |
| 961 | 1077 | |
| 962 | 1078 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en |
| 963 | 1079 | Date: June 2020 |
| 964 | 1080 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 965 | 1081 | Description: This entry shows if flush is enabled. |
| 966 | − 0: Flush operation is not performed. | |
| 967 | − 1: Flush operation is performed. | |
| 1082 | + | |
| 1083 | + == ================================= | |
| 1084 | + 0 Flush operation is not performed. | |
| 1085 | + 1 Flush operation is performed. | |
| 1086 | + == ================================= | |
| 1087 | + | |
| 968 | 1088 | The file is read only. |
| 969 | 1089 | |
| 970 | 1090 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8 |
| 971 | 1091 | Date: June 2020 |
| 972 | 1092 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 973 | 1093 | Description: Flush WriteBooster Buffer during hibernate state. |
| 974 | − 0: Device is not allowed to flush the | |
| 975 | − WriteBooster Buffer during link hibernate | |
| 976 | − state. | |
| 977 | − 1: Device is allowed to flush the | |
| 978 | − WriteBooster Buffer during link hibernate | |
| 979 | − state | |
| 1094 | + | |
| 1095 | + == ================================================= | |
| 1096 | + 0 Device is not allowed to flush the | |
| 1097 | + WriteBooster Buffer during link hibernate state. | |
| 1098 | + 1 Device is allowed to flush the | |
| 1099 | + WriteBooster Buffer during link hibernate state. | |
| 1100 | + == ================================================= | |
| 1101 | + | |
| 980 | 1102 | The file is read only. |
| 981 | 1103 | |
| 982 | 1104 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf |
| @@ -984,23 +1106,30 @@ Date: June 2020 · 1 unmodified line | ||
| 984 | 1106 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 985 | 1107 | Description: This entry shows the amount of unused WriteBooster buffer |
| 986 | 1108 | available. |
| 1109 | + | |
| 987 | 1110 | The file is read only. |
| 988 | 1111 | |
| 989 | 1112 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf |
| 990 | 1113 | Date: June 2020 |
| 991 | 1114 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 992 | 1115 | Description: This entry shows the amount of unused current buffer. |
| 1116 | + | |
| 993 | 1117 | The file is read only. |
| 994 | 1118 | |
| 995 | 1119 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status |
| 996 | 1120 | Date: June 2020 |
| 997 | 1121 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 998 | 1122 | Description: This entry shows the flush operation status. |
| 999 | − 00h: idle | |
| 1000 | − 01h: Flush operation in progress | |
| 1001 | − 02h: Flush operation stopped prematurely. | |
| 1002 | − 03h: Flush operation completed successfully | |
| 1003 | − 04h: Flush operation general failure | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + === ====================================== | |
| 1126 | + 00h idle | |
| 1127 | + 01h Flush operation in progress | |
| 1128 | + 02h Flush operation stopped prematurely. | |
| 1129 | + 03h Flush operation completed successfully | |
| 1130 | + 04h Flush operation general failure | |
| 1131 | + === ====================================== | |
| 1132 | + | |
| 1004 | 1133 | The file is read only. |
| 1005 | 1134 | |
| 1006 | 1135 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est |
| @@ -1008,9 +1137,13 @@ Date: June 2020 · 1 unmodified line | ||
| 1008 | 1137 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 1009 | 1138 | Description: This entry shows an indication of the WriteBooster Buffer |
| 1010 | 1139 | lifetime based on the amount of performed program/erase cycles |
| 1011 | − 01h: 0% - 10% WriteBooster Buffer life time used | |
| 1140 | + | |
| 1141 | + === ============================================= | |
| 1142 | + 01h 0% - 10% WriteBooster Buffer life time used | |
| 1012 | 1143 | ... |
| 1013 | − 0Ah: 90% - 100% WriteBooster Buffer life time used | |
| 1144 | + 0Ah 90% - 100% WriteBooster Buffer life time used | |
| 1145 | + === ============================================= | |
| 1146 | + | |
| 1014 | 1147 | The file is read only. |
| 1015 | 1148 | |
| 1016 | 1149 | What: /sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units |
| @@ -1018,4 +1151,5 @@ Date: June 2020 · 1 unmodified line | ||
| 1018 | 1151 | Contact: Asutosh Das <asutoshd@codeaurora.org> |
| 1019 | 1152 | Description: This entry shows the configured size of WriteBooster buffer. |
| 1020 | 1153 | 0400h corresponds to 4GB. |
| 1154 | + | |
| 1021 | 1155 | The file is read only. |
| @@ -5,7 +5,9 @@ Contact: Jan Kandziora <jjj@gmx.de> · 4 unmodified lines | ||
| 5 | 5 | Description: When written, this file sets the I2C speed on the connected |
| 6 | 6 | DS28E17 chip. When read, it reads the current setting from |
| 7 | 7 | the DS28E17 chip. |
| 8 | + | |
| 8 | 9 | Valid values: 100, 400, 900 [kBaud]. |
| 10 | + | |
| 9 | 11 | Default 100, can be set by w1_ds28e17.speed= module parameter. |
| 10 | 12 | Users: w1_ds28e17 driver |
| 11 | 13 | |
| @@ -17,5 +19,6 @@ Description: When written, this file sets the multiplier used to calculate · 5 unmodified lines | ||
| 17 | 19 | the busy timeout for I2C operations on the connected DS28E17 |
| 18 | 20 | chip. When read, returns the current setting. |
| 19 | 21 | Valid values: 1 to 9. |
| 22 | + | |
| 20 | 23 | Default 1, can be set by w1_ds28e17.stretch= module parameter. |
| 21 | 24 | Users: w1_ds28e17 driver |
| @@ -22,8 +22,10 @@ Description: · 21 unmodified lines | ||
| 22 | 22 | device data to its embedded EEPROM, either restore data |
| 23 | 23 | embedded in device EEPROM. Be aware that devices support |
| 24 | 24 | limited EEPROM writing cycles (typical 50k) |
| 25 | + | |
| 25 | 26 | * 'save': save device RAM to EEPROM |
| 26 | 27 | * 'restore': restore EEPROM data in device RAM |
| 28 | + | |
| 27 | 29 | Users: any user space application which wants to communicate with |
| 28 | 30 | w1_term device |
| 29 | 31 | |
| @@ -33,9 +35,11 @@ Date: May 2020 · 3 unmodified lines | ||
| 33 | 35 | Contact: Akira Shimahara <akira215corp@gmail.com> |
| 34 | 36 | Description: |
| 35 | 37 | (RO) return the power status by asking the device |
| 38 | + | |
| 36 | 39 | * '0': device parasite powered |
| 37 | 40 | * '1': device externally powered |
| 38 | 41 | * '-xx': xx is kernel error when reading power status |
| 42 | + | |
| 39 | 43 | Users: any user space application which wants to communicate with |
| 40 | 44 | w1_term device |
| 41 | 45 | |
| @@ -49,10 +53,12 @@ Description: · 7 unmodified lines | ||
| 49 | 53 | will be changed only in device RAM, so it will be cleared when |
| 50 | 54 | power is lost. Trigger a 'save' to EEPROM command to keep |
| 51 | 55 | values after power-on. Read or write are : |
| 56 | + | |
| 52 | 57 | * '9..14': device resolution in bit |
| 53 | − or resolution to set in bit | |
| 58 | + or resolution to set in bit | |
| 54 | 59 | * '-xx': xx is kernel error when reading the resolution |
| 55 | 60 | * Anything else: do nothing |
| 61 | + | |
| 56 | 62 | Some DS18B20 clones are fixed in 12-bit resolution, so the |
| 57 | 63 | actual resolution is read back from the chip and verified. Error |
| 58 | 64 | is reported if the results differ. |
| @@ -65,16 +71,18 @@ Date: May 2020 · 6 unmodified lines | ||
| 65 | 71 | Contact: Akira Shimahara <akira215corp@gmail.com> |
| 66 | 72 | Description: |
| 67 | 73 | (RO) return the temperature in 1/1000 degC. |
| 74 | + | |
| 68 | 75 | * If a bulk read has been triggered, it will directly |
| 69 | − return the temperature computed when the bulk read | |
| 70 | − occurred, if available. If not yet available, nothing | |
| 71 | − is returned (a debug kernel message is sent), you | |
| 72 | − should retry later on. | |
| 76 | + return the temperature computed when the bulk read | |
| 77 | + occurred, if available. If not yet available, nothing | |
| 78 | + is returned (a debug kernel message is sent), you | |
| 79 | + should retry later on. | |
| 73 | 80 | * If no bulk read has been triggered, it will trigger |
| 74 | − a conversion and send the result. Note that the | |
| 75 | − conversion duration depend on the resolution (if | |
| 76 | − device support this feature). It takes 94ms in 9bits | |
| 77 | − resolution, 750ms for 12bits. | |
| 81 | + a conversion and send the result. Note that the | |
| 82 | + conversion duration depend on the resolution (if | |
| 83 | + device support this feature). It takes 94ms in 9bits | |
| 84 | + resolution, 750ms for 12bits. | |
| 85 | + | |
| 78 | 86 | Users: any user space application which wants to communicate with |
| 79 | 87 | w1_term device |
| 80 | 88 | |
| @@ -86,12 +94,14 @@ Description: · 5 unmodified lines | ||
| 86 | 94 | (RW) return the temperature in 1/1000 degC. |
| 87 | 95 | *read*: return 2 lines with the hexa output data sent on the |
| 88 | 96 | bus, return the CRC check and temperature in 1/1000 degC |
| 89 | − *write* : | |
| 97 | + *write*: | |
| 98 | + | |
| 90 | 99 | * '0' : save the 2 or 3 bytes to the device EEPROM |
| 91 | − (i.e. TH, TL and config register) | |
| 100 | + (i.e. TH, TL and config register) | |
| 92 | 101 | * '9..14' : set the device resolution in RAM |
| 93 | − (if supported) | |
| 102 | + (if supported) | |
| 94 | 103 | * Anything else: do nothing |
| 104 | + | |
| 95 | 105 | refer to Documentation/w1/slaves/w1_therm.rst for detailed |
| 96 | 106 | information. |
| 97 | 107 | Users: any user space application which wants to communicate with |
| @@ -103,14 +113,21 @@ Date: May 2020 · 5 unmodified lines | ||
| 103 | 113 | Contact: Akira Shimahara <akira215corp@gmail.com> |
| 104 | 114 | Description: |
| 105 | 115 | (RW) trigger a bulk read conversion. read the status |
| 116 | + | |
| 106 | 117 | *read*: |
| 107 | − * '-1': conversion in progress on at least 1 sensor | |
| 108 | − * '1' : conversion complete but at least one sensor | |
| 118 | + * '-1': | |
| 119 | + conversion in progress on at least 1 sensor | |
| 120 | + * '1' : | |
| 121 | + conversion complete but at least one sensor | |
| 109 | 122 | value has not been read yet |
| 110 | − * '0' : no bulk operation. Reading temperature will | |
| 123 | + * '0' : | |
| 124 | + no bulk operation. Reading temperature will | |
| 111 | 125 | trigger a conversion on each device |
| 112 | − *write*: 'trigger': trigger a bulk read on all supporting | |
| 126 | + | |
| 127 | + *write*: | |
| 128 | + 'trigger': trigger a bulk read on all supporting | |
| 113 | 129 | devices on the bus |
| 130 | + | |
| 114 | 131 | Note that if a bulk read is sent but one sensor is not read |
| 115 | 132 | immediately, the next access to temperature on this device |
| 116 | 133 | will return the temperature measured at the time of issue |
| @@ -128,14 +145,19 @@ Description: · 11 unmodified lines | ||
| 128 | 145 | reset to default (datasheet) conversion time for a new |
| 129 | 146 | resolution. |
| 130 | 147 | |
| 131 | − *read*: Actual conversion time in milliseconds. *write*: | |
| 132 | − '0': Set the default conversion time from the datasheet. | |
| 133 | − '1': Measure and set the conversion time. Make a single | |
| 148 | + *read*: | |
| 149 | + Actual conversion time in milliseconds. | |
| 150 | + | |
| 151 | + *write*: | |
| 152 | + * '0': | |
| 153 | + Set the default conversion time from the datasheet. | |
| 154 | + * '1': | |
| 155 | + Measure and set the conversion time. Make a single | |
| 134 | 156 | temperature conversion, measure an actual value. |
| 135 | 157 | Increase it by 20% for temperature range. A new |
| 136 | 158 | conversion time can be obtained by reading this |
| 137 | 159 | same attribute. |
| 138 | − other positive value: | |
| 160 | + * other positive value: | |
| 139 | 161 | Set the conversion time in milliseconds. |
| 140 | 162 | |
| 141 | 163 | Users: An application using the w1_term device |
| @@ -148,16 +170,21 @@ Description: · 6 unmodified lines | ||
| 148 | 170 | (RW) Control optional driver settings. |
| 149 | 171 | Bit masks to read/write (bitwise OR): |
| 150 | 172 | |
| 151 | − 1: Enable check for conversion success. If byte 6 of | |
| 173 | + == ============================================================ | |
| 174 | + 1 Enable check for conversion success. If byte 6 of | |
| 152 | 175 | scratchpad memory is 0xC after conversion, and |
| 153 | 176 | temperature reads 85.00 (powerup value) or 127.94 |
| 154 | 177 | (insufficient power) - return a conversion error. |
| 155 | 178 | |
| 156 | − 2: Enable poll for conversion completion. Generate read cycles | |
| 179 | + 2 Enable poll for conversion completion. Generate read cycles | |
| 157 | 180 | after the conversion start and wait for 1's. In parasite |
| 158 | 181 | power mode this feature is not available. |
| 182 | + == ============================================================ | |
| 183 | + | |
| 184 | + *read*: | |
| 185 | + Currently selected features. | |
| 159 | 186 | |
| 160 | − *read*: Currently selected features. | |
| 161 | − *write*: Select features. | |
| 187 | + *write*: | |
| 188 | + Select features. | |
| 162 | 189 | |
| 163 | 190 | Users: An application using the w1_term device |
| @@ -79,7 +79,9 @@ Description: · 78 unmodified lines | ||
| 79 | 79 | When the Wacom Intuos 4 is connected over Bluetooth, the |
| 80 | 80 | image has to contain 256 bytes (64x32 px 1 bit colour). |
| 81 | 81 | The format is also scrambled, like in the USB mode, and it can |
| 82 | − be summarized by converting 76543210 into GECA6420. | |
| 82 | + be summarized by converting:: | |
| 83 | + | |
| 84 | + 76543210 into GECA6420. | |
| 83 | 85 | HGFEDCBA HFDB7531 |
| 84 | 86 | |
| 85 | 87 | What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/unpair_remote |
| @@ -12,11 +12,14 @@ Description: · 11 unmodified lines | ||
| 12 | 12 | image: The image bitmap. Currently a 32-bit BMP. |
| 13 | 13 | status: 1 if the image is valid, 0 if firmware invalidated it. |
| 14 | 14 | type: 0 indicates image is in BMP format. |
| 15 | + | |
| 16 | + ======== =================================================== | |
| 15 | 17 | version: The version of the BGRT. Currently 1. |
| 16 | 18 | xoffset: The number of pixels between the left of the screen |
| 17 | 19 | and the left edge of the image. |
| 18 | 20 | yoffset: The number of pixels between the top of the screen |
| 19 | 21 | and the top edge of the image. |
| 22 | + ======== =================================================== | |
| 20 | 23 | |
| 21 | 24 | What: /sys/firmware/acpi/hotplug/ |
| 22 | 25 | Date: February 2013 |
| @@ -33,12 +36,14 @@ Description: · 10 unmodified lines | ||
| 33 | 36 | The following setting is available to user space for each |
| 34 | 37 | hotplug profile: |
| 35 | 38 | |
| 39 | + ======== ======================================================= | |
| 36 | 40 | enabled: If set, the ACPI core will handle notifications of |
| 37 | − hotplug events associated with the given class of | |
| 38 | − devices and will allow those devices to be ejected with | |
| 39 | − the help of the _EJ0 control method. Unsetting it | |
| 40 | − effectively disables hotplug for the correspoinding | |
| 41 | − class of devices. | |
| 41 | + hotplug events associated with the given class of | |
| 42 | + devices and will allow those devices to be ejected with | |
| 43 | + the help of the _EJ0 control method. Unsetting it | |
| 44 | + effectively disables hotplug for the correspoinding | |
| 45 | + class of devices. | |
| 46 | + ======== ======================================================= | |
| 42 | 47 | |
| 43 | 48 | The value of the above attribute is an integer number: 1 (set) |
| 44 | 49 | or 0 (unset). Attempts to write any other values to it will |
| @@ -71,86 +76,90 @@ Description: · 26 unmodified lines | ||
| 71 | 76 | To figure out where all the SCI's are coming from, |
| 72 | 77 | /sys/firmware/acpi/interrupts contains a file listing |
| 73 | 78 | every possible source, and the count of how many |
| 74 | − times it has triggered. | |
| 75 | − | |
| 76 | − $ cd /sys/firmware/acpi/interrupts | |
| 77 | − $ grep . * | |
| 78 | − error: 0 | |
| 79 | − ff_gbl_lock: 0 enable | |
| 80 | − ff_pmtimer: 0 invalid | |
| 81 | − ff_pwr_btn: 0 enable | |
| 82 | − ff_rt_clk: 2 disable | |
| 83 | − ff_slp_btn: 0 invalid | |
| 84 | − gpe00: 0 invalid | |
| 85 | − gpe01: 0 enable | |
| 86 | − gpe02: 108 enable | |
| 87 | − gpe03: 0 invalid | |
| 88 | − gpe04: 0 invalid | |
| 89 | − gpe05: 0 invalid | |
| 90 | − gpe06: 0 enable | |
| 91 | − gpe07: 0 enable | |
| 92 | − gpe08: 0 invalid | |
| 93 | − gpe09: 0 invalid | |
| 94 | − gpe0A: 0 invalid | |
| 95 | − gpe0B: 0 invalid | |
| 96 | − gpe0C: 0 invalid | |
| 97 | − gpe0D: 0 invalid | |
| 98 | − gpe0E: 0 invalid | |
| 99 | − gpe0F: 0 invalid | |
| 100 | − gpe10: 0 invalid | |
| 101 | − gpe11: 0 invalid | |
| 102 | − gpe12: 0 invalid | |
| 103 | − gpe13: 0 invalid | |
| 104 | − gpe14: 0 invalid | |
| 105 | − gpe15: 0 invalid | |
| 106 | − gpe16: 0 invalid | |
| 107 | − gpe17: 1084 enable | |
| 108 | − gpe18: 0 enable | |
| 109 | − gpe19: 0 invalid | |
| 110 | − gpe1A: 0 invalid | |
| 111 | − gpe1B: 0 invalid | |
| 112 | − gpe1C: 0 invalid | |
| 113 | − gpe1D: 0 invalid | |
| 114 | − gpe1E: 0 invalid | |
| 115 | − gpe1F: 0 invalid | |
| 116 | − gpe_all: 1192 | |
| 117 | − sci: 1194 | |
| 118 | − sci_not: 0 | |
| 119 | − | |
| 120 | − sci - The number of times the ACPI SCI | |
| 121 | − has been called and claimed an interrupt. | |
| 122 | − | |
| 123 | − sci_not - The number of times the ACPI SCI | |
| 124 | − has been called and NOT claimed an interrupt. | |
| 125 | − | |
| 126 | − gpe_all - count of SCI caused by GPEs. | |
| 127 | − | |
| 128 | − gpeXX - count for individual GPE source | |
| 129 | − | |
| 130 | − ff_gbl_lock - Global Lock | |
| 131 | − | |
| 132 | − ff_pmtimer - PM Timer | |
| 133 | − | |
| 134 | − ff_pwr_btn - Power Button | |
| 135 | − | |
| 136 | − ff_rt_clk - Real Time Clock | |
| 137 | − | |
| 138 | − ff_slp_btn - Sleep Button | |
| 139 | − | |
| 140 | − error - an interrupt that can't be accounted for above. | |
| 141 | − | |
| 142 | − invalid: it's either a GPE or a Fixed Event that | |
| 143 | − doesn't have an event handler. | |
| 144 | − | |
| 145 | − disable: the GPE/Fixed Event is valid but disabled. | |
| 146 | − | |
| 147 | − enable: the GPE/Fixed Event is valid and enabled. | |
| 148 | − | |
| 149 | − Root has permission to clear any of these counters. Eg. | |
| 150 | − # echo 0 > gpe11 | |
| 151 | − | |
| 152 | − All counters can be cleared by clearing the total "sci": | |
| 153 | − # echo 0 > sci | |
| 79 | + times it has triggered:: | |
| 80 | + | |
| 81 | + $ cd /sys/firmware/acpi/interrupts | |
| 82 | + $ grep . * | |
| 83 | + error: 0 | |
| 84 | + ff_gbl_lock: 0 enable | |
| 85 | + ff_pmtimer: 0 invalid | |
| 86 | + ff_pwr_btn: 0 enable | |
| 87 | + ff_rt_clk: 2 disable | |
| 88 | + ff_slp_btn: 0 invalid | |
| 89 | + gpe00: 0 invalid | |
| 90 | + gpe01: 0 enable | |
| 91 | + gpe02: 108 enable | |
| 92 | + gpe03: 0 invalid | |
| 93 | + gpe04: 0 invalid | |
| 94 | + gpe05: 0 invalid | |
| 95 | + gpe06: 0 enable | |
| 96 | + gpe07: 0 enable | |
| 97 | + gpe08: 0 invalid | |
| 98 | + gpe09: 0 invalid | |
| 99 | + gpe0A: 0 invalid | |
| 100 | + gpe0B: 0 invalid | |
| 101 | + gpe0C: 0 invalid | |
| 102 | + gpe0D: 0 invalid | |
| 103 | + gpe0E: 0 invalid | |
| 104 | + gpe0F: 0 invalid | |
| 105 | + gpe10: 0 invalid | |
| 106 | + gpe11: 0 invalid | |
| 107 | + gpe12: 0 invalid | |
| 108 | + gpe13: 0 invalid | |
| 109 | + gpe14: 0 invalid | |
| 110 | + gpe15: 0 invalid | |
| 111 | + gpe16: 0 invalid | |
| 112 | + gpe17: 1084 enable | |
| 113 | + gpe18: 0 enable | |
| 114 | + gpe19: 0 invalid | |
| 115 | + gpe1A: 0 invalid | |
| 116 | + gpe1B: 0 invalid | |
| 117 | + gpe1C: 0 invalid | |
| 118 | + gpe1D: 0 invalid | |
| 119 | + gpe1E: 0 invalid | |
| 120 | + gpe1F: 0 invalid | |
| 121 | + gpe_all: 1192 | |
| 122 | + sci: 1194 | |
| 123 | + sci_not: 0 | |
| 124 | + | |
| 125 | + =========== ================================================== | |
| 126 | + sci The number of times the ACPI SCI | |
| 127 | + has been called and claimed an interrupt. | |
| 128 | + | |
| 129 | + sci_not The number of times the ACPI SCI | |
| 130 | + has been called and NOT claimed an interrupt. | |
| 131 | + | |
| 132 | + gpe_all count of SCI caused by GPEs. | |
| 133 | + | |
| 134 | + gpeXX count for individual GPE source | |
| 135 | + | |
| 136 | + ff_gbl_lock Global Lock | |
| 137 | + | |
| 138 | + ff_pmtimer PM Timer | |
| 139 | + | |
| 140 | + ff_pwr_btn Power Button | |
| 141 | + | |
| 142 | + ff_rt_clk Real Time Clock | |
| 143 | + | |
| 144 | + ff_slp_btn Sleep Button | |
| 145 | + | |
| 146 | + error an interrupt that can't be accounted for above. | |
| 147 | + | |
| 148 | + invalid it's either a GPE or a Fixed Event that | |
| 149 | + doesn't have an event handler. | |
| 150 | + | |
| 151 | + disable the GPE/Fixed Event is valid but disabled. | |
| 152 | + | |
| 153 | + enable the GPE/Fixed Event is valid and enabled. | |
| 154 | + =========== ================================================== | |
| 155 | + | |
| 156 | + Root has permission to clear any of these counters. Eg.:: | |
| 157 | + | |
| 158 | + # echo 0 > gpe11 | |
| 159 | + | |
| 160 | + All counters can be cleared by clearing the total "sci":: | |
| 161 | + | |
| 162 | + # echo 0 > sci | |
| 154 | 163 | |
| 155 | 164 | None of these counters has an effect on the function |
| 156 | 165 | of the system, they are simply statistics. |
| @@ -165,32 +174,34 @@ Description: · 8 unmodified lines | ||
| 165 | 174 | |
| 166 | 175 | Let's take power button fixed event for example, please kill acpid |
| 167 | 176 | and other user space applications so that the machine won't shutdown |
| 168 | − when pressing the power button. | |
| 169 | − # cat ff_pwr_btn | |
| 170 | − 0 enabled | |
| 171 | − # press the power button for 3 times; | |
| 172 | − # cat ff_pwr_btn | |
| 173 | − 3 enabled | |
| 174 | − # echo disable > ff_pwr_btn | |
| 175 | − # cat ff_pwr_btn | |
| 176 | − 3 disabled | |
| 177 | − # press the power button for 3 times; | |
| 178 | − # cat ff_pwr_btn | |
| 179 | − 3 disabled | |
| 180 | − # echo enable > ff_pwr_btn | |
| 181 | − # cat ff_pwr_btn | |
| 182 | − 4 enabled | |
| 183 | − /* | |
| 184 | − * this is because the status bit is set even if the enable bit is cleared, | |
| 185 | − * and it triggers an ACPI fixed event when the enable bit is set again | |
| 186 | − */ | |
| 187 | − # press the power button for 3 times; | |
| 188 | − # cat ff_pwr_btn | |
| 189 | − 7 enabled | |
| 190 | − # echo disable > ff_pwr_btn | |
| 191 | − # press the power button for 3 times; | |
| 192 | − # echo clear > ff_pwr_btn /* clear the status bit */ | |
| 193 | − # echo disable > ff_pwr_btn | |
| 194 | − # cat ff_pwr_btn | |
| 195 | − 7 enabled | |
| 177 | + when pressing the power button:: | |
| 178 | + | |
| 179 | + # cat ff_pwr_btn | |
| 180 | + 0 enabled | |
| 181 | + # press the power button for 3 times; | |
| 182 | + # cat ff_pwr_btn | |
| 183 | + 3 enabled | |
| 184 | + # echo disable > ff_pwr_btn | |
| 185 | + # cat ff_pwr_btn | |
| 186 | + 3 disabled | |
| 187 | + # press the power button for 3 times; | |
| 188 | + # cat ff_pwr_btn | |
| 189 | + 3 disabled | |
| 190 | + # echo enable > ff_pwr_btn | |
| 191 | + # cat ff_pwr_btn | |
| 192 | + 4 enabled | |
| 193 | + /* | |
| 194 | + * this is because the status bit is set even if the enable | |
| 195 | + * bit is cleared, and it triggers an ACPI fixed event when | |
| 196 | + * the enable bit is set again | |
| 197 | + */ | |
| 198 | + # press the power button for 3 times; | |
| 199 | + # cat ff_pwr_btn | |
| 200 | + 7 enabled | |
| 201 | + # echo disable > ff_pwr_btn | |
| 202 | + # press the power button for 3 times; | |
| 203 | + # echo clear > ff_pwr_btn /* clear the status bit */ | |
| 204 | + # echo disable > ff_pwr_btn | |
| 205 | + # cat ff_pwr_btn | |
| 206 | + 7 enabled | |
| 196 | 207 | |
| @@ -33,7 +33,7 @@ Description: · 32 unmodified lines | ||
| 33 | 33 | doesn't matter), they will be represented in sysfs as |
| 34 | 34 | entries "T-0" through "T-(N-1)": |
| 35 | 35 | |
| 36 | − Example entry directories: | |
| 36 | + Example entry directories:: | |
| 37 | 37 | |
| 38 | 38 | /sys/firmware/dmi/entries/17-0 |
| 39 | 39 | /sys/firmware/dmi/entries/17-1 |
| @@ -50,61 +50,65 @@ Description: · 10 unmodified lines | ||
| 50 | 50 | Each DMI entry in sysfs has the common header values |
| 51 | 51 | exported as attributes: |
| 52 | 52 | |
| 53 | − handle : The 16bit 'handle' that is assigned to this | |
| 53 | + ======== ================================================= | |
| 54 | + handle The 16bit 'handle' that is assigned to this | |
| 54 | 55 | entry by the firmware. This handle may be |
| 55 | 56 | referred to by other entries. |
| 56 | − length : The length of the entry, as presented in the | |
| 57 | + length The length of the entry, as presented in the | |
| 57 | 58 | entry itself. Note that this is _not the |
| 58 | 59 | total count of bytes associated with the |
| 59 | − entry_. This value represents the length of | |
| 60 | + entry. This value represents the length of | |
| 60 | 61 | the "formatted" portion of the entry. This |
| 61 | 62 | "formatted" region is sometimes followed by |
| 62 | 63 | the "unformatted" region composed of nul |
| 63 | 64 | terminated strings, with termination signalled |
| 64 | 65 | by a two nul characters in series. |
| 65 | − raw : The raw bytes of the entry. This includes the | |
| 66 | + raw The raw bytes of the entry. This includes the | |
| 66 | 67 | "formatted" portion of the entry, the |
| 67 | 68 | "unformatted" strings portion of the entry, |
| 68 | 69 | and the two terminating nul characters. |
| 69 | − type : The type of the entry. This value is the same | |
| 70 | + type The type of the entry. This value is the same | |
| 70 | 71 | as found in the directory name. It indicates |
| 71 | 72 | how the rest of the entry should be interpreted. |
| 72 | − instance: The instance ordinal of the entry for the | |
| 73 | + instance The instance ordinal of the entry for the | |
| 73 | 74 | given type. This value is the same as found |
| 74 | 75 | in the parent directory name. |
| 75 | − position: The ordinal position (zero-based) of the entry | |
| 76 | + position The ordinal position (zero-based) of the entry | |
| 76 | 77 | within the entirety of the DMI entry table. |
| 78 | + ======== ================================================= | |
| 77 | 79 | |
| 78 | − === Entry Specialization === | |
| 80 | + **Entry Specialization** | |
| 79 | 81 | |
| 80 | 82 | Some entry types may have other information available in |
| 81 | 83 | sysfs. Not all types are specialized. |
| 82 | 84 | |
| 83 | − --- Type 15 - System Event Log --- | |
| 85 | + **Type 15 - System Event Log** | |
| 84 | 86 | |
| 85 | 87 | This entry allows the firmware to export a log of |
| 86 | 88 | events the system has taken. This information is |
| 87 | 89 | typically backed by nvram, but the implementation |
| 88 | 90 | details are abstracted by this table. This entry's data |
| 89 | − is exported in the directory: | |
| 91 | + is exported in the directory:: | |
| 90 | 92 | |
| 91 | − /sys/firmware/dmi/entries/15-0/system_event_log | |
| 93 | + /sys/firmware/dmi/entries/15-0/system_event_log | |
| 92 | 94 | |
| 93 | 95 | and has the following attributes (documented in the |
| 94 | 96 | SMBIOS / DMI specification under "System Event Log (Type 15)": |
| 95 | 97 | |
| 96 | − area_length | |
| 97 | − header_start_offset | |
| 98 | − data_start_offset | |
| 99 | − access_method | |
| 100 | − status | |
| 101 | − change_token | |
| 102 | − access_method_address | |
| 103 | − header_format | |
| 104 | − per_log_type_descriptor_length | |
| 105 | − type_descriptors_supported_count | |
| 98 | + - area_length | |
| 99 | + - header_start_offset | |
| 100 | + - data_start_offset | |
| 101 | + - access_method | |
| 102 | + - status | |
| 103 | + - change_token | |
| 104 | + - access_method_address | |
| 105 | + - header_format | |
| 106 | + - per_log_type_descriptor_length | |
| 107 | + - type_descriptors_supported_count | |
| 106 | 108 | |
| 107 | 109 | As well, the kernel exports the binary attribute: |
| 108 | 110 | |
| 109 | − raw_event_log : The raw binary bits of the event log | |
| 111 | + ============= ==================================== | |
| 112 | + raw_event_log The raw binary bits of the event log | |
| 110 | 113 | as described by the DMI entry. |
| 114 | + ============= ==================================== | |
| @@ -35,10 +35,13 @@ What: /sys/firmware/efi/esrt/entries/entry$N/fw_type · 34 unmodified lines | ||
| 35 | 35 | Date: February 2015 |
| 36 | 36 | Contact: Peter Jones <pjones@redhat.com> |
| 37 | 37 | Description: What kind of firmware entry this is: |
| 38 | − 0 - Unknown | |
| 39 | − 1 - System Firmware | |
| 40 | − 2 - Device Firmware | |
| 41 | − 3 - UEFI Driver | |
| 38 | + | |
| 39 | + == =============== | |
| 40 | + 0 Unknown | |
| 41 | + 1 System Firmware | |
| 42 | + 2 Device Firmware | |
| 43 | + 3 UEFI Driver | |
| 44 | + == =============== | |
| 42 | 45 | |
| 43 | 46 | What: /sys/firmware/efi/esrt/entries/entry$N/fw_class |
| 44 | 47 | Date: February 2015 |
| @@ -71,11 +74,14 @@ Date: February 2015 · 26 unmodified lines | ||
| 71 | 74 | Contact: Peter Jones <pjones@redhat.com> |
| 72 | 75 | Description: The result of the last firmware update attempt for the |
| 73 | 76 | firmware resource entry. |
| 74 | − 0 - Success | |
| 75 | − 1 - Insufficient resources | |
| 76 | − 2 - Incorrect version | |
| 77 | − 3 - Invalid format | |
| 78 | − 4 - Authentication error | |
| 79 | − 5 - AC power event | |
| 80 | − 6 - Battery power event | |
| 77 | + | |
| 78 | + == ====================== | |
| 79 | + 0 Success | |
| 80 | + 1 Insufficient resources | |
| 81 | + 2 Incorrect version | |
| 82 | + 3 Invalid format | |
| 83 | + 4 Authentication error | |
| 84 | + 5 AC power event | |
| 85 | + 6 Battery power event | |
| 86 | + == ====================== | |
| 81 | 87 | |
| @@ -14,7 +14,7 @@ Description: Switching efi runtime services to virtual mode requires · 13 unmodified lines | ||
| 14 | 14 | /sys/firmware/efi/runtime-map/ is the directory the kernel |
| 15 | 15 | exports that information in. |
| 16 | 16 | |
| 17 | − subdirectories are named with the number of the memory range: | |
| 17 | + subdirectories are named with the number of the memory range:: | |
| 18 | 18 | |
| 19 | 19 | /sys/firmware/efi/runtime-map/0 |
| 20 | 20 | /sys/firmware/efi/runtime-map/1 |
| @@ -24,11 +24,13 @@ Description: Switching efi runtime services to virtual mode requires · 3 unmodified lines | ||
| 24 | 24 | |
| 25 | 25 | Each subdirectory contains five files: |
| 26 | 26 | |
| 27 | − attribute : The attributes of the memory range. | |
| 28 | − num_pages : The size of the memory range in pages. | |
| 29 | − phys_addr : The physical address of the memory range. | |
| 30 | − type : The type of the memory range. | |
| 31 | − virt_addr : The virtual address of the memory range. | |
| 27 | + ========= ========================================= | |
| 28 | + attribute The attributes of the memory range. | |
| 29 | + num_pages The size of the memory range in pages. | |
| 30 | + phys_addr The physical address of the memory range. | |
| 31 | + type The type of the memory range. | |
| 32 | + virt_addr The virtual address of the memory range. | |
| 33 | + ========= ========================================= | |
| 32 | 34 | |
| 33 | 35 | Above values are all hexadecimal numbers with the '0x' prefix. |
| 34 | 36 | Users: Kexec |
| @@ -20,7 +20,7 @@ Description: · 19 unmodified lines | ||
| 20 | 20 | |
| 21 | 21 | This directory has the same layout (and |
| 22 | 22 | underlying implementation as /sys/firmware/efi/vars. |
| 23 | − See Documentation/ABI/*/sysfs-firmware-efi-vars | |
| 23 | + See `Documentation/ABI/*/sysfs-firmware-efi-vars` | |
| 24 | 24 | for more information on how to interact with |
| 25 | 25 | this structure. |
| 26 | 26 | |
| @@ -20,7 +20,7 @@ Description: · 19 unmodified lines | ||
| 20 | 20 | the raw memory map to userspace. |
| 21 | 21 | |
| 22 | 22 | The structure is as follows: Under /sys/firmware/memmap there |
| 23 | − are subdirectories with the number of the entry as their name: | |
| 23 | + are subdirectories with the number of the entry as their name:: | |
| 24 | 24 | |
| 25 | 25 | /sys/firmware/memmap/0 |
| 26 | 26 | /sys/firmware/memmap/1 |
| @@ -34,14 +34,16 @@ Description: · 7 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | Each directory contains three files: |
| 36 | 36 | |
| 37 | − start : The start address (as hexadecimal number with the | |
| 37 | + ======== ===================================================== | |
| 38 | + start The start address (as hexadecimal number with the | |
| 38 | 39 | '0x' prefix). |
| 39 | − end : The end address, inclusive (regardless whether the | |
| 40 | + end The end address, inclusive (regardless whether the | |
| 40 | 41 | firmware provides inclusive or exclusive ranges). |
| 41 | − type : Type of the entry as string. See below for a list of | |
| 42 | + type Type of the entry as string. See below for a list of | |
| 42 | 43 | valid types. |
| 44 | + ======== ===================================================== | |
| 43 | 45 | |
| 44 | − So, for example: | |
| 46 | + So, for example:: | |
| 45 | 47 | |
| 46 | 48 | /sys/firmware/memmap/0/start |
| 47 | 49 | /sys/firmware/memmap/0/end |
| @@ -57,9 +59,8 @@ Description: · 9 unmodified lines | ||
| 57 | 59 | - reserved |
| 58 | 60 | |
| 59 | 61 | Following shell snippet can be used to display that memory |
| 60 | − map in a human-readable format: | |
| 62 | + map in a human-readable format:: | |
| 61 | 63 | |
| 62 | − -------------------- 8< ---------------------------------------- | |
| 63 | 64 | #!/bin/bash |
| 64 | 65 | cd /sys/firmware/memmap |
| 65 | 66 | for dir in * ; do |
| @@ -68,4 +69,3 @@ Description: · 2 unmodified lines | ||
| 68 | 69 | type=$(cat $dir/type) |
| 69 | 70 | printf "%016x-%016x (%s)\n" $start $[ $end +1] "$type" |
| 70 | 71 | done |
| 71 | − -------------------- >8 ---------------------------------------- | |
| @@ -15,7 +15,7 @@ Description: · 14 unmodified lines | ||
| 15 | 15 | to the fw_cfg device can be found in "docs/specs/fw_cfg.txt" |
| 16 | 16 | in the QEMU source tree. |
| 17 | 17 | |
| 18 | − === SysFS fw_cfg Interface === | |
| 18 | + **SysFS fw_cfg Interface** | |
| 19 | 19 | |
| 20 | 20 | The fw_cfg sysfs interface described in this document is only |
| 21 | 21 | intended to display discoverable blobs (i.e., those registered |
| @@ -31,7 +31,7 @@ Description: · 9 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | /sys/firmware/qemu_fw_cfg/rev |
| 33 | 33 | |
| 34 | − --- Discoverable fw_cfg blobs by selector key --- | |
| 34 | + **Discoverable fw_cfg blobs by selector key** | |
| 35 | 35 | |
| 36 | 36 | All discoverable blobs listed in the fw_cfg file directory are |
| 37 | 37 | displayed as entries named after their unique selector key |
| @@ -45,24 +45,26 @@ Description: · 7 unmodified lines | ||
| 45 | 45 | Each such fw_cfg sysfs entry has the following values exported |
| 46 | 46 | as attributes: |
| 47 | 47 | |
| 48 | − name : The 56-byte nul-terminated ASCII string used as the | |
| 48 | + ==== ==================================================== | |
| 49 | + name The 56-byte nul-terminated ASCII string used as the | |
| 49 | 50 | blob's 'file name' in the fw_cfg directory. |
| 50 | − size : The length of the blob, as given in the fw_cfg | |
| 51 | + size The length of the blob, as given in the fw_cfg | |
| 51 | 52 | directory. |
| 52 | − key : The value of the blob's selector key as given in the | |
| 53 | + key The value of the blob's selector key as given in the | |
| 53 | 54 | fw_cfg directory. This value is the same as used in |
| 54 | 55 | the parent directory name. |
| 55 | − raw : The raw bytes of the blob, obtained by selecting the | |
| 56 | + raw The raw bytes of the blob, obtained by selecting the | |
| 56 | 57 | entry via the control register, and reading a number |
| 57 | 58 | of bytes equal to the blob size from the data |
| 58 | 59 | register. |
| 60 | + ==== ==================================================== | |
| 59 | 61 | |
| 60 | − --- Listing fw_cfg blobs by file name --- | |
| 62 | + **Listing fw_cfg blobs by file name** | |
| 61 | 63 | |
| 62 | 64 | While the fw_cfg device does not impose any specific naming |
| 63 | 65 | convention on the blobs registered in the file directory, |
| 64 | 66 | QEMU developers have traditionally used path name semantics |
| 65 | − to give each blob a descriptive name. For example: | |
| 67 | + to give each blob a descriptive name. For example:: | |
| 66 | 68 | |
| 67 | 69 | "bootorder" |
| 68 | 70 | "genroms/kvmvapic.bin" |
| @@ -81,7 +83,7 @@ Description: · 12 unmodified lines | ||
| 81 | 83 | of directories matching the path name components of fw_cfg |
| 82 | 84 | blob names, ending in symlinks to the by_key entry for each |
| 83 | 85 | "basename", as illustrated below (assume current directory is |
| 84 | − /sys/firmware): | |
| 86 | + /sys/firmware):: | |
| 85 | 87 | |
| 86 | 88 | qemu_fw_cfg/by_name/bootorder -> ../by_key/38 |
| 87 | 89 | qemu_fw_cfg/by_name/etc/e820 -> ../../by_key/35 |
| @@ -9,7 +9,7 @@ Description: · 8 unmodified lines | ||
| 9 | 9 | http://simplefirmware.org/documentation |
| 10 | 10 | |
| 11 | 11 | While the tables are used by the kernel, user-space |
| 12 | − can observe them this way: | |
| 12 | + can observe them this way:: | |
| 13 | 13 | |
| 14 | − # cd /sys/firmware/sfi/tables | |
| 15 | − # cat $TABLENAME > $TABLENAME.bin | |
| 14 | + # cd /sys/firmware/sfi/tables | |
| 15 | + # cat $TABLENAME > $TABLENAME.bin | |
| @@ -5,7 +5,7 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | The /sys/firmware/sgi_uv directory contains information |
| 6 | 6 | about the SGI UV platform. |
| 7 | 7 | |
| 8 | − Under that directory are a number of files: | |
| 8 | + Under that directory are a number of files:: | |
| 9 | 9 | |
| 10 | 10 | partition_id |
| 11 | 11 | coherence_id |
| @@ -14,7 +14,7 @@ Description: · 2 unmodified lines | ||
| 14 | 14 | SGI UV systems can be partitioned into multiple physical |
| 15 | 15 | machines, which each partition running a unique copy |
| 16 | 16 | of the operating system. Each partition will have a unique |
| 17 | − partition id. To display the partition id, use the command: | |
| 17 | + partition id. To display the partition id, use the command:: | |
| 18 | 18 | |
| 19 | 19 | cat /sys/firmware/sgi_uv/partition_id |
| 20 | 20 | |
| @@ -22,6 +22,6 @@ Description: · 1 unmodified line | ||
| 22 | 22 | A partitioned SGI UV system can have one or more coherence |
| 23 | 23 | domain. The coherence id indicates which coherence domain |
| 24 | 24 | this partition is in. To display the coherence id, use the |
| 25 | − command: | |
| 25 | + command:: | |
| 26 | 26 | |
| 27 | 27 | cat /sys/firmware/sgi_uv/coherence_id |
| @@ -2,21 +2,21 @@ What: /sys/firmware/turris-mox-rwtm/board_version · 1 unmodified line | ||
| 2 | 2 | Date: August 2019 |
| 3 | 3 | KernelVersion: 5.4 |
| 4 | 4 | Contact: Marek Behún <marek.behun@nic.cz> |
| 5 | −Description: (R) Board version burned into eFuses of this Turris Mox board. | |
| 5 | +Description: (Read) Board version burned into eFuses of this Turris Mox board. | |
| 6 | 6 | Format: %i |
| 7 | 7 | |
| 8 | 8 | What: /sys/firmware/turris-mox-rwtm/mac_address* |
| 9 | 9 | Date: August 2019 |
| 10 | 10 | KernelVersion: 5.4 |
| 11 | 11 | Contact: Marek Behún <marek.behun@nic.cz> |
| 12 | −Description: (R) MAC addresses burned into eFuses of this Turris Mox board. | |
| 12 | +Description: (Read) MAC addresses burned into eFuses of this Turris Mox board. | |
| 13 | 13 | Format: %pM |
| 14 | 14 | |
| 15 | 15 | What: /sys/firmware/turris-mox-rwtm/pubkey |
| 16 | 16 | Date: August 2019 |
| 17 | 17 | KernelVersion: 5.4 |
| 18 | 18 | Contact: Marek Behún <marek.behun@nic.cz> |
| 19 | −Description: (R) ECDSA public key (in pubkey hex compressed form) computed | |
| 19 | +Description: (Read) ECDSA public key (in pubkey hex compressed form) computed | |
| 20 | 20 | as pair to the ECDSA private key burned into eFuses of this |
| 21 | 21 | Turris Mox Board. |
| 22 | 22 | Format: string |
| @@ -25,7 +25,7 @@ What: /sys/firmware/turris-mox-rwtm/ram_size · 2 unmodified lines | ||
| 25 | 25 | Date: August 2019 |
| 26 | 26 | KernelVersion: 5.4 |
| 27 | 27 | Contact: Marek Behún <marek.behun@nic.cz> |
| 28 | −Description: (R) RAM size in MiB of this Turris Mox board as was detected | |
| 28 | +Description: (Read) RAM size in MiB of this Turris Mox board as was detected | |
| 29 | 29 | during manufacturing and burned into eFuses. Can be 512 or 1024. |
| 30 | 30 | Format: %i |
| 31 | 31 | |
| @@ -33,5 +33,5 @@ What: /sys/firmware/turris-mox-rwtm/serial_number · 1 unmodified line | ||
| 33 | 33 | Date: August 2019 |
| 34 | 34 | KernelVersion: 5.4 |
| 35 | 35 | Contact: Marek Behún <marek.behun@nic.cz> |
| 36 | −Description: (R) Serial number burned into eFuses of this Turris Mox device. | |
| 36 | +Description: (Read) Serial number burned into eFuses of this Turris Mox device. | |
| 37 | 37 | Format: %016X |
| @@ -45,8 +45,8 @@ Description: · 44 unmodified lines | ||
| 45 | 45 | parameter will have their blocks allocated out of a |
| 46 | 46 | block group specific preallocation pool, so that small |
| 47 | 47 | files are packed closely together. Each large file |
| 48 | − will have its blocks allocated out of its own unique | |
| 49 | − preallocation pool. | |
| 48 | + will have its blocks allocated out of its own unique | |
| 49 | + preallocation pool. | |
| 50 | 50 | |
| 51 | 51 | What: /sys/fs/ext4/<disk>/inode_readahead_blks |
| 52 | 52 | Date: March 2008 |
| @@ -20,10 +20,13 @@ What: /sys/fs/f2fs/<disk>/gc_idle · 19 unmodified lines | ||
| 20 | 20 | Date: July 2013 |
| 21 | 21 | Contact: "Namjae Jeon" <namjae.jeon@samsung.com> |
| 22 | 22 | Description: Controls the victim selection policy for garbage collection. |
| 23 | − Setting gc_idle = 0(default) will disable this option. Setting | |
| 24 | − gc_idle = 1 will select the Cost Benefit approach & setting | |
| 25 | − gc_idle = 2 will select the greedy approach & setting | |
| 26 | − gc_idle = 3 will select the age-threshold based approach. | |
| 23 | + Setting gc_idle = 0(default) will disable this option. Setting: | |
| 24 | + | |
| 25 | + =========== =============================================== | |
| 26 | + gc_idle = 1 will select the Cost Benefit approach & setting | |
| 27 | + gc_idle = 2 will select the greedy approach & setting | |
| 28 | + gc_idle = 3 will select the age-threshold based approach. | |
| 29 | + =========== =============================================== | |
| 27 | 30 | |
| 28 | 31 | What: /sys/fs/f2fs/<disk>/reclaim_segments |
| 29 | 32 | Date: October 2013 |
| @@ -46,10 +49,17 @@ Date: November 2013 · 16 unmodified lines | ||
| 46 | 49 | Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com> |
| 47 | 50 | Description: Controls the in-place-update policy. |
| 48 | 51 | updates in f2fs. User can set: |
| 49 | − 0x01: F2FS_IPU_FORCE, 0x02: F2FS_IPU_SSR, | |
| 50 | − 0x04: F2FS_IPU_UTIL, 0x08: F2FS_IPU_SSR_UTIL, | |
| 51 | − 0x10: F2FS_IPU_FSYNC, 0x20: F2FS_IPU_ASYNC, | |
| 52 | − 0x40: F2FS_IPU_NOCACHE. | |
| 52 | + | |
| 53 | + ==== ================= | |
| 54 | + 0x01 F2FS_IPU_FORCE | |
| 55 | + 0x02 F2FS_IPU_SSR | |
| 56 | + 0x04 F2FS_IPU_UTIL | |
| 57 | + 0x08 F2FS_IPU_SSR_UTIL | |
| 58 | + 0x10 F2FS_IPU_FSYNC | |
| 59 | + 0x20 F2FS_IPU_ASYNC, | |
| 60 | + 0x40 F2FS_IPU_NOCACHE | |
| 61 | + ==== ================= | |
| 62 | + | |
| 53 | 63 | Refer segment.h for details. |
| 54 | 64 | |
| 55 | 65 | What: /sys/fs/f2fs/<disk>/min_ipu_util |
| @@ -332,18 +342,28 @@ Date: April 2020 · 276 unmodified lines | ||
| 332 | 342 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
| 333 | 343 | Description: Give a way to attach REQ_META|FUA to data writes |
| 334 | 344 | given temperature-based bits. Now the bits indicate: |
| 335 | − * REQ_META | REQ_FUA | | |
| 336 | − * 5 | 4 | 3 | 2 | 1 | 0 | | |
| 337 | − * Cold | Warm | Hot | Cold | Warm | Hot | | |
| 345 | + | |
| 346 | + +-------------------+-------------------+ | |
| 347 | + | REQ_META | REQ_FUA | | |
| 348 | + +------+------+-----+------+------+-----+ | |
| 349 | + | 5 | 4 | 3 | 2 | 1 | 0 | | |
| 350 | + +------+------+-----+------+------+-----+ | |
| 351 | + | Cold | Warm | Hot | Cold | Warm | Hot | | |
| 352 | + +------+------+-----+------+------+-----+ | |
| 338 | 353 | |
| 339 | 354 | What: /sys/fs/f2fs/<disk>/node_io_flag |
| 340 | 355 | Date: June 2020 |
| 341 | 356 | Contact: "Jaegeuk Kim" <jaegeuk@kernel.org> |
| 342 | 357 | Description: Give a way to attach REQ_META|FUA to node writes |
| 343 | 358 | given temperature-based bits. Now the bits indicate: |
| 344 | − * REQ_META | REQ_FUA | | |
| 345 | − * 5 | 4 | 3 | 2 | 1 | 0 | | |
| 346 | − * Cold | Warm | Hot | Cold | Warm | Hot | | |
| 359 | + | |
| 360 | + +-------------------+-------------------+ | |
| 361 | + | REQ_META | REQ_FUA | | |
| 362 | + +------+------+-----+------+------+-----+ | |
| 363 | + | 5 | 4 | 3 | 2 | 1 | 0 | | |
| 364 | + +------+------+-----+------+------+-----+ | |
| 365 | + | Cold | Warm | Hot | Cold | Warm | Hot | | |
| 366 | + +------+------+-----+------+------+-----+ | |
| 347 | 367 | |
| 348 | 368 | What: /sys/fs/f2fs/<disk>/iostat_period_ms |
| 349 | 369 | Date: April 2020 |
| @@ -15,14 +15,17 @@ KernelVersion: 4.3 · 14 unmodified lines | ||
| 15 | 15 | Contact: Boris Ostrovsky <boris.ostrovsky@oracle.com> |
| 16 | 16 | Description: If running under Xen: |
| 17 | 17 | Describes mode that Xen's performance-monitoring unit (PMU) |
| 18 | − uses. Accepted values are | |
| 19 | − "off" -- PMU is disabled | |
| 20 | − "self" -- The guest can profile itself | |
| 21 | − "hv" -- The guest can profile itself and, if it is | |
| 18 | + uses. Accepted values are: | |
| 19 | + | |
| 20 | + ====== ============================================ | |
| 21 | + "off" PMU is disabled | |
| 22 | + "self" The guest can profile itself | |
| 23 | + "hv" The guest can profile itself and, if it is | |
| 22 | 24 | privileged (e.g. dom0), the hypervisor |
| 23 | − "all" -- The guest can profile itself, the hypervisor | |
| 25 | + "all" The guest can profile itself, the hypervisor | |
| 24 | 26 | and all other guests. Only available to |
| 25 | 27 | privileged guests. |
| 28 | + ====== ============================================ | |
| 26 | 29 | |
| 27 | 30 | What: /sys/hypervisor/pmu/pmu_features |
| 28 | 31 | Date: August 2015 |
| @@ -23,16 +23,17 @@ Description: The /sys/kernel/boot_params directory contains two · 22 unmodified lines | ||
| 23 | 23 | representation of setup_data type. "data" file is the binary |
| 24 | 24 | representation of setup_data payload. |
| 25 | 25 | |
| 26 | − The whole boot_params directory structure is like below: | |
| 27 | − /sys/kernel/boot_params | |
| 28 | − |__ data | |
| 29 | − |__ setup_data | |
| 30 | − | |__ 0 | |
| 31 | − | | |__ data | |
| 32 | − | | |__ type | |
| 33 | − | |__ 1 | |
| 34 | − | |__ data | |
| 35 | − | |__ type | |
| 36 | − |__ version | |
| 26 | + The whole boot_params directory structure is like below:: | |
| 27 | + | |
| 28 | + /sys/kernel/boot_params | |
| 29 | + |__ data | |
| 30 | + |__ setup_data | |
| 31 | + | |__ 0 | |
| 32 | + | | |__ data | |
| 33 | + | | |__ type | |
| 34 | + | |__ 1 | |
| 35 | + | |__ data | |
| 36 | + | |__ type | |
| 37 | + |__ version | |
| 37 | 38 | |
| 38 | 39 | Users: Kexec |
| @@ -7,9 +7,11 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | of the hugepages supported by the kernel/CPU combination. |
| 8 | 8 | |
| 9 | 9 | Under these directories are a number of files: |
| 10 | − nr_hugepages | |
| 11 | − nr_overcommit_hugepages | |
| 12 | − free_hugepages | |
| 13 | − surplus_hugepages | |
| 14 | − resv_hugepages | |
| 10 | + | |
| 11 | + - nr_hugepages | |
| 12 | + - nr_overcommit_hugepages | |
| 13 | + - free_hugepages | |
| 14 | + - surplus_hugepages | |
| 15 | + - resv_hugepages | |
| 16 | + | |
| 15 | 17 | See Documentation/admin-guide/mm/hugetlbpage.rst for details. |
| @@ -34,8 +34,9 @@ Description: Kernel Samepage Merging daemon sysfs interface · 33 unmodified lines | ||
| 34 | 34 | in a tree. |
| 35 | 35 | |
| 36 | 36 | run: write 0 to disable ksm, read 0 while ksm is disabled. |
| 37 | − write 1 to run ksm, read 1 while ksm is running. | |
| 38 | − write 2 to disable ksm and unmerge all its pages. | |
| 37 | + | |
| 38 | + - write 1 to run ksm, read 1 while ksm is running. | |
| 39 | + - write 2 to disable ksm and unmerge all its pages. | |
| 39 | 40 | |
| 40 | 41 | sleep_millisecs: how many milliseconds ksm should sleep between |
| 41 | 42 | scans. |
| @@ -346,6 +346,7 @@ Description: · 345 unmodified lines | ||
| 346 | 346 | number of objects per slab. If a slab cannot be allocated |
| 347 | 347 | because of fragmentation, SLUB will retry with the minimum order |
| 348 | 348 | possible depending on its characteristics. |
| 349 | + | |
| 349 | 350 | When debug_guardpage_minorder=N (N > 0) parameter is specified |
| 350 | 351 | (see Documentation/admin-guide/kernel-parameters.rst), the minimum possible |
| 351 | 352 | order is used and this sysfs entry can not be used to change |
| @@ -361,6 +362,7 @@ Description: · 9 unmodified lines | ||
| 361 | 362 | new slab has not been possible at the cache's order and instead |
| 362 | 363 | fallen back to its minimum possible order. It can be written to |
| 363 | 364 | clear the current count. |
| 365 | + | |
| 364 | 366 | Available when CONFIG_SLUB_STATS is enabled. |
| 365 | 367 | |
| 366 | 368 | What: /sys/kernel/slab/cache/partial |
| @@ -410,6 +412,7 @@ Description: · 43 unmodified lines | ||
| 410 | 412 | slab from a remote node as opposed to allocating a new slab on |
| 411 | 413 | the local node. This reduces the amount of wasted memory over |
| 412 | 414 | the entire system but can be expensive. |
| 415 | + | |
| 413 | 416 | Available when CONFIG_NUMA is enabled. |
| 414 | 417 | |
| 415 | 418 | What: /sys/kernel/slab/cache/sanity_checks |
| @@ -17,14 +17,15 @@ KernelVersion: 3.1 · 16 unmodified lines | ||
| 17 | 17 | Contact: Kirill Smelkov <kirr@mns.spb.ru> |
| 18 | 18 | Description: Maximum time allowed for periodic transfers per microframe (μs) |
| 19 | 19 | |
| 20 | − [ USB 2.0 sets maximum allowed time for periodic transfers per | |
| 20 | + Note: | |
| 21 | + USB 2.0 sets maximum allowed time for periodic transfers per | |
| 21 | 22 | microframe to be 80%, that is 100 microseconds out of 125 |
| 22 | 23 | microseconds (full microframe). |
| 23 | 24 | |
| 24 | 25 | However there are cases, when 80% max isochronous bandwidth is |
| 25 | 26 | too limiting. For example two video streams could require 110 |
| 26 | 27 | microseconds of isochronous bandwidth per microframe to work |
| 27 | − together. ] | |
| 28 | + together. | |
| 28 | 29 | |
| 29 | 30 | Through this setting it is possible to raise the limit so that |
| 30 | 31 | the host controller would allow allocating more than 100 |
| @@ -45,8 +46,10 @@ Date: Jan 2012 · 14 unmodified lines | ||
| 45 | 46 | KernelVersion:»·3.3 |
| 46 | 47 | Contact: Kay Sievers <kay.sievers@vrfy.org> |
| 47 | 48 | Description: Module taint flags: |
| 48 | − P - proprietary module | |
| 49 | − O - out-of-tree module | |
| 50 | − F - force-loaded module | |
| 51 | − C - staging driver module | |
| 52 | − E - unsigned module | |
| 49 | + == ===================== | |
| 50 | + P proprietary module | |
| 51 | + O out-of-tree module | |
| 52 | + F force-loaded module | |
| 53 | + C staging driver module | |
| 54 | + E unsigned module | |
| 55 | + == ===================== | |
| @@ -4,13 +4,16 @@ KernelVersion: 2.6.20 · 3 unmodified lines | ||
| 4 | 4 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
| 5 | 5 | Description: |
| 6 | 6 | This file allows display switching. The value |
| 7 | − is composed by 4 bits and defined as follow: | |
| 8 | − 4321 | |
| 9 | − |||`- LCD | |
| 10 | − ||`-- CRT | |
| 11 | − |`--- TV | |
| 12 | − `---- DVI | |
| 13 | − Ex: - 0 (0000b) means no display | |
| 7 | + is composed by 4 bits and defined as follow:: | |
| 8 | + | |
| 9 | + 4321 | |
| 10 | + |||`- LCD | |
| 11 | + ||`-- CRT | |
| 12 | + |`--- TV | |
| 13 | + `---- DVI | |
| 14 | + | |
| 15 | + Ex: | |
| 16 | + - 0 (0000b) means no display | |
| 14 | 17 | - 3 (0011b) CRT+LCD. |
| 15 | 18 | |
| 16 | 19 | What: /sys/devices/platform/asus_laptop/gps |
| @@ -28,8 +31,10 @@ Contact: "Corentin Chary" <corentincj@iksaif.net> · 11 unmodified lines | ||
| 28 | 31 | Description: |
| 29 | 32 | Some models like the W1N have a LED display that can be |
| 30 | 33 | used to display several items of information. |
| 31 | − To control the LED display, use the following : | |
| 34 | + To control the LED display, use the following:: | |
| 35 | + | |
| 32 | 36 | echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ |
| 37 | + | |
| 33 | 38 | where T control the 3 letters display, and DDD the 3 digits display. |
| 34 | 39 | The DDD table can be found in Documentation/admin-guide/laptops/asus-laptop.rst |
| 35 | 40 | |
| @@ -5,6 +5,7 @@ Contact: "Corentin Chary" <corentincj@iksaif.net> · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | Change CPU clock configuration (write-only). |
| 7 | 7 | There are three available clock configuration: |
| 8 | + | |
| 8 | 9 | * 0 -> Super Performance Mode |
| 9 | 10 | * 1 -> High Performance Mode |
| 10 | 11 | * 2 -> Power Saving Mode |
| @@ -18,8 +18,10 @@ Description: · 17 unmodified lines | ||
| 18 | 18 | In order to use an extended can_id add the |
| 19 | 19 | CAN_EFF_FLAG (0x80000000U) to the can_id. Example: |
| 20 | 20 | |
| 21 | − - standard id 0x7ff: | |
| 22 | − echo 0x7ff > /sys/class/net/can0/mb0_id | |
| 21 | + - standard id 0x7ff:: | |
| 23 | 22 | |
| 24 | − - extended id 0x1fffffff: | |
| 25 | − echo 0x9fffffff > /sys/class/net/can0/mb0_id | |
| 23 | + echo 0x7ff > /sys/class/net/can0/mb0_id | |
| 24 | + | |
| 25 | + - extended id 0x1fffffff:: | |
| 26 | + | |
| 27 | + echo 0x9fffffff > /sys/class/net/can0/mb0_id | |
| @@ -34,9 +34,12 @@ Description: · 33 unmodified lines | ||
| 34 | 34 | this file. To disable a trigger, write its name preceded |
| 35 | 35 | by '-' instead. |
| 36 | 36 | |
| 37 | − For example, to enable the keyboard as trigger run: | |
| 37 | + For example, to enable the keyboard as trigger run:: | |
| 38 | + | |
| 38 | 39 | echo +keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers |
| 39 | − To disable it: | |
| 40 | + | |
| 41 | + To disable it:: | |
| 42 | + | |
| 40 | 43 | echo -keyboard > /sys/class/leds/dell::kbd_backlight/start_triggers |
| 41 | 44 | |
| 42 | 45 | Note that not all the available triggers can be configured. |
| @@ -57,7 +60,8 @@ Description: · 14 unmodified lines | ||
| 57 | 60 | with any the above units. If no unit is specified, the value |
| 58 | 61 | is assumed to be expressed in seconds. |
| 59 | 62 | |
| 60 | − For example, to set the timeout to 10 minutes run: | |
| 63 | + For example, to set the timeout to 10 minutes run:: | |
| 64 | + | |
| 61 | 65 | echo 10m > /sys/class/leds/dell::kbd_backlight/stop_timeout |
| 62 | 66 | |
| 63 | 67 | Note that when this file is read, the returned value might be |
| @@ -13,8 +13,8 @@ Description: · 12 unmodified lines | ||
| 13 | 13 | For example the token ID "5" would be available |
| 14 | 14 | as the following attributes: |
| 15 | 15 | |
| 16 | − 0005_location | |
| 17 | − 0005_value | |
| 16 | + - 0005_location | |
| 17 | + - 0005_value | |
| 18 | 18 | |
| 19 | 19 | Tokens will vary from machine to machine, and |
| 20 | 20 | only tokens available on that machine will be |
| @@ -113,8 +113,11 @@ KernelVersion: 5.5 · 112 unmodified lines | ||
| 113 | 113 | Contact: Wu Hao <hao.wu@intel.com> |
| 114 | 114 | Description: Read-Only. Read this file to get the name of hwmon device, it |
| 115 | 115 | supports values: |
| 116 | − 'dfl_fme_thermal' - thermal hwmon device name | |
| 117 | − 'dfl_fme_power' - power hwmon device name | |
| 116 | + | |
| 117 | + ================= ========================= | |
| 118 | + 'dfl_fme_thermal' thermal hwmon device name | |
| 119 | + 'dfl_fme_power' power hwmon device name | |
| 120 | + ================= ========================= | |
| 118 | 121 | |
| 119 | 122 | What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/temp1_input |
| 120 | 123 | Date: October 2019 |
| @@ -169,8 +172,11 @@ KernelVersion: 5.5 · 48 unmodified lines | ||
| 169 | 172 | Contact: Wu Hao <hao.wu@intel.com> |
| 170 | 173 | Description: Read-Only. Read this file to get the policy of hardware threshold1 |
| 171 | 174 | (see 'temp1_max'). It only supports two values (policies): |
| 172 | − 0 - AP2 state (90% throttling) | |
| 173 | − 1 - AP1 state (50% throttling) | |
| 175 | + | |
| 176 | + == ========================== | |
| 177 | + 0 AP2 state (90% throttling) | |
| 178 | + 1 AP1 state (50% throttling) | |
| 179 | + == ========================== | |
| 174 | 180 | |
| 175 | 181 | What: /sys/bus/platform/devices/dfl-fme.0/hwmon/hwmonX/power1_input |
| 176 | 182 | Date: October 2019 |
| @@ -27,12 +27,15 @@ KernelVersion: v4.10 · 26 unmodified lines | ||
| 27 | 27 | Contact: linux-acpi@vger.kernel.org |
| 28 | 28 | Description: |
| 29 | 29 | (RO) Display the platform power source |
| 30 | + | |
| 31 | + ========= ============================ | |
| 30 | 32 | bits[3:0] Current power source |
| 31 | − 0x00 = DC | |
| 32 | − 0x01 = AC | |
| 33 | − 0x02 = USB | |
| 34 | − 0x03 = Wireless Charger | |
| 33 | + - 0x00 = DC | |
| 34 | + - 0x01 = AC | |
| 35 | + - 0x02 = USB | |
| 36 | + - 0x03 = Wireless Charger | |
| 35 | 37 | bits[7:4] Power source sequence number |
| 38 | + ========= ============================ | |
| 36 | 39 | |
| 37 | 40 | What: /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power |
| 38 | 41 | Date: Jul, 2016 |
| @@ -4,9 +4,11 @@ KernelVersion: 2.6.26 · 3 unmodified lines | ||
| 4 | 4 | Contact: "Corentin Chary" <corentincj@iksaif.net> |
| 5 | 5 | Description: |
| 6 | 6 | This file allows display switching. |
| 7 | + | |
| 7 | 8 | - 1 = LCD |
| 8 | 9 | - 2 = CRT |
| 9 | 10 | - 3 = LCD+CRT |
| 11 | + | |
| 10 | 12 | If you run X11, you should use xrandr instead. |
| 11 | 13 | |
| 12 | 14 | What: /sys/devices/platform/eeepc/camera |
| @@ -30,16 +32,20 @@ Contact: "Corentin Chary" <corentincj@iksaif.net> · 17 unmodified lines | ||
| 30 | 32 | Description: |
| 31 | 33 | Change CPU clock configuration. |
| 32 | 34 | On the Eee PC 1000H there are three available clock configuration: |
| 35 | + | |
| 33 | 36 | * 0 -> Super Performance Mode |
| 34 | 37 | * 1 -> High Performance Mode |
| 35 | 38 | * 2 -> Power Saving Mode |
| 39 | + | |
| 36 | 40 | On Eee PC 701 there is only 2 available clock configurations. |
| 37 | 41 | Available configuration are listed in available_cpufv file. |
| 38 | 42 | Reading this file will show the raw hexadecimal value which |
| 39 | − is defined as follow: | |
| 40 | − | 8 bit | 8 bit | | |
| 41 | − | `---- Current mode | |
| 42 | − `------------ Availables modes | |
| 43 | + is defined as follow:: | |
| 44 | + | |
| 45 | + | 8 bit | 8 bit | | |
| 46 | + | `---- Current mode | |
| 47 | + `------------ Availables modes | |
| 48 | + | |
| 43 | 49 | For example, 0x301 means: mode 1 selected, 3 available modes. |
| 44 | 50 | |
| 45 | 51 | What: /sys/devices/platform/eeepc/available_cpufv |
| @@ -5,9 +5,9 @@ Contact: Wolfram Sang <wsa+renesas@sang-engineering.com> · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | Reading the file will give you a list of masters which can be |
| 7 | 7 | selected for a demultiplexed bus. The format is |
| 8 | − "<index>:<name>". Example from a Renesas Lager board: | |
| 8 | + "<index>:<name>". Example from a Renesas Lager board:: | |
| 9 | 9 | |
| 10 | − 0:/i2c@e6500000 1:/i2c@e6508000 | |
| 10 | + 0:/i2c@e6500000 1:/i2c@e6508000 | |
| 11 | 11 | |
| 12 | 12 | What: /sys/devices/platform/<i2c-demux-name>/current_master |
| 13 | 13 | Date: January 2016 |
| @@ -12,6 +12,7 @@ Contact: "Maxim Mikityanskiy <maxtram95@gmail.com>" · 11 unmodified lines | ||
| 12 | 12 | Description: |
| 13 | 13 | Change fan mode |
| 14 | 14 | There are four available modes: |
| 15 | + | |
| 15 | 16 | * 0 -> Super Silent Mode |
| 16 | 17 | * 1 -> Standard Mode |
| 17 | 18 | * 2 -> Dust Cleaning |
| @@ -32,9 +33,11 @@ KernelVersion: 4.18 · 14 unmodified lines | ||
| 32 | 33 | Contact: "Oleg Keri <ezhi99@gmail.com>" |
| 33 | 34 | Description: |
| 34 | 35 | Control fn-lock mode. |
| 36 | + | |
| 35 | 37 | * 1 -> Switched On |
| 36 | 38 | * 0 -> Switched Off |
| 37 | 39 | |
| 38 | − For example: | |
| 39 | − # echo "0" > \ | |
| 40 | − /sys/bus/pci/devices/0000:00:1f.0/PNP0C09:00/VPC2004:00/fn_lock | |
| 40 | + For example:: | |
| 41 | + | |
| 42 | + # echo "0" > \ | |
| 43 | + /sys/bus/pci/devices/0000:00:1f.0/PNP0C09:00/VPC2004:00/fn_lock | |
| @@ -8,5 +8,6 @@ Description: · 7 unmodified lines | ||
| 8 | 8 | of 0 and userspace can signal SBL to update firmware, |
| 9 | 9 | on next reboot, by writing a value of 1. |
| 10 | 10 | There are two available states: |
| 11 | + | |
| 11 | 12 | * 0 -> Skip firmware update while rebooting |
| 12 | 13 | * 1 -> Attempt firmware update on next reboot |
| @@ -7,5 +7,6 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | Thunderbolt controllers to turn on or off when no |
| 8 | 8 | devices are connected (write-only) |
| 9 | 9 | There are two available states: |
| 10 | + | |
| 10 | 11 | * 0 -> Force power disabled |
| 11 | 12 | * 1 -> Force power enabled |
| @@ -5,6 +5,7 @@ Contact: "Pavan Savoy" <pavan_savoy@ti.com> · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | Name of the UART device at which the WL128x chip |
| 7 | 7 | is connected. example: "/dev/ttyS0". |
| 8 | + | |
| 8 | 9 | The device name flows down to architecture specific board |
| 9 | 10 | initialization file from the SFI/ATAGS bootloader |
| 10 | 11 | firmware. The name exposed is read from the user-space |
| @@ -5,10 +5,13 @@ Contact: "Liming Sun <lsun@mellanox.com>" · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | The Life-cycle state of the SoC, which could be one of the |
| 7 | 7 | following values. |
| 8 | − Production - Production state and can be updated to secure | |
| 9 | − GA Secured - Secure chip and not able to change state | |
| 10 | − GA Non-Secured - Non-Secure chip and not able to change state | |
| 11 | − RMA - Return Merchandise Authorization | |
| 8 | + | |
| 9 | + ============== ============================================= | |
| 10 | + Production Production state and can be updated to secure | |
| 11 | + GA Secured Secure chip and not able to change state | |
| 12 | + GA Non-Secured Non-Secure chip and not able to change state | |
| 13 | + RMA Return Merchandise Authorization | |
| 14 | + ============== ============================================= | |
| 12 | 15 | |
| 13 | 16 | What: /sys/bus/platform/devices/MLNXBF04:00/post_reset_wdog |
| 14 | 17 | Date: Oct 2019 |
| @@ -25,10 +28,13 @@ KernelVersion: 5.5 · 10 unmodified lines | ||
| 25 | 28 | Contact: "Liming Sun <lsun@mellanox.com>" |
| 26 | 29 | Description: |
| 27 | 30 | The source of the boot stream for the next reset. It could be |
| 28 | − one of the following values. | |
| 29 | − external - boot from external source (USB or PCIe) | |
| 30 | − emmc - boot from the onchip eMMC | |
| 31 | − emmc_legacy - boot from the onchip eMMC in legacy (slow) mode | |
| 31 | + one of the following values: | |
| 32 | + | |
| 33 | + =========== =============================================== | |
| 34 | + external boot from external source (USB or PCIe) | |
| 35 | + emmc boot from the onchip eMMC | |
| 36 | + emmc_legacy boot from the onchip eMMC in legacy (slow) mode | |
| 37 | + =========== =============================================== | |
| 32 | 38 | |
| 33 | 39 | What: /sys/bus/platform/devices/MLNXBF04:00/second_reset_action |
| 34 | 40 | Date: Oct 2019 |
| @@ -38,11 +44,14 @@ Description: · 3 unmodified lines | ||
| 38 | 44 | Update the source of the boot stream after next reset. It could |
| 39 | 45 | be one of the following values and will be applied after next |
| 40 | 46 | reset. |
| 41 | − external - boot from external source (USB or PCIe) | |
| 42 | − emmc - boot from the onchip eMMC | |
| 43 | − emmc_legacy - boot from the onchip eMMC in legacy (slow) mode | |
| 44 | − swap_emmc - swap the primary / secondary boot partition | |
| 45 | − none - cancel the action | |
| 47 | + | |
| 48 | + =========== =============================================== | |
| 49 | + external boot from external source (USB or PCIe) | |
| 50 | + emmc boot from the onchip eMMC | |
| 51 | + emmc_legacy boot from the onchip eMMC in legacy (slow) mode | |
| 52 | + swap_emmc swap the primary / secondary boot partition | |
| 53 | + none cancel the action | |
| 54 | + =========== =============================================== | |
| 46 | 55 | |
| 47 | 56 | What: /sys/bus/platform/devices/MLNXBF04:00/secure_boot_fuse_state |
| 48 | 57 | Date: Oct 2019 |
| @@ -50,9 +59,12 @@ KernelVersion: 5.5 · 1 unmodified line | ||
| 50 | 59 | Contact: "Liming Sun <lsun@mellanox.com>" |
| 51 | 60 | Description: |
| 52 | 61 | The state of eFuse versions with the following values. |
| 53 | − InUse - burnt, valid and currently in use | |
| 54 | − Used - burnt and valid | |
| 55 | − Free - not burnt and free to use | |
| 56 | − Skipped - not burnt but not free (skipped) | |
| 57 | − Wasted - burnt and invalid | |
| 58 | − Invalid - not burnt but marked as valid (error state). | |
| 62 | + | |
| 63 | + ======= =============================================== | |
| 64 | + InUse burnt, valid and currently in use | |
| 65 | + Used burnt and valid | |
| 66 | + Free not burnt and free to use | |
| 67 | + Skipped not burnt but not free (skipped) | |
| 68 | + Wasted burnt and invalid | |
| 69 | + Invalid not burnt but marked as valid (error state). | |
| 70 | + ======= =============================================== | |
| @@ -7,9 +7,11 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | The file can show/change the phy mode for role swap of usb. |
| 8 | 8 | |
| 9 | 9 | Write the following strings to change the mode: |
| 10 | − "host" - switching mode from peripheral to host. | |
| 11 | − "peripheral" - switching mode from host to peripheral. | |
| 10 | + | |
| 11 | + - "host" - switching mode from peripheral to host. | |
| 12 | + - "peripheral" - switching mode from host to peripheral. | |
| 12 | 13 | |
| 13 | 14 | Read the file, then it shows the following strings: |
| 14 | − "host" - The mode is host now. | |
| 15 | − "peripheral" - The mode is peripheral now. | |
| 15 | + | |
| 16 | + - "host" - The mode is host now. | |
| 17 | + - "peripheral" - The mode is peripheral now. | |
| @@ -7,9 +7,11 @@ Description: · 6 unmodified lines | ||
| 7 | 7 | The file can show/change the drd mode of usb. |
| 8 | 8 | |
| 9 | 9 | Write the following string to change the mode: |
| 10 | − "host" - switching mode from peripheral to host. | |
| 11 | − "peripheral" - switching mode from host to peripheral. | |
| 10 | + | |
| 11 | + - "host" - switching mode from peripheral to host. | |
| 12 | + - "peripheral" - switching mode from host to peripheral. | |
| 12 | 13 | |
| 13 | 14 | Read the file, then it shows the following strings: |
| 14 | − "host" - The mode is host now. | |
| 15 | − "peripheral" - The mode is peripheral now. | |
| 15 | + | |
| 16 | + - "host" - The mode is host now. | |
| 17 | + - "peripheral" - The mode is peripheral now. | |
| @@ -5,13 +5,22 @@ Contact: "Sebastien Guiriec" <sebastien.guiriec@intel.com> · 4 unmodified lines | ||
| 5 | 5 | Description: |
| 6 | 6 | LPE Firmware version for SST driver on all atom |
| 7 | 7 | plaforms (BYT/CHT/Merrifield/BSW). |
| 8 | − If the FW has never been loaded it will display: | |
| 8 | + If the FW has never been loaded it will display:: | |
| 9 | + | |
| 9 | 10 | "FW not yet loaded" |
| 10 | − If FW has been loaded it will display: | |
| 11 | + | |
| 12 | + If FW has been loaded it will display:: | |
| 13 | + | |
| 11 | 14 | "v01.aa.bb.cc" |
| 15 | + | |
| 12 | 16 | aa: Major version is reflecting SoC version: |
| 17 | + | |
| 18 | + === ============= | |
| 13 | 19 | 0d: BYT FW |
| 14 | 20 | 0b: BSW FW |
| 15 | 21 | 07: Merrifield FW |
| 22 | + === ============= | |
| 23 | + | |
| 16 | 24 | bb: Minor version |
| 25 | + | |
| 17 | 26 | cc: Build version |
| @@ -16,10 +16,13 @@ Contact: Krzysztof Opasiak <k.opasiak@samsung.com> · 15 unmodified lines | ||
| 16 | 16 | Description: |
| 17 | 17 | Current status of the device. |
| 18 | 18 | Allowed values: |
| 19 | − 1 - Device is available and can be exported | |
| 20 | − 2 - Device is currently exported | |
| 21 | − 3 - Fatal error occurred during communication | |
| 22 | − with peer | |
| 19 | + | |
| 20 | + == ========================================== | |
| 21 | + 1 Device is available and can be exported | |
| 22 | + 2 Device is currently exported | |
| 23 | + 3 Fatal error occurred during communication | |
| 24 | + with peer | |
| 25 | + == ========================================== | |
| 23 | 26 | |
| 24 | 27 | What: /sys/devices/platform/usbip-vudc.%d/usbip_sockfd |
| 25 | 28 | Date: April 2016 |
| @@ -39,6 +39,7 @@ Description: · 38 unmodified lines | ||
| 39 | 39 | which affects charging via the special USB PowerShare port |
| 40 | 40 | (marked with a small lightning bolt or battery icon) when in |
| 41 | 41 | low power states: |
| 42 | + | |
| 42 | 43 | - In S0, the port will always provide power. |
| 43 | 44 | - In S0ix, if usb_charge is enabled, then power will be |
| 44 | 45 | supplied to the port when on AC or if battery is > 50%. |
| @@ -47,14 +47,18 @@ Description: · 46 unmodified lines | ||
| 47 | 47 | suspend-to-disk mechanism. Reading from this file returns |
| 48 | 48 | the name of the method by which the system will be put to |
| 49 | 49 | sleep on the next suspend. There are four methods supported: |
| 50 | + | |
| 50 | 51 | 'firmware' - means that the memory image will be saved to disk |
| 51 | 52 | by some firmware, in which case we also assume that the |
| 52 | 53 | firmware will handle the system suspend. |
| 54 | + | |
| 53 | 55 | 'platform' - the memory image will be saved by the kernel and |
| 54 | 56 | the system will be put to sleep by the platform driver (e.g. |
| 55 | 57 | ACPI or other PM registers). |
| 58 | + | |
| 56 | 59 | 'shutdown' - the memory image will be saved by the kernel and |
| 57 | 60 | the system will be powered off. |
| 61 | + | |
| 58 | 62 | 'reboot' - the memory image will be saved by the kernel and |
| 59 | 63 | the system will be rebooted. |
| 60 | 64 | |
| @@ -74,12 +78,12 @@ Description: · 13 unmodified lines | ||
| 74 | 78 | The suspend-to-disk method may be chosen by writing to this |
| 75 | 79 | file one of the accepted strings: |
| 76 | 80 | |
| 77 | − 'firmware' | |
| 78 | − 'platform' | |
| 79 | − 'shutdown' | |
| 80 | − 'reboot' | |
| 81 | − 'testproc' | |
| 82 | − 'test' | |
| 81 | + - 'firmware' | |
| 82 | + - 'platform' | |
| 83 | + - 'shutdown' | |
| 84 | + - 'reboot' | |
| 85 | + - 'testproc' | |
| 86 | + - 'test' | |
| 83 | 87 | |
| 84 | 88 | It will only change to 'firmware' or 'platform' if the system |
| 85 | 89 | supports that. |
| @@ -114,9 +118,9 @@ Description: · 28 unmodified lines | ||
| 114 | 118 | string representing a nonzero integer into it. |
| 115 | 119 | |
| 116 | 120 | To use this debugging feature you should attempt to suspend |
| 117 | − the machine, then reboot it and run | |
| 121 | + the machine, then reboot it and run:: | |
| 118 | 122 | |
| 119 | − dmesg -s 1000000 | grep 'hash matches' | |
| 123 | + dmesg -s 1000000 | grep 'hash matches' | |
| 120 | 124 | |
| 121 | 125 | If you do not get any matches (or they appear to be false |
| 122 | 126 | positives), it is possible that the last PM event point |
| @@ -244,6 +248,7 @@ Description: · 121 unmodified lines | ||
| 244 | 248 | wakeup sources created with the help of /sys/power/wake_lock. |
| 245 | 249 | When a string is written to /sys/power/wake_unlock, it will be |
| 246 | 250 | assumed to represent the name of a wakeup source to deactivate. |
| 251 | + | |
| 247 | 252 | If a wakeup source object of that name exists and is active at |
| 248 | 253 | the moment, it will be deactivated. |
| 249 | 254 | |
| @@ -5,7 +5,7 @@ Description: · 4 unmodified lines | ||
| 5 | 5 | /sys/kernel/profiling is the runtime equivalent |
| 6 | 6 | of the boot-time profile= option. |
| 7 | 7 | |
| 8 | − You can get the same effect running: | |
| 8 | + You can get the same effect running:: | |
| 9 | 9 | |
| 10 | 10 | echo 2 > /sys/kernel/profiling |
| 11 | 11 | |
| @@ -69,7 +69,7 @@ Description: · 68 unmodified lines | ||
| 69 | 69 | pin offered by the PTP hardware clock. The file name |
| 70 | 70 | is the hardware dependent pin name. Reading from this |
| 71 | 71 | file produces two numbers, the assigned function (see |
| 72 | − the PTP_PF_ enumeration values in linux/ptp_clock.h) | |
| 72 | + the `PTP_PF_` enumeration values in linux/ptp_clock.h) | |
| 73 | 73 | and the channel number. The function and channel |
| 74 | 74 | assignment may be changed by two writing numbers into |
| 75 | 75 | the file. |
| @@ -6,42 +6,46 @@ Description: · 5 unmodified lines | ||
| 6 | 6 | Enable passing additional variables for synthetic uevents that |
| 7 | 7 | are generated by writing /sys/.../uevent file. |
| 8 | 8 | |
| 9 | − Recognized extended format is ACTION [UUID [KEY=VALUE ...]. | |
| 9 | + Recognized extended format is:: | |
| 10 | 10 | |
| 11 | − The ACTION is compulsory - it is the name of the uevent action | |
| 12 | − ("add", "change", "remove"). There is no change compared to | |
| 13 | − previous functionality here. The rest of the extended format | |
| 14 | − is optional. | |
| 11 | + ACTION [UUID [KEY=VALUE ...] | |
| 12 | + | |
| 13 | + The ACTION is compulsory - it is the name of the uevent | |
| 14 | + action (``add``, ``change``, ``remove``). There is no change | |
| 15 | + compared to previous functionality here. The rest of the | |
| 16 | + extended format is optional. | |
| 15 | 17 | |
| 16 | 18 | You need to pass UUID first before any KEY=VALUE pairs. |
| 17 | − The UUID must be in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
| 19 | + The UUID must be in ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`` | |
| 18 | 20 | format where 'x' is a hex digit. The UUID is considered to be |
| 19 | 21 | a transaction identifier so it's possible to use the same UUID |
| 20 | 22 | value for one or more synthetic uevents in which case we |
| 21 | 23 | logically group these uevents together for any userspace |
| 22 | 24 | listeners. The UUID value appears in uevent as |
| 23 | − "SYNTH_UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" environment | |
| 25 | + ``SYNTH_UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`` environment | |
| 24 | 26 | variable. |
| 25 | 27 | |
| 26 | 28 | If UUID is not passed in, the generated synthetic uevent gains |
| 27 | − "SYNTH_UUID=0" environment variable automatically. | |
| 29 | + ``SYNTH_UUID=0`` environment variable automatically. | |
| 28 | 30 | |
| 29 | 31 | The KEY=VALUE pairs can contain alphanumeric characters only. |
| 32 | + | |
| 30 | 33 | It's possible to define zero or more pairs - each pair is then |
| 31 | 34 | delimited by a space character ' '. Each pair appears in |
| 32 | − synthetic uevent as "SYNTH_ARG_KEY=VALUE". That means the KEY | |
| 33 | − name gains "SYNTH_ARG_" prefix to avoid possible collisions | |
| 35 | + synthetic uevent as ``SYNTH_ARG_KEY=VALUE``. That means the KEY | |
| 36 | + name gains ``SYNTH_ARG_`` prefix to avoid possible collisions | |
| 34 | 37 | with existing variables. |
| 35 | 38 | |
| 36 | − Example of valid sequence written to the uevent file: | |
| 39 | + Example of valid sequence written to the uevent file:: | |
| 37 | 40 | |
| 38 | 41 | add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc |
| 39 | 42 | |
| 40 | − This generates synthetic uevent including these variables: | |
| 43 | + This generates synthetic uevent including these variables:: | |
| 41 | 44 | |
| 42 | 45 | ACTION=add |
| 43 | 46 | SYNTH_ARG_A=1 |
| 44 | 47 | SYNTH_ARG_B=abc |
| 45 | 48 | SYNTH_UUID=fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed |
| 49 | + | |
| 46 | 50 | Users: |
| 47 | 51 | udev, userspace tools generating synthetic uevents |
| @@ -45,7 +45,8 @@ Description: · 44 unmodified lines | ||
| 45 | 45 | 7. Device is unplugged. |
| 46 | 46 | |
| 47 | 47 | References: |
| 48 | − [WUSB-AM] Association Models Supplement to the | |
| 48 | + [WUSB-AM] | |
| 49 | + Association Models Supplement to the | |
| 49 | 50 | Certified Wireless Universal Serial Bus |
| 50 | 51 | Specification, version 1.0. |
| 51 | 52 | |
| @@ -3,44 +3,52 @@ Date: 2020-01-14 · 2 unmodified lines | ||
| 3 | 3 | KernelVersion: 5.6 |
| 4 | 4 | Contact: linux-usb@vger.kernel.org |
| 5 | 5 | Description: There are two USB charger states: |
| 6 | − USB_CHARGER_ABSENT | |
| 7 | − USB_CHARGER_PRESENT | |
| 6 | + | |
| 7 | + - USB_CHARGER_ABSENT | |
| 8 | + - USB_CHARGER_PRESENT | |
| 9 | + | |
| 8 | 10 | There are five USB charger types: |
| 9 | − USB_CHARGER_UNKNOWN_TYPE: Charger type is unknown | |
| 10 | − USB_CHARGER_SDP_TYPE: Standard Downstream Port | |
| 11 | − USB_CHARGER_CDP_TYPE: Charging Downstream Port | |
| 12 | − USB_CHARGER_DCP_TYPE: Dedicated Charging Port | |
| 13 | − USB_CHARGER_ACA_TYPE: Accessory Charging Adapter | |
| 11 | + | |
| 12 | + ======================== ========================== | |
| 13 | + USB_CHARGER_UNKNOWN_TYPE Charger type is unknown | |
| 14 | + USB_CHARGER_SDP_TYPE Standard Downstream Port | |
| 15 | + USB_CHARGER_CDP_TYPE Charging Downstream Port | |
| 16 | + USB_CHARGER_DCP_TYPE Dedicated Charging Port | |
| 17 | + USB_CHARGER_ACA_TYPE Accessory Charging Adapter | |
| 18 | + ======================== ========================== | |
| 19 | + | |
| 14 | 20 | https://www.usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement |
| 15 | 21 | |
| 16 | − Here are two examples taken using udevadm monitor -p when | |
| 17 | − USB charger is online: | |
| 18 | − UDEV change /devices/soc0/usbphynop1 (platform) | |
| 19 | − ACTION=change | |
| 20 | − DEVPATH=/devices/soc0/usbphynop1 | |
| 21 | − DRIVER=usb_phy_generic | |
| 22 | − MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv | |
| 23 | − OF_COMPATIBLE_0=usb-nop-xceiv | |
| 24 | − OF_COMPATIBLE_N=1 | |
| 25 | − OF_FULLNAME=/usbphynop1 | |
| 26 | − OF_NAME=usbphynop1 | |
| 27 | − SEQNUM=2493 | |
| 28 | − SUBSYSTEM=platform | |
| 29 | − USB_CHARGER_STATE=USB_CHARGER_PRESENT | |
| 30 | − USB_CHARGER_TYPE=USB_CHARGER_SDP_TYPE | |
| 31 | − USEC_INITIALIZED=227422826 | |
| 32 | − | |
| 33 | − USB charger is offline: | |
| 34 | − KERNEL change /devices/soc0/usbphynop1 (platform) | |
| 35 | − ACTION=change | |
| 36 | − DEVPATH=/devices/soc0/usbphynop1 | |
| 37 | − DRIVER=usb_phy_generic | |
| 38 | − MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv | |
| 39 | − OF_COMPATIBLE_0=usb-nop-xceiv | |
| 40 | − OF_COMPATIBLE_N=1 | |
| 41 | − OF_FULLNAME=/usbphynop1 | |
| 42 | − OF_NAME=usbphynop1 | |
| 43 | − SEQNUM=2494 | |
| 44 | − SUBSYSTEM=platform | |
| 45 | − USB_CHARGER_STATE=USB_CHARGER_ABSENT | |
| 46 | − USB_CHARGER_TYPE=USB_CHARGER_UNKNOWN_TYPE | |
| 22 | + Here are two examples taken using ``udevadm monitor -p`` when | |
| 23 | + USB charger is online:: | |
| 24 | + | |
| 25 | + UDEV change /devices/soc0/usbphynop1 (platform) | |
| 26 | + ACTION=change | |
| 27 | + DEVPATH=/devices/soc0/usbphynop1 | |
| 28 | + DRIVER=usb_phy_generic | |
| 29 | + MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv | |
| 30 | + OF_COMPATIBLE_0=usb-nop-xceiv | |
| 31 | + OF_COMPATIBLE_N=1 | |
| 32 | + OF_FULLNAME=/usbphynop1 | |
| 33 | + OF_NAME=usbphynop1 | |
| 34 | + SEQNUM=2493 | |
| 35 | + SUBSYSTEM=platform | |
| 36 | + USB_CHARGER_STATE=USB_CHARGER_PRESENT | |
| 37 | + USB_CHARGER_TYPE=USB_CHARGER_SDP_TYPE | |
| 38 | + USEC_INITIALIZED=227422826 | |
| 39 | + | |
| 40 | + USB charger is offline:: | |
| 41 | + | |
| 42 | + KERNEL change /devices/soc0/usbphynop1 (platform) | |
| 43 | + ACTION=change | |
| 44 | + DEVPATH=/devices/soc0/usbphynop1 | |
| 45 | + DRIVER=usb_phy_generic | |
| 46 | + MODALIAS=of:Nusbphynop1T(null)Cusb-nop-xceiv | |
| 47 | + OF_COMPATIBLE_0=usb-nop-xceiv | |
| 48 | + OF_COMPATIBLE_N=1 | |
| 49 | + OF_FULLNAME=/usbphynop1 | |
| 50 | + OF_NAME=usbphynop1 | |
| 51 | + SEQNUM=2494 | |
| 52 | + SUBSYSTEM=platform | |
| 53 | + USB_CHARGER_STATE=USB_CHARGER_ABSENT | |
| 54 | + USB_CHARGER_TYPE=USB_CHARGER_UNKNOWN_TYPE | |
| @@ -6,22 +6,22 @@ Description: When the USB Host Controller has entered a state where it is no · 5 unmodified lines | ||
| 6 | 6 | longer functional a uevent will be raised. The uevent will |
| 7 | 7 | contain ACTION=offline and ERROR=DEAD. |
| 8 | 8 | |
| 9 | − Here is an example taken using udevadm monitor -p: | |
| 9 | + Here is an example taken using udevadm monitor -p:: | |
| 10 | 10 | |
| 11 | − KERNEL[130.428945] offline /devices/pci0000:00/0000:00:10.0/usb2 (usb) | |
| 12 | − ACTION=offline | |
| 13 | − BUSNUM=002 | |
| 14 | − DEVNAME=/dev/bus/usb/002/001 | |
| 15 | − DEVNUM=001 | |
| 16 | − DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2 | |
| 17 | − DEVTYPE=usb_device | |
| 18 | − DRIVER=usb | |
| 19 | − ERROR=DEAD | |
| 20 | − MAJOR=189 | |
| 21 | − MINOR=128 | |
| 22 | − PRODUCT=1d6b/2/414 | |
| 23 | − SEQNUM=2168 | |
| 24 | − SUBSYSTEM=usb | |
| 25 | − TYPE=9/0/1 | |
| 11 | + KERNEL[130.428945] offline /devices/pci0000:00/0000:00:10.0/usb2 (usb) | |
| 12 | + ACTION=offline | |
| 13 | + BUSNUM=002 | |
| 14 | + DEVNAME=/dev/bus/usb/002/001 | |
| 15 | + DEVNUM=001 | |
| 16 | + DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2 | |
| 17 | + DEVTYPE=usb_device | |
| 18 | + DRIVER=usb | |
| 19 | + ERROR=DEAD | |
| 20 | + MAJOR=189 | |
| 21 | + MINOR=128 | |
| 22 | + PRODUCT=1d6b/2/414 | |
| 23 | + SEQNUM=2168 | |
| 24 | + SUBSYSTEM=usb | |
| 25 | + TYPE=9/0/1 | |
| 26 | 26 | |
| 27 | 27 | Users: chromium-os-dev@chromium.org |
| @@ -10,4 +10,14 @@ config WARN_MISSING_DOCUMENTS · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | If unsure, select 'N'. |
| 12 | 12 | |
| 13 | +config WARN_ABI_ERRORS | |
| 14 | + bool "Warn if there are errors at ABI files" | |
| 15 | + depends on COMPILE_TEST | |
| 16 | + help | |
| 17 | + The files under Documentation/ABI should follow what's | |
| 18 | + described at Documentation/ABI/README. Yet, as they're manually | |
| 19 | + written, it would be possible that some of those files would | |
| 20 | + have errors that would break them for being parsed by | |
| 21 | + scripts/get_abi.pl. Add a check to verify them. | |
| 13 | 22 | |
| 23 | + If unsure, select 'N'. | |
| @@ -10,6 +10,11 @@ ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y) · 9 unmodified lines | ||
| 10 | 10 | $(shell $(srctree)/scripts/documentation-file-ref-check --warn) |
| 11 | 11 | endif |
| 12 | 12 | |
| 13 | +# Check for broken ABI files | |
| 14 | +ifeq ($(CONFIG_WARN_ABI_ERRORS),y) | |
| 15 | +$(shell $(srctree)/scripts/get_abi.pl validate --dir $(srctree)/Documentation/ABI) | |
| 16 | +endif | |
| 17 | + | |
| 13 | 18 | # You can set these variables from the command line. |
| 14 | 19 | SPHINXBUILD = sphinx-build |
| 15 | 20 | SPHINXOPTS = |
| @@ -21,6 +26,10 @@ BUILDDIR = $(obj)/output · 5 unmodified lines | ||
| 21 | 26 | PDFLATEX = xelatex |
| 22 | 27 | LATEXOPTS = -interaction=batchmode |
| 23 | 28 | |
| 29 | +ifeq ($(KBUILD_VERBOSE),0) | |
| 30 | +SPHINXOPTS += "-q" | |
| 31 | +endif | |
| 32 | + | |
| 24 | 33 | # User-friendly check for sphinx-build |
| 25 | 34 | HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi) |
| 26 | 35 | |
| @@ -107,7 +107,7 @@ for a UID/GID will prevent that UID/GID from obtaining auxiliary setid · 106 unmodified lines | ||
| 107 | 107 | privileges, such as allowing a user to set up user namespace UID/GID mappings. |
| 108 | 108 | |
| 109 | 109 | Note on GID policies and setgroups() |
| 110 | −================== | |
| 110 | +==================================== | |
| 111 | 111 | In v5.9 we are adding support for limiting CAP_SETGID privileges as was done |
| 112 | 112 | previously for CAP_SETUID. However, for compatibility with common sandboxing |
| 113 | 113 | related code conventions in userspace, we currently allow arbitrary |
| @@ -0,0 +1,11 @@ | ||
| 1 | +ABI obsolete symbols | |
| 2 | +==================== | |
| 3 | + | |
| 4 | +Documents interfaces that are still remaining in the kernel, but are | |
| 5 | +marked to be removed at some later point in time. | |
| 6 | + | |
| 7 | +The description of the interface will document the reason why it is | |
| 8 | +obsolete and when it can be expected to be removed. | |
| 9 | + | |
| 10 | +.. kernel-abi:: $srctree/Documentation/ABI/obsolete | |
| 11 | + :rst: | |
| @@ -0,0 +1,5 @@ | ||
| 1 | +ABI removed symbols | |
| 2 | +=================== | |
| 3 | + | |
| 4 | +.. kernel-abi:: $srctree/Documentation/ABI/removed | |
| 5 | + :rst: | |
| @@ -0,0 +1,14 @@ | ||
| 1 | +ABI stable symbols | |
| 2 | +================== | |
| 3 | + | |
| 4 | +Documents the interfaces that the developer has defined to be stable. | |
| 5 | + | |
| 6 | +Userspace programs are free to use these interfaces with no | |
| 7 | +restrictions, and backward compatibility for them will be guaranteed | |
| 8 | +for at least 2 years. | |
| 9 | + | |
| 10 | +Most interfaces (like syscalls) are expected to never change and always | |
| 11 | +be available. | |
| 12 | + | |
| 13 | +.. kernel-abi:: $srctree/Documentation/ABI/stable | |
| 14 | + :rst: | |
| @@ -0,0 +1,20 @@ | ||
| 1 | +ABI testing symbols | |
| 2 | +=================== | |
| 3 | + | |
| 4 | +Documents interfaces that are felt to be stable, | |
| 5 | +as the main development of this interface has been completed. | |
| 6 | + | |
| 7 | +The interface can be changed to add new features, but the | |
| 8 | +current interface will not break by doing this, unless grave | |
| 9 | +errors or security problems are found in them. | |
| 10 | + | |
| 11 | +Userspace programs can start to rely on these interfaces, but they must | |
| 12 | +be aware of changes that can occur before these interfaces move to | |
| 13 | +be marked stable. | |
| 14 | + | |
| 15 | +Programs that use these interfaces are strongly encouraged to add their | |
| 16 | +name to the description of these interfaces, so that the kernel | |
| 17 | +developers can easily notify them if any changes occur. | |
| 18 | + | |
| 19 | +.. kernel-abi:: $srctree/Documentation/ABI/testing | |
| 20 | + :rst: | |
| @@ -0,0 +1,11 @@ | ||
| 1 | +===================== | |
| 2 | +Linux ABI description | |
| 3 | +===================== | |
| 4 | + | |
| 5 | +.. toctree:: | |
| 6 | + :maxdepth: 2 | |
| 7 | + | |
| 8 | + abi-stable | |
| 9 | + abi-testing | |
| 10 | + abi-obsolete | |
| 11 | + abi-removed | |
| @@ -18,6 +18,8 @@ etc. · 17 unmodified lines | ||
| 18 | 18 | devices |
| 19 | 19 | sysctl/index |
| 20 | 20 | |
| 21 | + abi | |
| 22 | + | |
| 21 | 23 | This section describes CPU vulnerabilities and their mitigations. |
| 22 | 24 | |
| 23 | 25 | .. toctree:: |
| @@ -478,7 +478,7 @@ order to ask the hardware to enter that state. Also, for each · 477 unmodified lines | ||
| 478 | 478 | statistics of the given idle state. That information is exposed by the kernel |
| 479 | 479 | via ``sysfs``. |
| 480 | 480 | |
| 481 | −For each CPU in the system, there is a :file:`/sys/devices/system/cpu<N>/cpuidle/` | |
| 481 | +For each CPU in the system, there is a :file:`/sys/devices/system/cpu/cpu<N>/cpuidle/` | |
| 482 | 482 | directory in ``sysfs``, where the number ``<N>`` is assigned to the given |
| 483 | 483 | CPU at the initialization time. That directory contains a set of subdirectories |
| 484 | 484 | called :file:`state0`, :file:`state1` and so on, up to the number of idle state |
| @@ -494,7 +494,7 @@ object corresponding to it, as follows: · 9 unmodified lines | ||
| 494 | 494 | residency. |
| 495 | 495 | |
| 496 | 496 | ``below`` |
| 497 | − Total number of times this idle state had been asked for, but cerainly | |
| 497 | + Total number of times this idle state had been asked for, but certainly | |
| 498 | 498 | a deeper idle state would have been a better match for the observed idle |
| 499 | 499 | duration. |
| 500 | 500 | |
| @@ -300,6 +300,7 @@ Note: · 299 unmodified lines | ||
| 300 | 300 | 0: 0 1 2 3 4 5 6 7 |
| 301 | 301 | RSS hash key: |
| 302 | 302 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89 |
| 303 | + | |
| 303 | 304 | netdev_tstamp_prequeue |
| 304 | 305 | ---------------------- |
| 305 | 306 | |
| @@ -148,3 +148,13 @@ SunXi family · 147 unmodified lines | ||
| 148 | 148 | * User Manual |
| 149 | 149 | |
| 150 | 150 | http://dl.linux-sunxi.org/A64/Allwinner%20A64%20User%20Manual%20v1.0.pdf |
| 151 | + | |
| 152 | + - Allwinner H6 | |
| 153 | + | |
| 154 | + * Datasheet | |
| 155 | + | |
| 156 | + https://linux-sunxi.org/images/5/5c/Allwinner_H6_V200_Datasheet_V1.1.pdf | |
| 157 | + | |
| 158 | + * User Manual | |
| 159 | + | |
| 160 | + https://linux-sunxi.org/images/4/46/Allwinner_H6_V200_User_Manual_V1.1.pdf | |
| @@ -102,7 +102,9 @@ applications. · 101 unmodified lines | ||
| 102 | 102 | system call) are not checked if the user thread tag checking mode is |
| 103 | 103 | ``PR_MTE_TCF_NONE`` or ``PR_MTE_TCF_ASYNC``. If the tag checking mode is |
| 104 | 104 | ``PR_MTE_TCF_SYNC``, the kernel makes a best effort to check its user |
| 105 | −address accesses, however it cannot always guarantee it. | |
| 105 | +address accesses, however it cannot always guarantee it. Kernel accesses | |
| 106 | +to user addresses are always performed with an effective ``PSTATE.TCO`` | |
| 107 | +value of zero, regardless of the user configuration. | |
| 106 | 108 | |
| 107 | 109 | Excluding Tags in the ``IRG``, ``ADDG`` and ``SUBG`` instructions |
| 108 | 110 | ----------------------------------------------------------------- |
| @@ -90,6 +90,8 @@ stable kernels. · 89 unmodified lines | ||
| 90 | 90 | +----------------+-----------------+-----------------+-----------------------------+ |
| 91 | 91 | | ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 | |
| 92 | 92 | +----------------+-----------------+-----------------+-----------------------------+ |
| 93 | +| ARM | Cortex-A77 | #1508412 | ARM64_ERRATUM_1508412 | | |
| 94 | ++----------------+-----------------+-----------------+-----------------------------+ | |
| 93 | 95 | | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 | |
| 94 | 96 | +----------------+-----------------+-----------------+-----------------------------+ |
| 95 | 97 | | ARM | Neoverse-N1 | #1349291 | N/A | |
| @@ -38,7 +38,8 @@ needs_sphinx = '1.3' · 37 unmodified lines | ||
| 38 | 38 | # ones. |
| 39 | 39 | extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', |
| 40 | 40 | 'kfigure', 'sphinx.ext.ifconfig', 'automarkup', |
| 41 | − 'maintainers_include', 'sphinx.ext.autosectionlabel' ] | |
| 41 | + 'maintainers_include', 'sphinx.ext.autosectionlabel', | |
| 42 | + 'kernel_abi'] | |
| 42 | 43 | |
| 43 | 44 | # |
| 44 | 45 | # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* |
| @@ -50,7 +51,7 @@ if major >= 3: · 5 unmodified lines | ||
| 50 | 51 | support for Sphinx v3.0 and above is brand new. Be prepared for |
| 51 | 52 | possible issues in the generated output. |
| 52 | 53 | ''') |
| 53 | − if minor > 0 or patch >= 2: | |
| 54 | + if (major > 3) or (minor > 0 or patch >= 2): | |
| 54 | 55 | # Sphinx c function parser is more pedantic with regards to type |
| 55 | 56 | # checking. Due to that, having macros at c:function cause problems. |
| 56 | 57 | # Those needed to be scaped by using c_id_attributes[] array |
| @@ -295,11 +295,13 @@ print the number of the test and the status of the test: · 294 unmodified lines | ||
| 295 | 295 | pass:: |
| 296 | 296 | |
| 297 | 297 | ok 28 - kmalloc_double_kzfree |
| 298 | + | |
| 298 | 299 | or, if kmalloc failed:: |
| 299 | 300 | |
| 300 | 301 | # kmalloc_large_oob_right: ASSERTION FAILED at lib/test_kasan.c:163 |
| 301 | 302 | Expected ptr is not null, but is |
| 302 | 303 | not ok 4 - kmalloc_large_oob_right |
| 304 | + | |
| 303 | 305 | or, if a KASAN report was expected, but not found:: |
| 304 | 306 | |
| 305 | 307 | # kmalloc_double_kzfree: EXPECTATION FAILED at lib/test_kasan.c:629 |
| @@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``: · 196 unmodified lines | ||
| 197 | 197 | |
| 198 | 198 | config MISC_EXAMPLE_TEST |
| 199 | 199 | bool "Test for my example" |
| 200 | − depends on MISC_EXAMPLE && KUNIT | |
| 200 | + depends on MISC_EXAMPLE && KUNIT=y | |
| 201 | 201 | |
| 202 | 202 | and the following to ``drivers/misc/Makefile``: |
| 203 | 203 | |
| @@ -561,6 +561,11 @@ Once the kernel is built and installed, a simple · 560 unmodified lines | ||
| 561 | 561 | |
| 562 | 562 | ...will run the tests. |
| 563 | 563 | |
| 564 | +.. note:: | |
| 565 | + Note that you should make sure your test depends on ``KUNIT=y`` in Kconfig | |
| 566 | + if the test does not support module build. Otherwise, it will trigger | |
| 567 | + compile errors if ``CONFIG_KUNIT`` is ``m``. | |
| 568 | + | |
| 564 | 569 | Writing new tests for other architectures |
| 565 | 570 | ----------------------------------------- |
| 566 | 571 | |
| @@ -4,7 +4,7 @@ Clock control registers reside in different Hi6220 system controllers, · 3 unmodified lines | ||
| 4 | 4 | please refer the following document to know more about the binding rules |
| 5 | 5 | for these system controllers: |
| 6 | 6 | |
| 7 | −Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | |
| 7 | +Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml | |
| 8 | 8 | |
| 9 | 9 | Required Properties: |
| 10 | 10 | |
| @@ -37,6 +37,9 @@ properties: · 36 unmodified lines | ||
| 37 | 37 | |
| 38 | 38 | reset-gpios: true |
| 39 | 39 | |
| 40 | + 'mantix,tp-rstn-gpios': | |
| 41 | + description: second reset line that triggers DSI config load | |
| 42 | + | |
| 40 | 43 | backlight: true |
| 41 | 44 | |
| 42 | 45 | required: |
| @@ -63,6 +66,7 @@ examples: · 20 unmodified lines | ||
| 63 | 66 | avee-supply = <®_avee>; |
| 64 | 67 | vddi-supply = <®_1v8_p>; |
| 65 | 68 | reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; |
| 69 | + mantix,tp-rstn-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; | |
| 66 | 70 | backlight = <&backlight>; |
| 67 | 71 | }; |
| 68 | 72 | }; |
| @@ -0,0 +1,18 @@ | ||
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | |
| 2 | +%YAML 1.2 | |
| 3 | +--- | |
| 4 | +$id: http://devicetree.org/schemas/net/can/can-controller.yaml# | |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# | |
| 6 | + | |
| 7 | +title: CAN Controller Generic Binding | |
| 8 | + | |
| 9 | +maintainers: | |
| 10 | + - Marc Kleine-Budde <mkl@pengutronix.de> | |
| 11 | + | |
| 12 | +properties: | |
| 13 | + $nodename: | |
| 14 | + pattern: "^can(@.*)?$" | |
| 15 | + | |
| 16 | +additionalProperties: true | |
| 17 | + | |
| 18 | +... | |
| @@ -0,0 +1,135 @@ | ||
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | |
| 2 | +%YAML 1.2 | |
| 3 | +--- | |
| 4 | +$id: http://devicetree.org/schemas/net/can/fsl,flexcan.yaml# | |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# | |
| 6 | + | |
| 7 | +title: | |
| 8 | + Flexcan CAN controller on Freescale's ARM and PowerPC system-on-a-chip (SOC). | |
| 9 | + | |
| 10 | +maintainers: | |
| 11 | + - Marc Kleine-Budde <mkl@pengutronix.de> | |
| 12 | + | |
| 13 | +allOf: | |
| 14 | + - $ref: can-controller.yaml# | |
| 15 | + | |
| 16 | +properties: | |
| 17 | + compatible: | |
| 18 | + oneOf: | |
| 19 | + - enum: | |
| 20 | + - fsl,imx8qm-flexcan | |
| 21 | + - fsl,imx8mp-flexcan | |
| 22 | + - fsl,imx6q-flexcan | |
| 23 | + - fsl,imx53-flexcan | |
| 24 | + - fsl,imx35-flexcan | |
| 25 | + - fsl,imx28-flexcan | |
| 26 | + - fsl,imx25-flexcan | |
| 27 | + - fsl,p1010-flexcan | |
| 28 | + - fsl,vf610-flexcan | |
| 29 | + - fsl,ls1021ar2-flexcan | |
| 30 | + - fsl,lx2160ar1-flexcan | |
| 31 | + - items: | |
| 32 | + - enum: | |
| 33 | + - fsl,imx7d-flexcan | |
| 34 | + - fsl,imx6ul-flexcan | |
| 35 | + - fsl,imx6sx-flexcan | |
| 36 | + - const: fsl,imx6q-flexcan | |
| 37 | + - items: | |
| 38 | + - enum: | |
| 39 | + - fsl,ls1028ar1-flexcan | |
| 40 | + - const: fsl,lx2160ar1-flexcan | |
| 41 | + | |
| 42 | + reg: | |
| 43 | + maxItems: 1 | |
| 44 | + | |
| 45 | + interrupts: | |
| 46 | + maxItems: 1 | |
| 47 | + | |
| 48 | + clocks: | |
| 49 | + maxItems: 2 | |
| 50 | + | |
| 51 | + clock-names: | |
| 52 | + items: | |
| 53 | + - const: ipg | |
| 54 | + - const: per | |
| 55 | + | |
| 56 | + clock-frequency: | |
| 57 | + description: | | |
| 58 | + The oscillator frequency driving the flexcan device, filled in by the | |
| 59 | + boot loader. This property should only be used the used operating system | |
| 60 | + doesn't support the clocks and clock-names property. | |
| 61 | + | |
| 62 | + xceiver-supply: | |
| 63 | + description: Regulator that powers the CAN transceiver. | |
| 64 | + | |
| 65 | + big-endian: | |
| 66 | + $ref: /schemas/types.yaml#/definitions/flag | |
| 67 | + description: | | |
| 68 | + This means the registers of FlexCAN controller are big endian. This is | |
| 69 | + optional property.i.e. if this property is not present in device tree | |
| 70 | + node then controller is assumed to be little endian. If this property is | |
| 71 | + present then controller is assumed to be big endian. | |
| 72 | + | |
| 73 | + fsl,stop-mode: | |
| 74 | + description: | | |
| 75 | + Register bits of stop mode control. | |
| 76 | + | |
| 77 | + The format should be as follows: | |
| 78 | + <gpr req_gpr req_bit> | |
| 79 | + gpr is the phandle to general purpose register node. | |
| 80 | + req_gpr is the gpr register offset of CAN stop request. | |
| 81 | + req_bit is the bit offset of CAN stop request. | |
| 82 | + $ref: /schemas/types.yaml#/definitions/phandle-array | |
| 83 | + items: | |
| 84 | + - description: The 'gpr' is the phandle to general purpose register node. | |
| 85 | + - description: The 'req_gpr' is the gpr register offset of CAN stop request. | |
| 86 | + maximum: 0xff | |
| 87 | + - description: The 'req_bit' is the bit offset of CAN stop request. | |
| 88 | + maximum: 0x1f | |
| 89 | + | |
| 90 | + fsl,clk-source: | |
| 91 | + description: | | |
| 92 | + Select the clock source to the CAN Protocol Engine (PE). It's SoC | |
| 93 | + implementation dependent. Refer to RM for detailed definition. If this | |
| 94 | + property is not set in device tree node then driver selects clock source 1 | |
| 95 | + by default. | |
| 96 | + 0: clock source 0 (oscillator clock) | |
| 97 | + 1: clock source 1 (peripheral clock) | |
| 98 | + $ref: /schemas/types.yaml#/definitions/uint32 | |
| 99 | + default: 1 | |
| 100 | + minimum: 0 | |
| 101 | + maximum: 1 | |
| 102 | + | |
| 103 | + wakeup-source: | |
| 104 | + $ref: /schemas/types.yaml#/definitions/flag | |
| 105 | + description: | |
| 106 | + Enable CAN remote wakeup. | |
| 107 | + | |
| 108 | +required: | |
| 109 | + - compatible | |
| 110 | + - reg | |
| 111 | + - interrupts | |
| 112 | + | |
| 113 | +additionalProperties: false | |
| 114 | + | |
| 115 | +examples: | |
| 116 | + - | | |
| 117 | + can@1c000 { | |
| 118 | + compatible = "fsl,p1010-flexcan"; | |
| 119 | + reg = <0x1c000 0x1000>; | |
| 120 | + interrupts = <48 0x2>; | |
| 121 | + interrupt-parent = <&mpic>; | |
| 122 | + clock-frequency = <200000000>; | |
| 123 | + fsl,clk-source = <0>; | |
| 124 | + }; | |
| 125 | + - | | |
| 126 | + #include <dt-bindings/interrupt-controller/irq.h> | |
| 127 | + | |
| 128 | + can@2090000 { | |
| 129 | + compatible = "fsl,imx6q-flexcan"; | |
| 130 | + reg = <0x02090000 0x4000>; | |
| 131 | + interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>; | |
| 132 | + clocks = <&clks 1>, <&clks 2>; | |
| 133 | + clock-names = "ipg", "per"; | |
| 134 | + fsl,stop-mode = <&gpr 0x34 28>; | |
| 135 | + }; | |
| @@ -1,57 +0,0 @@ | ||
| 1 | −Flexcan CAN controller on Freescale's ARM and PowerPC system-on-a-chip (SOC). | |
| 2 | − | |
| 3 | −Required properties: | |
| 4 | − | |
| 5 | −- compatible : Should be "fsl,<processor>-flexcan" | |
| 6 | − | |
| 7 | − where <processor> is imx8qm, imx6q, imx28, imx53, imx35, imx25, p1010, | |
| 8 | − vf610, ls1021ar2, lx2160ar1, ls1028ar1. | |
| 9 | − | |
| 10 | − The ls1028ar1 must be followed by lx2160ar1, e.g. | |
| 11 | − - "fsl,ls1028ar1-flexcan", "fsl,lx2160ar1-flexcan" | |
| 12 | − | |
| 13 | − An implementation should also claim any of the following compatibles | |
| 14 | − that it is fully backwards compatible with: | |
| 15 | − | |
| 16 | − - fsl,p1010-flexcan | |
| 17 | − | |
| 18 | −- reg : Offset and length of the register set for this device | |
| 19 | −- interrupts : Interrupt tuple for this device | |
| 20 | − | |
| 21 | −Optional properties: | |
| 22 | − | |
| 23 | −- clock-frequency : The oscillator frequency driving the flexcan device | |
| 24 | − | |
| 25 | −- xceiver-supply: Regulator that powers the CAN transceiver | |
| 26 | − | |
| 27 | −- big-endian: This means the registers of FlexCAN controller are big endian. | |
| 28 | − This is optional property.i.e. if this property is not present in | |
| 29 | − device tree node then controller is assumed to be little endian. | |
| 30 | − if this property is present then controller is assumed to be big | |
| 31 | − endian. | |
| 32 | − | |
| 33 | −- fsl,stop-mode: register bits of stop mode control, the format is | |
| 34 | − <&gpr req_gpr req_bit>. | |
| 35 | − gpr is the phandle to general purpose register node. | |
| 36 | − req_gpr is the gpr register offset of CAN stop request. | |
| 37 | − req_bit is the bit offset of CAN stop request. | |
| 38 | − | |
| 39 | −- fsl,clk-source: Select the clock source to the CAN Protocol Engine (PE). | |
| 40 | − It's SoC Implementation dependent. Refer to RM for detailed | |
| 41 | − definition. If this property is not set in device tree node | |
| 42 | − then driver selects clock source 1 by default. | |
| 43 | − 0: clock source 0 (oscillator clock) | |
| 44 | − 1: clock source 1 (peripheral clock) | |
| 45 | − | |
| 46 | −- wakeup-source: enable CAN remote wakeup | |
| 47 | − | |
| 48 | −Example: | |
| 49 | − | |
| 50 | − can@1c000 { | |
| 51 | − compatible = "fsl,p1010-flexcan"; | |
| 52 | − reg = <0x1c000 0x1000>; | |
| 53 | − interrupts = <48 0x2>; | |
| 54 | − interrupt-parent = <&mpic>; | |
| 55 | − clock-frequency = <200000000>; // filled in by bootloader | |
| 56 | − fsl,clk-source = <0>; // select clock source 0 for PE | |
| 57 | − }; | |
| @@ -33,6 +33,9 @@ properties: · 32 unmodified lines | ||
| 33 | 33 | - const: allwinner,sun4i-a10-system-control |
| 34 | 34 | - const: allwinner,sun8i-a23-system-control |
| 35 | 35 | - const: allwinner,sun8i-h3-system-control |
| 36 | + - items: | |
| 37 | + - const: allwinner,sun8i-v3s-system-control | |
| 38 | + - const: allwinner,sun8i-h3-system-control | |
| 36 | 39 | - items: |
| 37 | 40 | - const: allwinner,sun8i-r40-system-control |
| 38 | 41 | - const: allwinner,sun4i-a10-system-control |
| @@ -86,9 +86,6 @@ Other Functions · 85 unmodified lines | ||
| 86 | 86 | .. kernel-doc:: fs/dax.c |
| 87 | 87 | :export: |
| 88 | 88 | |
| 89 | −.. kernel-doc:: fs/direct-io.c | |
| 90 | − :export: | |
| 91 | − | |
| 92 | 89 | .. kernel-doc:: fs/libfs.c |
| 93 | 90 | :export: |
| 94 | 91 | |
| @@ -199,7 +199,7 @@ of its elements. Note: Once array is created its size can not be changed. · 198 unmodified lines | ||
| 199 | 199 | |
| 200 | 200 | There is a helper function to create device related seq_file:: |
| 201 | 201 | |
| 202 | − struct dentry *debugfs_create_devm_seqfile(struct device *dev, | |
| 202 | + void debugfs_create_devm_seqfile(struct device *dev, | |
| 203 | 203 | const char *name, |
| 204 | 204 | struct dentry *parent, |
| 205 | 205 | int (*read_fn)(struct seq_file *s, |
| @@ -83,10 +83,6 @@ AMDGPU XGMI Support · 82 unmodified lines | ||
| 83 | 83 | =================== |
| 84 | 84 | |
| 85 | 85 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c |
| 86 | − :doc: AMDGPU XGMI Support | |
| 87 | − | |
| 88 | −.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
| 89 | − :internal: | |
| 90 | 86 | |
| 91 | 87 | AMDGPU RAS Support |
| 92 | 88 | ================== |
| @@ -124,9 +120,6 @@ RAS VRAM Bad Pages sysfs Interface · 31 unmodified lines | ||
| 124 | 120 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c |
| 125 | 121 | :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface |
| 126 | 122 | |
| 127 | −.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| 128 | − :internal: | |
| 129 | − | |
| 130 | 123 | Sample Code |
| 131 | 124 | ----------- |
| 132 | 125 | Sample code for testing error injection can be found here: |
| @@ -20,7 +20,7 @@ ADM1266 is a sequencer that features voltage readback from 17 channels via an · 19 unmodified lines | ||
| 20 | 20 | integrated 12 bit SAR ADC, accessed using a PMBus interface. |
| 21 | 21 | |
| 22 | 22 | The driver is a client driver to the core PMBus driver. Please see |
| 23 | −Documentation/hwmon/pmbus for details on PMBus client drivers. | |
| 23 | +Documentation/hwmon/pmbus.rst for details on PMBus client drivers. | |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | Sysfs entries |
| @@ -132,6 +132,7 @@ Hardware Monitoring Kernel Drivers · 131 unmodified lines | ||
| 132 | 132 | mcp3021 |
| 133 | 133 | menf21bmc |
| 134 | 134 | mlxreg-fan |
| 135 | + mp2975 | |
| 135 | 136 | nct6683 |
| 136 | 137 | nct6775 |
| 137 | 138 | nct7802 |
| @@ -20,6 +20,7 @@ This driver implements support for Monolithic Power Systems, Inc. (MPS) · 19 unmodified lines | ||
| 20 | 20 | vendor dual-loop, digital, multi-phase controller MP2975. |
| 21 | 21 | |
| 22 | 22 | This device: |
| 23 | + | |
| 23 | 24 | - Supports up to two power rail. |
| 24 | 25 | - Provides 8 pulse-width modulations (PWMs), and can be configured up |
| 25 | 26 | to 8-phase operation for rail 1 and up to 4-phase operation for rail |
| @@ -32,10 +33,12 @@ This device: · 6 unmodified lines | ||
| 32 | 33 | 10-mV DAC, IMVP9 mode with 5-mV DAC. |
| 33 | 34 | |
| 34 | 35 | Device supports: |
| 36 | + | |
| 35 | 37 | - SVID interface. |
| 36 | 38 | - AVSBus interface. |
| 37 | 39 | |
| 38 | 40 | Device complaint with: |
| 41 | + | |
| 39 | 42 | - PMBus rev 1.3 interface. |
| 40 | 43 | |
| 41 | 44 | Device supports direct format for reading output current, output voltage, |
| @@ -45,11 +48,14 @@ Device supports VID and direct formats for reading output voltage. · 3 unmodified lines | ||
| 45 | 48 | The below VID modes are supported: VR12, VR13, IMVP9. |
| 46 | 49 | |
| 47 | 50 | The driver provides the next attributes for the current: |
| 51 | + | |
| 48 | 52 | - for current in: input, maximum alarm; |
| 49 | 53 | - for current out input, maximum alarm and highest values; |
| 50 | 54 | - for phase current: input and label. |
| 51 | −attributes. | |
| 55 | + attributes. | |
| 56 | + | |
| 52 | 57 | The driver exports the following attributes via the 'sysfs' files, where |
| 58 | + | |
| 53 | 59 | - 'n' is number of telemetry pages (from 1 to 2); |
| 54 | 60 | - 'k' is number of configured phases (from 1 to 8); |
| 55 | 61 | - indexes 1, 1*n for "iin"; |
| @@ -65,11 +71,14 @@ The driver exports the following attributes via the 'sysfs' files, where · 9 unmodified lines | ||
| 65 | 71 | **curr[1-{2n+k}]_label** |
| 66 | 72 | |
| 67 | 73 | The driver provides the next attributes for the voltage: |
| 74 | + | |
| 68 | 75 | - for voltage in: input, high critical threshold, high critical alarm, all only |
| 69 | 76 | from page 0; |
| 70 | 77 | - for voltage out: input, low and high critical thresholds, low and high |
| 71 | 78 | critical alarms, from pages 0 and 1; |
| 79 | + | |
| 72 | 80 | The driver exports the following attributes via the 'sysfs' files, where |
| 81 | + | |
| 73 | 82 | - 'n' is number of telemetry pages (from 1 to 2); |
| 74 | 83 | - indexes 1 for "iin"; |
| 75 | 84 | - indexes n+1, n+2 for "vout"; |
| @@ -87,9 +96,12 @@ The driver exports the following attributes via the 'sysfs' files, where · 11 unmodified lines | ||
| 87 | 96 | **in[2-{n+1}1_lcrit_alarm** |
| 88 | 97 | |
| 89 | 98 | The driver provides the next attributes for the power: |
| 99 | + | |
| 90 | 100 | - for power in alarm and input. |
| 91 | 101 | - for power out: highest and input. |
| 102 | + | |
| 92 | 103 | The driver exports the following attributes via the 'sysfs' files, where |
| 104 | + | |
| 93 | 105 | - 'n' is number of telemetry pages (from 1 to 2); |
| 94 | 106 | - indexes 1 for "pin"; |
| 95 | 107 | - indexes n+1, n+2 for "pout"; |
| @@ -17,6 +17,7 @@ LEDs · 16 unmodified lines | ||
| 17 | 17 | uleds |
| 18 | 18 | |
| 19 | 19 | leds-blinkm |
| 20 | + leds-el15203000 | |
| 20 | 21 | leds-lm3556 |
| 21 | 22 | leds-lp3944 |
| 22 | 23 | leds-lp5521 |
| @@ -0,0 +1,140 @@ | ||
| 1 | +.. SPDX-License-Identifier: GPL-2.0 | |
| 2 | + | |
| 3 | +================================== | |
| 4 | +Kernel driver for Crane EL15203000 | |
| 5 | +================================== | |
| 6 | + | |
| 7 | +/sys/class/leds/<led>/hw_pattern | |
| 8 | +-------------------------------- | |
| 9 | + | |
| 10 | +Specify a hardware pattern for the EL15203000 LED. | |
| 11 | + | |
| 12 | +The LEDs board supports only predefined patterns by firmware | |
| 13 | +for specific LEDs. | |
| 14 | + | |
| 15 | +Breathing mode for Screen frame light tube:: | |
| 16 | + | |
| 17 | + "0 4000 1 4000" | |
| 18 | + | |
| 19 | + ^ | |
| 20 | + | | |
| 21 | + Max-| --- | |
| 22 | + | / \ | |
| 23 | + | / \ | |
| 24 | + | / \ / | |
| 25 | + | / \ / | |
| 26 | + Min-|- --- | |
| 27 | + | | |
| 28 | + 0------4------8--> time (sec) | |
| 29 | + | |
| 30 | +Cascade mode for Pipe LED:: | |
| 31 | + | |
| 32 | + "1 800 2 800 4 800 8 800 16 800" | |
| 33 | + | |
| 34 | + ^ | |
| 35 | + | | |
| 36 | + 0 On -|----+ +----+ +--- | |
| 37 | + | | | | | | |
| 38 | + Off-| +-------------------+ +-------------------+ | |
| 39 | + | | |
| 40 | + 1 On -| +----+ +----+ | |
| 41 | + | | | | | | |
| 42 | + Off |----+ +-------------------+ +------------------ | |
| 43 | + | | |
| 44 | + 2 On -| +----+ +----+ | |
| 45 | + | | | | | | |
| 46 | + Off-|---------+ +-------------------+ +------------- | |
| 47 | + | | |
| 48 | + 3 On -| +----+ +----+ | |
| 49 | + | | | | | | |
| 50 | + Off-|--------------+ +-------------------+ +-------- | |
| 51 | + | | |
| 52 | + 4 On -| +----+ +----+ | |
| 53 | + | | | | | | |
| 54 | + Off-|-------------------+ +-------------------+ +--- | |
| 55 | + | | |
| 56 | + 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 57 | + | |
| 58 | +Inverted cascade mode for Pipe LED:: | |
| 59 | + | |
| 60 | + "30 800 29 800 27 800 23 800 15 800" | |
| 61 | + | |
| 62 | + ^ | |
| 63 | + | | |
| 64 | + 0 On -| +-------------------+ +-------------------+ | |
| 65 | + | | | | | | |
| 66 | + Off-|----+ +----+ +--- | |
| 67 | + | | |
| 68 | + 1 On -|----+ +-------------------+ +------------------ | |
| 69 | + | | | | | | |
| 70 | + Off | +----+ +----+ | |
| 71 | + | | |
| 72 | + 2 On -|---------+ +-------------------+ +------------- | |
| 73 | + | | | | | | |
| 74 | + Off-| +----+ +----+ | |
| 75 | + | | |
| 76 | + 3 On -|--------------+ +-------------------+ +-------- | |
| 77 | + | | | | | | |
| 78 | + Off-| +----+ +----+ | |
| 79 | + | | |
| 80 | + 4 On -|-------------------+ +-------------------+ +--- | |
| 81 | + | | | | | | |
| 82 | + Off-| +----+ +----+ | |
| 83 | + | | |
| 84 | + 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 85 | + | |
| 86 | +Bounce mode for Pipe LED:: | |
| 87 | + | |
| 88 | + "1 800 2 800 4 800 8 800 16 800 16 800 8 800 4 800 2 800 1 800" | |
| 89 | + | |
| 90 | + ^ | |
| 91 | + | | |
| 92 | + 0 On -|----+ +-------- | |
| 93 | + | | | | |
| 94 | + Off-| +---------------------------------------+ | |
| 95 | + | | |
| 96 | + 1 On -| +----+ +----+ | |
| 97 | + | | | | | | |
| 98 | + Off |----+ +-----------------------------+ +-------- | |
| 99 | + | | |
| 100 | + 2 On -| +----+ +----+ | |
| 101 | + | | | | | | |
| 102 | + Off-|---------+ +-------------------+ +------------- | |
| 103 | + | | |
| 104 | + 3 On -| +----+ +----+ | |
| 105 | + | | | | | | |
| 106 | + Off-|--------------+ +---------+ +------------------ | |
| 107 | + | | |
| 108 | + 4 On -| +---------+ | |
| 109 | + | | | | |
| 110 | + Off-|-------------------+ +----------------------- | |
| 111 | + | | |
| 112 | + 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| 113 | + | |
| 114 | +Inverted bounce mode for Pipe LED:: | |
| 115 | + | |
| 116 | + "30 800 29 800 27 800 23 800 15 800 15 800 23 800 27 800 29 800 30 800" | |
| 117 | + | |
| 118 | + ^ | |
| 119 | + | | |
| 120 | + 0 On -| +---------------------------------------+ | |
| 121 | + | | | | |
| 122 | + Off-|----+ +-------- | |
| 123 | + | | |
| 124 | + 1 On -|----+ +-----------------------------+ +-------- | |
| 125 | + | | | | | | |
| 126 | + Off | +----+ +----+ | |
| 127 | + | | |
| 128 | + 2 On -|---------+ +-------------------+ +------------- | |
| 129 | + | | | | | | |
| 130 | + Off-| +----+ +----+ | |
| 131 | + | | |
| 132 | + 3 On -|--------------+ +---------+ +------------------ | |
| 133 | + | | | | | | |
| 134 | + Off-| +----+ +----+ | |
| 135 | + | | |
| 136 | + 4 On -|-------------------+ +----------------------- | |
| 137 | + | | | | |
| 138 | + Off-| +---------+ | |
| 139 | + | | |
| 140 | + 0---0.8--1.6--2.4--3.2---4---4.8--5.6--6.4--7.2---8--> time (sec) | |
| @@ -0,0 +1,27 @@ | ||
| 1 | +.. SPDX-License-Identifier: GPL-2.0 | |
| 2 | + | |
| 3 | +=================================== | |
| 4 | +Kernel driver for Spreadtrum SC27XX | |
| 5 | +=================================== | |
| 6 | + | |
| 7 | +/sys/class/leds/<led>/hw_pattern | |
| 8 | +-------------------------------- | |
| 9 | + | |
| 10 | +Specify a hardware pattern for the SC27XX LED. For the SC27XX | |
| 11 | +LED controller, it only supports 4 stages to make a single | |
| 12 | +hardware pattern, which is used to configure the rise time, | |
| 13 | +high time, fall time and low time for the breathing mode. | |
| 14 | + | |
| 15 | +For the breathing mode, the SC27XX LED only expects one brightness | |
| 16 | +for the high stage. To be compatible with the hardware pattern | |
| 17 | +format, we should set brightness as 0 for rise stage, fall | |
| 18 | +stage and low stage. | |
| 19 | + | |
| 20 | +- Min stage duration: 125 ms | |
| 21 | +- Max stage duration: 31875 ms | |
| 22 | + | |
| 23 | +Since the stage duration step is 125 ms, the duration should be | |
| 24 | +a multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms. | |
| 25 | + | |
| 26 | +Thus the format of the hardware pattern values should be: | |
| 27 | +"0 rise_duration brightness high_duration 0 fall_duration 0 low_duration". | |
| @@ -42,6 +42,7 @@ The validator tracks lock-class usage history and divides the usage into · 41 unmodified lines | ||
| 42 | 42 | (4 usages * n STATEs + 1) categories: |
| 43 | 43 | |
| 44 | 44 | where the 4 usages can be: |
| 45 | + | |
| 45 | 46 | - 'ever held in STATE context' |
| 46 | 47 | - 'ever held as readlock in STATE context' |
| 47 | 48 | - 'ever held with STATE enabled' |
| @@ -49,10 +50,12 @@ where the 4 usages can be: · 1 unmodified line | ||
| 49 | 50 | |
| 50 | 51 | where the n STATEs are coded in kernel/locking/lockdep_states.h and as of |
| 51 | 52 | now they include: |
| 53 | + | |
| 52 | 54 | - hardirq |
| 53 | 55 | - softirq |
| 54 | 56 | |
| 55 | 57 | where the last 1 category is: |
| 58 | + | |
| 56 | 59 | - 'ever used' [ == !unused ] |
| 57 | 60 | |
| 58 | 61 | When locking rules are violated, these usage bits are presented in the |
| @@ -96,9 +99,9 @@ exact case is for the lock as of the reporting time. · 37 unmodified lines | ||
| 96 | 99 | +--------------+-------------+--------------+ |
| 97 | 100 | | | irq enabled | irq disabled | |
| 98 | 101 | +--------------+-------------+--------------+ |
| 99 | − | ever in irq | ? | - | | |
| 102 | + | ever in irq | '?' | '-' | | |
| 100 | 103 | +--------------+-------------+--------------+ |
| 101 | − | never in irq | + | . | | |
| 104 | + | never in irq | '+' | '.' | | |
| 102 | 105 | +--------------+-------------+--------------+ |
| 103 | 106 | |
| 104 | 107 | The character '-' suggests irq is disabled because if otherwise the |
| @@ -216,7 +219,7 @@ looks like this:: · 111 unmodified lines | ||
| 216 | 219 | BD_MUTEX_PARTITION |
| 217 | 220 | }; |
| 218 | 221 | |
| 219 | −mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_PARTITION); | |
| 222 | + mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_PARTITION); | |
| 220 | 223 | |
| 221 | 224 | In this case the locking is done on a bdev object that is known to be a |
| 222 | 225 | partition. |
| @@ -334,7 +337,7 @@ Troubleshooting: · 111 unmodified lines | ||
| 334 | 337 | ---------------- |
| 335 | 338 | |
| 336 | 339 | The validator tracks a maximum of MAX_LOCKDEP_KEYS number of lock classes. |
| 337 | −Exceeding this number will trigger the following lockdep warning: | |
| 340 | +Exceeding this number will trigger the following lockdep warning:: | |
| 338 | 341 | |
| 339 | 342 | (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)) |
| 340 | 343 | |
| @@ -420,7 +423,8 @@ the critical section of another reader of the same lock instance. · 79 unmodified lines | ||
| 420 | 423 | |
| 421 | 424 | The difference between recursive readers and non-recursive readers is because: |
| 422 | 425 | recursive readers get blocked only by a write lock *holder*, while non-recursive |
| 423 | −readers could get blocked by a write lock *waiter*. Considering the follow example: | |
| 426 | +readers could get blocked by a write lock *waiter*. Considering the follow | |
| 427 | +example:: | |
| 424 | 428 | |
| 425 | 429 | TASK A: TASK B: |
| 426 | 430 | |
| @@ -448,20 +452,22 @@ There are simply four block conditions: · 21 unmodified lines | ||
| 448 | 452 | |
| 449 | 453 | Block condition matrix, Y means the row blocks the column, and N means otherwise. |
| 450 | 454 | |
| 451 | − | E | r | R | | |
| 452 | 455 | +---+---+---+---+ |
| 453 | − E | Y | Y | Y | | |
| 456 | + | | E | r | R | | |
| 457 | + +---+---+---+---+ | |
| 458 | + | E | Y | Y | Y | | |
| 459 | + +---+---+---+---+ | |
| 460 | + | r | Y | Y | N | | |
| 454 | 461 | +---+---+---+---+ |
| 455 | − r | Y | Y | N | | |
| 462 | + | R | Y | Y | N | | |
| 456 | 463 | +---+---+---+---+ |
| 457 | − R | Y | Y | N | | |
| 458 | 464 | |
| 459 | 465 | (W: writers, r: non-recursive readers, R: recursive readers) |
| 460 | 466 | |
| 461 | 467 | |
| 462 | 468 | acquired recursively. Unlike non-recursive read locks, recursive read locks |
| 463 | 469 | only get blocked by current write lock *holders* other than write lock |
| 464 | −*waiters*, for example: | |
| 470 | +*waiters*, for example:: | |
| 465 | 471 | |
| 466 | 472 | TASK A: TASK B: |
| 467 | 473 | |
| @@ -491,7 +497,7 @@ Recursive locks don't block each other, while non-recursive locks do (this is · 23 unmodified lines | ||
| 491 | 497 | even true for two non-recursive read locks). A non-recursive lock can block the |
| 492 | 498 | corresponding recursive lock, and vice versa. |
| 493 | 499 | |
| 494 | −A deadlock case with recursive locks involved is as follow: | |
| 500 | +A deadlock case with recursive locks involved is as follow:: | |
| 495 | 501 | |
| 496 | 502 | TASK A: TASK B: |
| 497 | 503 | |
| @@ -510,7 +516,7 @@ because there are 3 types for lockers, there are, in theory, 9 types of lock · 12 unmodified lines | ||
| 510 | 516 | dependencies, but we can show that 4 types of lock dependencies are enough for |
| 511 | 517 | deadlock detection. |
| 512 | 518 | |
| 513 | −For each lock dependency: | |
| 519 | +For each lock dependency:: | |
| 514 | 520 | |
| 515 | 521 | L1 -> L2 |
| 516 | 522 | |
| @@ -525,20 +531,25 @@ same types). · 8 unmodified lines | ||
| 525 | 531 | With the above combination for simplification, there are 4 types of dependency edges |
| 526 | 532 | in the lockdep graph: |
| 527 | 533 | |
| 528 | −1) -(ER)->: exclusive writer to recursive reader dependency, "X -(ER)-> Y" means | |
| 534 | +1) -(ER)->: | |
| 535 | + exclusive writer to recursive reader dependency, "X -(ER)-> Y" means | |
| 529 | 536 | X -> Y and X is a writer and Y is a recursive reader. |
| 530 | 537 | |
| 531 | −2) -(EN)->: exclusive writer to non-recursive locker dependency, "X -(EN)-> Y" means | |
| 538 | +2) -(EN)->: | |
| 539 | + exclusive writer to non-recursive locker dependency, "X -(EN)-> Y" means | |
| 532 | 540 | X -> Y and X is a writer and Y is either a writer or non-recursive reader. |
| 533 | 541 | |
| 534 | −3) -(SR)->: shared reader to recursive reader dependency, "X -(SR)-> Y" means | |
| 542 | +3) -(SR)->: | |
| 543 | + shared reader to recursive reader dependency, "X -(SR)-> Y" means | |
| 535 | 544 | X -> Y and X is a reader (recursive or not) and Y is a recursive reader. |
| 536 | 545 | |
| 537 | −4) -(SN)->: shared reader to non-recursive locker dependency, "X -(SN)-> Y" means | |
| 546 | +4) -(SN)->: | |
| 547 | + shared reader to non-recursive locker dependency, "X -(SN)-> Y" means | |
| 538 | 548 | X -> Y and X is a reader (recursive or not) and Y is either a writer or |
| 539 | 549 | non-recursive reader. |
| 540 | 550 | |
| 541 | −Note that given two locks, they may have multiple dependencies between them, for example: | |
| 551 | +Note that given two locks, they may have multiple dependencies between them, | |
| 552 | +for example:: | |
| 542 | 553 | |
| 543 | 554 | TASK A: |
| 544 | 555 | |
| @@ -592,11 +603,11 @@ circles that won't cause deadlocks. · 47 unmodified lines | ||
| 592 | 603 | |
| 593 | 604 | Proof for sufficiency (Lemma 1): |
| 594 | 605 | |
| 595 | −Let's say we have a strong circle: | |
| 606 | +Let's say we have a strong circle:: | |
| 596 | 607 | |
| 597 | 608 | L1 -> L2 ... -> Ln -> L1 |
| 598 | 609 | |
| 599 | −, which means we have dependencies: | |
| 610 | +, which means we have dependencies:: | |
| 600 | 611 | |
| 601 | 612 | L1 -> L2 |
| 602 | 613 | L2 -> L3 |
| @@ -633,7 +644,7 @@ a lock held by P2, and P2 is waiting for a lock held by P3, ... and Pn is waitin · 30 unmodified lines | ||
| 633 | 644 | for a lock held by P1. Let's name the lock Px is waiting as Lx, so since P1 is waiting |
| 634 | 645 | for L1 and holding Ln, so we will have Ln -> L1 in the dependency graph. Similarly, |
| 635 | 646 | we have L1 -> L2, L2 -> L3, ..., Ln-1 -> Ln in the dependency graph, which means we |
| 636 | −have a circle: | |
| 647 | +have a circle:: | |
| 637 | 648 | |
| 638 | 649 | Ln -> L1 -> L2 -> ... -> Ln |
| 639 | 650 | |
| @@ -1,16 +0,0 @@ | ||
| 1 | −============================================= | |
| 2 | −Intel Many Integrated Core (MIC) architecture | |
| 3 | −============================================= | |
| 4 | − | |
| 5 | −.. toctree:: | |
| 6 | − :maxdepth: 1 | |
| 7 | − | |
| 8 | − mic_overview | |
| 9 | − scif_overview | |
| 10 | − | |
| 11 | −.. only:: subproject and html | |
| 12 | − | |
| 13 | − Indices | |
| 14 | − ======= | |
| 15 | − | |
| 16 | − * :ref:`genindex` | |
| @@ -1,85 +0,0 @@ | ||
| 1 | −====================================================== | |
| 2 | −Intel Many Integrated Core (MIC) architecture overview | |
| 3 | −====================================================== | |
| 4 | − | |
| 5 | −An Intel MIC X100 device is a PCIe form factor add-in coprocessor | |
| 6 | −card based on the Intel Many Integrated Core (MIC) architecture | |
| 7 | −that runs a Linux OS. It is a PCIe endpoint in a platform and therefore | |
| 8 | −implements the three required standard address spaces i.e. configuration, | |
| 9 | −memory and I/O. The host OS loads a device driver as is typical for | |
| 10 | −PCIe devices. The card itself runs a bootstrap after reset that | |
| 11 | −transfers control to the card OS downloaded from the host driver. The | |
| 12 | −host driver supports OSPM suspend and resume operations. It shuts down | |
| 13 | −the card during suspend and reboots the card OS during resume. | |
| 14 | −The card OS as shipped by Intel is a Linux kernel with modifications | |
| 15 | −for the X100 devices. | |
| 16 | − | |
| 17 | −Since it is a PCIe card, it does not have the ability to host hardware | |
| 18 | −devices for networking, storage and console. We provide these devices | |
| 19 | −on X100 coprocessors thus enabling a self-bootable equivalent | |
| 20 | −environment for applications. A key benefit of our solution is that it | |
| 21 | −leverages the standard virtio framework for network, disk and console | |
| 22 | −devices, though in our case the virtio framework is used across a PCIe | |
| 23 | −bus. A Virtio Over PCIe (VOP) driver allows creating user space | |
| 24 | −backends or devices on the host which are used to probe virtio drivers | |
| 25 | −for these devices on the MIC card. The existing VRINGH infrastructure | |
| 26 | −in the kernel is used to access virtio rings from the host. The card | |
| 27 | −VOP driver allows card virtio drivers to communicate with their user | |
| 28 | −space backends on the host via a device page. Ring 3 apps on the host | |
| 29 | −can add, remove and configure virtio devices. A thin MIC specific | |
| 30 | −virtio_config_ops is implemented which is borrowed heavily from | |
| 31 | −previous similar implementations in lguest and s390. | |
| 32 | − | |
| 33 | −MIC PCIe card has a dma controller with 8 channels. These channels are | |
| 34 | −shared between the host s/w and the card s/w. 0 to 3 are used by host | |
| 35 | −and 4 to 7 by card. As the dma device doesn't show up as PCIe device, | |
| 36 | −a virtual bus called mic bus is created and virtual dma devices are | |
| 37 | −created on it by the host/card drivers. On host the channels are private | |
| 38 | −and used only by the host driver to transfer data for the virtio devices. | |
| 39 | − | |
| 40 | −The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a | |
| 41 | −low level communications API across PCIe currently implemented for MIC. | |
| 42 | −More details are available at scif_overview.txt. | |
| 43 | − | |
| 44 | −The Coprocessor State Management (COSM) driver on the host allows for | |
| 45 | −boot, shutdown and reset of Intel MIC devices. It communicates with a COSM | |
| 46 | −"client" driver on the MIC cards over SCIF to perform these functions. | |
| 47 | − | |
| 48 | −Here is a block diagram of the various components described above. The | |
| 49 | −virtio backends are situated on the host rather than the card given better | |
| 50 | −single threaded performance for the host compared to MIC, the ability of | |
| 51 | −the host to initiate DMA's to/from the card using the MIC DMA engine and | |
| 52 | −the fact that the virtio block storage backend can only be on the host:: | |
| 53 | − | |
| 54 | − +----------+ | +----------+ | |
| 55 | − | Card OS | | | Host OS | | |
| 56 | − +----------+ | +----------+ | |
| 57 | − | | |
| 58 | − +-------+ +--------+ +------+ | +---------+ +--------+ +--------+ | |
| 59 | − | Virtio| |Virtio | |Virtio| | |Virtio | |Virtio | |Virtio | | |
| 60 | − | Net | |Console | |Block | | |Net | |Console | |Block | | |
| 61 | − | Driver| |Driver | |Driver| | |backend | |backend | |backend | | |
| 62 | − +---+---+ +---+----+ +--+---+ | +---------+ +----+---+ +--------+ | |
| 63 | − | | | | | | | | |
| 64 | − | | | |User | | | | |
| 65 | − | | | |------|------------|--+------|------- | |
| 66 | − +---------+---------+ |Kernel | | |
| 67 | − | | | | |
| 68 | − +---------+ +---+----+ +------+ | +------+ +------+ +--+---+ +-------+ | |
| 69 | − |MIC DMA | | VOP | | SCIF | | | SCIF | | COSM | | VOP | |MIC DMA| | |
| 70 | − +---+-----+ +---+----+ +--+---+ | +--+---+ +--+---+ +------+ +----+--+ | |
| 71 | − | | | | | | | | |
| 72 | − +---+-----+ +---+----+ +--+---+ | +--+---+ +--+---+ +------+ +----+--+ | |
| 73 | − |MIC | | VOP | |SCIF | | |SCIF | | COSM | | VOP | | MIC | | |
| 74 | − |HW Bus | | HW Bus| |HW Bus| | |HW Bus| | Bus | |HW Bus| |HW Bus | | |
| 75 | − +---------+ +--------+ +--+---+ | +--+---+ +------+ +------+ +-------+ | |
| 76 | − | | | | | | | | |
| 77 | − | +-----------+--+ | | | +---------------+ | | |
| 78 | − | |Intel MIC | | | | |Intel MIC | | | |
| 79 | − | |Card Driver | | | | |Host Driver | | | |
| 80 | − +---+--------------+------+ | +----+---------------+-----+ | |
| 81 | − | | | | |
| 82 | − +-------------------------------------------------------------+ | |
| 83 | − | | | |
| 84 | − | PCIe Bus | | |
| 85 | − +-------------------------------------------------------------+ | |
| @@ -1,108 +0,0 @@ | ||
| 1 | −======================================== | |
| 2 | −Symmetric Communication Interface (SCIF) | |
| 3 | −======================================== | |
| 4 | − | |
| 5 | −The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a low | |
| 6 | −level communications API across PCIe currently implemented for MIC. Currently | |
| 7 | −SCIF provides inter-node communication within a single host platform, where a | |
| 8 | −node is a MIC Coprocessor or Xeon based host. SCIF abstracts the details of | |
| 9 | −communicating over the PCIe bus while providing an API that is symmetric | |
| 10 | −across all the nodes in the PCIe network. An important design objective for SCIF | |
| 11 | −is to deliver the maximum possible performance given the communication | |
| 12 | −abilities of the hardware. SCIF has been used to implement an offload compiler | |
| 13 | −runtime and OFED support for MPI implementations for MIC coprocessors. | |
| 14 | − | |
| 15 | −SCIF API Components | |
| 16 | −=================== | |
| 17 | − | |
| 18 | −The SCIF API has the following parts: | |
| 19 | − | |
| 20 | −1. Connection establishment using a client server model | |
| 21 | −2. Byte stream messaging intended for short messages | |
| 22 | −3. Node enumeration to determine online nodes | |
| 23 | −4. Poll semantics for detection of incoming connections and messages | |
| 24 | −5. Memory registration to pin down pages | |
| 25 | −6. Remote memory mapping for low latency CPU accesses via mmap | |
| 26 | −7. Remote DMA (RDMA) for high bandwidth DMA transfers | |
| 27 | −8. Fence APIs for RDMA synchronization | |
| 28 | − | |
| 29 | −SCIF exposes the notion of a connection which can be used by peer processes on | |
| 30 | −nodes in a SCIF PCIe "network" to share memory "windows" and to communicate. A | |
| 31 | −process in a SCIF node initiates a SCIF connection to a peer process on a | |
| 32 | −different node via a SCIF "endpoint". SCIF endpoints support messaging APIs | |
| 33 | −which are similar to connection oriented socket APIs. Connected SCIF endpoints | |
| 34 | −can also register local memory which is followed by data transfer using either | |
| 35 | −DMA, CPU copies or remote memory mapping via mmap. SCIF supports both user and | |
| 36 | −kernel mode clients which are functionally equivalent. | |
| 37 | − | |
| 38 | −SCIF Performance for MIC | |
| 39 | −======================== | |
| 40 | − | |
| 41 | −DMA bandwidth comparison between the TCP (over ethernet over PCIe) stack versus | |
| 42 | −SCIF shows the performance advantages of SCIF for HPC applications and | |
| 43 | −runtimes:: | |
| 44 | − | |
| 45 | − Comparison of TCP and SCIF based BW | |
| 46 | − | |
| 47 | − Throughput (GB/sec) | |
| 48 | − 8 + PCIe Bandwidth ****** | |
| 49 | − + TCP ###### | |
| 50 | − 7 + ************************************** SCIF %%%%%% | |
| 51 | − | %%%%%%%%%%%%%%%%%%% | |
| 52 | − 6 + %%%% | |
| 53 | − | %% | |
| 54 | − | %%% | |
| 55 | − 5 + %% | |
| 56 | − | %% | |
| 57 | − 4 + %% | |
| 58 | − | %% | |
| 59 | − 3 + %% | |
| 60 | − | % | |
| 61 | − 2 + %% | |
| 62 | − | %% | |
| 63 | − | % | |
| 64 | − 1 + | |
| 65 | − + ###################################### | |
| 66 | − 0 +++---+++--+--+-+--+--+-++-+--+-++-+--+-++-+- | |
| 67 | − 1 10 100 1000 10000 100000 | |
| 68 | − Transfer Size (KBytes) | |
| 69 | − | |
| 70 | −SCIF allows memory sharing via mmap(..) between processes on different PCIe | |
| 71 | −nodes and thus provides bare-metal PCIe latency. The round trip SCIF mmap | |
| 72 | −latency from the host to an x100 MIC for an 8 byte message is 0.44 usecs. | |
| 73 | − | |
| 74 | −SCIF has a user space library which is a thin IOCTL wrapper providing a user | |
| 75 | −space API similar to the kernel API in scif.h. The SCIF user space library | |
| 76 | −is distributed @ https://software.intel.com/en-us/mic-developer | |
| 77 | − | |
| 78 | −Here is some pseudo code for an example of how two applications on two PCIe | |
| 79 | −nodes would typically use the SCIF API:: | |
| 80 | − | |
| 81 | − Process A (on node A) Process B (on node B) | |
| 82 | − | |
| 83 | − /* get online node information */ | |
| 84 | − scif_get_node_ids(..) scif_get_node_ids(..) | |
| 85 | − scif_open(..) scif_open(..) | |
| 86 | − scif_bind(..) scif_bind(..) | |
| 87 | − scif_listen(..) | |
| 88 | − scif_accept(..) scif_connect(..) | |
| 89 | − /* SCIF connection established */ | |
| 90 | − | |
| 91 | − /* Send and receive short messages */ | |
| 92 | − scif_send(..)/scif_recv(..) scif_send(..)/scif_recv(..) | |
| 93 | − | |
| 94 | − /* Register memory */ | |
| 95 | − scif_register(..) scif_register(..) | |
| 96 | − | |
| 97 | − /* RDMA */ | |
| 98 | − scif_readfrom(..)/scif_writeto(..) scif_readfrom(..)/scif_writeto(..) | |
| 99 | − | |
| 100 | − /* Fence DMAs */ | |
| 101 | − scif_fence_signal(..) scif_fence_signal(..) | |
| 102 | − | |
| 103 | − mmap(..) mmap(..) | |
| 104 | − | |
| 105 | − /* Access remote registered memory */ | |
| 106 | − | |
| 107 | − /* Close the endpoints */ | |
| 108 | − scif_close(..) scif_close(..) | |
| @@ -70,6 +70,7 @@ The ``ice`` driver reports the following versions · 69 unmodified lines | ||
| 70 | 70 | that both the name (as reported by ``fw.app.name``) and version are |
| 71 | 71 | required to uniquely identify the package. |
| 72 | 72 | * - ``fw.app.bundle_id`` |
| 73 | + - running | |
| 73 | 74 | - 0xc0000001 |
| 74 | 75 | - Unique identifier for the DDP package loaded in the device. Also |
| 75 | 76 | referred to as the DDP Track ID. Can be used to uniquely identify |
| @@ -10,9 +10,9 @@ Overview / What Is J1939 · 9 unmodified lines | ||
| 10 | 10 | SAE J1939 defines a higher layer protocol on CAN. It implements a more |
| 11 | 11 | sophisticated addressing scheme and extends the maximum packet size above 8 |
| 12 | 12 | bytes. Several derived specifications exist, which differ from the original |
| 13 | −J1939 on the application level, like MilCAN A, NMEA2000 and especially | |
| 13 | +J1939 on the application level, like MilCAN A, NMEA2000, and especially | |
| 14 | 14 | ISO-11783 (ISOBUS). This last one specifies the so-called ETP (Extended |
| 15 | −Transport Protocol) which is has been included in this implementation. This | |
| 15 | +Transport Protocol), which has been included in this implementation. This | |
| 16 | 16 | results in a maximum packet size of ((2 ^ 24) - 1) * 7 bytes == 111 MiB. |
| 17 | 17 | |
| 18 | 18 | Specifications used |
| @@ -32,15 +32,15 @@ sockets, we found some reasons to justify a kernel implementation for the · 13 unmodified lines | ||
| 32 | 32 | addressing and transport methods used by J1939. |
| 33 | 33 | |
| 34 | 34 | * **Addressing:** when a process on an ECU communicates via J1939, it should |
| 35 | − not necessarily know its source address. Although at least one process per | |
| 35 | + not necessarily know its source address. Although, at least one process per | |
| 36 | 36 | ECU should know the source address. Other processes should be able to reuse |
| 37 | 37 | that address. This way, address parameters for different processes |
| 38 | 38 | cooperating for the same ECU, are not duplicated. This way of working is |
| 39 | − closely related to the UNIX concept where programs do just one thing, and do | |
| 39 | + closely related to the UNIX concept, where programs do just one thing and do | |
| 40 | 40 | it well. |
| 41 | 41 | |
| 42 | 42 | * **Dynamic addressing:** Address Claiming in J1939 is time critical. |
| 43 | − Furthermore data transport should be handled properly during the address | |
| 43 | + Furthermore, data transport should be handled properly during the address | |
| 44 | 44 | negotiation. Putting this functionality in the kernel eliminates it as a |
| 45 | 45 | requirement for _every_ user space process that communicates via J1939. This |
| 46 | 46 | results in a consistent J1939 bus with proper addressing. |
| @@ -58,7 +58,7 @@ Therefore, these parts are left to user space. · 11 unmodified lines | ||
| 58 | 58 | |
| 59 | 59 | The J1939 sockets operate on CAN network devices (see SocketCAN). Any J1939 |
| 60 | 60 | user space library operating on CAN raw sockets will still operate properly. |
| 61 | −Since such library does not communicate with the in-kernel implementation, care | |
| 61 | +Since such a library does not communicate with the in-kernel implementation, care | |
| 62 | 62 | must be taken that these two do not interfere. In practice, this means they |
| 63 | 63 | cannot share ECU addresses. A single ECU (or virtual ECU) address is used by |
| 64 | 64 | the library exclusively, or by the in-kernel system exclusively. |
| @@ -77,13 +77,13 @@ is composed as follows: · 12 unmodified lines | ||
| 77 | 77 | 8 bits : PS (PDU Specific) |
| 78 | 78 | |
| 79 | 79 | In J1939-21 distinction is made between PDU1 format (where PF < 240) and PDU2 |
| 80 | −format (where PF >= 240). Furthermore, when using PDU2 format, the PS-field | |
| 80 | +format (where PF >= 240). Furthermore, when using the PDU2 format, the PS-field | |
| 81 | 81 | contains a so-called Group Extension, which is part of the PGN. When using PDU2 |
| 82 | 82 | format, the Group Extension is set in the PS-field. |
| 83 | 83 | |
| 84 | 84 | On the other hand, when using PDU1 format, the PS-field contains a so-called |
| 85 | 85 | Destination Address, which is _not_ part of the PGN. When communicating a PGN |
| 86 | −from user space to kernel (or visa versa) and PDU2 format is used, the PS-field | |
| 86 | +from user space to kernel (or vice versa) and PDU2 format is used, the PS-field | |
| 87 | 87 | of the PGN shall be set to zero. The Destination Address shall be set |
| 88 | 88 | elsewhere. |
| 89 | 89 | |
| @@ -96,15 +96,15 @@ Addressing · 6 unmodified lines | ||
| 96 | 96 | |
| 97 | 97 | Both static and dynamic addressing methods can be used. |
| 98 | 98 | |
| 99 | −For static addresses, no extra checks are made by the kernel, and provided | |
| 99 | +For static addresses, no extra checks are made by the kernel and provided | |
| 100 | 100 | addresses are considered right. This responsibility is for the OEM or system |
| 101 | 101 | integrator. |
| 102 | 102 | |
| 103 | 103 | For dynamic addressing, so-called Address Claiming, extra support is foreseen |
| 104 | −in the kernel. In J1939 any ECU is known by it's 64-bit NAME. At the moment of | |
| 104 | +in the kernel. In J1939 any ECU is known by its 64-bit NAME. At the moment of | |
| 105 | 105 | a successful address claim, the kernel keeps track of both NAME and source |
| 106 | 106 | address being claimed. This serves as a base for filter schemes. By default, |
| 107 | −packets with a destination that is not locally, will be rejected. | |
| 107 | +packets with a destination that is not locally will be rejected. | |
| 108 | 108 | |
| 109 | 109 | Mixed mode packets (from a static to a dynamic address or vice versa) are |
| 110 | 110 | allowed. The BSD sockets define separate API calls for getting/setting the |
| @@ -131,31 +131,31 @@ API Calls · 20 unmodified lines | ||
| 131 | 131 | --------- |
| 132 | 132 | |
| 133 | 133 | On CAN, you first need to open a socket for communicating over a CAN network. |
| 134 | −To use J1939, #include <linux/can/j1939.h>. From there, <linux/can.h> will be | |
| 134 | +To use J1939, ``#include <linux/can/j1939.h>``. From there, ``<linux/can.h>`` will be | |
| 135 | 135 | included too. To open a socket, use: |
| 136 | 136 | |
| 137 | 137 | .. code-block:: C |
| 138 | 138 | |
| 139 | 139 | s = socket(PF_CAN, SOCK_DGRAM, CAN_J1939); |
| 140 | 140 | |
| 141 | −J1939 does use SOCK_DGRAM sockets. In the J1939 specification, connections are | |
| 141 | +J1939 does use ``SOCK_DGRAM`` sockets. In the J1939 specification, connections are | |
| 142 | 142 | mentioned in the context of transport protocol sessions. These still deliver |
| 143 | −packets to the other end (using several CAN packets). SOCK_STREAM is not | |
| 143 | +packets to the other end (using several CAN packets). ``SOCK_STREAM`` is not | |
| 144 | 144 | supported. |
| 145 | 145 | |
| 146 | −After the successful creation of the socket, you would normally use the bind(2) | |
| 147 | −and/or connect(2) system call to bind the socket to a CAN interface. After | |
| 148 | −binding and/or connecting the socket, you can read(2) and write(2) from/to the | |
| 149 | −socket or use send(2), sendto(2), sendmsg(2) and the recv*() counterpart | |
| 146 | +After the successful creation of the socket, you would normally use the ``bind(2)`` | |
| 147 | +and/or ``connect(2)`` system call to bind the socket to a CAN interface. After | |
| 148 | +binding and/or connecting the socket, you can ``read(2)`` and ``write(2)`` from/to the | |
| 149 | +socket or use ``send(2)``, ``sendto(2)``, ``sendmsg(2)`` and the ``recv*()`` counterpart | |
| 150 | 150 | operations on the socket as usual. There are also J1939 specific socket options |
| 151 | 151 | described below. |
| 152 | 152 | |
| 153 | −In order to send data, a bind(2) must have been successful. bind(2) assigns a | |
| 153 | +In order to send data, a ``bind(2)`` must have been successful. ``bind(2)`` assigns a | |
| 154 | 154 | local address to a socket. |
| 155 | 155 | |
| 156 | −Different from CAN is that the payload data is just the data that get send, | |
| 157 | −without it's header info. The header info is derived from the sockaddr supplied | |
| 158 | −to bind(2), connect(2), sendto(2) and recvfrom(2). A write(2) with size 4 will | |
| 156 | +Different from CAN is that the payload data is just the data that get sends, | |
| 157 | +without its header info. The header info is derived from the sockaddr supplied | |
| 158 | +to ``bind(2)``, ``connect(2)``, ``sendto(2)`` and ``recvfrom(2)``. A ``write(2)`` with size 4 will | |
| 159 | 159 | result in a packet with 4 bytes. |
| 160 | 160 | |
| 161 | 161 | The sockaddr structure has extensions for use with J1939 as specified below: |
| @@ -180,47 +180,47 @@ The sockaddr structure has extensions for use with J1939 as specified below: · 18 unmodified lines | ||
| 180 | 180 | } can_addr; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | −can_family & can_ifindex serve the same purpose as for other SocketCAN sockets. | |
| 183 | +``can_family`` & ``can_ifindex`` serve the same purpose as for other SocketCAN sockets. | |
| 184 | 184 | |
| 185 | −can_addr.j1939.pgn specifies the PGN (max 0x3ffff). Individual bits are | |
| 185 | +``can_addr.j1939.pgn`` specifies the PGN (max 0x3ffff). Individual bits are | |
| 186 | 186 | specified above. |
| 187 | 187 | |
| 188 | −can_addr.j1939.name contains the 64-bit J1939 NAME. | |
| 188 | +``can_addr.j1939.name`` contains the 64-bit J1939 NAME. | |
| 189 | 189 | |
| 190 | −can_addr.j1939.addr contains the address. | |
| 190 | +``can_addr.j1939.addr`` contains the address. | |
| 191 | 191 | |
| 192 | −The bind(2) system call assigns the local address, i.e. the source address when | |
| 193 | −sending packages. If a PGN during bind(2) is set, it's used as a RX filter. | |
| 194 | −I.e. only packets with a matching PGN are received. If an ADDR or NAME is set | |
| 192 | +The ``bind(2)`` system call assigns the local address, i.e. the source address when | |
| 193 | +sending packages. If a PGN during ``bind(2)`` is set, it's used as a RX filter. | |
| 194 | +I.e. only packets with a matching PGN are received. If an ADDR or NAME is set | |
| 195 | 195 | it is used as a receive filter, too. It will match the destination NAME or ADDR |
| 196 | 196 | of the incoming packet. The NAME filter will work only if appropriate Address |
| 197 | 197 | Claiming for this name was done on the CAN bus and registered/cached by the |
| 198 | 198 | kernel. |
| 199 | 199 | |
| 200 | −On the other hand connect(2) assigns the remote address, i.e. the destination | |
| 201 | −address. The PGN from connect(2) is used as the default PGN when sending | |
| 200 | +On the other hand ``connect(2)`` assigns the remote address, i.e. the destination | |
| 201 | +address. The PGN from ``connect(2)`` is used as the default PGN when sending | |
| 202 | 202 | packets. If ADDR or NAME is set it will be used as the default destination ADDR |
| 203 | −or NAME. Further a set ADDR or NAME during connect(2) is used as a receive | |
| 203 | +or NAME. Further a set ADDR or NAME during ``connect(2)`` is used as a receive | |
| 204 | 204 | filter. It will match the source NAME or ADDR of the incoming packet. |
| 205 | 205 | |
| 206 | −Both write(2) and send(2) will send a packet with local address from bind(2) and | |
| 207 | −the remote address from connect(2). Use sendto(2) to overwrite the destination | |
| 206 | +Both ``write(2)`` and ``send(2)`` will send a packet with local address from ``bind(2)`` and the | |
| 207 | +remote address from ``connect(2)``. Use ``sendto(2)`` to overwrite the destination | |
| 208 | 208 | address. |
| 209 | 209 | |
| 210 | −If can_addr.j1939.name is set (!= 0) the NAME is looked up by the kernel and | |
| 211 | −the corresponding ADDR is used. If can_addr.j1939.name is not set (== 0), | |
| 212 | −can_addr.j1939.addr is used. | |
| 210 | +If ``can_addr.j1939.name`` is set (!= 0) the NAME is looked up by the kernel and | |
| 211 | +the corresponding ADDR is used. If ``can_addr.j1939.name`` is not set (== 0), | |
| 212 | +``can_addr.j1939.addr`` is used. | |
| 213 | 213 | |
| 214 | 214 | When creating a socket, reasonable defaults are set. Some options can be |
| 215 | −modified with setsockopt(2) & getsockopt(2). | |
| 215 | +modified with ``setsockopt(2)`` & ``getsockopt(2)``. | |
| 216 | 216 | |
| 217 | 217 | RX path related options: |
| 218 | 218 | |
| 219 | −- SO_J1939_FILTER - configure array of filters | |
| 220 | −- SO_J1939_PROMISC - disable filters set by bind(2) and connect(2) | |
| 219 | +- ``SO_J1939_FILTER`` - configure array of filters | |
| 220 | +- ``SO_J1939_PROMISC`` - disable filters set by ``bind(2)`` and ``connect(2)`` | |
| 221 | 221 | |
| 222 | 222 | By default no broadcast packets can be send or received. To enable sending or |
| 223 | −receiving broadcast packets use the socket option SO_BROADCAST: | |
| 223 | +receiving broadcast packets use the socket option ``SO_BROADCAST``: | |
| 224 | 224 | |
| 225 | 225 | .. code-block:: C |
| 226 | 226 | |
| @@ -261,26 +261,26 @@ The following diagram illustrates the RX path: · 34 unmodified lines | ||
| 261 | 261 | +---------------------------+ |
| 262 | 262 | |
| 263 | 263 | TX path related options: |
| 264 | −SO_J1939_SEND_PRIO - change default send priority for the socket | |
| 264 | +``SO_J1939_SEND_PRIO`` - change default send priority for the socket | |
| 265 | 265 | |
| 266 | 266 | Message Flags during send() and Related System Calls |
| 267 | 267 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 268 | 268 | |
| 269 | −send(2), sendto(2) and sendmsg(2) take a 'flags' argument. Currently | |
| 269 | +``send(2)``, ``sendto(2)`` and ``sendmsg(2)`` take a 'flags' argument. Currently | |
| 270 | 270 | supported flags are: |
| 271 | 271 | |
| 272 | −* MSG_DONTWAIT, i.e. non-blocking operation. | |
| 272 | +* ``MSG_DONTWAIT``, i.e. non-blocking operation. | |
| 273 | 273 | |
| 274 | 274 | recvmsg(2) |
| 275 | 275 | ^^^^^^^^^^ |
| 276 | 276 | |
| 277 | −In most cases recvmsg(2) is needed if you want to extract more information than | |
| 278 | −recvfrom(2) can provide. For example package priority and timestamp. The | |
| 277 | +In most cases ``recvmsg(2)`` is needed if you want to extract more information than | |
| 278 | +``recvfrom(2)`` can provide. For example package priority and timestamp. The | |
| 279 | 279 | Destination Address, name and packet priority (if applicable) are attached to |
| 280 | −the msghdr in the recvmsg(2) call. They can be extracted using cmsg(3) macros, | |
| 281 | −with cmsg_level == SOL_J1939 && cmsg_type == SCM_J1939_DEST_ADDR, | |
| 282 | −SCM_J1939_DEST_NAME or SCM_J1939_PRIO. The returned data is a uint8_t for | |
| 283 | −priority and dst_addr, and uint64_t for dst_name. | |
| 280 | +the msghdr in the ``recvmsg(2)`` call. They can be extracted using ``cmsg(3)`` macros, | |
| 281 | +with ``cmsg_level == SOL_J1939 && cmsg_type == SCM_J1939_DEST_ADDR``, | |
| 282 | +``SCM_J1939_DEST_NAME`` or ``SCM_J1939_PRIO``. The returned data is a ``uint8_t`` for | |
| 283 | +``priority`` and ``dst_addr``, and ``uint64_t`` for ``dst_name``. | |
| 284 | 284 | |
| 285 | 285 | .. code-block:: C |
| 286 | 286 | |
| @@ -305,12 +305,12 @@ Dynamic Addressing · 18 unmodified lines | ||
| 305 | 305 | |
| 306 | 306 | Distinction has to be made between using the claimed address and doing an |
| 307 | 307 | address claim. To use an already claimed address, one has to fill in the |
| 308 | −j1939.name member and provide it to bind(2). If the name had claimed an address | |
| 308 | +``j1939.name`` member and provide it to ``bind(2)``. If the name had claimed an address | |
| 309 | 309 | earlier, all further messages being sent will use that address. And the |
| 310 | −j1939.addr member will be ignored. | |
| 310 | +``j1939.addr`` member will be ignored. | |
| 311 | 311 | |
| 312 | 312 | An exception on this is PGN 0x0ee00. This is the "Address Claim/Cannot Claim |
| 313 | −Address" message and the kernel will use the j1939.addr member for that PGN if | |
| 313 | +Address" message and the kernel will use the ``j1939.addr`` member for that PGN if | |
| 314 | 314 | necessary. |
| 315 | 315 | |
| 316 | 316 | To claim an address following code example can be used: |
| @@ -371,12 +371,12 @@ NAME can send packets. · 54 unmodified lines | ||
| 371 | 371 | |
| 372 | 372 | If another ECU claims the address, the kernel will mark the NAME-SA expired. |
| 373 | 373 | No socket bound to the NAME can send packets (other than address claims). To |
| 374 | −claim another address, some socket bound to NAME, must bind(2) again, but with | |
| 375 | −only j1939.addr changed to the new SA, and must then send a valid address claim | |
| 374 | +claim another address, some socket bound to NAME, must ``bind(2)`` again, but with | |
| 375 | +only ``j1939.addr`` changed to the new SA, and must then send a valid address claim | |
| 376 | 376 | packet. This restarts the state machine in the kernel (and any other |
| 377 | 377 | participant on the bus) for this NAME. |
| 378 | 378 | |
| 379 | −can-utils also include the jacd tool, so it can be used as code example or as | |
| 379 | +``can-utils`` also include the ``j1939acd`` tool, so it can be used as code example or as | |
| 380 | 380 | default Address Claiming daemon. |
| 381 | 381 | |
| 382 | 382 | Send Examples |
| @@ -403,8 +403,8 @@ Bind: · 20 unmodified lines | ||
| 403 | 403 | |
| 404 | 404 | bind(sock, (struct sockaddr *)&baddr, sizeof(baddr)); |
| 405 | 405 | |
| 406 | −Now, the socket 'sock' is bound to the SA 0x20. Since no connect(2) was called, | |
| 407 | −at this point we can use only sendto(2) or sendmsg(2). | |
| 406 | +Now, the socket 'sock' is bound to the SA 0x20. Since no ``connect(2)`` was called, | |
| 407 | +at this point we can use only ``sendto(2)`` or ``sendmsg(2)``. | |
| 408 | 408 | |
| 409 | 409 | Send: |
| 410 | 410 | |
| @@ -414,8 +414,8 @@ Send: · 3 unmodified lines | ||
| 414 | 414 | .can_family = AF_CAN, |
| 415 | 415 | .can_addr.j1939 = { |
| 416 | 416 | .name = J1939_NO_NAME; |
| 417 | − .pgn = 0x30, | |
| 418 | − .addr = 0x12300, | |
| 417 | + .addr = 0x30, | |
| 418 | + .pgn = 0x12300, | |
| 419 | 419 | }, |
| 420 | 420 | }; |
| 421 | 421 | |
| @@ -175,5 +175,4 @@ The following structures are internal to the kernel, their members are · 174 unmodified lines | ||
| 175 | 175 | translated to netlink attributes when dumped. Drivers must not overwrite |
| 176 | 176 | the statistics they don't report with 0. |
| 177 | 177 | |
| 178 | −.. kernel-doc:: include/linux/ethtool.h | |
| 179 | − :identifiers: ethtool_pause_stats | |
| 178 | +- ethtool_pause_stats() | |
| @@ -15,6 +15,14 @@ else: · 14 unmodified lines | ||
| 15 | 15 | import re |
| 16 | 16 | from itertools import chain |
| 17 | 17 | |
| 18 | +# | |
| 19 | +# Python 2 lacks re.ASCII... | |
| 20 | +# | |
| 21 | +try: | |
| 22 | + ascii_p3 = re.ASCII | |
| 23 | +except AttributeError: | |
| 24 | + ascii_p3 = 0 | |
| 25 | + | |
| 18 | 26 | # |
| 19 | 27 | # Regex nastiness. Of course. |
| 20 | 28 | # Try to identify "function()" that's not already marked up some |
| @@ -22,22 +30,22 @@ from itertools import chain · 1 unmodified line | ||
| 22 | 30 | # :c:func: block (i.e. ":c:func:`mmap()`s" flakes out), so the last |
| 23 | 31 | # bit tries to restrict matches to things that won't create trouble. |
| 24 | 32 | # |
| 25 | −RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=re.ASCII) | |
| 33 | +RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=ascii_p3) | |
| 26 | 34 | |
| 27 | 35 | # |
| 28 | 36 | # Sphinx 2 uses the same :c:type role for struct, union, enum and typedef |
| 29 | 37 | # |
| 30 | 38 | RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)', |
| 31 | − flags=re.ASCII) | |
| 39 | + flags=ascii_p3) | |
| 32 | 40 | |
| 33 | 41 | # |
| 34 | 42 | # Sphinx 3 uses a different C role for each one of struct, union, enum and |
| 35 | 43 | # typedef |
| 36 | 44 | # |
| 37 | −RE_struct = re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=re.ASCII) | |
| 38 | −RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=re.ASCII) | |
| 39 | −RE_enum = re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=re.ASCII) | |
| 40 | −RE_typedef = re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=re.ASCII) | |
| 45 | +RE_struct = re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=ascii_p3) | |
| 46 | +RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=ascii_p3) | |
| 47 | +RE_enum = re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=ascii_p3) | |
| 48 | +RE_typedef = re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=ascii_p3) | |
| 41 | 49 | |
| 42 | 50 | # |
| 43 | 51 | # Detects a reference to a documentation page of the form Documentation/... with |
| @@ -0,0 +1,194 @@ | ||
| 1 | +# -*- coding: utf-8; mode: python -*- | |
| 2 | +# coding=utf-8 | |
| 3 | +# SPDX-License-Identifier: GPL-2.0 | |
| 4 | +# | |
| 5 | +u""" | |
| 6 | + kernel-abi | |
| 7 | + ~~~~~~~~~~ | |
| 8 | + | |
| 9 | + Implementation of the ``kernel-abi`` reST-directive. | |
| 10 | + | |
| 11 | + :copyright: Copyright (C) 2016 Markus Heiser | |
| 12 | + :copyright: Copyright (C) 2016-2020 Mauro Carvalho Chehab | |
| 13 | + :maintained-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | |
| 14 | + :license: GPL Version 2, June 1991 see Linux/COPYING for details. | |
| 15 | + | |
| 16 | + The ``kernel-abi`` (:py:class:`KernelCmd`) directive calls the | |
| 17 | + scripts/get_abi.pl script to parse the Kernel ABI files. | |
| 18 | + | |
| 19 | + Overview of directive's argument and options. | |
| 20 | + | |
| 21 | + .. code-block:: rst | |
| 22 | + | |
| 23 | + .. kernel-abi:: <ABI directory location> | |
| 24 | + :debug: | |
| 25 | + | |
| 26 | + The argument ``<ABI directory location>`` is required. It contains the | |
| 27 | + location of the ABI files to be parsed. | |
| 28 | + | |
| 29 | + ``debug`` | |
| 30 | + Inserts a code-block with the *raw* reST. Sometimes it is helpful to see | |
| 31 | + what reST is generated. | |
| 32 | + | |
| 33 | +""" | |
| 34 | + | |
| 35 | +import codecs | |
| 36 | +import os | |
| 37 | +import subprocess | |
| 38 | +import sys | |
| 39 | +import re | |
| 40 | +import kernellog | |
| 41 | + | |
| 42 | +from os import path | |
| 43 | + | |
| 44 | +from docutils import nodes, statemachine | |
| 45 | +from docutils.statemachine import ViewList | |
| 46 | +from docutils.parsers.rst import directives, Directive | |
| 47 | +from docutils.utils.error_reporting import ErrorString | |
| 48 | + | |
| 49 | +# | |
| 50 | +# AutodocReporter is only good up to Sphinx 1.7 | |
| 51 | +# | |
| 52 | +import sphinx | |
| 53 | + | |
| 54 | +Use_SSI = sphinx.__version__[:3] >= '1.7' | |
| 55 | +if Use_SSI: | |
| 56 | + from sphinx.util.docutils import switch_source_input | |
| 57 | +else: | |
| 58 | + from sphinx.ext.autodoc import AutodocReporter | |
| 59 | + | |
| 60 | +__version__ = '1.0' | |
| 61 | + | |
| 62 | +def setup(app): | |
| 63 | + | |
| 64 | + app.add_directive("kernel-abi", KernelCmd) | |
| 65 | + return dict( | |
| 66 | + version = __version__ | |
| 67 | + , parallel_read_safe = True | |
| 68 | + , parallel_write_safe = True | |
| 69 | + ) | |
| 70 | + | |
| 71 | +class KernelCmd(Directive): | |
| 72 | + | |
| 73 | + u"""KernelABI (``kernel-abi``) directive""" | |
| 74 | + | |
| 75 | + required_arguments = 1 | |
| 76 | + optional_arguments = 2 | |
| 77 | + has_content = False | |
| 78 | + final_argument_whitespace = True | |
| 79 | + | |
| 80 | + option_spec = { | |
| 81 | + "debug" : directives.flag, | |
| 82 | + "rst" : directives.unchanged | |
| 83 | + } | |
| 84 | + | |
| 85 | + def run(self): | |
| 86 | + | |
| 87 | + doc = self.state.document | |
| 88 | + if not doc.settings.file_insertion_enabled: | |
| 89 | + raise self.warning("docutils: file insertion disabled") | |
| 90 | + | |
| 91 | + env = doc.settings.env | |
| 92 | + cwd = path.dirname(doc.current_source) | |
| 93 | + cmd = "get_abi.pl rest --enable-lineno --dir " | |
| 94 | + cmd += self.arguments[0] | |
| 95 | + | |
| 96 | + if 'rst' in self.options: | |
| 97 | + cmd += " --rst-source" | |
| 98 | + | |
| 99 | + srctree = path.abspath(os.environ["srctree"]) | |
| 100 | + | |
| 101 | + fname = cmd | |
| 102 | + | |
| 103 | + # extend PATH with $(srctree)/scripts | |
| 104 | + path_env = os.pathsep.join([ | |
| 105 | + srctree + os.sep + "scripts", | |
| 106 | + os.environ["PATH"] | |
| 107 | + ]) | |
| 108 | + shell_env = os.environ.copy() | |
| 109 | + shell_env["PATH"] = path_env | |
| 110 | + shell_env["srctree"] = srctree | |
| 111 | + | |
| 112 | + lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env) | |
| 113 | + nodeList = self.nestedParse(lines, self.arguments[0]) | |
| 114 | + return nodeList | |
| 115 | + | |
| 116 | + def runCmd(self, cmd, **kwargs): | |
| 117 | + u"""Run command ``cmd`` and return it's stdout as unicode.""" | |
| 118 | + | |
| 119 | + try: | |
| 120 | + proc = subprocess.Popen( | |
| 121 | + cmd | |
| 122 | + , stdout = subprocess.PIPE | |
| 123 | + , stderr = subprocess.PIPE | |
| 124 | + , **kwargs | |
| 125 | + ) | |
| 126 | + out, err = proc.communicate() | |
| 127 | + | |
| 128 | + out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8') | |
| 129 | + | |
| 130 | + if proc.returncode != 0: | |
| 131 | + raise self.severe( | |
| 132 | + u"command '%s' failed with return code %d" | |
| 133 | + % (cmd, proc.returncode) | |
| 134 | + ) | |
| 135 | + except OSError as exc: | |
| 136 | + raise self.severe(u"problems with '%s' directive: %s." | |
| 137 | + % (self.name, ErrorString(exc))) | |
| 138 | + return out | |
| 139 | + | |
| 140 | + def nestedParse(self, lines, fname): | |
| 141 | + content = ViewList() | |
| 142 | + node = nodes.section() | |
| 143 | + | |
| 144 | + if "debug" in self.options: | |
| 145 | + code_block = "\n\n.. code-block:: rst\n :linenos:\n" | |
| 146 | + for l in lines.split("\n"): | |
| 147 | + code_block += "\n " + l | |
| 148 | + lines = code_block + "\n\n" | |
| 149 | + | |
| 150 | + line_regex = re.compile("^#define LINENO (\S+)\#([0-9]+)$") | |
| 151 | + ln = 0 | |
| 152 | + n = 0 | |
| 153 | + f = fname | |
| 154 | + | |
| 155 | + for line in lines.split("\n"): | |
| 156 | + n = n + 1 | |
| 157 | + match = line_regex.search(line) | |
| 158 | + if match: | |
| 159 | + new_f = match.group(1) | |
| 160 | + | |
| 161 | + # Sphinx parser is lazy: it stops parsing contents in the | |
| 162 | + # middle, if it is too big. So, handle it per input file | |
| 163 | + if new_f != f and content: | |
| 164 | + self.do_parse(content, node) | |
| 165 | + content = ViewList() | |
| 166 | + | |
| 167 | + f = new_f | |
| 168 | + | |
| 169 | + # sphinx counts lines from 0 | |
| 170 | + ln = int(match.group(2)) - 1 | |
| 171 | + else: | |
| 172 | + content.append(line, f, ln) | |
| 173 | + | |
| 174 | + kernellog.info(self.state.document.settings.env.app, "%s: parsed %i lines" % (fname, n)) | |
| 175 | + | |
| 176 | + if content: | |
| 177 | + self.do_parse(content, node) | |
| 178 | + | |
| 179 | + return node.children | |
| 180 | + | |
| 181 | + def do_parse(self, content, node): | |
| 182 | + if Use_SSI: | |
| 183 | + with switch_source_input(self.state, content): | |
| 184 | + self.state.nested_parse(content, 0, node, match_titles=1) | |
| 185 | + else: | |
| 186 | + buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter | |
| 187 | + | |
| 188 | + self.state.memo.title_styles = [] | |
| 189 | + self.state.memo.section_level = 0 | |
| 190 | + self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter) | |
| 191 | + try: | |
| 192 | + self.state.nested_parse(content, 0, node, match_titles=1) | |
| 193 | + finally: | |
| 194 | + self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf | |
| @@ -25,4 +25,8 @@ def verbose(app, message): · 24 unmodified lines | ||
| 25 | 25 | else: |
| 26 | 26 | app.verbose(message) |
| 27 | 27 | |
| 28 | − | |
| 28 | +def info(app, message): | |
| 29 | + if UseLogging: | |
| 30 | + logger.info(message) | |
| 31 | + else: | |
| 32 | + app.info(message) | |
| @@ -22,6 +22,7 @@ place where this information is gathered. · 21 unmodified lines | ||
| 22 | 22 | spec_ctrl |
| 23 | 23 | accelerators/ocxl |
| 24 | 24 | ioctl/index |
| 25 | + iommu | |
| 25 | 26 | media/index |
| 26 | 27 | |
| 27 | 28 | .. only:: subproject and html |
| @@ -92,6 +92,10 @@ KVM_FEATURE_ASYNC_PF_INT 14 guest checks this feature bit · 91 unmodified lines | ||
| 92 | 92 | async pf acknowledgment msr |
| 93 | 93 | 0x4b564d07. |
| 94 | 94 | |
| 95 | +KVM_FEATURE_MSI_EXT_DEST_ID 15 guest checks this feature bit | |
| 96 | + before using extended destination | |
| 97 | + ID bits in MSI address bits 11-5. | |
| 98 | + | |
| 95 | 99 | KVM_FEATURE_CLOCKSOURCE_STABLE_BIT 24 host will warn if no guest-side |
| 96 | 100 | per-cpu warps are expected in |
| 97 | 101 | kvmclock |
| @@ -934,7 +934,7 @@ M: Evan Quan <evan.quan@amd.com> · 933 unmodified lines | ||
| 934 | 934 | L: amd-gfx@lists.freedesktop.org |
| 935 | 935 | S: Supported |
| 936 | 936 | T: git git://people.freedesktop.org/~agd5f/linux |
| 937 | −F: drivers/gpu/drm/amd/powerplay/ | |
| 937 | +F: drivers/gpu/drm/amd/pm/powerplay/ | |
| 938 | 938 | |
| 939 | 939 | AMD SEATTLE DEVICE TREE SUPPORT |
| 940 | 940 | M: Brijesh Singh <brijeshkumar.singh@amd.com> |
| @@ -978,7 +978,7 @@ M: Michael Hennerich <Michael.Hennerich@analog.com> · 37 unmodified lines | ||
| 978 | 978 | L: linux-iio@vger.kernel.org |
| 979 | 979 | S: Supported |
| 980 | 980 | W: http://ez.analog.com/community/linux-device-drivers |
| 981 | −F: Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt | |
| 981 | +F: Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml | |
| 982 | 982 | F: drivers/iio/adc/ad7768-1.c |
| 983 | 983 | |
| 984 | 984 | ANALOG DEVICES INC AD7780 DRIVER |
| @@ -2375,7 +2375,6 @@ F: sound/soc/rockchip/ · 1390 unmodified lines | ||
| 2375 | 2375 | N: rockchip |
| 2376 | 2376 | |
| 2377 | 2377 | ARM/SAMSUNG EXYNOS ARM ARCHITECTURES |
| 2378 | −M: Kukjin Kim <kgene@kernel.org> | |
| 2379 | 2378 | M: Krzysztof Kozlowski <krzk@kernel.org> |
| 2380 | 2379 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2381 | 2380 | L: linux-samsung-soc@vger.kernel.org |
| @@ -2642,10 +2641,8 @@ F: drivers/pinctrl/visconti/ · 260 unmodified lines | ||
| 2642 | 2641 | N: visconti |
| 2643 | 2642 | |
| 2644 | 2643 | ARM/UNIPHIER ARCHITECTURE |
| 2645 | −M: Masahiro Yamada <yamada.masahiro@socionext.com> | |
| 2646 | 2644 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2647 | −S: Maintained | |
| 2648 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier.git | |
| 2645 | +S: Orphan | |
| 2649 | 2646 | F: Documentation/devicetree/bindings/arm/socionext/uniphier.yaml |
| 2650 | 2647 | F: Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml |
| 2651 | 2648 | F: Documentation/devicetree/bindings/pinctrl/socionext,uniphier-pinctrl.yaml |
| @@ -3860,7 +3857,7 @@ M: Roger Quadros <rogerq@ti.com> · 1208 unmodified lines | ||
| 3860 | 3857 | L: linux-usb@vger.kernel.org |
| 3861 | 3858 | S: Maintained |
| 3862 | 3859 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git |
| 3863 | −F: Documentation/devicetree/bindings/usb/cdns-usb3.txt | |
| 3860 | +F: Documentation/devicetree/bindings/usb/cdns,usb3.yaml | |
| 3864 | 3861 | F: drivers/usb/cdns3/ |
| 3865 | 3862 | |
| 3866 | 3863 | CADET FM/AM RADIO RECEIVER DRIVER |
| @@ -5006,9 +5003,8 @@ T: git git://linuxtv.org/media_tree.git · 1139 unmodified lines | ||
| 5006 | 5003 | F: drivers/media/platform/sti/delta |
| 5007 | 5004 | |
| 5008 | 5005 | DENALI NAND DRIVER |
| 5009 | −M: Masahiro Yamada <yamada.masahiro@socionext.com> | |
| 5010 | 5006 | L: linux-mtd@lists.infradead.org |
| 5011 | −S: Supported | |
| 5007 | +S: Orphan | |
| 5012 | 5008 | F: drivers/mtd/nand/raw/denali* |
| 5013 | 5009 | |
| 5014 | 5010 | DESIGNWARE EDMA CORE IP DRIVER |
| @@ -7920,7 +7916,7 @@ HISILICON LPC BUS DRIVER · 2905 unmodified lines | ||
| 7920 | 7916 | M: john.garry@huawei.com |
| 7921 | 7917 | S: Maintained |
| 7922 | 7918 | W: http://www.hisilicon.com |
| 7923 | −F: Documentation/devicetree/bindings/arm/hisilicon/hisilicon-low-pin-count.txt | |
| 7919 | +F: Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml | |
| 7924 | 7920 | F: drivers/bus/hisi_lpc.c |
| 7925 | 7921 | |
| 7926 | 7922 | HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3) |
| @@ -8976,22 +8972,6 @@ S: Supported · 1049 unmodified lines | ||
| 8976 | 8972 | W: https://01.org/linux-acpi |
| 8977 | 8973 | F: drivers/platform/x86/intel_menlow.c |
| 8978 | 8974 | |
| 8979 | −INTEL MIC DRIVERS (mic) | |
| 8980 | −M: Sudeep Dutt <sudeep.dutt@intel.com> | |
| 8981 | −M: Ashutosh Dixit <ashutosh.dixit@intel.com> | |
| 8982 | −S: Supported | |
| 8983 | −W: https://github.com/sudeepdutt/mic | |
| 8984 | −W: http://software.intel.com/en-us/mic-developer | |
| 8985 | −F: Documentation/misc-devices/mic/ | |
| 8986 | −F: drivers/dma/mic_x100_dma.c | |
| 8987 | −F: drivers/dma/mic_x100_dma.h | |
| 8988 | −F: drivers/misc/mic/ | |
| 8989 | −F: include/linux/mic_bus.h | |
| 8990 | −F: include/linux/scif.h | |
| 8991 | −F: include/uapi/linux/mic_common.h | |
| 8992 | −F: include/uapi/linux/mic_ioctl.h | |
| 8993 | −F: include/uapi/linux/scif_ioctl.h | |
| 8994 | − | |
| 8995 | 8975 | INTEL P-Unit IPC DRIVER |
| 8996 | 8976 | M: Zha Qipeng <qipeng.zha@intel.com> |
| 8997 | 8977 | L: platform-driver-x86@vger.kernel.org |
| @@ -14538,6 +14518,14 @@ F: Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml · 5540 unmodified lines | ||
| 14538 | 14518 | F: drivers/mailbox/qcom-ipcc.c |
| 14539 | 14519 | F: include/dt-bindings/mailbox/qcom-ipcc.h |
| 14540 | 14520 | |
| 14521 | +QUALCOMM IPQ4019 VQMMC REGULATOR DRIVER | |
| 14522 | +M: Robert Marko <robert.marko@sartura.hr> | |
| 14523 | +M: Luka Perkov <luka.perkov@sartura.hr> | |
| 14524 | +L: linux-arm-msm@vger.kernel.org | |
| 14525 | +S: Maintained | |
| 14526 | +F: Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml | |
| 14527 | +F: drivers/regulator/vqmmc-ipq4019-regulator.c | |
| 14528 | + | |
| 14541 | 14529 | QUALCOMM RMNET DRIVER |
| 14542 | 14530 | M: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> |
| 14543 | 14531 | M: Sean Tranchetti <stranche@codeaurora.org> |
| @@ -14893,7 +14881,6 @@ RENESAS ETHERNET DRIVERS · 349 unmodified lines | ||
| 14893 | 14881 | R: Sergei Shtylyov <sergei.shtylyov@gmail.com> |
| 14894 | 14882 | L: netdev@vger.kernel.org |
| 14895 | 14883 | L: linux-renesas-soc@vger.kernel.org |
| 14896 | −F: Documentation/devicetree/bindings/net/renesas,*.txt | |
| 14897 | 14884 | F: Documentation/devicetree/bindings/net/renesas,*.yaml |
| 14898 | 14885 | F: drivers/net/ethernet/renesas/ |
| 14899 | 14886 | F: include/linux/sh_eth.h |
| @@ -15363,7 +15350,6 @@ F: security/safesetid/ · 463 unmodified lines | ||
| 15363 | 15350 | |
| 15364 | 15351 | SAMSUNG AUDIO (ASoC) DRIVERS |
| 15365 | 15352 | M: Krzysztof Kozlowski <krzk@kernel.org> |
| 15366 | −M: Sangbeom Kim <sbkim73@samsung.com> | |
| 15367 | 15353 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> |
| 15368 | 15354 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| 15369 | 15355 | S: Supported |
| @@ -15398,7 +15384,6 @@ S: Maintained · 28 unmodified lines | ||
| 15398 | 15384 | F: drivers/platform/x86/samsung-laptop.c |
| 15399 | 15385 | |
| 15400 | 15386 | SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS |
| 15401 | −M: Sangbeom Kim <sbkim73@samsung.com> | |
| 15402 | 15387 | M: Krzysztof Kozlowski <krzk@kernel.org> |
| 15403 | 15388 | M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
| 15404 | 15389 | L: linux-kernel@vger.kernel.org |
| @@ -15480,7 +15465,6 @@ F: include/linux/clk/samsung.h · 75 unmodified lines | ||
| 15480 | 15465 | F: include/linux/platform_data/clk-s3c2410.h |
| 15481 | 15466 | |
| 15482 | 15467 | SAMSUNG SPI DRIVERS |
| 15483 | −M: Kukjin Kim <kgene@kernel.org> | |
| 15484 | 15468 | M: Krzysztof Kozlowski <krzk@kernel.org> |
| 15485 | 15469 | M: Andi Shyti <andi@etezian.org> |
| 15486 | 15470 | L: linux-spi@vger.kernel.org |
| @@ -18097,7 +18081,7 @@ M: Yu Chen <chenyu56@huawei.com> · 2610 unmodified lines | ||
| 18097 | 18081 | M: Binghui Wang <wangbinghui@hisilicon.com> |
| 18098 | 18082 | L: linux-usb@vger.kernel.org |
| 18099 | 18083 | S: Maintained |
| 18100 | −F: Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt | |
| 18084 | +F: Documentation/devicetree/bindings/phy/hisilicon,hi3660-usb3.yaml | |
| 18101 | 18085 | F: drivers/phy/hisilicon/phy-hi3660-usb3.c |
| 18102 | 18086 | |
| 18103 | 18087 | USB ISP116X DRIVER |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | VERSION = 5 |
| 3 | 3 | PATCHLEVEL = 10 |
| 4 | 4 | SUBLEVEL = 0 |
| 5 | −EXTRAVERSION = -rc1 | |
| 5 | +EXTRAVERSION = -rc2 | |
| 6 | 6 | NAME = Kleptomaniac Octopus |
| 7 | 7 | |
| 8 | 8 | # *DOCUMENTATION* |
| @@ -67,7 +67,22 @@ · 66 unmodified lines | ||
| 67 | 67 | sr r5, [ARC_REG_LPB_CTRL] |
| 68 | 68 | 1: |
| 69 | 69 | #endif /* CONFIG_ARC_LPB_DISABLE */ |
| 70 | −#endif | |
| 70 | + | |
| 71 | + /* On HSDK, CCMs need to remapped super early */ | |
| 72 | +#ifdef CONFIG_ARC_SOC_HSDK | |
| 73 | + mov r6, 0x60000000 | |
| 74 | + lr r5, [ARC_REG_ICCM_BUILD] | |
| 75 | + breq r5, 0, 1f | |
| 76 | + sr r6, [ARC_REG_AUX_ICCM] | |
| 77 | +1: | |
| 78 | + lr r5, [ARC_REG_DCCM_BUILD] | |
| 79 | + breq r5, 0, 2f | |
| 80 | + sr r6, [ARC_REG_AUX_DCCM] | |
| 81 | +2: | |
| 82 | +#endif /* CONFIG_ARC_SOC_HSDK */ | |
| 83 | + | |
| 84 | +#endif /* CONFIG_ISA_ARCV2 */ | |
| 85 | + | |
| 71 | 86 | ; Config DSP_CTRL properly, so kernel may use integer multiply, |
| 72 | 87 | ; multiply-accumulate, and divide operations |
| 73 | 88 | DSP_EARLY_INIT |
| @@ -112,7 +112,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs, · 111 unmodified lines | ||
| 112 | 112 | int (*consumer_fn) (unsigned int, void *), void *arg) |
| 113 | 113 | { |
| 114 | 114 | #ifdef CONFIG_ARC_DW2_UNWIND |
| 115 | − int ret = 0; | |
| 115 | + int ret = 0, cnt = 0; | |
| 116 | 116 | unsigned int address; |
| 117 | 117 | struct unwind_frame_info frame_info; |
| 118 | 118 | |
| @@ -132,6 +132,11 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs, · 13 unmodified lines | ||
| 132 | 132 | break; |
| 133 | 133 | |
| 134 | 134 | frame_info.regs.r63 = frame_info.regs.r31; |
| 135 | + | |
| 136 | + if (cnt++ > 128) { | |
| 137 | + printk("unwinder looping too long, aborting !\n"); | |
| 138 | + return 0; | |
| 139 | + } | |
| 135 | 140 | } |
| 136 | 141 | |
| 137 | 142 | return address; /* return the last address it saw */ |
| @@ -17,22 +17,6 @@ int arc_hsdk_axi_dmac_coherent __section(".data") = 0; · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | #define ARC_CCM_UNUSED_ADDR 0x60000000 |
| 19 | 19 | |
| 20 | −static void __init hsdk_init_per_cpu(unsigned int cpu) | |
| 21 | −{ | |
| 22 | − /* | |
| 23 | − * By default ICCM is mapped to 0x7z while this area is used for | |
| 24 | − * kernel virtual mappings, so move it to currently unused area. | |
| 25 | − */ | |
| 26 | − if (cpuinfo_arc700[cpu].iccm.sz) | |
| 27 | − write_aux_reg(ARC_REG_AUX_ICCM, ARC_CCM_UNUSED_ADDR); | |
| 28 | − | |
| 29 | − /* | |
| 30 | − * By default DCCM is mapped to 0x8z while this area is used by kernel, | |
| 31 | − * so move it to currently unused area. | |
| 32 | − */ | |
| 33 | − if (cpuinfo_arc700[cpu].dccm.sz) | |
| 34 | − write_aux_reg(ARC_REG_AUX_DCCM, ARC_CCM_UNUSED_ADDR); | |
| 35 | −} | |
| 36 | 20 | |
| 37 | 21 | #define ARC_PERIPHERAL_BASE 0xf0000000 |
| 38 | 22 | #define CREG_BASE (ARC_PERIPHERAL_BASE + 0x1000) |
| @@ -339,5 +323,4 @@ static const char *hsdk_compat[] __initconst = { · 300 unmodified lines | ||
| 339 | 323 | MACHINE_START(SIMULATION, "hsdk") |
| 340 | 324 | .dt_compat = hsdk_compat, |
| 341 | 325 | .init_early = hsdk_init_early, |
| 342 | − .init_per_cpu = hsdk_init_per_cpu, | |
| 343 | 326 | MACHINE_END |
| @@ -227,12 +227,12 @@ · 226 unmodified lines | ||
| 227 | 227 | /delete-property/ #size-cells; |
| 228 | 228 | spi-slave; |
| 229 | 229 | status = "okay"; |
| 230 | − ready-gpio = <&gpio 125 GPIO_ACTIVE_HIGH>; | |
| 230 | + ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>; | |
| 231 | 231 | |
| 232 | 232 | slave { |
| 233 | 233 | compatible = "olpc,xo1.75-ec"; |
| 234 | 234 | spi-cpha; |
| 235 | − cmd-gpio = <&gpio 155 GPIO_ACTIVE_HIGH>; | |
| 235 | + cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>; | |
| 236 | 236 | }; |
| 237 | 237 | }; |
| 238 | 238 | |
| @@ -296,6 +296,7 @@ · 295 unmodified lines | ||
| 296 | 296 | interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; |
| 297 | 297 | clocks = <&soc_clocks MMP2_CLK_CCIC0>; |
| 298 | 298 | clock-names = "axi"; |
| 299 | + power-domains = <&soc_clocks MMP3_POWER_DOMAIN_CAMERA>; | |
| 299 | 300 | #clock-cells = <0>; |
| 300 | 301 | clock-output-names = "mclk"; |
| 301 | 302 | status = "disabled"; |
| @@ -307,6 +308,7 @@ · 5 unmodified lines | ||
| 307 | 308 | interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; |
| 308 | 309 | clocks = <&soc_clocks MMP2_CLK_CCIC1>; |
| 309 | 310 | clock-names = "axi"; |
| 311 | + power-domains = <&soc_clocks MMP3_POWER_DOMAIN_CAMERA>; | |
| 310 | 312 | #clock-cells = <0>; |
| 311 | 313 | clock-output-names = "mclk"; |
| 312 | 314 | status = "disabled"; |
| @@ -89,6 +89,14 @@ · 88 unmodified lines | ||
| 89 | 89 | states = <1800000 0x1>, |
| 90 | 90 | <2900000 0x0>; |
| 91 | 91 | }; |
| 92 | + | |
| 93 | + vin: vin { | |
| 94 | + compatible = "regulator-fixed"; | |
| 95 | + regulator-name = "vin"; | |
| 96 | + regulator-min-microvolt = <5000000>; | |
| 97 | + regulator-max-microvolt = <5000000>; | |
| 98 | + regulator-always-on; | |
| 99 | + }; | |
| 92 | 100 | }; |
| 93 | 101 | |
| 94 | 102 | &adc { |
| @@ -150,11 +158,18 @@ · 55 unmodified lines | ||
| 150 | 158 | |
| 151 | 159 | regulators { |
| 152 | 160 | compatible = "st,stpmic1-regulators"; |
| 161 | + buck1-supply = <&vin>; | |
| 162 | + buck2-supply = <&vin>; | |
| 163 | + buck3-supply = <&vin>; | |
| 164 | + buck4-supply = <&vin>; | |
| 153 | 165 | ldo1-supply = <&v3v3>; |
| 154 | 166 | ldo2-supply = <&v3v3>; |
| 155 | 167 | ldo3-supply = <&vdd_ddr>; |
| 168 | + ldo4-supply = <&vin>; | |
| 156 | 169 | ldo5-supply = <&v3v3>; |
| 157 | 170 | ldo6-supply = <&v3v3>; |
| 171 | + vref_ddr-supply = <&vin>; | |
| 172 | + boost-supply = <&vin>; | |
| 158 | 173 | pwr_sw1-supply = <&bst_out>; |
| 159 | 174 | pwr_sw2-supply = <&bst_out>; |
| 160 | 175 | |
| @@ -80,6 +80,14 @@ · 79 unmodified lines | ||
| 80 | 80 | dais = <&sai2a_port &sai2b_port &i2s2_port>; |
| 81 | 81 | status = "okay"; |
| 82 | 82 | }; |
| 83 | + | |
| 84 | + vin: vin { | |
| 85 | + compatible = "regulator-fixed"; | |
| 86 | + regulator-name = "vin"; | |
| 87 | + regulator-min-microvolt = <5000000>; | |
| 88 | + regulator-max-microvolt = <5000000>; | |
| 89 | + regulator-always-on; | |
| 90 | + }; | |
| 83 | 91 | }; |
| 84 | 92 | |
| 85 | 93 | &adc { |
| @@ -240,9 +248,18 @@ · 154 unmodified lines | ||
| 240 | 248 | |
| 241 | 249 | regulators { |
| 242 | 250 | compatible = "st,stpmic1-regulators"; |
| 251 | + buck1-supply = <&vin>; | |
| 252 | + buck2-supply = <&vin>; | |
| 253 | + buck3-supply = <&vin>; | |
| 254 | + buck4-supply = <&vin>; | |
| 243 | 255 | ldo1-supply = <&v3v3>; |
| 256 | + ldo2-supply = <&vin>; | |
| 244 | 257 | ldo3-supply = <&vdd_ddr>; |
| 258 | + ldo4-supply = <&vin>; | |
| 259 | + ldo5-supply = <&vin>; | |
| 245 | 260 | ldo6-supply = <&v3v3>; |
| 261 | + vref_ddr-supply = <&vin>; | |
| 262 | + boost-supply = <&vin>; | |
| 246 | 263 | pwr_sw1-supply = <&bst_out>; |
| 247 | 264 | pwr_sw2-supply = <&bst_out>; |
| 248 | 265 | |
| @@ -143,7 +143,7 @@ · 142 unmodified lines | ||
| 143 | 143 | trips { |
| 144 | 144 | cpu_alert0: cpu-alert0 { |
| 145 | 145 | /* milliCelsius */ |
| 146 | − temperature = <850000>; | |
| 146 | + temperature = <85000>; | |
| 147 | 147 | hysteresis = <2000>; |
| 148 | 148 | type = "passive"; |
| 149 | 149 | }; |
| @@ -93,6 +93,7 @@ CONFIG_SPI=y · 92 unmodified lines | ||
| 93 | 93 | CONFIG_SPI_IMX=y |
| 94 | 94 | CONFIG_SPI_SPIDEV=y |
| 95 | 95 | CONFIG_GPIO_SYSFS=y |
| 96 | +CONFIG_GPIO_MXC=y | |
| 96 | 97 | CONFIG_W1=y |
| 97 | 98 | CONFIG_W1_MASTER_MXC=y |
| 98 | 99 | CONFIG_W1_SLAVE_THERM=y |
| @@ -217,6 +217,7 @@ CONFIG_GPIO_PCA953X=y · 216 unmodified lines | ||
| 217 | 217 | CONFIG_GPIO_PCF857X=y |
| 218 | 218 | CONFIG_GPIO_STMPE=y |
| 219 | 219 | CONFIG_GPIO_74X164=y |
| 220 | +CONFIG_GPIO_MXC=y | |
| 220 | 221 | CONFIG_POWER_RESET=y |
| 221 | 222 | CONFIG_POWER_RESET_SYSCON=y |
| 222 | 223 | CONFIG_POWER_RESET_SYSCON_POWEROFF=y |
| @@ -166,6 +166,7 @@ CONFIG_SPI_IMX=y · 165 unmodified lines | ||
| 166 | 166 | CONFIG_SPI_ORION=y |
| 167 | 167 | CONFIG_GPIO_ASPEED=m |
| 168 | 168 | CONFIG_GPIO_ASPEED_SGPIO=y |
| 169 | +CONFIG_GPIO_MXC=y | |
| 169 | 170 | CONFIG_POWER_RESET=y |
| 170 | 171 | CONFIG_POWER_RESET_GPIO=y |
| 171 | 172 | CONFIG_POWER_RESET_QNAP=y |
| @@ -465,6 +465,7 @@ CONFIG_GPIO_PALMAS=y · 464 unmodified lines | ||
| 465 | 465 | CONFIG_GPIO_TPS6586X=y |
| 466 | 466 | CONFIG_GPIO_TPS65910=y |
| 467 | 467 | CONFIG_GPIO_TWL4030=y |
| 468 | +CONFIG_GPIO_MXC=y | |
| 468 | 469 | CONFIG_POWER_AVS=y |
| 469 | 470 | CONFIG_ROCKCHIP_IODOMAIN=y |
| 470 | 471 | CONFIG_POWER_RESET_AS3722=y |
| @@ -35,13 +35,8 @@ ENTRY(ll_get_coherency_base) · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | /* |
| 37 | 37 | * MMU is disabled, use the physical address of the coherency |
| 38 | − * base address. However, if the coherency fabric isn't mapped | |
| 39 | − * (i.e its virtual address is zero), it means coherency is | |
| 40 | − * not enabled, so we return 0. | |
| 38 | + * base address, (or 0x0 if the coherency fabric is not mapped) | |
| 41 | 39 | */ |
| 42 | − ldr r1, =coherency_base | |
| 43 | − cmp r1, #0 | |
| 44 | − beq 2f | |
| 45 | 40 | adr r1, 3f |
| 46 | 41 | ldr r3, [r1] |
| 47 | 42 | ldr r1, [r1, r3] |
| @@ -354,8 +354,8 @@ static void __init free_highpages(void) · 353 unmodified lines | ||
| 354 | 354 | /* set highmem page free */ |
| 355 | 355 | for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE, |
| 356 | 356 | &range_start, &range_end, NULL) { |
| 357 | − unsigned long start = PHYS_PFN(range_start); | |
| 358 | − unsigned long end = PHYS_PFN(range_end); | |
| 357 | + unsigned long start = PFN_UP(range_start); | |
| 358 | + unsigned long end = PFN_DOWN(range_end); | |
| 359 | 359 | |
| 360 | 360 | /* Ignore complete lowmem entries */ |
| 361 | 361 | if (end <= max_low) |
| @@ -636,6 +636,26 @@ config ARM64_ERRATUM_1542419 · 635 unmodified lines | ||
| 636 | 636 | |
| 637 | 637 | If unsure, say Y. |
| 638 | 638 | |
| 639 | +config ARM64_ERRATUM_1508412 | |
| 640 | + bool "Cortex-A77: 1508412: workaround deadlock on sequence of NC/Device load and store exclusive or PAR read" | |
| 641 | + default y | |
| 642 | + help | |
| 643 | + This option adds a workaround for Arm Cortex-A77 erratum 1508412. | |
| 644 | + | |
| 645 | + Affected Cortex-A77 cores (r0p0, r1p0) could deadlock on a sequence | |
| 646 | + of a store-exclusive or read of PAR_EL1 and a load with device or | |
| 647 | + non-cacheable memory attributes. The workaround depends on a firmware | |
| 648 | + counterpart. | |
| 649 | + | |
| 650 | + KVM guests must also have the workaround implemented or they can | |
| 651 | + deadlock the system. | |
| 652 | + | |
| 653 | + Work around the issue by inserting DMB SY barriers around PAR_EL1 | |
| 654 | + register reads and warning KVM users. The DMB barrier is sufficient | |
| 655 | + to prevent a speculative PAR_EL1 read. | |
| 656 | + | |
| 657 | + If unsure, say Y. | |
| 658 | + | |
| 639 | 659 | config CAVIUM_ERRATUM_22375 |
| 640 | 660 | bool "Cavium erratum 22375, 24313" |
| 641 | 661 | default y |
| @@ -982,7 +1002,7 @@ config NUMA · 340 unmodified lines | ||
| 982 | 1002 | config NODES_SHIFT |
| 983 | 1003 | int "Maximum NUMA Nodes (as a power of 2)" |
| 984 | 1004 | range 1 10 |
| 985 | − default "2" | |
| 1005 | + default "4" | |
| 986 | 1006 | depends on NEED_MULTIPLE_NODES |
| 987 | 1007 | help |
| 988 | 1008 | Specify the maximum number of NUMA Nodes available on the target |
| @@ -54,6 +54,7 @@ config ARCH_BCM_IPROC · 53 unmodified lines | ||
| 54 | 54 | config ARCH_BERLIN |
| 55 | 55 | bool "Marvell Berlin SoC Family" |
| 56 | 56 | select DW_APB_ICTL |
| 57 | + select DW_APB_TIMER_OF | |
| 57 | 58 | select GPIOLIB |
| 58 | 59 | select PINCTRL |
| 59 | 60 | help |
| @@ -584,3 +584,9 @@ · 583 unmodified lines | ||
| 584 | 584 | pinctrl-0 = <&uart_ao_a_pins>; |
| 585 | 585 | pinctrl-names = "default"; |
| 586 | 586 | }; |
| 587 | + | |
| 588 | +&usb { | |
| 589 | + status = "okay"; | |
| 590 | + dr_mode = "otg"; | |
| 591 | + vbus-supply = <&usb_pwr>; | |
| 592 | +}; | |
| @@ -171,6 +171,46 @@ · 170 unmodified lines | ||
| 171 | 171 | #size-cells = <2>; |
| 172 | 172 | ranges; |
| 173 | 173 | |
| 174 | + usb: usb@ffe09080 { | |
| 175 | + compatible = "amlogic,meson-axg-usb-ctrl"; | |
| 176 | + reg = <0x0 0xffe09080 0x0 0x20>; | |
| 177 | + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; | |
| 178 | + #address-cells = <2>; | |
| 179 | + #size-cells = <2>; | |
| 180 | + ranges; | |
| 181 | + | |
| 182 | + clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1_DDR_BRIDGE>; | |
| 183 | + clock-names = "usb_ctrl", "ddr"; | |
| 184 | + resets = <&reset RESET_USB_OTG>; | |
| 185 | + | |
| 186 | + dr_mode = "otg"; | |
| 187 | + | |
| 188 | + phys = <&usb2_phy1>; | |
| 189 | + phy-names = "usb2-phy1"; | |
| 190 | + | |
| 191 | + dwc2: usb@ff400000 { | |
| 192 | + compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; | |
| 193 | + reg = <0x0 0xff400000 0x0 0x40000>; | |
| 194 | + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; | |
| 195 | + clocks = <&clkc CLKID_USB1>; | |
| 196 | + clock-names = "otg"; | |
| 197 | + phys = <&usb2_phy1>; | |
| 198 | + dr_mode = "peripheral"; | |
| 199 | + g-rx-fifo-size = <192>; | |
| 200 | + g-np-tx-fifo-size = <128>; | |
| 201 | + g-tx-fifo-size = <128 128 16 16 16>; | |
| 202 | + }; | |
| 203 | + | |
| 204 | + dwc3: usb@ff500000 { | |
| 205 | + compatible = "snps,dwc3"; | |
| 206 | + reg = <0x0 0xff500000 0x0 0x100000>; | |
| 207 | + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; | |
| 208 | + dr_mode = "host"; | |
| 209 | + maximum-speed = "high-speed"; | |
| 210 | + snps,dis_u2_susphy_quirk; | |
| 211 | + }; | |
| 212 | + }; | |
| 213 | + | |
| 174 | 214 | ethmac: ethernet@ff3f0000 { |
| 175 | 215 | compatible = "amlogic,meson-axg-dwmac", |
| 176 | 216 | "snps,dwmac-3.70a", |
| @@ -187,6 +227,8 @@ · 10 unmodified lines | ||
| 187 | 227 | "timing-adjustment"; |
| 188 | 228 | rx-fifo-depth = <4096>; |
| 189 | 229 | tx-fifo-depth = <2048>; |
| 230 | + resets = <&reset RESET_ETHERNET>; | |
| 231 | + reset-names = "stmmaceth"; | |
| 190 | 232 | status = "disabled"; |
| 191 | 233 | }; |
| 192 | 234 | |
| @@ -1734,6 +1776,16 @@ · 1541 unmodified lines | ||
| 1734 | 1776 | clock-names = "core", "clkin0", "clkin1"; |
| 1735 | 1777 | resets = <&reset RESET_SD_EMMC_C>; |
| 1736 | 1778 | }; |
| 1779 | + | |
| 1780 | + usb2_phy1: phy@9020 { | |
| 1781 | + compatible = "amlogic,meson-gxl-usb2-phy"; | |
| 1782 | + #phy-cells = <0>; | |
| 1783 | + reg = <0x0 0x9020 0x0 0x20>; | |
| 1784 | + clocks = <&clkc CLKID_USB>; | |
| 1785 | + clock-names = "phy"; | |
| 1786 | + resets = <&reset RESET_USB_OTG>; | |
| 1787 | + reset-names = "phy"; | |
| 1788 | + }; | |
| 1737 | 1789 | }; |
| 1738 | 1790 | |
| 1739 | 1791 | sram: sram@fffc0000 { |
| @@ -209,7 +209,7 @@ · 208 unmodified lines | ||
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | 211 | ethmac: ethernet@ff3f0000 { |
| 212 | − compatible = "amlogic,meson-axg-dwmac", | |
| 212 | + compatible = "amlogic,meson-g12a-dwmac", | |
| 213 | 213 | "snps,dwmac-3.70a", |
| 214 | 214 | "snps,dwmac"; |
| 215 | 215 | reg = <0x0 0xff3f0000 0x0 0x10000>, |
| @@ -224,6 +224,8 @@ · 8 unmodified lines | ||
| 224 | 224 | "timing-adjustment"; |
| 225 | 225 | rx-fifo-depth = <4096>; |
| 226 | 226 | tx-fifo-depth = <2048>; |
| 227 | + resets = <&reset RESET_ETHERNET>; | |
| 228 | + reset-names = "stmmaceth"; | |
| 227 | 229 | status = "disabled"; |
| 228 | 230 | |
| 229 | 231 | mdio0: mdio { |
| @@ -282,6 +284,8 @@ · 52 unmodified lines | ||
| 282 | 284 | hwrng: rng@218 { |
| 283 | 285 | compatible = "amlogic,meson-rng"; |
| 284 | 286 | reg = <0x0 0x218 0x0 0x4>; |
| 287 | + clocks = <&clkc CLKID_RNG0>; | |
| 288 | + clock-names = "core"; | |
| 285 | 289 | }; |
| 286 | 290 | }; |
| 287 | 291 | |
| @@ -19,7 +19,7 @@ · 18 unmodified lines | ||
| 19 | 19 | regulator-min-microvolt = <680000>; |
| 20 | 20 | regulator-max-microvolt = <1040000>; |
| 21 | 21 | |
| 22 | − pwms = <&pwm_AO_cd 1 1500 0>; | |
| 22 | + pwms = <&pwm_ab 0 1500 0>; | |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | 25 | &vddcpu_b { |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <dt-bindings/interrupt-controller/irq.h> |
| 14 | 14 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 15 | 15 | #include <dt-bindings/power/meson-gxbb-power.h> |
| 16 | +#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> | |
| 16 | 17 | #include <dt-bindings/thermal/thermal.h> |
| 17 | 18 | |
| 18 | 19 | / { |
| @@ -575,6 +576,8 @@ · 556 unmodified lines | ||
| 575 | 576 | interrupt-names = "macirq"; |
| 576 | 577 | rx-fifo-depth = <4096>; |
| 577 | 578 | tx-fifo-depth = <2048>; |
| 579 | + resets = <&reset RESET_ETHERNET>; | |
| 580 | + reset-names = "stmmaceth"; | |
| 578 | 581 | power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>; |
| 579 | 582 | status = "disabled"; |
| 580 | 583 | }; |
| @@ -20,17 +20,23 @@ · 19 unmodified lines | ||
| 20 | 20 | compatible = "globalscale,espressobin-v7-emmc", "globalscale,espressobin-v7", |
| 21 | 21 | "globalscale,espressobin", "marvell,armada3720", |
| 22 | 22 | "marvell,armada3710"; |
| 23 | + | |
| 24 | + aliases { | |
| 25 | + /* ethernet1 is wan port */ | |
| 26 | + ethernet1 = &switch0port3; | |
| 27 | + ethernet3 = &switch0port1; | |
| 28 | + }; | |
| 23 | 29 | }; |
| 24 | 30 | |
| 25 | 31 | &switch0 { |
| 26 | 32 | ports { |
| 27 | − port@1 { | |
| 33 | + switch0port1: port@1 { | |
| 28 | 34 | reg = <1>; |
| 29 | 35 | label = "lan1"; |
| 30 | 36 | phy-handle = <&switch0phy0>; |
| 31 | 37 | }; |
| 32 | 38 | |
| 33 | − port@3 { | |
| 39 | + switch0port3: port@3 { | |
| 34 | 40 | reg = <3>; |
| 35 | 41 | label = "wan"; |
| 36 | 42 | phy-handle = <&switch0phy2>; |
| @@ -19,17 +19,23 @@ · 18 unmodified lines | ||
| 19 | 19 | model = "Globalscale Marvell ESPRESSOBin Board V7"; |
| 20 | 20 | compatible = "globalscale,espressobin-v7", "globalscale,espressobin", |
| 21 | 21 | "marvell,armada3720", "marvell,armada3710"; |
| 22 | + | |
| 23 | + aliases { | |
| 24 | + /* ethernet1 is wan port */ | |
| 25 | + ethernet1 = &switch0port3; | |
| 26 | + ethernet3 = &switch0port1; | |
| 27 | + }; | |
| 22 | 28 | }; |
| 23 | 29 | |
| 24 | 30 | &switch0 { |
| 25 | 31 | ports { |
| 26 | − port@1 { | |
| 32 | + switch0port1: port@1 { | |
| 27 | 33 | reg = <1>; |
| 28 | 34 | label = "lan1"; |
| 29 | 35 | phy-handle = <&switch0phy0>; |
| 30 | 36 | }; |
| 31 | 37 | |
| 32 | − port@3 { | |
| 38 | + switch0port3: port@3 { | |
| 33 | 39 | reg = <3>; |
| 34 | 40 | label = "wan"; |
| 35 | 41 | phy-handle = <&switch0phy2>; |
| @@ -13,6 +13,10 @@ · 12 unmodified lines | ||
| 13 | 13 | / { |
| 14 | 14 | aliases { |
| 15 | 15 | ethernet0 = ð0; |
| 16 | + /* for dsa slave device */ | |
| 17 | + ethernet1 = &switch0port1; | |
| 18 | + ethernet2 = &switch0port2; | |
| 19 | + ethernet3 = &switch0port3; | |
| 16 | 20 | serial0 = &uart0; |
| 17 | 21 | serial1 = &uart1; |
| 18 | 22 | }; |
| @@ -120,7 +124,7 @@ · 101 unmodified lines | ||
| 120 | 124 | #address-cells = <1>; |
| 121 | 125 | #size-cells = <0>; |
| 122 | 126 | |
| 123 | − port@0 { | |
| 127 | + switch0port0: port@0 { | |
| 124 | 128 | reg = <0>; |
| 125 | 129 | label = "cpu"; |
| 126 | 130 | ethernet = <ð0>; |
| @@ -131,19 +135,19 @@ · 4 unmodified lines | ||
| 131 | 135 | }; |
| 132 | 136 | }; |
| 133 | 137 | |
| 134 | − port@1 { | |
| 138 | + switch0port1: port@1 { | |
| 135 | 139 | reg = <1>; |
| 136 | 140 | label = "wan"; |
| 137 | 141 | phy-handle = <&switch0phy0>; |
| 138 | 142 | }; |
| 139 | 143 | |
| 140 | − port@2 { | |
| 144 | + switch0port2: port@2 { | |
| 141 | 145 | reg = <2>; |
| 142 | 146 | label = "lan0"; |
| 143 | 147 | phy-handle = <&switch0phy1>; |
| 144 | 148 | }; |
| 145 | 149 | |
| 146 | − port@3 { | |
| 150 | + switch0port3: port@3 { | |
| 147 | 151 | reg = <3>; |
| 148 | 152 | label = "lan1"; |
| 149 | 153 | phy-handle = <&switch0phy2>; |
| @@ -500,6 +500,7 @@ CONFIG_GPIO_ALTERA=m · 499 unmodified lines | ||
| 500 | 500 | CONFIG_GPIO_DWAPB=y |
| 501 | 501 | CONFIG_GPIO_MB86S7X=y |
| 502 | 502 | CONFIG_GPIO_MPC8XXX=y |
| 503 | +CONFIG_GPIO_MXC=y | |
| 503 | 504 | CONFIG_GPIO_PL061=y |
| 504 | 505 | CONFIG_GPIO_RCAR=y |
| 505 | 506 | CONFIG_GPIO_UNIPHIER=y |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | * #imm16 values used for BRK instruction generation |
| 11 | 11 | * 0x004: for installing kprobes |
| 12 | 12 | * 0x005: for installing uprobes |
| 13 | + * 0x006: for kprobe software single-step | |
| 13 | 14 | * Allowed values for kgdb are 0x400 - 0x7ff |
| 14 | 15 | * 0x100: for triggering a fault on purpose (reserved) |
| 15 | 16 | * 0x400: for dynamic BRK instruction |
| @@ -19,6 +20,7 @@ · 3 unmodified lines | ||
| 19 | 20 | */ |
| 20 | 21 | #define KPROBES_BRK_IMM 0x004 |
| 21 | 22 | #define UPROBES_BRK_IMM 0x005 |
| 23 | +#define KPROBES_BRK_SS_IMM 0x006 | |
| 22 | 24 | #define FAULT_BRK_IMM 0x100 |
| 23 | 25 | #define KGDB_DYN_DBG_BRK_IMM 0x400 |
| 24 | 26 | #define KGDB_COMPILED_DBG_BRK_IMM 0x401 |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | #define CTR_L1IP(ctr) (((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK) |
| 25 | 25 | |
| 26 | 26 | #define ICACHE_POLICY_VPIPT 0 |
| 27 | +#define ICACHE_POLICY_RESERVED 1 | |
| 27 | 28 | #define ICACHE_POLICY_VIPT 2 |
| 28 | 29 | #define ICACHE_POLICY_PIPT 3 |
| 29 | 30 | |
| @@ -65,7 +65,8 @@ · 64 unmodified lines | ||
| 65 | 65 | #define ARM64_HAS_ARMv8_4_TTL 55 |
| 66 | 66 | #define ARM64_HAS_TLB_RANGE 56 |
| 67 | 67 | #define ARM64_MTE 57 |
| 68 | +#define ARM64_WORKAROUND_1508412 58 | |
| 68 | 69 | |
| 69 | −#define ARM64_NCAPS 58 | |
| 70 | +#define ARM64_NCAPS 59 | |
| 70 | 71 | |
| 71 | 72 | #endif /* __ASM_CPUCAPS_H */ |
| @@ -375,6 +375,23 @@ cpucap_multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry, · 374 unmodified lines | ||
| 375 | 375 | return false; |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | +static __always_inline bool is_vhe_hyp_code(void) | |
| 379 | +{ | |
| 380 | + /* Only defined for code run in VHE hyp context */ | |
| 381 | + return __is_defined(__KVM_VHE_HYPERVISOR__); | |
| 382 | +} | |
| 383 | + | |
| 384 | +static __always_inline bool is_nvhe_hyp_code(void) | |
| 385 | +{ | |
| 386 | + /* Only defined for code run in NVHE hyp context */ | |
| 387 | + return __is_defined(__KVM_NVHE_HYPERVISOR__); | |
| 388 | +} | |
| 389 | + | |
| 390 | +static __always_inline bool is_hyp_code(void) | |
| 391 | +{ | |
| 392 | + return is_vhe_hyp_code() || is_nvhe_hyp_code(); | |
| 393 | +} | |
| 394 | + | |
| 378 | 395 | extern DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS); |
| 379 | 396 | extern struct static_key_false cpu_hwcap_keys[ARM64_NCAPS]; |
| 380 | 397 | extern struct static_key_false arm64_const_caps_ready; |
| @@ -428,35 +445,40 @@ static __always_inline bool __cpus_have_const_cap(int num) · 47 unmodified lines | ||
| 428 | 445 | } |
| 429 | 446 | |
| 430 | 447 | /* |
| 431 | − * Test for a capability, possibly with a runtime check. | |
| 448 | + * Test for a capability without a runtime check. | |
| 432 | 449 | * |
| 433 | − * Before capabilities are finalized, this behaves as cpus_have_cap(). | |
| 450 | + * Before capabilities are finalized, this will BUG(). | |
| 434 | 451 | * After capabilities are finalized, this is patched to avoid a runtime check. |
| 435 | 452 | * |
| 436 | 453 | * @num must be a compile-time constant. |
| 437 | 454 | */ |
| 438 | −static __always_inline bool cpus_have_const_cap(int num) | |
| 455 | +static __always_inline bool cpus_have_final_cap(int num) | |
| 439 | 456 | { |
| 440 | 457 | if (system_capabilities_finalized()) |
| 441 | 458 | return __cpus_have_const_cap(num); |
| 442 | 459 | else |
| 443 | − return cpus_have_cap(num); | |
| 460 | + BUG(); | |
| 444 | 461 | } |
| 445 | 462 | |
| 446 | 463 | /* |
| 447 | − * Test for a capability without a runtime check. | |
| 464 | + * Test for a capability, possibly with a runtime check for non-hyp code. | |
| 448 | 465 | * |
| 449 | − * Before capabilities are finalized, this will BUG(). | |
| 466 | + * For hyp code, this behaves the same as cpus_have_final_cap(). | |
| 467 | + * | |
| 468 | + * For non-hyp code: | |
| 469 | + * Before capabilities are finalized, this behaves as cpus_have_cap(). | |
| 450 | 470 | * After capabilities are finalized, this is patched to avoid a runtime check. |
| 451 | 471 | * |
| 452 | 472 | * @num must be a compile-time constant. |
| 453 | 473 | */ |
| 454 | −static __always_inline bool cpus_have_final_cap(int num) | |
| 474 | +static __always_inline bool cpus_have_const_cap(int num) | |
| 455 | 475 | { |
| 456 | − if (system_capabilities_finalized()) | |
| 476 | + if (is_hyp_code()) | |
| 477 | + return cpus_have_final_cap(num); | |
| 478 | + else if (system_capabilities_finalized()) | |
| 457 | 479 | return __cpus_have_const_cap(num); |
| 458 | 480 | else |
| 459 | − BUG(); | |
| 481 | + return cpus_have_cap(num); | |
| 460 | 482 | } |
| 461 | 483 | |
| 462 | 484 | static inline void cpus_set_cap(unsigned int num) |
| @@ -71,6 +71,7 @@ · 70 unmodified lines | ||
| 71 | 71 | #define ARM_CPU_PART_CORTEX_A55 0xD05 |
| 72 | 72 | #define ARM_CPU_PART_CORTEX_A76 0xD0B |
| 73 | 73 | #define ARM_CPU_PART_NEOVERSE_N1 0xD0C |
| 74 | +#define ARM_CPU_PART_CORTEX_A77 0xD0D | |
| 74 | 75 | |
| 75 | 76 | #define APM_CPU_PART_POTENZA 0x000 |
| 76 | 77 | |
| @@ -105,6 +106,7 @@ · 28 unmodified lines | ||
| 105 | 106 | #define MIDR_CORTEX_A55 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A55) |
| 106 | 107 | #define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76) |
| 107 | 108 | #define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1) |
| 109 | +#define MIDR_CORTEX_A77 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A77) | |
| 108 | 110 | #define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX) |
| 109 | 111 | #define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX) |
| 110 | 112 | #define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX) |
| @@ -53,6 +53,7 @@ · 52 unmodified lines | ||
| 53 | 53 | |
| 54 | 54 | /* kprobes BRK opcodes with ESR encoding */ |
| 55 | 55 | #define BRK64_OPCODE_KPROBES (AARCH64_BREAK_MON | (KPROBES_BRK_IMM << 5)) |
| 56 | +#define BRK64_OPCODE_KPROBES_SS (AARCH64_BREAK_MON | (KPROBES_BRK_SS_IMM << 5)) | |
| 56 | 57 | /* uprobes BRK opcodes with ESR encoding */ |
| 57 | 58 | #define BRK64_OPCODE_UPROBES (AARCH64_BREAK_MON | (UPROBES_BRK_IMM << 5)) |
| 58 | 59 | |
| @@ -16,7 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include <linux/percpu.h> |
| 17 | 17 | |
| 18 | 18 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
| 19 | −#define MAX_INSN_SIZE 1 | |
| 19 | +#define MAX_INSN_SIZE 2 | |
| 20 | 20 | |
| 21 | 21 | #define flush_insn_slot(p) do { } while (0) |
| 22 | 22 | #define kretprobe_blacklist_size 0 |
| @@ -239,6 +239,7 @@ enum vcpu_sysreg { · 238 unmodified lines | ||
| 239 | 239 | #define cp14_DBGWCR0 (DBGWCR0_EL1 * 2) |
| 240 | 240 | #define cp14_DBGWVR0 (DBGWVR0_EL1 * 2) |
| 241 | 241 | #define cp14_DBGDCCINT (MDCCINT_EL1 * 2) |
| 242 | +#define cp14_DBGVCR (DBGVCR32_EL2 * 2) | |
| 242 | 243 | |
| 243 | 244 | #define NR_COPRO_REGS (NR_SYS_REGS * 2) |
| 244 | 245 | |
| @@ -1007,6 +1007,7 @@ · 1006 unmodified lines | ||
| 1007 | 1007 | |
| 1008 | 1008 | #include <linux/build_bug.h> |
| 1009 | 1009 | #include <linux/types.h> |
| 1010 | +#include <asm/alternative.h> | |
| 1010 | 1011 | |
| 1011 | 1012 | #define __DEFINE_MRS_MSR_S_REGNUM \ |
| 1012 | 1013 | " .irp num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n" \ |
| @@ -1095,6 +1096,14 @@ · 82 unmodified lines | ||
| 1095 | 1096 | write_sysreg_s(__scs_new, sysreg); \ |
| 1096 | 1097 | } while (0) |
| 1097 | 1098 | |
| 1099 | +#define read_sysreg_par() ({ \ | |
| 1100 | + u64 par; \ | |
| 1101 | + asm(ALTERNATIVE("nop", "dmb sy", ARM64_WORKAROUND_1508412)); \ | |
| 1102 | + par = read_sysreg(par_el1); \ | |
| 1103 | + asm(ALTERNATIVE("nop", "dmb sy", ARM64_WORKAROUND_1508412)); \ | |
| 1104 | + par; \ | |
| 1105 | +}) | |
| 1106 | + | |
| 1098 | 1107 | #endif |
| 1099 | 1108 | |
| 1100 | 1109 | #endif /* __ASM_SYSREG_H */ |
| @@ -86,13 +86,12 @@ static inline bool is_kernel_in_hyp_mode(void) · 85 unmodified lines | ||
| 86 | 86 | static __always_inline bool has_vhe(void) |
| 87 | 87 | { |
| 88 | 88 | /* |
| 89 | − * The following macros are defined for code specic to VHE/nVHE. | |
| 90 | − * If has_vhe() is inlined into those compilation units, it can | |
| 91 | − * be determined statically. Otherwise fall back to caps. | |
| 89 | + * Code only run in VHE/NVHE hyp context can assume VHE is present or | |
| 90 | + * absent. Otherwise fall back to caps. | |
| 92 | 91 | */ |
| 93 | − if (__is_defined(__KVM_VHE_HYPERVISOR__)) | |
| 92 | + if (is_vhe_hyp_code()) | |
| 94 | 93 | return true; |
| 95 | − else if (__is_defined(__KVM_NVHE_HYPERVISOR__)) | |
| 94 | + else if (is_nvhe_hyp_code()) | |
| 96 | 95 | return false; |
| 97 | 96 | else |
| 98 | 97 | return cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN); |
| @@ -522,6 +522,16 @@ const struct arm64_cpu_capabilities arm64_errata[] = { · 521 unmodified lines | ||
| 522 | 522 | .matches = has_neoverse_n1_erratum_1542419, |
| 523 | 523 | .cpu_enable = cpu_enable_trap_ctr_access, |
| 524 | 524 | }, |
| 525 | +#endif | |
| 526 | +#ifdef CONFIG_ARM64_ERRATUM_1508412 | |
| 527 | + { | |
| 528 | + /* we depend on the firmware portion for correctness */ | |
| 529 | + .desc = "ARM erratum 1508412 (kernel portion)", | |
| 530 | + .capability = ARM64_WORKAROUND_1508412, | |
| 531 | + ERRATA_MIDR_RANGE(MIDR_CORTEX_A77, | |
| 532 | + 0, 0, | |
| 533 | + 1, 0), | |
| 534 | + }, | |
| 525 | 535 | #endif |
| 526 | 536 | { |
| 527 | 537 | } |
| @@ -34,10 +34,10 @@ DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data); · 33 unmodified lines | ||
| 34 | 34 | static struct cpuinfo_arm64 boot_cpu_data; |
| 35 | 35 | |
| 36 | 36 | static const char *icache_policy_str[] = { |
| 37 | − [0 ... ICACHE_POLICY_PIPT] = "RESERVED/UNKNOWN", | |
| 37 | + [ICACHE_POLICY_VPIPT] = "VPIPT", | |
| 38 | + [ICACHE_POLICY_RESERVED] = "RESERVED/UNKNOWN", | |
| 38 | 39 | [ICACHE_POLICY_VIPT] = "VIPT", |
| 39 | 40 | [ICACHE_POLICY_PIPT] = "PIPT", |
| 40 | − [ICACHE_POLICY_VPIPT] = "VPIPT", | |
| 41 | 41 | }; |
| 42 | 42 | |
| 43 | 43 | unsigned long __icache_flags; |
| @@ -334,10 +334,11 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info) · 290 unmodified lines | ||
| 334 | 334 | case ICACHE_POLICY_VPIPT: |
| 335 | 335 | set_bit(ICACHEF_VPIPT, &__icache_flags); |
| 336 | 336 | break; |
| 337 | − default: | |
| 337 | + case ICACHE_POLICY_RESERVED: | |
| 338 | 338 | case ICACHE_POLICY_VIPT: |
| 339 | 339 | /* Assume aliasing */ |
| 340 | 340 | set_bit(ICACHEF_ALIASING, &__icache_flags); |
| 341 | + break; | |
| 341 | 342 | } |
| 342 | 343 | |
| 343 | 344 | pr_info("Detected %s I-cache on CPU%d\n", icache_policy_str[l1ip], cpu); |
| @@ -147,6 +147,6 @@ efi_debug_entry: · 146 unmodified lines | ||
| 147 | 147 | * correctly at this alignment, we must ensure that .text is |
| 148 | 148 | * placed at a 4k boundary in the Image to begin with. |
| 149 | 149 | */ |
| 150 | − .align 12 | |
| 150 | + .balign SEGMENT_ALIGN | |
| 151 | 151 | efi_header_end: |
| 152 | 152 | .endm |
| @@ -365,6 +365,9 @@ alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0 · 364 unmodified lines | ||
| 365 | 365 | br x30 |
| 366 | 366 | #endif |
| 367 | 367 | .else |
| 368 | + /* Ensure any device/NC reads complete */ | |
| 369 | + alternative_insn nop, "dmb sy", ARM64_WORKAROUND_1508412 | |
| 370 | + | |
| 368 | 371 | eret |
| 369 | 372 | .endif |
| 370 | 373 | sb |
| @@ -87,7 +87,6 @@ KVM_NVHE_ALIAS(__icache_flags); · 86 unmodified lines | ||
| 87 | 87 | /* Kernel symbols needed for cpus_have_final/const_caps checks. */ |
| 88 | 88 | KVM_NVHE_ALIAS(arm64_const_caps_ready); |
| 89 | 89 | KVM_NVHE_ALIAS(cpu_hwcap_keys); |
| 90 | −KVM_NVHE_ALIAS(cpu_hwcaps); | |
| 91 | 90 | |
| 92 | 91 | /* Static keys which are set if a vGIC trap should be handled in hyp. */ |
| 93 | 92 | KVM_NVHE_ALIAS(vgic_v2_cpuif_trap); |
| @@ -43,7 +43,7 @@ static void *image_load(struct kimage *image, · 42 unmodified lines | ||
| 43 | 43 | u64 flags, value; |
| 44 | 44 | bool be_image, be_kernel; |
| 45 | 45 | struct kexec_buf kbuf; |
| 46 | − unsigned long text_offset; | |
| 46 | + unsigned long text_offset, kernel_segment_number; | |
| 47 | 47 | struct kexec_segment *kernel_segment; |
| 48 | 48 | int ret; |
| 49 | 49 | |
| @@ -88,11 +88,37 @@ static void *image_load(struct kimage *image, · 38 unmodified lines | ||
| 88 | 88 | /* Adjust kernel segment with TEXT_OFFSET */ |
| 89 | 89 | kbuf.memsz += text_offset; |
| 90 | 90 | |
| 91 | − ret = kexec_add_buffer(&kbuf); | |
| 92 | − if (ret) | |
| 91 | + kernel_segment_number = image->nr_segments; | |
| 92 | + | |
| 93 | + /* | |
| 94 | + * The location of the kernel segment may make it impossible to satisfy | |
| 95 | + * the other segment requirements, so we try repeatedly to find a | |
| 96 | + * location that will work. | |
| 97 | + */ | |
| 98 | + while ((ret = kexec_add_buffer(&kbuf)) == 0) { | |
| 99 | + /* Try to load additional data */ | |
| 100 | + kernel_segment = &image->segment[kernel_segment_number]; | |
| 101 | + ret = load_other_segments(image, kernel_segment->mem, | |
| 102 | + kernel_segment->memsz, initrd, | |
| 103 | + initrd_len, cmdline); | |
| 104 | + if (!ret) | |
| 105 | + break; | |
| 106 | + | |
| 107 | + /* | |
| 108 | + * We couldn't find space for the other segments; erase the | |
| 109 | + * kernel segment and try the next available hole. | |
| 110 | + */ | |
| 111 | + image->nr_segments -= 1; | |
| 112 | + kbuf.buf_min = kernel_segment->mem + kernel_segment->memsz; | |
| 113 | + kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; | |
| 114 | + } | |
| 115 | + | |
| 116 | + if (ret) { | |
| 117 | + pr_err("Could not find any suitable kernel location!"); | |
| 93 | 118 | return ERR_PTR(ret); |
| 119 | + } | |
| 94 | 120 | |
| 95 | − kernel_segment = &image->segment[image->nr_segments - 1]; | |
| 121 | + kernel_segment = &image->segment[kernel_segment_number]; | |
| 96 | 122 | kernel_segment->mem += text_offset; |
| 97 | 123 | kernel_segment->memsz -= text_offset; |
| 98 | 124 | image->start = kernel_segment->mem; |
| @@ -101,12 +127,7 @@ static void *image_load(struct kimage *image, · 2 unmodified lines | ||
| 101 | 127 | kernel_segment->mem, kbuf.bufsz, |
| 102 | 128 | kernel_segment->memsz); |
| 103 | 129 | |
| 104 | − /* Load additional data */ | |
| 105 | − ret = load_other_segments(image, | |
| 106 | − kernel_segment->mem, kernel_segment->memsz, | |
| 107 | − initrd, initrd_len, cmdline); | |
| 108 | − | |
| 109 | − return ERR_PTR(ret); | |
| 130 | + return 0; | |
| 110 | 131 | } |
| 111 | 132 | |
| 112 | 133 | #ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG |
| @@ -240,6 +240,11 @@ static int prepare_elf_headers(void **addr, unsigned long *sz) · 239 unmodified lines | ||
| 240 | 240 | return ret; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | +/* | |
| 244 | + * Tries to add the initrd and DTB to the image. If it is not possible to find | |
| 245 | + * valid locations, this function will undo changes to the image and return non | |
| 246 | + * zero. | |
| 247 | + */ | |
| 243 | 248 | int load_other_segments(struct kimage *image, |
| 244 | 249 | unsigned long kernel_load_addr, |
| 245 | 250 | unsigned long kernel_size, |
| @@ -248,7 +253,8 @@ int load_other_segments(struct kimage *image, · 2 unmodified lines | ||
| 248 | 253 | { |
| 249 | 254 | struct kexec_buf kbuf; |
| 250 | 255 | void *headers, *dtb = NULL; |
| 251 | − unsigned long headers_sz, initrd_load_addr = 0, dtb_len; | |
| 256 | + unsigned long headers_sz, initrd_load_addr = 0, dtb_len, | |
| 257 | + orig_segments = image->nr_segments; | |
| 252 | 258 | int ret = 0; |
| 253 | 259 | |
| 254 | 260 | kbuf.image = image; |
| @@ -334,6 +340,7 @@ int load_other_segments(struct kimage *image, · 79 unmodified lines | ||
| 334 | 340 | return 0; |
| 335 | 341 | |
| 336 | 342 | out_err: |
| 343 | + image->nr_segments = orig_segments; | |
| 337 | 344 | vfree(dtb); |
| 338 | 345 | return ret; |
| 339 | 346 | } |
| @@ -36,25 +36,16 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); · 35 unmodified lines | ||
| 36 | 36 | static void __kprobes |
| 37 | 37 | post_kprobe_handler(struct kprobe_ctlblk *, struct pt_regs *); |
| 38 | 38 | |
| 39 | −static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode) | |
| 40 | −{ | |
| 41 | − void *addrs[1]; | |
| 42 | − u32 insns[1]; | |
| 43 | − | |
| 44 | − addrs[0] = addr; | |
| 45 | − insns[0] = opcode; | |
| 46 | − | |
| 47 | − return aarch64_insn_patch_text(addrs, insns, 1); | |
| 48 | −} | |
| 49 | − | |
| 50 | 39 | static void __kprobes arch_prepare_ss_slot(struct kprobe *p) |
| 51 | 40 | { |
| 41 | + kprobe_opcode_t *addr = p->ainsn.api.insn; | |
| 42 | + void *addrs[] = {addr, addr + 1}; | |
| 43 | + u32 insns[] = {p->opcode, BRK64_OPCODE_KPROBES_SS}; | |
| 44 | + | |
| 52 | 45 | /* prepare insn slot */ |
| 53 | − patch_text(p->ainsn.api.insn, p->opcode); | |
| 46 | + aarch64_insn_patch_text(addrs, insns, 2); | |
| 54 | 47 | |
| 55 | − flush_icache_range((uintptr_t) (p->ainsn.api.insn), | |
| 56 | − (uintptr_t) (p->ainsn.api.insn) + | |
| 57 | − MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); | |
| 48 | + flush_icache_range((uintptr_t)addr, (uintptr_t)(addr + MAX_INSN_SIZE)); | |
| 58 | 49 | |
| 59 | 50 | /* |
| 60 | 51 | * Needs restoring of return address after stepping xol. |
| @@ -128,13 +119,18 @@ void *alloc_insn_page(void) · 67 unmodified lines | ||
| 128 | 119 | /* arm kprobe: install breakpoint in text */ |
| 129 | 120 | void __kprobes arch_arm_kprobe(struct kprobe *p) |
| 130 | 121 | { |
| 131 | − patch_text(p->addr, BRK64_OPCODE_KPROBES); | |
| 122 | + void *addr = p->addr; | |
| 123 | + u32 insn = BRK64_OPCODE_KPROBES; | |
| 124 | + | |
| 125 | + aarch64_insn_patch_text(&addr, &insn, 1); | |
| 132 | 126 | } |
| 133 | 127 | |
| 134 | 128 | /* disarm kprobe: remove breakpoint from text */ |
| 135 | 129 | void __kprobes arch_disarm_kprobe(struct kprobe *p) |
| 136 | 130 | { |
| 137 | − patch_text(p->addr, p->opcode); | |
| 131 | + void *addr = p->addr; | |
| 132 | + | |
| 133 | + aarch64_insn_patch_text(&addr, &p->opcode, 1); | |
| 138 | 134 | } |
| 139 | 135 | |
| 140 | 136 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
| @@ -163,20 +159,15 @@ static void __kprobes set_current_kprobe(struct kprobe *p) · 22 unmodified lines | ||
| 163 | 159 | } |
| 164 | 160 | |
| 165 | 161 | /* |
| 166 | − * Interrupts need to be disabled before single-step mode is set, and not | |
| 167 | − * reenabled until after single-step mode ends. | |
| 168 | − * Without disabling interrupt on local CPU, there is a chance of | |
| 169 | − * interrupt occurrence in the period of exception return and start of | |
| 170 | − * out-of-line single-step, that result in wrongly single stepping | |
| 171 | − * into the interrupt handler. | |
| 162 | + * Mask all of DAIF while executing the instruction out-of-line, to keep things | |
| 163 | + * simple and avoid nesting exceptions. Interrupts do have to be disabled since | |
| 164 | + * the kprobe state is per-CPU and doesn't get migrated. | |
| 172 | 165 | */ |
| 173 | 166 | static void __kprobes kprobes_save_local_irqflag(struct kprobe_ctlblk *kcb, |
| 174 | 167 | struct pt_regs *regs) |
| 175 | 168 | { |
| 176 | 169 | kcb->saved_irqflag = regs->pstate & DAIF_MASK; |
| 177 | − regs->pstate |= PSR_I_BIT; | |
| 178 | − /* Unmask PSTATE.D for enabling software step exceptions. */ | |
| 179 | − regs->pstate &= ~PSR_D_BIT; | |
| 170 | + regs->pstate |= DAIF_MASK; | |
| 180 | 171 | } |
| 181 | 172 | |
| 182 | 173 | static void __kprobes kprobes_restore_local_irqflag(struct kprobe_ctlblk *kcb, |
| @@ -219,10 +210,7 @@ static void __kprobes setup_singlestep(struct kprobe *p, · 36 unmodified lines | ||
| 219 | 210 | slot = (unsigned long)p->ainsn.api.insn; |
| 220 | 211 | |
| 221 | 212 | set_ss_context(kcb, slot); /* mark pending ss */ |
| 222 | − | |
| 223 | − /* IRQs and single stepping do not mix well. */ | |
| 224 | 213 | kprobes_save_local_irqflag(kcb, regs); |
| 225 | − kernel_enable_single_step(regs); | |
| 226 | 214 | instruction_pointer_set(regs, slot); |
| 227 | 215 | } else { |
| 228 | 216 | /* insn simulation */ |
| @@ -273,12 +261,8 @@ post_kprobe_handler(struct kprobe_ctlblk *kcb, struct pt_regs *regs) · 44 unmodified lines | ||
| 273 | 261 | } |
| 274 | 262 | /* call post handler */ |
| 275 | 263 | kcb->kprobe_status = KPROBE_HIT_SSDONE; |
| 276 | − if (cur->post_handler) { | |
| 277 | − /* post_handler can hit breakpoint and single step | |
| 278 | − * again, so we enable D-flag for recursive exception. | |
| 279 | − */ | |
| 264 | + if (cur->post_handler) | |
| 280 | 265 | cur->post_handler(cur, regs, 0); |
| 281 | − } | |
| 282 | 266 | |
| 283 | 267 | reset_current_kprobe(); |
| 284 | 268 | } |
| @@ -302,8 +286,6 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr) · 17 unmodified lines | ||
| 302 | 286 | if (!instruction_pointer(regs)) |
| 303 | 287 | BUG(); |
| 304 | 288 | |
| 305 | − kernel_disable_single_step(); | |
| 306 | − | |
| 307 | 289 | if (kcb->kprobe_status == KPROBE_REENTER) |
| 308 | 290 | restore_previous_kprobe(kcb); |
| 309 | 291 | else |
| @@ -365,10 +347,6 @@ static void __kprobes kprobe_handler(struct pt_regs *regs) · 55 unmodified lines | ||
| 365 | 347 | * pre-handler and it returned non-zero, it will |
| 366 | 348 | * modify the execution path and no need to single |
| 367 | 349 | * stepping. Let's just reset current kprobe and exit. |
| 368 | − * | |
| 369 | − * pre_handler can hit a breakpoint and can step thru | |
| 370 | − * before return, keep PSTATE D-flag enabled until | |
| 371 | − * pre_handler return back. | |
| 372 | 350 | */ |
| 373 | 351 | if (!p->pre_handler || !p->pre_handler(p, regs)) { |
| 374 | 352 | setup_singlestep(p, regs, kcb, 0); |
| @@ -399,7 +377,7 @@ kprobe_ss_hit(struct kprobe_ctlblk *kcb, unsigned long addr) · 24 unmodified lines | ||
| 399 | 377 | } |
| 400 | 378 | |
| 401 | 379 | static int __kprobes |
| 402 | −kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr) | |
| 380 | +kprobe_breakpoint_ss_handler(struct pt_regs *regs, unsigned int esr) | |
| 403 | 381 | { |
| 404 | 382 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); |
| 405 | 383 | int retval; |
| @@ -409,16 +387,15 @@ kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr) · 3 unmodified lines | ||
| 409 | 387 | |
| 410 | 388 | if (retval == DBG_HOOK_HANDLED) { |
| 411 | 389 | kprobes_restore_local_irqflag(kcb, regs); |
| 412 | − kernel_disable_single_step(); | |
| 413 | − | |
| 414 | 390 | post_kprobe_handler(kcb, regs); |
| 415 | 391 | } |
| 416 | 392 | |
| 417 | 393 | return retval; |
| 418 | 394 | } |
| 419 | 395 | |
| 420 | −static struct step_hook kprobes_step_hook = { | |
| 421 | − .fn = kprobe_single_step_handler, | |
| 396 | +static struct break_hook kprobes_break_ss_hook = { | |
| 397 | + .imm = KPROBES_BRK_SS_IMM, | |
| 398 | + .fn = kprobe_breakpoint_ss_handler, | |
| 422 | 399 | }; |
| 423 | 400 | |
| 424 | 401 | static int __kprobes |
| @@ -486,7 +463,7 @@ int __kprobes arch_trampoline_kprobe(struct kprobe *p) · 61 unmodified lines | ||
| 486 | 463 | int __init arch_init_kprobes(void) |
| 487 | 464 | { |
| 488 | 465 | register_kernel_break_hook(&kprobes_break_hook); |
| 489 | − register_kernel_step_hook(&kprobes_step_hook); | |
| 466 | + register_kernel_break_hook(&kprobes_break_ss_hook); | |
| 490 | 467 | |
| 491 | 468 | return 0; |
| 492 | 469 | } |
| @@ -135,8 +135,6 @@ static enum mitigation_state spectre_v2_get_cpu_hw_mitigation_state(void) · 134 unmodified lines | ||
| 135 | 135 | return SPECTRE_VULNERABLE; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | −#define SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED (1) | |
| 139 | − | |
| 140 | 138 | static enum mitigation_state spectre_v2_get_cpu_fw_mitigation_state(void) |
| 141 | 139 | { |
| 142 | 140 | int ret; |
| @@ -222,6 +222,7 @@ asmlinkage notrace void secondary_start_kernel(void) · 221 unmodified lines | ||
| 222 | 222 | if (system_uses_irq_prio_masking()) |
| 223 | 223 | init_gic_priority_masking(); |
| 224 | 224 | |
| 225 | + rcu_cpu_starting(cpu); | |
| 225 | 226 | preempt_disable(); |
| 226 | 227 | trace_hardirqs_off(); |
| 227 | 228 | |
| @@ -22,16 +22,21 @@ endif · 21 unmodified lines | ||
| 22 | 22 | |
| 23 | 23 | CC_COMPAT ?= $(CC) |
| 24 | 24 | CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS) |
| 25 | + | |
| 26 | +ifneq ($(LLVM),) | |
| 27 | +LD_COMPAT ?= $(LD) | |
| 28 | +else | |
| 29 | +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld | |
| 30 | +endif | |
| 25 | 31 | else |
| 26 | 32 | CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc |
| 33 | +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld | |
| 27 | 34 | endif |
| 28 | 35 | |
| 29 | 36 | cc32-option = $(call try-run,\ |
| 30 | 37 | $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) |
| 31 | 38 | cc32-disable-warning = $(call try-run,\ |
| 32 | 39 | $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) |
| 33 | −cc32-ldoption = $(call try-run,\ | |
| 34 | − $(CC_COMPAT) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) | |
| 35 | 40 | cc32-as-instr = $(call try-run,\ |
| 36 | 41 | printf "%b\n" "$(1)" | $(CC_COMPAT) $(VDSO_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) |
| 37 | 42 | |
| @@ -122,14 +127,10 @@ dmbinstr := $(call cc32-as-instr,dmb ishld,-DCONFIG_AS_DMB_ISHLD=1) · 84 unmodified lines | ||
| 122 | 127 | VDSO_CFLAGS += $(dmbinstr) |
| 123 | 128 | VDSO_AFLAGS += $(dmbinstr) |
| 124 | 129 | |
| 125 | −VDSO_LDFLAGS := $(VDSO_CPPFLAGS) | |
| 126 | 130 | # From arm vDSO Makefile |
| 127 | −VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 | |
| 128 | −VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 | |
| 129 | −VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft | |
| 130 | −VDSO_LDFLAGS += -Wl,--hash-style=sysv | |
| 131 | −VDSO_LDFLAGS += -Wl,--build-id=sha1 | |
| 132 | −VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd) | |
| 131 | +VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 | |
| 132 | +VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096 | |
| 133 | +VDSO_LDFLAGS += -nostdlib -shared --hash-style=sysv --build-id=sha1 | |
| 133 | 134 | |
| 134 | 135 | |
| 135 | 136 | # Borrow vdsomunge.c from the arm vDSO |
| @@ -189,8 +190,8 @@ quiet_cmd_vdsold_and_vdso_check = LD32 $@ · 53 unmodified lines | ||
| 189 | 190 | cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check) |
| 190 | 191 | |
| 191 | 192 | quiet_cmd_vdsold = LD32 $@ |
| 192 | − cmd_vdsold = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_LDFLAGS) \ | |
| 193 | − -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@ | |
| 193 | + cmd_vdsold = $(LD_COMPAT) $(VDSO_LDFLAGS) \ | |
| 194 | + -T $(filter %.lds,$^) $(filter %.o,$^) -o $@ | |
| 194 | 195 | quiet_cmd_vdsocc = CC32 $@ |
| 195 | 196 | cmd_vdsocc = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_CFLAGS) -c -o $@ $< |
| 196 | 197 | quiet_cmd_vdsocc_gettimeofday = CC32 $@ |
| @@ -278,7 +278,7 @@ SECTIONS · 277 unmodified lines | ||
| 278 | 278 | * explicitly check instead of blindly discarding. |
| 279 | 279 | */ |
| 280 | 280 | .plt : { |
| 281 | − *(.plt) *(.plt.*) *(.iplt) *(.igot) | |
| 281 | + *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt) | |
| 282 | 282 | } |
| 283 | 283 | ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!") |
| 284 | 284 | |
| @@ -808,6 +808,25 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) · 807 unmodified lines | ||
| 808 | 808 | |
| 809 | 809 | preempt_enable(); |
| 810 | 810 | |
| 811 | + /* | |
| 812 | + * The ARMv8 architecture doesn't give the hypervisor | |
| 813 | + * a mechanism to prevent a guest from dropping to AArch32 EL0 | |
| 814 | + * if implemented by the CPU. If we spot the guest in such | |
| 815 | + * state and that we decided it wasn't supposed to do so (like | |
| 816 | + * with the asymmetric AArch32 case), return to userspace with | |
| 817 | + * a fatal error. | |
| 818 | + */ | |
| 819 | + if (!system_supports_32bit_el0() && vcpu_mode_is_32bit(vcpu)) { | |
| 820 | + /* | |
| 821 | + * As we have caught the guest red-handed, decide that | |
| 822 | + * it isn't fit for purpose anymore by making the vcpu | |
| 823 | + * invalid. The VMM can try and fix it by issuing a | |
| 824 | + * KVM_ARM_VCPU_INIT if it really wants to. | |
| 825 | + */ | |
| 826 | + vcpu->arch.target = -1; | |
| 827 | + ret = ARM_EXCEPTION_IL; | |
| 828 | + } | |
| 829 | + | |
| 811 | 830 | ret = handle_exit(vcpu, ret); |
| 812 | 831 | } |
| 813 | 832 | |
| @@ -1719,7 +1738,8 @@ int kvm_arch_init(void *opaque) · 905 unmodified lines | ||
| 1719 | 1738 | return -ENODEV; |
| 1720 | 1739 | } |
| 1721 | 1740 | |
| 1722 | − if (cpus_have_final_cap(ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE)) | |
| 1741 | + if (cpus_have_final_cap(ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE) || | |
| 1742 | + cpus_have_final_cap(ARM64_WORKAROUND_1508412)) | |
| 1723 | 1743 | kvm_info("Guests without required CPU erratum workarounds can deadlock system!\n" \ |
| 1724 | 1744 | "Only trusted guests should be used on this system.\n"); |
| 1725 | 1745 | |
| @@ -140,9 +140,9 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) · 139 unmodified lines | ||
| 140 | 140 | * We do need to save/restore PAR_EL1 though, as we haven't |
| 141 | 141 | * saved the guest context yet, and we may return early... |
| 142 | 142 | */ |
| 143 | − par = read_sysreg(par_el1); | |
| 143 | + par = read_sysreg_par(); | |
| 144 | 144 | if (!__kvm_at("s1e1r", far)) |
| 145 | − tmp = read_sysreg(par_el1); | |
| 145 | + tmp = read_sysreg_par(); | |
| 146 | 146 | else |
| 147 | 147 | tmp = SYS_PAR_EL1_F; /* back to the guest */ |
| 148 | 148 | write_sysreg(par, par_el1); |
| @@ -421,7 +421,7 @@ static inline bool fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code) · 272 unmodified lines | ||
| 421 | 421 | if (cpus_have_final_cap(ARM64_WORKAROUND_CAVIUM_TX2_219_TVM) && |
| 422 | 422 | kvm_vcpu_trap_get_class(vcpu) == ESR_ELx_EC_SYS64 && |
| 423 | 423 | handle_tx2_tvm(vcpu)) |
| 424 | − return true; | |
| 424 | + goto guest; | |
| 425 | 425 | |
| 426 | 426 | /* |
| 427 | 427 | * We trap the first access to the FP/SIMD to save the host context |
| @@ -431,13 +431,13 @@ static inline bool fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code) · 3 unmodified lines | ||
| 431 | 431 | * Similarly for trapped SVE accesses. |
| 432 | 432 | */ |
| 433 | 433 | if (__hyp_handle_fpsimd(vcpu)) |
| 434 | − return true; | |
| 434 | + goto guest; | |
| 435 | 435 | |
| 436 | 436 | if (__hyp_handle_ptrauth(vcpu)) |
| 437 | − return true; | |
| 437 | + goto guest; | |
| 438 | 438 | |
| 439 | 439 | if (!__populate_fault_info(vcpu)) |
| 440 | − return true; | |
| 440 | + goto guest; | |
| 441 | 441 | |
| 442 | 442 | if (static_branch_unlikely(&vgic_v2_cpuif_trap)) { |
| 443 | 443 | bool valid; |
| @@ -452,7 +452,7 @@ static inline bool fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code) · 8 unmodified lines | ||
| 452 | 452 | int ret = __vgic_v2_perform_cpuif_access(vcpu); |
| 453 | 453 | |
| 454 | 454 | if (ret == 1) |
| 455 | − return true; | |
| 455 | + goto guest; | |
| 456 | 456 | |
| 457 | 457 | /* Promote an illegal access to an SError.*/ |
| 458 | 458 | if (ret == -1) |
| @@ -468,12 +468,17 @@ static inline bool fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code) · 9 unmodified lines | ||
| 468 | 468 | int ret = __vgic_v3_perform_cpuif_access(vcpu); |
| 469 | 469 | |
| 470 | 470 | if (ret == 1) |
| 471 | − return true; | |
| 471 | + goto guest; | |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | exit: |
| 475 | 475 | /* Return to the host kernel and handle the exit */ |
| 476 | 476 | return false; |
| 477 | + | |
| 478 | +guest: | |
| 479 | + /* Re-enter the guest */ | |
| 480 | + asm(ALTERNATIVE("nop", "dmb sy", ARM64_WORKAROUND_1508412)); | |
| 481 | + return true; | |
| 477 | 482 | } |
| 478 | 483 | |
| 479 | 484 | static inline void __kvm_unexpected_el2_exception(void) |
| @@ -43,7 +43,7 @@ static inline void __sysreg_save_el1_state(struct kvm_cpu_context *ctxt) · 42 unmodified lines | ||
| 43 | 43 | ctxt_sys_reg(ctxt, CONTEXTIDR_EL1) = read_sysreg_el1(SYS_CONTEXTIDR); |
| 44 | 44 | ctxt_sys_reg(ctxt, AMAIR_EL1) = read_sysreg_el1(SYS_AMAIR); |
| 45 | 45 | ctxt_sys_reg(ctxt, CNTKCTL_EL1) = read_sysreg_el1(SYS_CNTKCTL); |
| 46 | − ctxt_sys_reg(ctxt, PAR_EL1) = read_sysreg(par_el1); | |
| 46 | + ctxt_sys_reg(ctxt, PAR_EL1) = read_sysreg_par(); | |
| 47 | 47 | ctxt_sys_reg(ctxt, TPIDR_EL1) = read_sysreg(tpidr_el1); |
| 48 | 48 | |
| 49 | 49 | ctxt_sys_reg(ctxt, SP_EL1) = read_sysreg(sp_el1); |
| @@ -17,8 +17,6 @@ SYM_FUNC_START(__host_exit) · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | get_host_ctxt x0, x1 |
| 19 | 19 | |
| 20 | − ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN) | |
| 21 | − | |
| 22 | 20 | /* Store the host regs x2 and x3 */ |
| 23 | 21 | stp x2, x3, [x0, #CPU_XREG_OFFSET(2)] |
| 24 | 22 | |
| @@ -57,16 +57,25 @@ __do_hyp_init: · 56 unmodified lines | ||
| 57 | 57 | cmp x0, #HVC_STUB_HCALL_NR |
| 58 | 58 | b.lo __kvm_handle_stub_hvc |
| 59 | 59 | |
| 60 | − /* Set tpidr_el2 for use by HYP to free a register */ | |
| 61 | − msr tpidr_el2, x2 | |
| 62 | − | |
| 63 | − mov x2, #KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) | |
| 64 | − cmp x0, x2 | |
| 65 | − b.eq 1f | |
| 60 | + // We only actively check bits [24:31], and everything | |
| 61 | + // else has to be zero, which we check at build time. | |
| 62 | +#if (KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) & 0xFFFFFFFF00FFFFFF) | |
| 63 | +#error Unexpected __KVM_HOST_SMCCC_FUNC___kvm_hyp_init value | |
| 64 | +#endif | |
| 65 | + | |
| 66 | + ror x0, x0, #24 | |
| 67 | + eor x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 24) & 0xF) | |
| 68 | + ror x0, x0, #4 | |
| 69 | + eor x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 28) & 0xF) | |
| 70 | + cbz x0, 1f | |
| 66 | 71 | mov x0, #SMCCC_RET_NOT_SUPPORTED |
| 67 | 72 | eret |
| 68 | 73 | |
| 69 | −1: phys_to_ttbr x0, x1 | |
| 74 | +1: | |
| 75 | + /* Set tpidr_el2 for use by HYP to free a register */ | |
| 76 | + msr tpidr_el2, x2 | |
| 77 | + | |
| 78 | + phys_to_ttbr x0, x1 | |
| 70 | 79 | alternative_if ARM64_HAS_CNP |
| 71 | 80 | orr x0, x0, #TTBR_CNP_BIT |
| 72 | 81 | alternative_else_nop_endif |
| @@ -250,7 +250,7 @@ void __noreturn hyp_panic(void) · 249 unmodified lines | ||
| 250 | 250 | { |
| 251 | 251 | u64 spsr = read_sysreg_el2(SYS_SPSR); |
| 252 | 252 | u64 elr = read_sysreg_el2(SYS_ELR); |
| 253 | − u64 par = read_sysreg(par_el1); | |
| 253 | + u64 par = read_sysreg_par(); | |
| 254 | 254 | bool restore_host = true; |
| 255 | 255 | struct kvm_cpu_context *host_ctxt; |
| 256 | 256 | struct kvm_vcpu *vcpu; |
| @@ -128,7 +128,6 @@ void __kvm_tlb_flush_local_vmid(struct kvm_s2_mmu *mmu) · 127 unmodified lines | ||
| 128 | 128 | struct tlb_inv_context cxt; |
| 129 | 129 | |
| 130 | 130 | /* Switch to requested VMID */ |
| 131 | − mmu = kern_hyp_va(mmu); | |
| 132 | 131 | __tlb_switch_to_guest(mmu, &cxt); |
| 133 | 132 | |
| 134 | 133 | __tlbi(vmalle1); |
| @@ -635,7 +635,7 @@ static void stage2_flush_dcache(void *addr, u64 size) · 634 unmodified lines | ||
| 635 | 635 | |
| 636 | 636 | static bool stage2_pte_cacheable(kvm_pte_t pte) |
| 637 | 637 | { |
| 638 | − u64 memattr = FIELD_GET(KVM_PTE_LEAF_ATTR_LO_S2_MEMATTR, pte); | |
| 638 | + u64 memattr = pte & KVM_PTE_LEAF_ATTR_LO_S2_MEMATTR; | |
| 639 | 639 | return memattr == PAGE_S2_MEMATTR(NORMAL); |
| 640 | 640 | } |
| 641 | 641 | |
| @@ -846,7 +846,7 @@ int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm *kvm) · 204 unmodified lines | ||
| 846 | 846 | u32 start_level = VTCR_EL2_TGRAN_SL0_BASE - sl0; |
| 847 | 847 | |
| 848 | 848 | pgd_sz = kvm_pgd_pages(ia_bits, start_level) * PAGE_SIZE; |
| 849 | − pgt->pgd = alloc_pages_exact(pgd_sz, GFP_KERNEL | __GFP_ZERO); | |
| 849 | + pgt->pgd = alloc_pages_exact(pgd_sz, GFP_KERNEL_ACCOUNT | __GFP_ZERO); | |
| 850 | 850 | if (!pgt->pgd) |
| 851 | 851 | return -ENOMEM; |
| 852 | 852 | |
| @@ -215,7 +215,7 @@ void __noreturn hyp_panic(void) · 214 unmodified lines | ||
| 215 | 215 | { |
| 216 | 216 | u64 spsr = read_sysreg_el2(SYS_SPSR); |
| 217 | 217 | u64 elr = read_sysreg_el2(SYS_ELR); |
| 218 | − u64 par = read_sysreg(par_el1); | |
| 218 | + u64 par = read_sysreg_par(); | |
| 219 | 219 | |
| 220 | 220 | __hyp_call_panic(spsr, elr, par); |
| 221 | 221 | unreachable(); |
| @@ -31,7 +31,7 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu) · 30 unmodified lines | ||
| 31 | 31 | val = SMCCC_RET_SUCCESS; |
| 32 | 32 | break; |
| 33 | 33 | case SPECTRE_UNAFFECTED: |
| 34 | − val = SMCCC_RET_NOT_REQUIRED; | |
| 34 | + val = SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED; | |
| 35 | 35 | break; |
| 36 | 36 | } |
| 37 | 37 | break; |
| @@ -787,14 +787,26 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 786 unmodified lines | ||
| 787 | 787 | vma_shift = PAGE_SHIFT; |
| 788 | 788 | } |
| 789 | 789 | |
| 790 | − if (vma_shift == PUD_SHIFT && | |
| 791 | − !fault_supports_stage2_huge_mapping(memslot, hva, PUD_SIZE)) | |
| 792 | − vma_shift = PMD_SHIFT; | |
| 793 | − | |
| 794 | − if (vma_shift == PMD_SHIFT && | |
| 795 | − !fault_supports_stage2_huge_mapping(memslot, hva, PMD_SIZE)) { | |
| 796 | − force_pte = true; | |
| 790 | + switch (vma_shift) { | |
| 791 | + case PUD_SHIFT: | |
| 792 | + if (fault_supports_stage2_huge_mapping(memslot, hva, PUD_SIZE)) | |
| 793 | + break; | |
| 794 | + fallthrough; | |
| 795 | + case CONT_PMD_SHIFT: | |
| 796 | + vma_shift = PMD_SHIFT; | |
| 797 | + fallthrough; | |
| 798 | + case PMD_SHIFT: | |
| 799 | + if (fault_supports_stage2_huge_mapping(memslot, hva, PMD_SIZE)) | |
| 800 | + break; | |
| 801 | + fallthrough; | |
| 802 | + case CONT_PTE_SHIFT: | |
| 797 | 803 | vma_shift = PAGE_SHIFT; |
| 804 | + force_pte = true; | |
| 805 | + fallthrough; | |
| 806 | + case PAGE_SHIFT: | |
| 807 | + break; | |
| 808 | + default: | |
| 809 | + WARN_ONCE(1, "Unknown vma_shift %d", vma_shift); | |
| 798 | 810 | } |
| 799 | 811 | |
| 800 | 812 | vma_pagesize = 1UL << vma_shift; |
| @@ -839,6 +851,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, · 38 unmodified lines | ||
| 839 | 851 | |
| 840 | 852 | if (kvm_is_device_pfn(pfn)) { |
| 841 | 853 | device = true; |
| 854 | + force_pte = true; | |
| 842 | 855 | } else if (logging_active && !write_fault) { |
| 843 | 856 | /* |
| 844 | 857 | * Only actually map the page as writable if this was a write |
| @@ -95,7 +95,7 @@ static bool __vcpu_read_sys_reg_from_cpu(int reg, u64 *val) · 94 unmodified lines | ||
| 95 | 95 | case AMAIR_EL1: *val = read_sysreg_s(SYS_AMAIR_EL12); break; |
| 96 | 96 | case CNTKCTL_EL1: *val = read_sysreg_s(SYS_CNTKCTL_EL12); break; |
| 97 | 97 | case ELR_EL1: *val = read_sysreg_s(SYS_ELR_EL12); break; |
| 98 | − case PAR_EL1: *val = read_sysreg_s(SYS_PAR_EL1); break; | |
| 98 | + case PAR_EL1: *val = read_sysreg_par(); break; | |
| 99 | 99 | case DACR32_EL2: *val = read_sysreg_s(SYS_DACR32_EL2); break; |
| 100 | 100 | case IFSR32_EL2: *val = read_sysreg_s(SYS_IFSR32_EL2); break; |
| 101 | 101 | case DBGVCR32_EL2: *val = read_sysreg_s(SYS_DBGVCR32_EL2); break; |
| @@ -1897,9 +1897,9 @@ static const struct sys_reg_desc cp14_regs[] = { · 1795 unmodified lines | ||
| 1897 | 1897 | { Op1( 0), CRn( 0), CRm( 1), Op2( 0), trap_raz_wi }, |
| 1898 | 1898 | DBG_BCR_BVR_WCR_WVR(1), |
| 1899 | 1899 | /* DBGDCCINT */ |
| 1900 | − { Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32 }, | |
| 1900 | + { Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32, NULL, cp14_DBGDCCINT }, | |
| 1901 | 1901 | /* DBGDSCRext */ |
| 1902 | − { Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32 }, | |
| 1902 | + { Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32, NULL, cp14_DBGDSCRext }, | |
| 1903 | 1903 | DBG_BCR_BVR_WCR_WVR(2), |
| 1904 | 1904 | /* DBGDTR[RT]Xint */ |
| 1905 | 1905 | { Op1( 0), CRn( 0), CRm( 3), Op2( 0), trap_raz_wi }, |
| @@ -1914,7 +1914,7 @@ static const struct sys_reg_desc cp14_regs[] = { · 8 unmodified lines | ||
| 1914 | 1914 | { Op1( 0), CRn( 0), CRm( 6), Op2( 2), trap_raz_wi }, |
| 1915 | 1915 | DBG_BCR_BVR_WCR_WVR(6), |
| 1916 | 1916 | /* DBGVCR */ |
| 1917 | − { Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32 }, | |
| 1917 | + { Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32, NULL, cp14_DBGVCR }, | |
| 1918 | 1918 | DBG_BCR_BVR_WCR_WVR(7), |
| 1919 | 1919 | DBG_BCR_BVR_WCR_WVR(8), |
| 1920 | 1920 | DBG_BCR_BVR_WCR_WVR(9), |
| @@ -56,9 +56,8 @@ · 55 unmodified lines | ||
| 56 | 56 | stp \reg1, \reg2, [\ptr], \val |
| 57 | 57 | .endm |
| 58 | 58 | |
| 59 | − .weak memcpy | |
| 60 | 59 | SYM_FUNC_START_ALIAS(__memcpy) |
| 61 | −SYM_FUNC_START_PI(memcpy) | |
| 60 | +SYM_FUNC_START_WEAK_PI(memcpy) | |
| 62 | 61 | #include "copy_template.S" |
| 63 | 62 | ret |
| 64 | 63 | SYM_FUNC_END_PI(memcpy) |
| @@ -45,9 +45,8 @@ C_h .req x12 · 44 unmodified lines | ||
| 45 | 45 | D_l .req x13 |
| 46 | 46 | D_h .req x14 |
| 47 | 47 | |
| 48 | − .weak memmove | |
| 49 | 48 | SYM_FUNC_START_ALIAS(__memmove) |
| 50 | −SYM_FUNC_START_PI(memmove) | |
| 49 | +SYM_FUNC_START_WEAK_PI(memmove) | |
| 51 | 50 | cmp dstin, src |
| 52 | 51 | b.lo __memcpy |
| 53 | 52 | add tmp1, src, count |
| @@ -42,9 +42,8 @@ dst .req x8 · 41 unmodified lines | ||
| 42 | 42 | tmp3w .req w9 |
| 43 | 43 | tmp3 .req x9 |
| 44 | 44 | |
| 45 | − .weak memset | |
| 46 | 45 | SYM_FUNC_START_ALIAS(__memset) |
| 47 | −SYM_FUNC_START_PI(memset) | |
| 46 | +SYM_FUNC_START_WEAK_PI(memset) | |
| 48 | 47 | mov dst, dstin /* Preserve return value. */ |
| 49 | 48 | and A_lw, val, #255 |
| 50 | 49 | orr A_lw, A_lw, A_lw, lsl #8 |
| @@ -262,7 +262,7 @@ static bool __kprobes is_spurious_el1_translation_fault(unsigned long addr, · 261 unmodified lines | ||
| 262 | 262 | local_irq_save(flags); |
| 263 | 263 | asm volatile("at s1e1r, %0" :: "r" (addr)); |
| 264 | 264 | isb(); |
| 265 | − par = read_sysreg(par_el1); | |
| 265 | + par = read_sysreg_par(); | |
| 266 | 266 | local_irq_restore(flags); |
| 267 | 267 | |
| 268 | 268 | /* |
| @@ -93,9 +93,10 @@ CONFIG_CLEANCACHE=y · 92 unmodified lines | ||
| 93 | 93 | CONFIG_FRONTSWAP=y |
| 94 | 94 | CONFIG_CMA_DEBUG=y |
| 95 | 95 | CONFIG_CMA_DEBUGFS=y |
| 96 | +CONFIG_CMA_AREAS=7 | |
| 96 | 97 | CONFIG_MEM_SOFT_DIRTY=y |
| 97 | 98 | CONFIG_ZSWAP=y |
| 98 | −CONFIG_ZSMALLOC=m | |
| 99 | +CONFIG_ZSMALLOC=y | |
| 99 | 100 | CONFIG_ZSMALLOC_STAT=y |
| 100 | 101 | CONFIG_DEFERRED_STRUCT_PAGE_INIT=y |
| 101 | 102 | CONFIG_IDLE_PAGE_TRACKING=y |
| @@ -378,7 +379,6 @@ CONFIG_NETLINK_DIAG=m · 276 unmodified lines | ||
| 378 | 379 | CONFIG_CGROUP_NET_PRIO=y |
| 379 | 380 | CONFIG_BPF_JIT=y |
| 380 | 381 | CONFIG_NET_PKTGEN=m |
| 381 | −# CONFIG_NET_DROP_MONITOR is not set | |
| 382 | 382 | CONFIG_PCI=y |
| 383 | 383 | # CONFIG_PCIEASPM is not set |
| 384 | 384 | CONFIG_PCI_DEBUG=y |
| @@ -386,7 +386,7 @@ CONFIG_HOTPLUG_PCI=y · 1 unmodified line | ||
| 386 | 386 | CONFIG_HOTPLUG_PCI_S390=y |
| 387 | 387 | CONFIG_DEVTMPFS=y |
| 388 | 388 | CONFIG_CONNECTOR=y |
| 389 | −CONFIG_ZRAM=m | |
| 389 | +CONFIG_ZRAM=y | |
| 390 | 390 | CONFIG_BLK_DEV_LOOP=m |
| 391 | 391 | CONFIG_BLK_DEV_CRYPTOLOOP=m |
| 392 | 392 | CONFIG_BLK_DEV_DRBD=m |
| @@ -689,6 +689,7 @@ CONFIG_CRYPTO_TEST=m · 296 unmodified lines | ||
| 689 | 689 | CONFIG_CRYPTO_DH=m |
| 690 | 690 | CONFIG_CRYPTO_ECDH=m |
| 691 | 691 | CONFIG_CRYPTO_ECRDSA=m |
| 692 | +CONFIG_CRYPTO_SM2=m | |
| 692 | 693 | CONFIG_CRYPTO_CURVE25519=m |
| 693 | 694 | CONFIG_CRYPTO_GCM=y |
| 694 | 695 | CONFIG_CRYPTO_CHACHA20POLY1305=m |
| @@ -709,7 +710,6 @@ CONFIG_CRYPTO_RMD160=m · 14 unmodified lines | ||
| 709 | 710 | CONFIG_CRYPTO_RMD256=m |
| 710 | 711 | CONFIG_CRYPTO_RMD320=m |
| 711 | 712 | CONFIG_CRYPTO_SHA3=m |
| 712 | −CONFIG_CRYPTO_SM3=m | |
| 713 | 713 | CONFIG_CRYPTO_TGR192=m |
| 714 | 714 | CONFIG_CRYPTO_WP512=m |
| 715 | 715 | CONFIG_CRYPTO_AES_TI=m |
| @@ -753,6 +753,7 @@ CONFIG_CRYPTO_DES_S390=m · 37 unmodified lines | ||
| 753 | 753 | CONFIG_CRYPTO_AES_S390=m |
| 754 | 754 | CONFIG_CRYPTO_GHASH_S390=m |
| 755 | 755 | CONFIG_CRYPTO_CRC32_S390=y |
| 756 | +CONFIG_CRYPTO_DEV_VIRTIO=m | |
| 756 | 757 | CONFIG_CORDIC=m |
| 757 | 758 | CONFIG_CRC32_SELFTEST=y |
| 758 | 759 | CONFIG_CRC4=m |
| @@ -829,6 +830,7 @@ CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=m · 70 unmodified lines | ||
| 829 | 830 | CONFIG_FAULT_INJECTION=y |
| 830 | 831 | CONFIG_FAILSLAB=y |
| 831 | 832 | CONFIG_FAIL_PAGE_ALLOC=y |
| 833 | +CONFIG_FAULT_INJECTION_USERCOPY=y | |
| 832 | 834 | CONFIG_FAIL_MAKE_REQUEST=y |
| 833 | 835 | CONFIG_FAIL_IO_TIMEOUT=y |
| 834 | 836 | CONFIG_FAIL_FUTEX=y |
| @@ -87,9 +87,10 @@ CONFIG_KSM=y · 86 unmodified lines | ||
| 87 | 87 | CONFIG_TRANSPARENT_HUGEPAGE=y |
| 88 | 88 | CONFIG_CLEANCACHE=y |
| 89 | 89 | CONFIG_FRONTSWAP=y |
| 90 | +CONFIG_CMA_AREAS=7 | |
| 90 | 91 | CONFIG_MEM_SOFT_DIRTY=y |
| 91 | 92 | CONFIG_ZSWAP=y |
| 92 | −CONFIG_ZSMALLOC=m | |
| 93 | +CONFIG_ZSMALLOC=y | |
| 93 | 94 | CONFIG_ZSMALLOC_STAT=y |
| 94 | 95 | CONFIG_DEFERRED_STRUCT_PAGE_INIT=y |
| 95 | 96 | CONFIG_IDLE_PAGE_TRACKING=y |
| @@ -371,7 +372,6 @@ CONFIG_NETLINK_DIAG=m · 275 unmodified lines | ||
| 371 | 372 | CONFIG_CGROUP_NET_PRIO=y |
| 372 | 373 | CONFIG_BPF_JIT=y |
| 373 | 374 | CONFIG_NET_PKTGEN=m |
| 374 | −# CONFIG_NET_DROP_MONITOR is not set | |
| 375 | 375 | CONFIG_PCI=y |
| 376 | 376 | # CONFIG_PCIEASPM is not set |
| 377 | 377 | CONFIG_HOTPLUG_PCI=y |
| @@ -379,7 +379,7 @@ CONFIG_HOTPLUG_PCI_S390=y · 1 unmodified line | ||
| 379 | 379 | CONFIG_UEVENT_HELPER=y |
| 380 | 380 | CONFIG_DEVTMPFS=y |
| 381 | 381 | CONFIG_CONNECTOR=y |
| 382 | −CONFIG_ZRAM=m | |
| 382 | +CONFIG_ZRAM=y | |
| 383 | 383 | CONFIG_BLK_DEV_LOOP=m |
| 384 | 384 | CONFIG_BLK_DEV_CRYPTOLOOP=m |
| 385 | 385 | CONFIG_BLK_DEV_DRBD=m |
| @@ -680,6 +680,7 @@ CONFIG_CRYPTO_TEST=m · 294 unmodified lines | ||
| 680 | 680 | CONFIG_CRYPTO_DH=m |
| 681 | 681 | CONFIG_CRYPTO_ECDH=m |
| 682 | 682 | CONFIG_CRYPTO_ECRDSA=m |
| 683 | +CONFIG_CRYPTO_SM2=m | |
| 683 | 684 | CONFIG_CRYPTO_CURVE25519=m |
| 684 | 685 | CONFIG_CRYPTO_GCM=y |
| 685 | 686 | CONFIG_CRYPTO_CHACHA20POLY1305=m |
| @@ -701,7 +702,6 @@ CONFIG_CRYPTO_RMD160=m · 15 unmodified lines | ||
| 701 | 702 | CONFIG_CRYPTO_RMD256=m |
| 702 | 703 | CONFIG_CRYPTO_RMD320=m |
| 703 | 704 | CONFIG_CRYPTO_SHA3=m |
| 704 | −CONFIG_CRYPTO_SM3=m | |
| 705 | 705 | CONFIG_CRYPTO_TGR192=m |
| 706 | 706 | CONFIG_CRYPTO_WP512=m |
| 707 | 707 | CONFIG_CRYPTO_AES_TI=m |
| @@ -745,6 +745,7 @@ CONFIG_CRYPTO_DES_S390=m · 37 unmodified lines | ||
| 745 | 745 | CONFIG_CRYPTO_AES_S390=m |
| 746 | 746 | CONFIG_CRYPTO_GHASH_S390=m |
| 747 | 747 | CONFIG_CRYPTO_CRC32_S390=y |
| 748 | +CONFIG_CRYPTO_DEV_VIRTIO=m | |
| 748 | 749 | CONFIG_CORDIC=m |
| 749 | 750 | CONFIG_PRIME_NUMBERS=m |
| 750 | 751 | CONFIG_CRC4=m |
| @@ -17,11 +17,11 @@ CONFIG_HZ_100=y · 16 unmodified lines | ||
| 17 | 17 | # CONFIG_CHSC_SCH is not set |
| 18 | 18 | # CONFIG_SCM_BUS is not set |
| 19 | 19 | CONFIG_CRASH_DUMP=y |
| 20 | −# CONFIG_SECCOMP is not set | |
| 21 | 20 | # CONFIG_PFAULT is not set |
| 22 | 21 | # CONFIG_S390_HYPFS_FS is not set |
| 23 | 22 | # CONFIG_VIRTUALIZATION is not set |
| 24 | 23 | # CONFIG_S390_GUEST is not set |
| 24 | +# CONFIG_SECCOMP is not set | |
| 25 | 25 | CONFIG_PARTITION_ADVANCED=y |
| 26 | 26 | CONFIG_IBM_PARTITION=y |
| 27 | 27 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| @@ -692,16 +692,6 @@ static inline int pud_large(pud_t pud) · 691 unmodified lines | ||
| 692 | 692 | return !!(pud_val(pud) & _REGION3_ENTRY_LARGE); |
| 693 | 693 | } |
| 694 | 694 | |
| 695 | −static inline unsigned long pud_pfn(pud_t pud) | |
| 696 | −{ | |
| 697 | − unsigned long origin_mask; | |
| 698 | − | |
| 699 | − origin_mask = _REGION_ENTRY_ORIGIN; | |
| 700 | − if (pud_large(pud)) | |
| 701 | − origin_mask = _REGION3_ENTRY_ORIGIN_LARGE; | |
| 702 | − return (pud_val(pud) & origin_mask) >> PAGE_SHIFT; | |
| 703 | −} | |
| 704 | − | |
| 705 | 695 | #define pmd_leaf pmd_large |
| 706 | 696 | static inline int pmd_large(pmd_t pmd) |
| 707 | 697 | { |
| @@ -747,16 +737,6 @@ static inline int pmd_none(pmd_t pmd) · 39 unmodified lines | ||
| 747 | 737 | return pmd_val(pmd) == _SEGMENT_ENTRY_EMPTY; |
| 748 | 738 | } |
| 749 | 739 | |
| 750 | −static inline unsigned long pmd_pfn(pmd_t pmd) | |
| 751 | −{ | |
| 752 | − unsigned long origin_mask; | |
| 753 | − | |
| 754 | − origin_mask = _SEGMENT_ENTRY_ORIGIN; | |
| 755 | − if (pmd_large(pmd)) | |
| 756 | − origin_mask = _SEGMENT_ENTRY_ORIGIN_LARGE; | |
| 757 | − return (pmd_val(pmd) & origin_mask) >> PAGE_SHIFT; | |
| 758 | −} | |
| 759 | − | |
| 760 | 740 | #define pmd_write pmd_write |
| 761 | 741 | static inline int pmd_write(pmd_t pmd) |
| 762 | 742 | { |
| @@ -1238,11 +1218,39 @@ static inline pte_t mk_pte(struct page *page, pgprot_t pgprot) · 475 unmodified lines | ||
| 1238 | 1218 | #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
| 1239 | 1219 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |
| 1240 | 1220 | |
| 1241 | −#define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) | |
| 1242 | −#define pud_deref(pud) (pud_val(pud) & _REGION_ENTRY_ORIGIN) | |
| 1243 | 1221 | #define p4d_deref(pud) (p4d_val(pud) & _REGION_ENTRY_ORIGIN) |
| 1244 | 1222 | #define pgd_deref(pgd) (pgd_val(pgd) & _REGION_ENTRY_ORIGIN) |
| 1245 | 1223 | |
| 1224 | +static inline unsigned long pmd_deref(pmd_t pmd) | |
| 1225 | +{ | |
| 1226 | + unsigned long origin_mask; | |
| 1227 | + | |
| 1228 | + origin_mask = _SEGMENT_ENTRY_ORIGIN; | |
| 1229 | + if (pmd_large(pmd)) | |
| 1230 | + origin_mask = _SEGMENT_ENTRY_ORIGIN_LARGE; | |
| 1231 | + return pmd_val(pmd) & origin_mask; | |
| 1232 | +} | |
| 1233 | + | |
| 1234 | +static inline unsigned long pmd_pfn(pmd_t pmd) | |
| 1235 | +{ | |
| 1236 | + return pmd_deref(pmd) >> PAGE_SHIFT; | |
| 1237 | +} | |
| 1238 | + | |
| 1239 | +static inline unsigned long pud_deref(pud_t pud) | |
| 1240 | +{ | |
| 1241 | + unsigned long origin_mask; | |
| 1242 | + | |
| 1243 | + origin_mask = _REGION_ENTRY_ORIGIN; | |
| 1244 | + if (pud_large(pud)) | |
| 1245 | + origin_mask = _REGION3_ENTRY_ORIGIN_LARGE; | |
| 1246 | + return pud_val(pud) & origin_mask; | |
| 1247 | +} | |
| 1248 | + | |
| 1249 | +static inline unsigned long pud_pfn(pud_t pud) | |
| 1250 | +{ | |
| 1251 | + return pud_deref(pud) >> PAGE_SHIFT; | |
| 1252 | +} | |
| 1253 | + | |
| 1246 | 1254 | /* |
| 1247 | 1255 | * The pgd_offset function *always* adds the index for the top-level |
| 1248 | 1256 | * region/segment table. This is done to get a sequence like the |
Empty file deleted.
| @@ -61,14 +61,6 @@ int main(void) · 60 unmodified lines | ||
| 61 | 61 | BLANK(); |
| 62 | 62 | OFFSET(__VDSO_GETCPU_VAL, vdso_per_cpu_data, getcpu_val); |
| 63 | 63 | BLANK(); |
| 64 | − /* constants used by the vdso */ | |
| 65 | − DEFINE(__CLOCK_REALTIME, CLOCK_REALTIME); | |
| 66 | − DEFINE(__CLOCK_MONOTONIC, CLOCK_MONOTONIC); | |
| 67 | − DEFINE(__CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE); | |
| 68 | − DEFINE(__CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_COARSE); | |
| 69 | − DEFINE(__CLOCK_THREAD_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID); | |
| 70 | − DEFINE(__CLOCK_COARSE_RES, LOW_RES_NSEC); | |
| 71 | − BLANK(); | |
| 72 | 64 | /* idle data offsets */ |
| 73 | 65 | OFFSET(__CLOCK_IDLE_ENTER, s390_idle_data, clock_idle_enter); |
| 74 | 66 | OFFSET(__CLOCK_IDLE_EXIT, s390_idle_data, clock_idle_exit); |
| @@ -855,13 +855,14 @@ void __init smp_detect_cpus(void) · 854 unmodified lines | ||
| 855 | 855 | |
| 856 | 856 | static void smp_init_secondary(void) |
| 857 | 857 | { |
| 858 | − int cpu = smp_processor_id(); | |
| 858 | + int cpu = raw_smp_processor_id(); | |
| 859 | 859 | |
| 860 | 860 | S390_lowcore.last_update_clock = get_tod_clock(); |
| 861 | 861 | restore_access_regs(S390_lowcore.access_regs_save_area); |
| 862 | 862 | set_cpu_flag(CIF_ASCE_PRIMARY); |
| 863 | 863 | set_cpu_flag(CIF_ASCE_SECONDARY); |
| 864 | 864 | cpu_init(); |
| 865 | + rcu_cpu_starting(cpu); | |
| 865 | 866 | preempt_disable(); |
| 866 | 867 | init_cpu_timer(); |
| 867 | 868 | vtime_init(); |
| @@ -101,6 +101,10 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) · 100 unmodified lines | ||
| 101 | 101 | if (ret) |
| 102 | 102 | break; |
| 103 | 103 | |
| 104 | + /* the PCI function will be scanned once function 0 appears */ | |
| 105 | + if (!zdev->zbus->bus) | |
| 106 | + break; | |
| 107 | + | |
| 104 | 108 | pdev = pci_scan_single_device(zdev->zbus->bus, zdev->devfn); |
| 105 | 109 | if (!pdev) |
| 106 | 110 | break; |
| @@ -164,6 +164,7 @@ void initialize_identity_maps(void *rmode) · 163 unmodified lines | ||
| 164 | 164 | add_identity_map(cmdline, cmdline + COMMAND_LINE_SIZE); |
| 165 | 165 | |
| 166 | 166 | /* Load the new page-table. */ |
| 167 | + sev_verify_cbit(top_level_pgt); | |
| 167 | 168 | write_cr3(top_level_pgt); |
| 168 | 169 | } |
| 169 | 170 | |
| @@ -68,6 +68,9 @@ SYM_FUNC_START(get_sev_encryption_bit) · 67 unmodified lines | ||
| 68 | 68 | SYM_FUNC_END(get_sev_encryption_bit) |
| 69 | 69 | |
| 70 | 70 | .code64 |
| 71 | + | |
| 72 | +#include "../../kernel/sev_verify_cbit.S" | |
| 73 | + | |
| 71 | 74 | SYM_FUNC_START(set_sev_encryption_mask) |
| 72 | 75 | #ifdef CONFIG_AMD_MEM_ENCRYPT |
| 73 | 76 | push %rbp |
| @@ -81,6 +84,19 @@ SYM_FUNC_START(set_sev_encryption_mask) · 7 unmodified lines | ||
| 81 | 84 | |
| 82 | 85 | bts %rax, sme_me_mask(%rip) /* Create the encryption mask */ |
| 83 | 86 | |
| 87 | + /* | |
| 88 | + * Read MSR_AMD64_SEV again and store it to sev_status. Can't do this in | |
| 89 | + * get_sev_encryption_bit() because this function is 32-bit code and | |
| 90 | + * shared between 64-bit and 32-bit boot path. | |
| 91 | + */ | |
| 92 | + movl $MSR_AMD64_SEV, %ecx /* Read the SEV MSR */ | |
| 93 | + rdmsr | |
| 94 | + | |
| 95 | + /* Store MSR value in sev_status */ | |
| 96 | + shlq $32, %rdx | |
| 97 | + orq %rdx, %rax | |
| 98 | + movq %rax, sev_status(%rip) | |
| 99 | + | |
| 84 | 100 | .Lno_sev_mask: |
| 85 | 101 | movq %rbp, %rsp /* Restore original stack pointer */ |
| 86 | 102 | |
| @@ -96,5 +112,7 @@ SYM_FUNC_END(set_sev_encryption_mask) · 9 unmodified lines | ||
| 96 | 112 | |
| 97 | 113 | #ifdef CONFIG_AMD_MEM_ENCRYPT |
| 98 | 114 | .balign 8 |
| 99 | −SYM_DATA(sme_me_mask, .quad 0) | |
| 115 | +SYM_DATA(sme_me_mask, .quad 0) | |
| 116 | +SYM_DATA(sev_status, .quad 0) | |
| 117 | +SYM_DATA(sev_check_data, .quad 0) | |
| 100 | 118 | #endif |
| @@ -159,4 +159,6 @@ void boot_page_fault(void); · 158 unmodified lines | ||
| 159 | 159 | void boot_stage1_vc(void); |
| 160 | 160 | void boot_stage2_vc(void); |
| 161 | 161 | |
| 162 | +unsigned long sev_verify_cbit(unsigned long cr3); | |
| 163 | + | |
| 162 | 164 | #endif /* BOOT_COMPRESSED_MISC_H */ |
| @@ -273,11 +273,15 @@ void __init hv_apic_init(void) · 272 unmodified lines | ||
| 273 | 273 | pr_info("Hyper-V: Using enlightened APIC (%s mode)", |
| 274 | 274 | x2apic_enabled() ? "x2apic" : "xapic"); |
| 275 | 275 | /* |
| 276 | − * With x2apic, architectural x2apic MSRs are equivalent to the | |
| 277 | − * respective synthetic MSRs, so there's no need to override | |
| 278 | − * the apic accessors. The only exception is | |
| 279 | − * hv_apic_eoi_write, because it benefits from lazy EOI when | |
| 280 | − * available, but it works for both xapic and x2apic modes. | |
| 276 | + * When in x2apic mode, don't use the Hyper-V specific APIC | |
| 277 | + * accessors since the field layout in the ICR register is | |
| 278 | + * different in x2apic mode. Furthermore, the architectural | |
| 279 | + * x2apic MSRs function just as well as the Hyper-V | |
| 280 | + * synthetic APIC MSRs, so there's no benefit in having | |
| 281 | + * separate Hyper-V accessors for x2apic mode. The only | |
| 282 | + * exception is hv_apic_eoi_write, because it benefits from | |
| 283 | + * lazy EOI when available, but the same accessor works for | |
| 284 | + * both xapic and x2apic because the field layout is the same. | |
| 281 | 285 | */ |
| 282 | 286 | apic_set_eoi_write(hv_apic_eoi_write); |
| 283 | 287 | if (!x2apic_enabled()) { |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | #define KVM_FEATURE_POLL_CONTROL 12 |
| 33 | 33 | #define KVM_FEATURE_PV_SCHED_YIELD 13 |
| 34 | 34 | #define KVM_FEATURE_ASYNC_PF_INT 14 |
| 35 | +#define KVM_FEATURE_MSI_EXT_DEST_ID 15 | |
| 35 | 36 | |
| 36 | 37 | #define KVM_HINTS_REALTIME 0 |
| 37 | 38 | |
| @@ -161,6 +161,21 @@ SYM_INNER_LABEL(secondary_startup_64_no_verify, SYM_L_GLOBAL) · 160 unmodified lines | ||
| 161 | 161 | |
| 162 | 162 | /* Setup early boot stage 4-/5-level pagetables. */ |
| 163 | 163 | addq phys_base(%rip), %rax |
| 164 | + | |
| 165 | + /* | |
| 166 | + * For SEV guests: Verify that the C-bit is correct. A malicious | |
| 167 | + * hypervisor could lie about the C-bit position to perform a ROP | |
| 168 | + * attack on the guest by writing to the unencrypted stack and wait for | |
| 169 | + * the next RET instruction. | |
| 170 | + * %rsi carries pointer to realmode data and is callee-clobbered. Save | |
| 171 | + * and restore it. | |
| 172 | + */ | |
| 173 | + pushq %rsi | |
| 174 | + movq %rax, %rdi | |
| 175 | + call sev_verify_cbit | |
| 176 | + popq %rsi | |
| 177 | + | |
| 178 | + /* Switch to new page-table */ | |
| 164 | 179 | movq %rax, %cr3 |
| 165 | 180 | |
| 166 | 181 | /* Ensure I am executing from virtual addresses */ |
| @@ -279,6 +294,7 @@ SYM_INNER_LABEL(secondary_startup_64_no_verify, SYM_L_GLOBAL) · 112 unmodified lines | ||
| 279 | 294 | SYM_CODE_END(secondary_startup_64) |
| 280 | 295 | |
| 281 | 296 | #include "verify_cpu.S" |
| 297 | +#include "sev_verify_cbit.S" | |
| 282 | 298 | |
| 283 | 299 | #ifdef CONFIG_HOTPLUG_CPU |
| 284 | 300 | /* |
| @@ -178,6 +178,32 @@ void __init do_vc_no_ghcb(struct pt_regs *regs, unsigned long exit_code) · 177 unmodified lines | ||
| 178 | 178 | goto fail; |
| 179 | 179 | regs->dx = val >> 32; |
| 180 | 180 | |
| 181 | + /* | |
| 182 | + * This is a VC handler and the #VC is only raised when SEV-ES is | |
| 183 | + * active, which means SEV must be active too. Do sanity checks on the | |
| 184 | + * CPUID results to make sure the hypervisor does not trick the kernel | |
| 185 | + * into the no-sev path. This could map sensitive data unencrypted and | |
| 186 | + * make it accessible to the hypervisor. | |
| 187 | + * | |
| 188 | + * In particular, check for: | |
| 189 | + * - Hypervisor CPUID bit | |
| 190 | + * - Availability of CPUID leaf 0x8000001f | |
| 191 | + * - SEV CPUID bit. | |
| 192 | + * | |
| 193 | + * The hypervisor might still report the wrong C-bit position, but this | |
| 194 | + * can't be checked here. | |
| 195 | + */ | |
| 196 | + | |
| 197 | + if ((fn == 1 && !(regs->cx & BIT(31)))) | |
| 198 | + /* Hypervisor bit */ | |
| 199 | + goto fail; | |
| 200 | + else if (fn == 0x80000000 && (regs->ax < 0x8000001f)) | |
| 201 | + /* SEV leaf check */ | |
| 202 | + goto fail; | |
| 203 | + else if ((fn == 0x8000001f && !(regs->ax & BIT(1)))) | |
| 204 | + /* SEV bit */ | |
| 205 | + goto fail; | |
| 206 | + | |
| 181 | 207 | /* Skip over the CPUID two-byte opcode */ |
| 182 | 208 | regs->ip += 2; |
| 183 | 209 | |
| @@ -374,8 +374,8 @@ fault: · 373 unmodified lines | ||
| 374 | 374 | return ES_EXCEPTION; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | −static bool vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt *ctxt, | |
| 378 | − unsigned long vaddr, phys_addr_t *paddr) | |
| 377 | +static enum es_result vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt *ctxt, | |
| 378 | + unsigned long vaddr, phys_addr_t *paddr) | |
| 379 | 379 | { |
| 380 | 380 | unsigned long va = (unsigned long)vaddr; |
| 381 | 381 | unsigned int level; |
| @@ -394,15 +394,19 @@ static bool vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt *ctxt, · 12 unmodified lines | ||
| 394 | 394 | if (user_mode(ctxt->regs)) |
| 395 | 395 | ctxt->fi.error_code |= X86_PF_USER; |
| 396 | 396 | |
| 397 | − return false; | |
| 397 | + return ES_EXCEPTION; | |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | + if (WARN_ON_ONCE(pte_val(*pte) & _PAGE_ENC)) | |
| 401 | + /* Emulated MMIO to/from encrypted memory not supported */ | |
| 402 | + return ES_UNSUPPORTED; | |
| 403 | + | |
| 400 | 404 | pa = (phys_addr_t)pte_pfn(*pte) << PAGE_SHIFT; |
| 401 | 405 | pa |= va & ~page_level_mask(level); |
| 402 | 406 | |
| 403 | 407 | *paddr = pa; |
| 404 | 408 | |
| 405 | − return true; | |
| 409 | + return ES_OK; | |
| 406 | 410 | } |
| 407 | 411 | |
| 408 | 412 | /* Include code shared with pre-decompression boot stage */ |
| @@ -731,6 +735,7 @@ static enum es_result vc_do_mmio(struct ghcb *ghcb, struct es_em_ctxt *ctxt, · 322 unmodified lines | ||
| 731 | 735 | { |
| 732 | 736 | u64 exit_code, exit_info_1, exit_info_2; |
| 733 | 737 | unsigned long ghcb_pa = __pa(ghcb); |
| 738 | + enum es_result res; | |
| 734 | 739 | phys_addr_t paddr; |
| 735 | 740 | void __user *ref; |
| 736 | 741 | |
| @@ -740,11 +745,12 @@ static enum es_result vc_do_mmio(struct ghcb *ghcb, struct es_em_ctxt *ctxt, · 3 unmodified lines | ||
| 740 | 745 | |
| 741 | 746 | exit_code = read ? SVM_VMGEXIT_MMIO_READ : SVM_VMGEXIT_MMIO_WRITE; |
| 742 | 747 | |
| 743 | − if (!vc_slow_virt_to_phys(ghcb, ctxt, (unsigned long)ref, &paddr)) { | |
| 744 | − if (!read) | |
| 748 | + res = vc_slow_virt_to_phys(ghcb, ctxt, (unsigned long)ref, &paddr); | |
| 749 | + if (res != ES_OK) { | |
| 750 | + if (res == ES_EXCEPTION && !read) | |
| 745 | 751 | ctxt->fi.error_code |= X86_PF_WRITE; |
| 746 | 752 | |
| 747 | − return ES_EXCEPTION; | |
| 753 | + return res; | |
| 748 | 754 | } |
| 749 | 755 | |
| 750 | 756 | exit_info_1 = paddr; |
| @@ -0,0 +1,89 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ | |
| 2 | +/* | |
| 3 | + * sev_verify_cbit.S - Code for verification of the C-bit position reported | |
| 4 | + * by the Hypervisor when running with SEV enabled. | |
| 5 | + * | |
| 6 | + * Copyright (c) 2020 Joerg Roedel (jroedel@suse.de) | |
| 7 | + * | |
| 8 | + * sev_verify_cbit() is called before switching to a new long-mode page-table | |
| 9 | + * at boot. | |
| 10 | + * | |
| 11 | + * Verify that the C-bit position is correct by writing a random value to | |
| 12 | + * an encrypted memory location while on the current page-table. Then it | |
| 13 | + * switches to the new page-table to verify the memory content is still the | |
| 14 | + * same. After that it switches back to the current page-table and when the | |
| 15 | + * check succeeded it returns. If the check failed the code invalidates the | |
| 16 | + * stack pointer and goes into a hlt loop. The stack-pointer is invalidated to | |
| 17 | + * make sure no interrupt or exception can get the CPU out of the hlt loop. | |
| 18 | + * | |
| 19 | + * New page-table pointer is expected in %rdi (first parameter) | |
| 20 | + * | |
| 21 | + */ | |
| 22 | +SYM_FUNC_START(sev_verify_cbit) | |
| 23 | +#ifdef CONFIG_AMD_MEM_ENCRYPT | |
| 24 | + /* First check if a C-bit was detected */ | |
| 25 | + movq sme_me_mask(%rip), %rsi | |
| 26 | + testq %rsi, %rsi | |
| 27 | + jz 3f | |
| 28 | + | |
| 29 | + /* sme_me_mask != 0 could mean SME or SEV - Check also for SEV */ | |
| 30 | + movq sev_status(%rip), %rsi | |
| 31 | + testq %rsi, %rsi | |
| 32 | + jz 3f | |
| 33 | + | |
| 34 | + /* Save CR4 in %rsi */ | |
| 35 | + movq %cr4, %rsi | |
| 36 | + | |
| 37 | + /* Disable Global Pages */ | |
| 38 | + movq %rsi, %rdx | |
| 39 | + andq $(~X86_CR4_PGE), %rdx | |
| 40 | + movq %rdx, %cr4 | |
| 41 | + | |
| 42 | + /* | |
| 43 | + * Verified that running under SEV - now get a random value using | |
| 44 | + * RDRAND. This instruction is mandatory when running as an SEV guest. | |
| 45 | + * | |
| 46 | + * Don't bail out of the loop if RDRAND returns errors. It is better to | |
| 47 | + * prevent forward progress than to work with a non-random value here. | |
| 48 | + */ | |
| 49 | +1: rdrand %rdx | |
| 50 | + jnc 1b | |
| 51 | + | |
| 52 | + /* Store value to memory and keep it in %rdx */ | |
| 53 | + movq %rdx, sev_check_data(%rip) | |
| 54 | + | |
| 55 | + /* Backup current %cr3 value to restore it later */ | |
| 56 | + movq %cr3, %rcx | |
| 57 | + | |
| 58 | + /* Switch to new %cr3 - This might unmap the stack */ | |
| 59 | + movq %rdi, %cr3 | |
| 60 | + | |
| 61 | + /* | |
| 62 | + * Compare value in %rdx with memory location. If C-bit is incorrect | |
| 63 | + * this would read the encrypted data and make the check fail. | |
| 64 | + */ | |
| 65 | + cmpq %rdx, sev_check_data(%rip) | |
| 66 | + | |
| 67 | + /* Restore old %cr3 */ | |
| 68 | + movq %rcx, %cr3 | |
| 69 | + | |
| 70 | + /* Restore previous CR4 */ | |
| 71 | + movq %rsi, %cr4 | |
| 72 | + | |
| 73 | + /* Check CMPQ result */ | |
| 74 | + je 3f | |
| 75 | + | |
| 76 | + /* | |
| 77 | + * The check failed, prevent any forward progress to prevent ROP | |
| 78 | + * attacks, invalidate the stack and go into a hlt loop. | |
| 79 | + */ | |
| 80 | + xorq %rsp, %rsp | |
| 81 | + subq $0x1000, %rsp | |
| 82 | +2: hlt | |
| 83 | + jmp 2b | |
| 84 | +3: | |
| 85 | +#endif | |
| 86 | + /* Return page-table pointer */ | |
| 87 | + movq %rdi, %rax | |
| 88 | + ret | |
| 89 | +SYM_FUNC_END(sev_verify_cbit) | |
| @@ -793,19 +793,6 @@ static __always_inline unsigned long debug_read_clear_dr6(void) · 792 unmodified lines | ||
| 793 | 793 | set_debugreg(DR6_RESERVED, 6); |
| 794 | 794 | dr6 ^= DR6_RESERVED; /* Flip to positive polarity */ |
| 795 | 795 | |
| 796 | − /* | |
| 797 | − * Clear the virtual DR6 value, ptrace routines will set bits here for | |
| 798 | − * things we want signals for. | |
| 799 | − */ | |
| 800 | − current->thread.virtual_dr6 = 0; | |
| 801 | − | |
| 802 | − /* | |
| 803 | − * The SDM says "The processor clears the BTF flag when it | |
| 804 | − * generates a debug exception." Clear TIF_BLOCKSTEP to keep | |
| 805 | − * TIF_BLOCKSTEP in sync with the hardware BTF flag. | |
| 806 | − */ | |
| 807 | − clear_thread_flag(TIF_BLOCKSTEP); | |
| 808 | − | |
| 809 | 796 | return dr6; |
| 810 | 797 | } |
| 811 | 798 | |
| @@ -873,6 +860,20 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs, · 61 unmodified lines | ||
| 873 | 860 | */ |
| 874 | 861 | WARN_ON_ONCE(user_mode(regs)); |
| 875 | 862 | |
| 863 | + if (test_thread_flag(TIF_BLOCKSTEP)) { | |
| 864 | + /* | |
| 865 | + * The SDM says "The processor clears the BTF flag when it | |
| 866 | + * generates a debug exception." but PTRACE_BLOCKSTEP requested | |
| 867 | + * it for userspace, but we just took a kernel #DB, so re-set | |
| 868 | + * BTF. | |
| 869 | + */ | |
| 870 | + unsigned long debugctl; | |
| 871 | + | |
| 872 | + rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl); | |
| 873 | + debugctl |= DEBUGCTLMSR_BTF; | |
| 874 | + wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl); | |
| 875 | + } | |
| 876 | + | |
| 876 | 877 | /* |
| 877 | 878 | * Catch SYSENTER with TF set and clear DR_STEP. If this hit a |
| 878 | 879 | * watchpoint at the same time then that will still be handled. |
| @@ -935,6 +936,22 @@ static __always_inline void exc_debug_user(struct pt_regs *regs, · 56 unmodified lines | ||
| 935 | 936 | irqentry_enter_from_user_mode(regs); |
| 936 | 937 | instrumentation_begin(); |
| 937 | 938 | |
| 939 | + /* | |
| 940 | + * Start the virtual/ptrace DR6 value with just the DR_STEP mask | |
| 941 | + * of the real DR6. ptrace_triggered() will set the DR_TRAPn bits. | |
| 942 | + * | |
| 943 | + * Userspace expects DR_STEP to be visible in ptrace_get_debugreg(6) | |
| 944 | + * even if it is not the result of PTRACE_SINGLESTEP. | |
| 945 | + */ | |
| 946 | + current->thread.virtual_dr6 = (dr6 & DR_STEP); | |
| 947 | + | |
| 948 | + /* | |
| 949 | + * The SDM says "The processor clears the BTF flag when it | |
| 950 | + * generates a debug exception." Clear TIF_BLOCKSTEP to keep | |
| 951 | + * TIF_BLOCKSTEP in sync with the hardware BTF flag. | |
| 952 | + */ | |
| 953 | + clear_thread_flag(TIF_BLOCKSTEP); | |
| 954 | + | |
| 938 | 955 | /* |
| 939 | 956 | * If dr6 has no reason to give us about the origin of this trap, |
| 940 | 957 | * then it's very likely the result of an icebp/int01 trap. |
| @@ -225,7 +225,7 @@ static gfn_t get_mmio_spte_gfn(u64 spte) · 224 unmodified lines | ||
| 225 | 225 | { |
| 226 | 226 | u64 gpa = spte & shadow_nonpresent_or_rsvd_lower_gfn_mask; |
| 227 | 227 | |
| 228 | − gpa |= (spte >> shadow_nonpresent_or_rsvd_mask_len) | |
| 228 | + gpa |= (spte >> SHADOW_NONPRESENT_OR_RSVD_MASK_LEN) | |
| 229 | 229 | & shadow_nonpresent_or_rsvd_mask; |
| 230 | 230 | |
| 231 | 231 | return gpa >> PAGE_SHIFT; |
| @@ -591,15 +591,15 @@ static u64 mmu_spte_get_lockless(u64 *sptep) · 359 unmodified lines | ||
| 591 | 591 | static u64 restore_acc_track_spte(u64 spte) |
| 592 | 592 | { |
| 593 | 593 | u64 new_spte = spte; |
| 594 | − u64 saved_bits = (spte >> shadow_acc_track_saved_bits_shift) | |
| 595 | − & shadow_acc_track_saved_bits_mask; | |
| 594 | + u64 saved_bits = (spte >> SHADOW_ACC_TRACK_SAVED_BITS_SHIFT) | |
| 595 | + & SHADOW_ACC_TRACK_SAVED_BITS_MASK; | |
| 596 | 596 | |
| 597 | 597 | WARN_ON_ONCE(spte_ad_enabled(spte)); |
| 598 | 598 | WARN_ON_ONCE(!is_access_track_spte(spte)); |
| 599 | 599 | |
| 600 | 600 | new_spte &= ~shadow_acc_track_mask; |
| 601 | − new_spte &= ~(shadow_acc_track_saved_bits_mask << | |
| 602 | − shadow_acc_track_saved_bits_shift); | |
| 601 | + new_spte &= ~(SHADOW_ACC_TRACK_SAVED_BITS_MASK << | |
| 602 | + SHADOW_ACC_TRACK_SAVED_BITS_SHIFT); | |
| 603 | 603 | new_spte |= saved_bits; |
| 604 | 604 | |
| 605 | 605 | return new_spte; |
| @@ -55,7 +55,7 @@ u64 make_mmio_spte(struct kvm_vcpu *vcpu, u64 gfn, unsigned int access) · 54 unmodified lines | ||
| 55 | 55 | mask |= shadow_mmio_value | access; |
| 56 | 56 | mask |= gpa | shadow_nonpresent_or_rsvd_mask; |
| 57 | 57 | mask |= (gpa & shadow_nonpresent_or_rsvd_mask) |
| 58 | − << shadow_nonpresent_or_rsvd_mask_len; | |
| 58 | + << SHADOW_NONPRESENT_OR_RSVD_MASK_LEN; | |
| 59 | 59 | |
| 60 | 60 | return mask; |
| 61 | 61 | } |
| @@ -231,12 +231,12 @@ u64 mark_spte_for_access_track(u64 spte) · 169 unmodified lines | ||
| 231 | 231 | !spte_can_locklessly_be_made_writable(spte), |
| 232 | 232 | "kvm: Writable SPTE is not locklessly dirty-trackable\n"); |
| 233 | 233 | |
| 234 | − WARN_ONCE(spte & (shadow_acc_track_saved_bits_mask << | |
| 235 | − shadow_acc_track_saved_bits_shift), | |
| 234 | + WARN_ONCE(spte & (SHADOW_ACC_TRACK_SAVED_BITS_MASK << | |
| 235 | + SHADOW_ACC_TRACK_SAVED_BITS_SHIFT), | |
| 236 | 236 | "kvm: Access Tracking saved bit locations are not zero\n"); |
| 237 | 237 | |
| 238 | − spte |= (spte & shadow_acc_track_saved_bits_mask) << | |
| 239 | − shadow_acc_track_saved_bits_shift; | |
| 238 | + spte |= (spte & SHADOW_ACC_TRACK_SAVED_BITS_MASK) << | |
| 239 | + SHADOW_ACC_TRACK_SAVED_BITS_SHIFT; | |
| 240 | 240 | spte &= ~shadow_acc_track_mask; |
| 241 | 241 | |
| 242 | 242 | return spte; |
| @@ -245,7 +245,7 @@ u64 mark_spte_for_access_track(u64 spte) · 2 unmodified lines | ||
| 245 | 245 | void kvm_mmu_set_mmio_spte_mask(u64 mmio_value, u64 access_mask) |
| 246 | 246 | { |
| 247 | 247 | BUG_ON((u64)(unsigned)access_mask != access_mask); |
| 248 | − WARN_ON(mmio_value & (shadow_nonpresent_or_rsvd_mask << shadow_nonpresent_or_rsvd_mask_len)); | |
| 248 | + WARN_ON(mmio_value & (shadow_nonpresent_or_rsvd_mask << SHADOW_NONPRESENT_OR_RSVD_MASK_LEN)); | |
| 249 | 249 | WARN_ON(mmio_value & shadow_nonpresent_or_rsvd_lower_gfn_mask); |
| 250 | 250 | shadow_mmio_value = mmio_value | SPTE_MMIO_MASK; |
| 251 | 251 | shadow_mmio_access_mask = access_mask; |
| @@ -306,9 +306,9 @@ void kvm_mmu_reset_all_pte_masks(void) · 54 unmodified lines | ||
| 306 | 306 | low_phys_bits = boot_cpu_data.x86_phys_bits; |
| 307 | 307 | if (boot_cpu_has_bug(X86_BUG_L1TF) && |
| 308 | 308 | !WARN_ON_ONCE(boot_cpu_data.x86_cache_bits >= |
| 309 | − 52 - shadow_nonpresent_or_rsvd_mask_len)) { | |
| 309 | + 52 - SHADOW_NONPRESENT_OR_RSVD_MASK_LEN)) { | |
| 310 | 310 | low_phys_bits = boot_cpu_data.x86_cache_bits |
| 311 | − - shadow_nonpresent_or_rsvd_mask_len; | |
| 311 | + - SHADOW_NONPRESENT_OR_RSVD_MASK_LEN; | |
| 312 | 312 | shadow_nonpresent_or_rsvd_mask = |
| 313 | 313 | rsvd_bits(low_phys_bits, boot_cpu_data.x86_cache_bits - 1); |
| 314 | 314 | } |
| @@ -104,20 +104,20 @@ extern u64 __read_mostly shadow_acc_track_mask; · 103 unmodified lines | ||
| 104 | 104 | */ |
| 105 | 105 | extern u64 __read_mostly shadow_nonpresent_or_rsvd_mask; |
| 106 | 106 | |
| 107 | +/* | |
| 108 | + * The number of high-order 1 bits to use in the mask above. | |
| 109 | + */ | |
| 110 | +#define SHADOW_NONPRESENT_OR_RSVD_MASK_LEN 5 | |
| 111 | + | |
| 107 | 112 | /* |
| 108 | 113 | * The mask/shift to use for saving the original R/X bits when marking the PTE |
| 109 | 114 | * as not-present for access tracking purposes. We do not save the W bit as the |
| 110 | 115 | * PTEs being access tracked also need to be dirty tracked, so the W bit will be |
| 111 | 116 | * restored only when a write is attempted to the page. |
| 112 | 117 | */ |
| 113 | −static const u64 shadow_acc_track_saved_bits_mask = PT64_EPT_READABLE_MASK | | |
| 114 | − PT64_EPT_EXECUTABLE_MASK; | |
| 115 | −static const u64 shadow_acc_track_saved_bits_shift = PT64_SECOND_AVAIL_BITS_SHIFT; | |
| 116 | − | |
| 117 | −/* | |
| 118 | − * The number of high-order 1 bits to use in the mask above. | |
| 119 | − */ | |
| 120 | −static const u64 shadow_nonpresent_or_rsvd_mask_len = 5; | |
| 118 | +#define SHADOW_ACC_TRACK_SAVED_BITS_MASK (PT64_EPT_READABLE_MASK | \ | |
| 119 | + PT64_EPT_EXECUTABLE_MASK) | |
| 120 | +#define SHADOW_ACC_TRACK_SAVED_BITS_SHIFT PT64_SECOND_AVAIL_BITS_SHIFT | |
| 121 | 121 | |
| 122 | 122 | /* |
| 123 | 123 | * In some cases, we need to preserve the GFN of a non-present or reserved |
| @@ -297,14 +297,13 @@ const struct evmcs_field vmcs_field_to_evmcs_1[] = { · 296 unmodified lines | ||
| 297 | 297 | }; |
| 298 | 298 | const unsigned int nr_evmcs_1_fields = ARRAY_SIZE(vmcs_field_to_evmcs_1); |
| 299 | 299 | |
| 300 | −void evmcs_sanitize_exec_ctrls(struct vmcs_config *vmcs_conf) | |
| 300 | +__init void evmcs_sanitize_exec_ctrls(struct vmcs_config *vmcs_conf) | |
| 301 | 301 | { |
| 302 | 302 | vmcs_conf->pin_based_exec_ctrl &= ~EVMCS1_UNSUPPORTED_PINCTRL; |
| 303 | 303 | vmcs_conf->cpu_based_2nd_exec_ctrl &= ~EVMCS1_UNSUPPORTED_2NDEXEC; |
| 304 | 304 | |
| 305 | 305 | vmcs_conf->vmexit_ctrl &= ~EVMCS1_UNSUPPORTED_VMEXIT_CTRL; |
| 306 | 306 | vmcs_conf->vmentry_ctrl &= ~EVMCS1_UNSUPPORTED_VMENTRY_CTRL; |
| 307 | − | |
| 308 | 307 | } |
| 309 | 308 | #endif |
| 310 | 309 | |
| @@ -185,7 +185,7 @@ static inline void evmcs_load(u64 phys_addr) · 184 unmodified lines | ||
| 185 | 185 | vp_ap->enlighten_vmentry = 1; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | −void evmcs_sanitize_exec_ctrls(struct vmcs_config *vmcs_conf); | |
| 188 | +__init void evmcs_sanitize_exec_ctrls(struct vmcs_config *vmcs_conf); | |
| 189 | 189 | #else /* !IS_ENABLED(CONFIG_HYPERV) */ |
| 190 | 190 | static inline void evmcs_write64(unsigned long field, u64 value) {} |
| 191 | 191 | static inline void evmcs_write32(unsigned long field, u32 value) {} |
| @@ -194,7 +194,6 @@ static inline u64 evmcs_read64(unsigned long field) { return 0; } · 2 unmodified lines | ||
| 194 | 194 | static inline u32 evmcs_read32(unsigned long field) { return 0; } |
| 195 | 195 | static inline u16 evmcs_read16(unsigned long field) { return 0; } |
| 196 | 196 | static inline void evmcs_load(u64 phys_addr) {} |
| 197 | −static inline void evmcs_sanitize_exec_ctrls(struct vmcs_config *vmcs_conf) {} | |
| 198 | 197 | static inline void evmcs_touch_msr_bitmap(void) {} |
| 199 | 198 | #endif /* IS_ENABLED(CONFIG_HYPERV) */ |
| 200 | 199 | |
| @@ -2560,8 +2560,10 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf, · 2559 unmodified lines | ||
| 2560 | 2560 | vmcs_conf->vmexit_ctrl = _vmexit_control; |
| 2561 | 2561 | vmcs_conf->vmentry_ctrl = _vmentry_control; |
| 2562 | 2562 | |
| 2563 | − if (static_branch_unlikely(&enable_evmcs)) | |
| 2563 | +#if IS_ENABLED(CONFIG_HYPERV) | |
| 2564 | + if (enlightened_vmcs) | |
| 2564 | 2565 | evmcs_sanitize_exec_ctrls(vmcs_conf); |
| 2566 | +#endif | |
| 2565 | 2567 | |
| 2566 | 2568 | return 0; |
| 2567 | 2569 | } |
| @@ -6834,7 +6836,6 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu) · 4266 unmodified lines | ||
| 6834 | 6836 | static int vmx_create_vcpu(struct kvm_vcpu *vcpu) |
| 6835 | 6837 | { |
| 6836 | 6838 | struct vcpu_vmx *vmx; |
| 6837 | − unsigned long *msr_bitmap; | |
| 6838 | 6839 | int i, cpu, err; |
| 6839 | 6840 | |
| 6840 | 6841 | BUILD_BUG_ON(offsetof(struct vcpu_vmx, vcpu) != 0); |
| @@ -6894,7 +6895,6 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu) · 53 unmodified lines | ||
| 6894 | 6895 | bitmap_fill(vmx->shadow_msr_intercept.read, MAX_POSSIBLE_PASSTHROUGH_MSRS); |
| 6895 | 6896 | bitmap_fill(vmx->shadow_msr_intercept.write, MAX_POSSIBLE_PASSTHROUGH_MSRS); |
| 6896 | 6897 | |
| 6897 | − msr_bitmap = vmx->vmcs01.msr_bitmap; | |
| 6898 | 6898 | vmx_disable_intercept_for_msr(vcpu, MSR_IA32_TSC, MSR_TYPE_R); |
| 6899 | 6899 | vmx_disable_intercept_for_msr(vcpu, MSR_FS_BASE, MSR_TYPE_RW); |
| 6900 | 6900 | vmx_disable_intercept_for_msr(vcpu, MSR_GS_BASE, MSR_TYPE_RW); |
| @@ -265,13 +265,13 @@ static int kvm_msr_ignored_check(struct kvm_vcpu *vcpu, u32 msr, · 264 unmodified lines | ||
| 265 | 265 | |
| 266 | 266 | if (ignore_msrs) { |
| 267 | 267 | if (report_ignored_msrs) |
| 268 | − vcpu_unimpl(vcpu, "ignored %s: 0x%x data 0x%llx\n", | |
| 269 | − op, msr, data); | |
| 268 | + kvm_pr_unimpl("ignored %s: 0x%x data 0x%llx\n", | |
| 269 | + op, msr, data); | |
| 270 | 270 | /* Mask the error */ |
| 271 | 271 | return 0; |
| 272 | 272 | } else { |
| 273 | − vcpu_debug_ratelimited(vcpu, "unhandled %s: 0x%x data 0x%llx\n", | |
| 274 | − op, msr, data); | |
| 273 | + kvm_debug_ratelimited("unhandled %s: 0x%x data 0x%llx\n", | |
| 274 | + op, msr, data); | |
| 275 | 275 | return -ENOENT; |
| 276 | 276 | } |
| 277 | 277 | } |
| @@ -39,6 +39,7 @@ · 38 unmodified lines | ||
| 39 | 39 | */ |
| 40 | 40 | u64 sme_me_mask __section(".data") = 0; |
| 41 | 41 | u64 sev_status __section(".data") = 0; |
| 42 | +u64 sev_check_data __section(".data") = 0; | |
| 42 | 43 | EXPORT_SYMBOL(sme_me_mask); |
| 43 | 44 | DEFINE_STATIC_KEY_FALSE(sev_enable_key); |
| 44 | 45 | EXPORT_SYMBOL_GPL(sev_enable_key); |
| @@ -89,8 +89,8 @@ static void __init free_highpages(void) · 88 unmodified lines | ||
| 89 | 89 | /* set highmem page free */ |
| 90 | 90 | for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE, |
| 91 | 91 | &range_start, &range_end, NULL) { |
| 92 | − unsigned long start = PHYS_PFN(range_start); | |
| 93 | − unsigned long end = PHYS_PFN(range_end); | |
| 92 | + unsigned long start = PFN_UP(range_start); | |
| 93 | + unsigned long end = PFN_DOWN(range_end); | |
| 94 | 94 | |
| 95 | 95 | /* Ignore complete lowmem entries */ |
| 96 | 96 | if (end <= max_low) |
| @@ -1044,6 +1044,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter) · 1043 unmodified lines | ||
| 1044 | 1044 | ssize_t size, left; |
| 1045 | 1045 | unsigned len, i; |
| 1046 | 1046 | size_t offset; |
| 1047 | + int ret = 0; | |
| 1047 | 1048 | |
| 1048 | 1049 | if (WARN_ON_ONCE(!max_append_sectors)) |
| 1049 | 1050 | return 0; |
| @@ -1066,15 +1067,17 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter) · 16 unmodified lines | ||
| 1066 | 1067 | |
| 1067 | 1068 | len = min_t(size_t, PAGE_SIZE - offset, left); |
| 1068 | 1069 | if (bio_add_hw_page(q, bio, page, len, offset, |
| 1069 | − max_append_sectors, &same_page) != len) | |
| 1070 | − return -EINVAL; | |
| 1070 | + max_append_sectors, &same_page) != len) { | |
| 1071 | + ret = -EINVAL; | |
| 1072 | + break; | |
| 1073 | + } | |
| 1071 | 1074 | if (same_page) |
| 1072 | 1075 | put_page(page); |
| 1073 | 1076 | offset = 0; |
| 1074 | 1077 | } |
| 1075 | 1078 | |
| 1076 | − iov_iter_advance(iter, size); | |
| 1077 | − return 0; | |
| 1079 | + iov_iter_advance(iter, size - left); | |
| 1080 | + return ret; | |
| 1078 | 1081 | } |
| 1079 | 1082 | |
| 1080 | 1083 | /** |
| @@ -657,13 +657,20 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, · 656 unmodified lines | ||
| 657 | 657 | goto fail; |
| 658 | 658 | } |
| 659 | 659 | |
| 660 | + if (radix_tree_preload(GFP_KERNEL)) { | |
| 661 | + blkg_free(new_blkg); | |
| 662 | + ret = -ENOMEM; | |
| 663 | + goto fail; | |
| 664 | + } | |
| 665 | + | |
| 660 | 666 | rcu_read_lock(); |
| 661 | 667 | spin_lock_irq(&q->queue_lock); |
| 662 | 668 | |
| 663 | 669 | blkg = blkg_lookup_check(pos, pol, q); |
| 664 | 670 | if (IS_ERR(blkg)) { |
| 665 | 671 | ret = PTR_ERR(blkg); |
| 666 | − goto fail_unlock; | |
| 672 | + blkg_free(new_blkg); | |
| 673 | + goto fail_preloaded; | |
| 667 | 674 | } |
| 668 | 675 | |
| 669 | 676 | if (blkg) { |
| @@ -672,10 +679,12 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol, · 2 unmodified lines | ||
| 672 | 679 | blkg = blkg_create(pos, q, new_blkg); |
| 673 | 680 | if (IS_ERR(blkg)) { |
| 674 | 681 | ret = PTR_ERR(blkg); |
| 675 | − goto fail_unlock; | |
| 682 | + goto fail_preloaded; | |
| 676 | 683 | } |
| 677 | 684 | } |
| 678 | 685 | |
| 686 | + radix_tree_preload_end(); | |
| 687 | + | |
| 679 | 688 | if (pos == blkcg) |
| 680 | 689 | goto success; |
| 681 | 690 | } |
| @@ -685,6 +694,8 @@ success: · 3 unmodified lines | ||
| 685 | 694 | ctx->body = input; |
| 686 | 695 | return 0; |
| 687 | 696 | |
| 697 | +fail_preloaded: | |
| 698 | + radix_tree_preload_end(); | |
| 688 | 699 | fail_unlock: |
| 689 | 700 | spin_unlock_irq(&q->queue_lock); |
| 690 | 701 | rcu_read_unlock(); |
| @@ -225,6 +225,7 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error) · 224 unmodified lines | ||
| 225 | 225 | /* release the tag's ownership to the req cloned from */ |
| 226 | 226 | spin_lock_irqsave(&fq->mq_flush_lock, flags); |
| 227 | 227 | |
| 228 | + WRITE_ONCE(flush_rq->state, MQ_RQ_IDLE); | |
| 228 | 229 | if (!refcount_dec_and_test(&flush_rq->ref)) { |
| 229 | 230 | fq->rq_status = error; |
| 230 | 231 | spin_unlock_irqrestore(&fq->mq_flush_lock, flags); |
| @@ -73,19 +73,6 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids); · 72 unmodified lines | ||
| 73 | 73 | |
| 74 | 74 | /* Please keep this list sorted alphabetically by vendor and model */ |
| 75 | 75 | static const struct dmi_system_id dmi_lid_quirks[] = { |
| 76 | − { | |
| 77 | − /* | |
| 78 | − * Acer Switch 10 SW5-012. _LID method messes with home and | |
| 79 | − * power button GPIO IRQ settings causing an interrupt storm on | |
| 80 | − * both GPIOs. This is unfixable without a DSDT override, so we | |
| 81 | − * have to disable the lid-switch functionality altogether :| | |
| 82 | − */ | |
| 83 | − .matches = { | |
| 84 | − DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | |
| 85 | − DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"), | |
| 86 | − }, | |
| 87 | − .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED, | |
| 88 | − }, | |
| 89 | 76 | { |
| 90 | 77 | /* GP-electronic T701, _LID method points to a floating GPIO */ |
| 91 | 78 | .matches = { |
| @@ -231,7 +231,8 @@ static void hot_remove_dock_devices(struct dock_station *ds) · 230 unmodified lines | ||
| 231 | 231 | * between them). |
| 232 | 232 | */ |
| 233 | 233 | list_for_each_entry_reverse(dd, &ds->dependent_devices, list) |
| 234 | − dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false); | |
| 234 | + dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, | |
| 235 | + DOCK_CALL_HANDLER); | |
| 235 | 236 | |
| 236 | 237 | list_for_each_entry_reverse(dd, &ds->dependent_devices, list) |
| 237 | 238 | acpi_bus_trim(dd->adev); |
| @@ -1564,7 +1564,7 @@ static ssize_t format1_show(struct device *dev, · 1563 unmodified lines | ||
| 1564 | 1564 | le16_to_cpu(nfit_dcr->dcr->code)); |
| 1565 | 1565 | break; |
| 1566 | 1566 | } |
| 1567 | − if (rc != ENXIO) | |
| 1567 | + if (rc != -ENXIO) | |
| 1568 | 1568 | break; |
| 1569 | 1569 | } |
| 1570 | 1570 | mutex_unlock(&acpi_desc->init_mutex); |
| @@ -2100,7 +2100,7 @@ static int nv_swncq_sdbfis(struct ata_port *ap) · 2099 unmodified lines | ||
| 2100 | 2100 | pp->dhfis_bits &= ~done_mask; |
| 2101 | 2101 | pp->dmafis_bits &= ~done_mask; |
| 2102 | 2102 | pp->sdbfis_bits |= done_mask; |
| 2103 | − ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask); | |
| 2103 | + ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask); | |
| 2104 | 2104 | |
| 2105 | 2105 | if (!ap->qc_active) { |
| 2106 | 2106 | DPRINTK("over\n"); |
| @@ -773,8 +773,7 @@ static void __device_link_del(struct kref *kref) · 772 unmodified lines | ||
| 773 | 773 | dev_dbg(link->consumer, "Dropping the link to %s\n", |
| 774 | 774 | dev_name(link->supplier)); |
| 775 | 775 | |
| 776 | − if (link->flags & DL_FLAG_PM_RUNTIME) | |
| 777 | − pm_runtime_drop_link(link->consumer); | |
| 776 | + pm_runtime_drop_link(link); | |
| 778 | 777 | |
| 779 | 778 | list_del_rcu(&link->s_node); |
| 780 | 779 | list_del_rcu(&link->c_node); |
| @@ -788,8 +787,7 @@ static void __device_link_del(struct kref *kref) · 7 unmodified lines | ||
| 788 | 787 | dev_info(link->consumer, "Dropping the link to %s\n", |
| 789 | 788 | dev_name(link->supplier)); |
| 790 | 789 | |
| 791 | − if (link->flags & DL_FLAG_PM_RUNTIME) | |
| 792 | − pm_runtime_drop_link(link->consumer); | |
| 790 | + pm_runtime_drop_link(link); | |
| 793 | 791 | |
| 794 | 792 | list_del(&link->s_node); |
| 795 | 793 | list_del(&link->c_node); |
| @@ -4264,6 +4262,7 @@ static inline bool fwnode_is_primary(struct fwnode_handle *fwnode) · 3468 unmodified lines | ||
| 4264 | 4262 | */ |
| 4265 | 4263 | void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode) |
| 4266 | 4264 | { |
| 4265 | + struct device *parent = dev->parent; | |
| 4267 | 4266 | struct fwnode_handle *fn = dev->fwnode; |
| 4268 | 4267 | |
| 4269 | 4268 | if (fwnode) { |
| @@ -4278,7 +4277,8 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode) · 8 unmodified lines | ||
| 4278 | 4277 | } else { |
| 4279 | 4278 | if (fwnode_is_primary(fn)) { |
| 4280 | 4279 | dev->fwnode = fn->secondary; |
| 4281 | − fn->secondary = NULL; | |
| 4280 | + if (!(parent && fn == parent->fwnode)) | |
| 4281 | + fn->secondary = ERR_PTR(-ENODEV); | |
| 4282 | 4282 | } else { |
| 4283 | 4283 | dev->fwnode = NULL; |
| 4284 | 4284 | } |
| @@ -1117,6 +1117,8 @@ static void __device_release_driver(struct device *dev, struct device *parent) · 1116 unmodified lines | ||
| 1117 | 1117 | |
| 1118 | 1118 | drv = dev->driver; |
| 1119 | 1119 | if (drv) { |
| 1120 | + pm_runtime_get_sync(dev); | |
| 1121 | + | |
| 1120 | 1122 | while (device_links_busy(dev)) { |
| 1121 | 1123 | __device_driver_unlock(dev, parent); |
| 1122 | 1124 | |
| @@ -1128,13 +1130,12 @@ static void __device_release_driver(struct device *dev, struct device *parent) · 5 unmodified lines | ||
| 1128 | 1130 | * have released the driver successfully while this one |
| 1129 | 1131 | * was waiting, so check for that. |
| 1130 | 1132 | */ |
| 1131 | − if (dev->driver != drv) | |
| 1133 | + if (dev->driver != drv) { | |
| 1134 | + pm_runtime_put(dev); | |
| 1132 | 1135 | return; |
| 1136 | + } | |
| 1133 | 1137 | } |
| 1134 | 1138 | |
| 1135 | − pm_runtime_get_sync(dev); | |
| 1136 | − pm_runtime_clean_up_links(dev); | |
| 1137 | − | |
| 1138 | 1139 | driver_sysfs_remove(dev); |
| 1139 | 1140 | |
| 1140 | 1141 | if (dev->bus) |
| @@ -1642,42 +1642,6 @@ void pm_runtime_remove(struct device *dev) · 1641 unmodified lines | ||
| 1642 | 1642 | pm_runtime_reinit(dev); |
| 1643 | 1643 | } |
| 1644 | 1644 | |
| 1645 | −/** | |
| 1646 | − * pm_runtime_clean_up_links - Prepare links to consumers for driver removal. | |
| 1647 | − * @dev: Device whose driver is going to be removed. | |
| 1648 | − * | |
| 1649 | − * Check links from this device to any consumers and if any of them have active | |
| 1650 | − * runtime PM references to the device, drop the usage counter of the device | |
| 1651 | − * (as many times as needed). | |
| 1652 | − * | |
| 1653 | − * Links with the DL_FLAG_MANAGED flag unset are ignored. | |
| 1654 | − * | |
| 1655 | − * Since the device is guaranteed to be runtime-active at the point this is | |
| 1656 | − * called, nothing else needs to be done here. | |
| 1657 | − * | |
| 1658 | − * Moreover, this is called after device_links_busy() has returned 'false', so | |
| 1659 | − * the status of each link is guaranteed to be DL_STATE_SUPPLIER_UNBIND and | |
| 1660 | − * therefore rpm_active can't be manipulated concurrently. | |
| 1661 | − */ | |
| 1662 | −void pm_runtime_clean_up_links(struct device *dev) | |
| 1663 | −{ | |
| 1664 | − struct device_link *link; | |
| 1665 | − int idx; | |
| 1666 | − | |
| 1667 | − idx = device_links_read_lock(); | |
| 1668 | − | |
| 1669 | − list_for_each_entry_rcu(link, &dev->links.consumers, s_node, | |
| 1670 | − device_links_read_lock_held()) { | |
| 1671 | − if (!(link->flags & DL_FLAG_MANAGED)) | |
| 1672 | − continue; | |
| 1673 | − | |
| 1674 | − while (refcount_dec_not_one(&link->rpm_active)) | |
| 1675 | − pm_runtime_put_noidle(dev); | |
| 1676 | − } | |
| 1677 | − | |
| 1678 | − device_links_read_unlock(idx); | |
| 1679 | −} | |
| 1680 | − | |
| 1681 | 1645 | /** |
| 1682 | 1646 | * pm_runtime_get_suppliers - Resume and reference-count supplier devices. |
| 1683 | 1647 | * @dev: Consumer device. |
| @@ -1729,7 +1693,7 @@ void pm_runtime_new_link(struct device *dev) · 45 unmodified lines | ||
| 1729 | 1693 | spin_unlock_irq(&dev->power.lock); |
| 1730 | 1694 | } |
| 1731 | 1695 | |
| 1732 | −void pm_runtime_drop_link(struct device *dev) | |
| 1696 | +static void pm_runtime_drop_link_count(struct device *dev) | |
| 1733 | 1697 | { |
| 1734 | 1698 | spin_lock_irq(&dev->power.lock); |
| 1735 | 1699 | WARN_ON(dev->power.links_count == 0); |
| @@ -1737,6 +1701,25 @@ void pm_runtime_drop_link(struct device *dev) · 1 unmodified line | ||
| 1737 | 1701 | spin_unlock_irq(&dev->power.lock); |
| 1738 | 1702 | } |
| 1739 | 1703 | |
| 1704 | +/** | |
| 1705 | + * pm_runtime_drop_link - Prepare for device link removal. | |
| 1706 | + * @link: Device link going away. | |
| 1707 | + * | |
| 1708 | + * Drop the link count of the consumer end of @link and decrement the supplier | |
| 1709 | + * device's runtime PM usage counter as many times as needed to drop all of the | |
| 1710 | + * PM runtime reference to it from the consumer. | |
| 1711 | + */ | |
| 1712 | +void pm_runtime_drop_link(struct device_link *link) | |
| 1713 | +{ | |
| 1714 | + if (!(link->flags & DL_FLAG_PM_RUNTIME)) | |
| 1715 | + return; | |
| 1716 | + | |
| 1717 | + pm_runtime_drop_link_count(link->consumer); | |
| 1718 | + | |
| 1719 | + while (refcount_dec_not_one(&link->rpm_active)) | |
| 1720 | + pm_runtime_put(link->supplier); | |
| 1721 | +} | |
| 1722 | + | |
| 1740 | 1723 | static bool pm_runtime_need_not_resume(struct device *dev) |
| 1741 | 1724 | { |
| 1742 | 1725 | return atomic_read(&dev->power.usage_count) <= 1 && |
| @@ -296,7 +296,7 @@ static void nbd_size_clear(struct nbd_device *nbd) · 295 unmodified lines | ||
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | −static void nbd_size_update(struct nbd_device *nbd) | |
| 299 | +static void nbd_size_update(struct nbd_device *nbd, bool start) | |
| 300 | 300 | { |
| 301 | 301 | struct nbd_config *config = nbd->config; |
| 302 | 302 | struct block_device *bdev = bdget_disk(nbd->disk, 0); |
| @@ -313,7 +313,8 @@ static void nbd_size_update(struct nbd_device *nbd) · 10 unmodified lines | ||
| 313 | 313 | if (bdev) { |
| 314 | 314 | if (bdev->bd_disk) { |
| 315 | 315 | bd_set_nr_sectors(bdev, nr_sectors); |
| 316 | − set_blocksize(bdev, config->blksize); | |
| 316 | + if (start) | |
| 317 | + set_blocksize(bdev, config->blksize); | |
| 317 | 318 | } else |
| 318 | 319 | set_bit(GD_NEED_PART_SCAN, &nbd->disk->state); |
| 319 | 320 | bdput(bdev); |
| @@ -328,7 +329,7 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize, · 8 unmodified lines | ||
| 328 | 329 | config->blksize = blocksize; |
| 329 | 330 | config->bytesize = blocksize * nr_blocks; |
| 330 | 331 | if (nbd->task_recv != NULL) |
| 331 | − nbd_size_update(nbd); | |
| 332 | + nbd_size_update(nbd, false); | |
| 332 | 333 | } |
| 333 | 334 | |
| 334 | 335 | static void nbd_complete_rq(struct request *req) |
| @@ -1308,7 +1309,7 @@ static int nbd_start_device(struct nbd_device *nbd) · 973 unmodified lines | ||
| 1308 | 1309 | args->index = i; |
| 1309 | 1310 | queue_work(nbd->recv_workq, &args->work); |
| 1310 | 1311 | } |
| 1311 | − nbd_size_update(nbd); | |
| 1312 | + nbd_size_update(nbd, true); | |
| 1312 | 1313 | return error; |
| 1313 | 1314 | } |
| 1314 | 1315 | |
| @@ -47,6 +47,8 @@ struct nullb_device { · 46 unmodified lines | ||
| 47 | 47 | unsigned int nr_zones_closed; |
| 48 | 48 | struct blk_zone *zones; |
| 49 | 49 | sector_t zone_size_sects; |
| 50 | + spinlock_t zone_dev_lock; | |
| 51 | + unsigned long *zone_locks; | |
| 50 | 52 | |
| 51 | 53 | unsigned long size; /* device size in MB */ |
| 52 | 54 | unsigned long completion_nsec; /* time in ns to complete a request */ |
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | #include <linux/vmalloc.h> |
| 3 | +#include <linux/bitmap.h> | |
| 3 | 4 | #include "null_blk.h" |
| 4 | 5 | |
| 5 | 6 | #define CREATE_TRACE_POINTS |
| @@ -45,6 +46,13 @@ int null_init_zoned_dev(struct nullb_device *dev, struct request_queue *q) · 39 unmodified lines | ||
| 45 | 46 | if (!dev->zones) |
| 46 | 47 | return -ENOMEM; |
| 47 | 48 | |
| 49 | + spin_lock_init(&dev->zone_dev_lock); | |
| 50 | + dev->zone_locks = bitmap_zalloc(dev->nr_zones, GFP_KERNEL); | |
| 51 | + if (!dev->zone_locks) { | |
| 52 | + kvfree(dev->zones); | |
| 53 | + return -ENOMEM; | |
| 54 | + } | |
| 55 | + | |
| 48 | 56 | if (dev->zone_nr_conv >= dev->nr_zones) { |
| 49 | 57 | dev->zone_nr_conv = dev->nr_zones - 1; |
| 50 | 58 | pr_info("changed the number of conventional zones to %u", |
| @@ -123,15 +131,26 @@ int null_register_zoned_dev(struct nullb *nullb) · 72 unmodified lines | ||
| 123 | 131 | |
| 124 | 132 | void null_free_zoned_dev(struct nullb_device *dev) |
| 125 | 133 | { |
| 134 | + bitmap_free(dev->zone_locks); | |
| 126 | 135 | kvfree(dev->zones); |
| 127 | 136 | } |
| 128 | 137 | |
| 138 | +static inline void null_lock_zone(struct nullb_device *dev, unsigned int zno) | |
| 139 | +{ | |
| 140 | + wait_on_bit_lock_io(dev->zone_locks, zno, TASK_UNINTERRUPTIBLE); | |
| 141 | +} | |
| 142 | + | |
| 143 | +static inline void null_unlock_zone(struct nullb_device *dev, unsigned int zno) | |
| 144 | +{ | |
| 145 | + clear_and_wake_up_bit(zno, dev->zone_locks); | |
| 146 | +} | |
| 147 | + | |
| 129 | 148 | int null_report_zones(struct gendisk *disk, sector_t sector, |
| 130 | 149 | unsigned int nr_zones, report_zones_cb cb, void *data) |
| 131 | 150 | { |
| 132 | 151 | struct nullb *nullb = disk->private_data; |
| 133 | 152 | struct nullb_device *dev = nullb->dev; |
| 134 | − unsigned int first_zone, i; | |
| 153 | + unsigned int first_zone, i, zno; | |
| 135 | 154 | struct blk_zone zone; |
| 136 | 155 | int error; |
| 137 | 156 | |
| @@ -142,15 +161,18 @@ int null_report_zones(struct gendisk *disk, sector_t sector, · 4 unmodified lines | ||
| 142 | 161 | nr_zones = min(nr_zones, dev->nr_zones - first_zone); |
| 143 | 162 | trace_nullb_report_zones(nullb, nr_zones); |
| 144 | 163 | |
| 145 | − for (i = 0; i < nr_zones; i++) { | |
| 164 | + zno = first_zone; | |
| 165 | + for (i = 0; i < nr_zones; i++, zno++) { | |
| 146 | 166 | /* |
| 147 | 167 | * Stacked DM target drivers will remap the zone information by |
| 148 | 168 | * modifying the zone information passed to the report callback. |
| 149 | 169 | * So use a local copy to avoid corruption of the device zone |
| 150 | 170 | * array. |
| 151 | 171 | */ |
| 152 | − memcpy(&zone, &dev->zones[first_zone + i], | |
| 153 | − sizeof(struct blk_zone)); | |
| 172 | + null_lock_zone(dev, zno); | |
| 173 | + memcpy(&zone, &dev->zones[zno], sizeof(struct blk_zone)); | |
| 174 | + null_unlock_zone(dev, zno); | |
| 175 | + | |
| 154 | 176 | error = cb(&zone, i, data); |
| 155 | 177 | if (error) |
| 156 | 178 | return error; |
| @@ -159,6 +181,10 @@ int null_report_zones(struct gendisk *disk, sector_t sector, · 2 unmodified lines | ||
| 159 | 181 | return nr_zones; |
| 160 | 182 | } |
| 161 | 183 | |
| 184 | +/* | |
| 185 | + * This is called in the case of memory backing from null_process_cmd() | |
| 186 | + * with the target zone already locked. | |
| 187 | + */ | |
| 162 | 188 | size_t null_zone_valid_read_len(struct nullb *nullb, |
| 163 | 189 | sector_t sector, unsigned int len) |
| 164 | 190 | { |
| @@ -295,22 +321,27 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector, · 130 unmodified lines | ||
| 295 | 321 | if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL) |
| 296 | 322 | return null_process_cmd(cmd, REQ_OP_WRITE, sector, nr_sectors); |
| 297 | 323 | |
| 324 | + null_lock_zone(dev, zno); | |
| 325 | + spin_lock(&dev->zone_dev_lock); | |
| 326 | + | |
| 298 | 327 | switch (zone->cond) { |
| 299 | 328 | case BLK_ZONE_COND_FULL: |
| 300 | 329 | /* Cannot write to a full zone */ |
| 301 | − return BLK_STS_IOERR; | |
| 330 | + ret = BLK_STS_IOERR; | |
| 331 | + goto unlock; | |
| 302 | 332 | case BLK_ZONE_COND_EMPTY: |
| 303 | 333 | case BLK_ZONE_COND_CLOSED: |
| 304 | 334 | ret = null_check_zone_resources(dev, zone); |
| 305 | 335 | if (ret != BLK_STS_OK) |
| 306 | − return ret; | |
| 336 | + goto unlock; | |
| 307 | 337 | break; |
| 308 | 338 | case BLK_ZONE_COND_IMP_OPEN: |
| 309 | 339 | case BLK_ZONE_COND_EXP_OPEN: |
| 310 | 340 | break; |
| 311 | 341 | default: |
| 312 | 342 | /* Invalid zone condition */ |
| 313 | − return BLK_STS_IOERR; | |
| 343 | + ret = BLK_STS_IOERR; | |
| 344 | + goto unlock; | |
| 314 | 345 | } |
| 315 | 346 | |
| 316 | 347 | /* |
| @@ -326,11 +357,14 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector, · 9 unmodified lines | ||
| 326 | 357 | else |
| 327 | 358 | cmd->rq->__sector = sector; |
| 328 | 359 | } else if (sector != zone->wp) { |
| 329 | − return BLK_STS_IOERR; | |
| 360 | + ret = BLK_STS_IOERR; | |
| 361 | + goto unlock; | |
| 330 | 362 | } |
| 331 | 363 | |
| 332 | − if (zone->wp + nr_sectors > zone->start + zone->capacity) | |
| 333 | − return BLK_STS_IOERR; | |
| 364 | + if (zone->wp + nr_sectors > zone->start + zone->capacity) { | |
| 365 | + ret = BLK_STS_IOERR; | |
| 366 | + goto unlock; | |
| 367 | + } | |
| 334 | 368 | |
| 335 | 369 | if (zone->cond == BLK_ZONE_COND_CLOSED) { |
| 336 | 370 | dev->nr_zones_closed--; |
| @@ -341,9 +375,11 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector, · 4 unmodified lines | ||
| 341 | 375 | if (zone->cond != BLK_ZONE_COND_EXP_OPEN) |
| 342 | 376 | zone->cond = BLK_ZONE_COND_IMP_OPEN; |
| 343 | 377 | |
| 378 | + spin_unlock(&dev->zone_dev_lock); | |
| 344 | 379 | ret = null_process_cmd(cmd, REQ_OP_WRITE, sector, nr_sectors); |
| 380 | + spin_lock(&dev->zone_dev_lock); | |
| 345 | 381 | if (ret != BLK_STS_OK) |
| 346 | − return ret; | |
| 382 | + goto unlock; | |
| 347 | 383 | |
| 348 | 384 | zone->wp += nr_sectors; |
| 349 | 385 | if (zone->wp == zone->start + zone->capacity) { |
| @@ -353,7 +389,13 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector, · 3 unmodified lines | ||
| 353 | 389 | dev->nr_zones_imp_open--; |
| 354 | 390 | zone->cond = BLK_ZONE_COND_FULL; |
| 355 | 391 | } |
| 356 | − return BLK_STS_OK; | |
| 392 | + ret = BLK_STS_OK; | |
| 393 | + | |
| 394 | +unlock: | |
| 395 | + spin_unlock(&dev->zone_dev_lock); | |
| 396 | + null_unlock_zone(dev, zno); | |
| 397 | + | |
| 398 | + return ret; | |
| 357 | 399 | } |
| 358 | 400 | |
| 359 | 401 | static blk_status_t null_open_zone(struct nullb_device *dev, struct blk_zone *zone) |
| @@ -464,16 +506,33 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op, · 104 unmodified lines | ||
| 464 | 506 | sector_t sector) |
| 465 | 507 | { |
| 466 | 508 | struct nullb_device *dev = cmd->nq->dev; |
| 467 | − unsigned int zone_no = null_zone_no(dev, sector); | |
| 468 | − struct blk_zone *zone = &dev->zones[zone_no]; | |
| 469 | − blk_status_t ret = BLK_STS_OK; | |
| 509 | + unsigned int zone_no; | |
| 510 | + struct blk_zone *zone; | |
| 511 | + blk_status_t ret; | |
| 470 | 512 | size_t i; |
| 471 | 513 | |
| 514 | + if (op == REQ_OP_ZONE_RESET_ALL) { | |
| 515 | + for (i = dev->zone_nr_conv; i < dev->nr_zones; i++) { | |
| 516 | + null_lock_zone(dev, i); | |
| 517 | + zone = &dev->zones[i]; | |
| 518 | + if (zone->cond != BLK_ZONE_COND_EMPTY) { | |
| 519 | + spin_lock(&dev->zone_dev_lock); | |
| 520 | + null_reset_zone(dev, zone); | |
| 521 | + spin_unlock(&dev->zone_dev_lock); | |
| 522 | + trace_nullb_zone_op(cmd, i, zone->cond); | |
| 523 | + } | |
| 524 | + null_unlock_zone(dev, i); | |
| 525 | + } | |
| 526 | + return BLK_STS_OK; | |
| 527 | + } | |
| 528 | + | |
| 529 | + zone_no = null_zone_no(dev, sector); | |
| 530 | + zone = &dev->zones[zone_no]; | |
| 531 | + | |
| 532 | + null_lock_zone(dev, zone_no); | |
| 533 | + spin_lock(&dev->zone_dev_lock); | |
| 534 | + | |
| 472 | 535 | switch (op) { |
| 473 | − case REQ_OP_ZONE_RESET_ALL: | |
| 474 | − for (i = dev->zone_nr_conv; i < dev->nr_zones; i++) | |
| 475 | − null_reset_zone(dev, &dev->zones[i]); | |
| 476 | − break; | |
| 477 | 536 | case REQ_OP_ZONE_RESET: |
| 478 | 537 | ret = null_reset_zone(dev, zone); |
| 479 | 538 | break; |
| @@ -487,30 +546,46 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op, · 7 unmodified lines | ||
| 487 | 546 | ret = null_finish_zone(dev, zone); |
| 488 | 547 | break; |
| 489 | 548 | default: |
| 490 | − return BLK_STS_NOTSUPP; | |
| 549 | + ret = BLK_STS_NOTSUPP; | |
| 550 | + break; | |
| 491 | 551 | } |
| 492 | 552 | |
| 553 | + spin_unlock(&dev->zone_dev_lock); | |
| 554 | + | |
| 493 | 555 | if (ret == BLK_STS_OK) |
| 494 | 556 | trace_nullb_zone_op(cmd, zone_no, zone->cond); |
| 495 | 557 | |
| 558 | + null_unlock_zone(dev, zone_no); | |
| 559 | + | |
| 496 | 560 | return ret; |
| 497 | 561 | } |
| 498 | 562 | |
| 499 | 563 | blk_status_t null_process_zoned_cmd(struct nullb_cmd *cmd, enum req_opf op, |
| 500 | 564 | sector_t sector, sector_t nr_sectors) |
| 501 | 565 | { |
| 566 | + struct nullb_device *dev = cmd->nq->dev; | |
| 567 | + unsigned int zno = null_zone_no(dev, sector); | |
| 568 | + blk_status_t sts; | |
| 569 | + | |
| 502 | 570 | switch (op) { |
| 503 | 571 | case REQ_OP_WRITE: |
| 504 | − return null_zone_write(cmd, sector, nr_sectors, false); | |
| 572 | + sts = null_zone_write(cmd, sector, nr_sectors, false); | |
| 573 | + break; | |
| 505 | 574 | case REQ_OP_ZONE_APPEND: |
| 506 | − return null_zone_write(cmd, sector, nr_sectors, true); | |
| 575 | + sts = null_zone_write(cmd, sector, nr_sectors, true); | |
| 576 | + break; | |
| 507 | 577 | case REQ_OP_ZONE_RESET: |
| 508 | 578 | case REQ_OP_ZONE_RESET_ALL: |
| 509 | 579 | case REQ_OP_ZONE_OPEN: |
| 510 | 580 | case REQ_OP_ZONE_CLOSE: |
| 511 | 581 | case REQ_OP_ZONE_FINISH: |
| 512 | − return null_zone_mgmt(cmd, op, sector); | |
| 582 | + sts = null_zone_mgmt(cmd, op, sector); | |
| 583 | + break; | |
| 513 | 584 | default: |
| 514 | − return null_process_cmd(cmd, op, sector, nr_sectors); | |
| 585 | + null_lock_zone(dev, zno); | |
| 586 | + sts = null_process_cmd(cmd, op, sector, nr_sectors); | |
| 587 | + null_unlock_zone(dev, zno); | |
| 515 | 588 | } |
| 589 | + | |
| 590 | + return sts; | |
| 516 | 591 | } |
| @@ -443,22 +443,27 @@ static void ace_fix_driveid(u16 *id) · 442 unmodified lines | ||
| 443 | 443 | #define ACE_FSM_NUM_STATES 11 |
| 444 | 444 | |
| 445 | 445 | /* Set flag to exit FSM loop and reschedule tasklet */ |
| 446 | −static inline void ace_fsm_yield(struct ace_device *ace) | |
| 446 | +static inline void ace_fsm_yieldpoll(struct ace_device *ace) | |
| 447 | 447 | { |
| 448 | − dev_dbg(ace->dev, "ace_fsm_yield()\n"); | |
| 449 | 448 | tasklet_schedule(&ace->fsm_tasklet); |
| 450 | 449 | ace->fsm_continue_flag = 0; |
| 451 | 450 | } |
| 452 | 451 | |
| 452 | +static inline void ace_fsm_yield(struct ace_device *ace) | |
| 453 | +{ | |
| 454 | + dev_dbg(ace->dev, "%s()\n", __func__); | |
| 455 | + ace_fsm_yieldpoll(ace); | |
| 456 | +} | |
| 457 | + | |
| 453 | 458 | /* Set flag to exit FSM loop and wait for IRQ to reschedule tasklet */ |
| 454 | 459 | static inline void ace_fsm_yieldirq(struct ace_device *ace) |
| 455 | 460 | { |
| 456 | 461 | dev_dbg(ace->dev, "ace_fsm_yieldirq()\n"); |
| 457 | 462 | |
| 458 | − if (!ace->irq) | |
| 459 | − /* No IRQ assigned, so need to poll */ | |
| 460 | − tasklet_schedule(&ace->fsm_tasklet); | |
| 461 | − ace->fsm_continue_flag = 0; | |
| 463 | + if (ace->irq > 0) | |
| 464 | + ace->fsm_continue_flag = 0; | |
| 465 | + else | |
| 466 | + ace_fsm_yieldpoll(ace); | |
| 462 | 467 | } |
| 463 | 468 | |
| 464 | 469 | static bool ace_has_next_request(struct request_queue *q) |
| @@ -1053,12 +1058,12 @@ static int ace_setup(struct ace_device *ace) · 588 unmodified lines | ||
| 1053 | 1058 | ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ); |
| 1054 | 1059 | |
| 1055 | 1060 | /* Now we can hook up the irq handler */ |
| 1056 | − if (ace->irq) { | |
| 1061 | + if (ace->irq > 0) { | |
| 1057 | 1062 | rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace); |
| 1058 | 1063 | if (rc) { |
| 1059 | 1064 | /* Failure - fall back to polled mode */ |
| 1060 | 1065 | dev_err(ace->dev, "request_irq failed\n"); |
| 1061 | − ace->irq = 0; | |
| 1066 | + ace->irq = rc; | |
| 1062 | 1067 | } |
| 1063 | 1068 | } |
| 1064 | 1069 | |
| @@ -1110,7 +1115,7 @@ static void ace_teardown(struct ace_device *ace) · 45 unmodified lines | ||
| 1110 | 1115 | |
| 1111 | 1116 | tasklet_kill(&ace->fsm_tasklet); |
| 1112 | 1117 | |
| 1113 | − if (ace->irq) | |
| 1118 | + if (ace->irq > 0) | |
| 1114 | 1119 | free_irq(ace->irq, ace); |
| 1115 | 1120 | |
| 1116 | 1121 | iounmap(ace->baseaddr); |
| @@ -1123,11 +1128,6 @@ static int ace_alloc(struct device *dev, int id, resource_size_t physaddr, · 6 unmodified lines | ||
| 1123 | 1128 | int rc; |
| 1124 | 1129 | dev_dbg(dev, "ace_alloc(%p)\n", dev); |
| 1125 | 1130 | |
| 1126 | − if (!physaddr) { | |
| 1127 | − rc = -ENODEV; | |
| 1128 | − goto err_noreg; | |
| 1129 | − } | |
| 1130 | − | |
| 1131 | 1131 | /* Allocate and initialize the ace device structure */ |
| 1132 | 1132 | ace = kzalloc(sizeof(struct ace_device), GFP_KERNEL); |
| 1133 | 1133 | if (!ace) { |
| @@ -1153,7 +1153,6 @@ err_setup: · 19 unmodified lines | ||
| 1153 | 1153 | dev_set_drvdata(dev, NULL); |
| 1154 | 1154 | kfree(ace); |
| 1155 | 1155 | err_alloc: |
| 1156 | −err_noreg: | |
| 1157 | 1156 | dev_err(dev, "could not initialize device, err=%i\n", rc); |
| 1158 | 1157 | return rc; |
| 1159 | 1158 | } |
| @@ -1176,10 +1175,11 @@ static void ace_free(struct device *dev) · 16 unmodified lines | ||
| 1176 | 1175 | |
| 1177 | 1176 | static int ace_probe(struct platform_device *dev) |
| 1178 | 1177 | { |
| 1179 | − resource_size_t physaddr = 0; | |
| 1180 | 1178 | int bus_width = ACE_BUS_WIDTH_16; /* FIXME: should not be hard coded */ |
| 1179 | + resource_size_t physaddr; | |
| 1180 | + struct resource *res; | |
| 1181 | 1181 | u32 id = dev->id; |
| 1182 | − int irq = 0; | |
| 1182 | + int irq; | |
| 1183 | 1183 | int i; |
| 1184 | 1184 | |
| 1185 | 1185 | dev_dbg(&dev->dev, "ace_probe(%p)\n", dev); |
| @@ -1190,12 +1190,15 @@ static int ace_probe(struct platform_device *dev) · 4 unmodified lines | ||
| 1190 | 1190 | if (of_find_property(dev->dev.of_node, "8-bit", NULL)) |
| 1191 | 1191 | bus_width = ACE_BUS_WIDTH_8; |
| 1192 | 1192 | |
| 1193 | − for (i = 0; i < dev->num_resources; i++) { | |
| 1194 | − if (dev->resource[i].flags & IORESOURCE_MEM) | |
| 1195 | − physaddr = dev->resource[i].start; | |
| 1196 | − if (dev->resource[i].flags & IORESOURCE_IRQ) | |
| 1197 | − irq = dev->resource[i].start; | |
| 1198 | − } | |
| 1193 | + res = platform_get_resource(dev, IORESOURCE_MEM, 0); | |
| 1194 | + if (!res) | |
| 1195 | + return -EINVAL; | |
| 1196 | + | |
| 1197 | + physaddr = res->start; | |
| 1198 | + if (!physaddr) | |
| 1199 | + return -ENODEV; | |
| 1200 | + | |
| 1201 | + irq = platform_get_irq_optional(dev, 0); | |
| 1199 | 1202 | |
| 1200 | 1203 | /* Call the bus-independent setup code */ |
| 1201 | 1204 | return ace_alloc(&dev->dev, id, physaddr, irq, bus_width); |
| @@ -47,7 +47,7 @@ enum { · 46 unmodified lines | ||
| 47 | 47 | struct intel_tlv { |
| 48 | 48 | u8 type; |
| 49 | 49 | u8 len; |
| 50 | − u8 val[0]; | |
| 50 | + u8 val[]; | |
| 51 | 51 | } __packed; |
| 52 | 52 | |
| 53 | 53 | struct intel_version_tlv { |
| @@ -41,6 +41,11 @@ int tpm_read_log_efi(struct tpm_chip *chip) · 40 unmodified lines | ||
| 41 | 41 | log_size = log_tbl->size; |
| 42 | 42 | memunmap(log_tbl); |
| 43 | 43 | |
| 44 | + if (!log_size) { | |
| 45 | + pr_warn("UEFI TPM log area empty\n"); | |
| 46 | + return -EIO; | |
| 47 | + } | |
| 48 | + | |
| 44 | 49 | log_tbl = memremap(efi.tpm_log, sizeof(*log_tbl) + log_size, |
| 45 | 50 | MEMREMAP_WB); |
| 46 | 51 | if (!log_tbl) { |
| @@ -27,6 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | #include <linux/of.h> |
| 28 | 28 | #include <linux/of_device.h> |
| 29 | 29 | #include <linux/kernel.h> |
| 30 | +#include <linux/dmi.h> | |
| 30 | 31 | #include "tpm.h" |
| 31 | 32 | #include "tpm_tis_core.h" |
| 32 | 33 | |
| @@ -49,8 +50,8 @@ static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *da · 16 unmodified lines | ||
| 49 | 50 | return container_of(data, struct tpm_tis_tcg_phy, priv); |
| 50 | 51 | } |
| 51 | 52 | |
| 52 | −static bool interrupts = true; | |
| 53 | −module_param(interrupts, bool, 0444); | |
| 53 | +static int interrupts = -1; | |
| 54 | +module_param(interrupts, int, 0444); | |
| 54 | 55 | MODULE_PARM_DESC(interrupts, "Enable interrupts"); |
| 55 | 56 | |
| 56 | 57 | static bool itpm; |
| @@ -63,6 +64,28 @@ module_param(force, bool, 0444); · 6 unmodified lines | ||
| 63 | 64 | MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry"); |
| 64 | 65 | #endif |
| 65 | 66 | |
| 67 | +static int tpm_tis_disable_irq(const struct dmi_system_id *d) | |
| 68 | +{ | |
| 69 | + if (interrupts == -1) { | |
| 70 | + pr_notice("tpm_tis: %s detected: disabling interrupts.\n", d->ident); | |
| 71 | + interrupts = 0; | |
| 72 | + } | |
| 73 | + | |
| 74 | + return 0; | |
| 75 | +} | |
| 76 | + | |
| 77 | +static const struct dmi_system_id tpm_tis_dmi_table[] = { | |
| 78 | + { | |
| 79 | + .callback = tpm_tis_disable_irq, | |
| 80 | + .ident = "ThinkPad T490s", | |
| 81 | + .matches = { | |
| 82 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | |
| 83 | + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"), | |
| 84 | + }, | |
| 85 | + }, | |
| 86 | + {} | |
| 87 | +}; | |
| 88 | + | |
| 66 | 89 | #if defined(CONFIG_PNP) && defined(CONFIG_ACPI) |
| 67 | 90 | static int has_hid(struct acpi_device *dev, const char *hid) |
| 68 | 91 | { |
| @@ -192,6 +215,8 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info) · 123 unmodified lines | ||
| 192 | 215 | int irq = -1; |
| 193 | 216 | int rc; |
| 194 | 217 | |
| 218 | + dmi_check_system(tpm_tis_dmi_table); | |
| 219 | + | |
| 195 | 220 | rc = check_acpi_tpm2(dev); |
| 196 | 221 | if (rc) |
| 197 | 222 | return rc; |
| @@ -71,6 +71,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE · 70 unmodified lines | ||
| 71 | 71 | |
| 72 | 72 | config CPU_FREQ_DEFAULT_GOV_ONDEMAND |
| 73 | 73 | bool "ondemand" |
| 74 | + depends on !(X86_INTEL_PSTATE && SMP) | |
| 74 | 75 | select CPU_FREQ_GOV_ONDEMAND |
| 75 | 76 | select CPU_FREQ_GOV_PERFORMANCE |
| 76 | 77 | help |
| @@ -83,6 +84,7 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND · 6 unmodified lines | ||
| 83 | 84 | |
| 84 | 85 | config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE |
| 85 | 86 | bool "conservative" |
| 87 | + depends on !(X86_INTEL_PSTATE && SMP) | |
| 86 | 88 | select CPU_FREQ_GOV_CONSERVATIVE |
| 87 | 89 | select CPU_FREQ_GOV_PERFORMANCE |
| 88 | 90 | help |
| @@ -1907,6 +1907,18 @@ void cpufreq_resume(void) · 1906 unmodified lines | ||
| 1907 | 1907 | } |
| 1908 | 1908 | } |
| 1909 | 1909 | |
| 1910 | +/** | |
| 1911 | + * cpufreq_driver_test_flags - Test cpufreq driver's flags against given ones. | |
| 1912 | + * @flags: Flags to test against the current cpufreq driver's flags. | |
| 1913 | + * | |
| 1914 | + * Assumes that the driver is there, so callers must ensure that this is the | |
| 1915 | + * case. | |
| 1916 | + */ | |
| 1917 | +bool cpufreq_driver_test_flags(u16 flags) | |
| 1918 | +{ | |
| 1919 | + return !!(cpufreq_driver->flags & flags); | |
| 1920 | +} | |
| 1921 | + | |
| 1910 | 1922 | /** |
| 1911 | 1923 | * cpufreq_get_current_driver - return current driver's name |
| 1912 | 1924 | * |
| @@ -2187,7 +2199,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy, · 274 unmodified lines | ||
| 2187 | 2199 | * exactly same freq is called again and so we can save on few function |
| 2188 | 2200 | * calls. |
| 2189 | 2201 | */ |
| 2190 | − if (target_freq == policy->cur) | |
| 2202 | + if (target_freq == policy->cur && | |
| 2203 | + !(cpufreq_driver->flags & CPUFREQ_NEED_UPDATE_LIMITS)) | |
| 2191 | 2204 | return 0; |
| 2192 | 2205 | |
| 2193 | 2206 | /* Save last value to restore later on errors */ |
| @@ -223,7 +223,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy) · 222 unmodified lines | ||
| 223 | 223 | case EPS_BRAND_C3: |
| 224 | 224 | pr_cont("C3\n"); |
| 225 | 225 | return -ENODEV; |
| 226 | − break; | |
| 227 | 226 | } |
| 228 | 227 | /* Enable Enhanced PowerSaver */ |
| 229 | 228 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
| @@ -2568,14 +2568,12 @@ static int intel_cpufreq_update_pstate(struct cpudata *cpu, int target_pstate, · 2567 unmodified lines | ||
| 2568 | 2568 | int old_pstate = cpu->pstate.current_pstate; |
| 2569 | 2569 | |
| 2570 | 2570 | target_pstate = intel_pstate_prepare_request(cpu, target_pstate); |
| 2571 | − if (target_pstate != old_pstate) { | |
| 2571 | + if (hwp_active) { | |
| 2572 | + intel_cpufreq_adjust_hwp(cpu, target_pstate, fast_switch); | |
| 2573 | + cpu->pstate.current_pstate = target_pstate; | |
| 2574 | + } else if (target_pstate != old_pstate) { | |
| 2575 | + intel_cpufreq_adjust_perf_ctl(cpu, target_pstate, fast_switch); | |
| 2572 | 2576 | cpu->pstate.current_pstate = target_pstate; |
| 2573 | − if (hwp_active) | |
| 2574 | − intel_cpufreq_adjust_hwp(cpu, target_pstate, | |
| 2575 | − fast_switch); | |
| 2576 | − else | |
| 2577 | − intel_cpufreq_adjust_perf_ctl(cpu, target_pstate, | |
| 2578 | − fast_switch); | |
| 2579 | 2577 | } |
| 2580 | 2578 | |
| 2581 | 2579 | intel_cpufreq_trace(cpu, fast_switch ? INTEL_PSTATE_TRACE_FAST_SWITCH : |
| @@ -3032,6 +3030,7 @@ static int __init intel_pstate_init(void) · 450 unmodified lines | ||
| 3032 | 3030 | hwp_mode_bdw = id->driver_data; |
| 3033 | 3031 | intel_pstate.attr = hwp_cpufreq_attrs; |
| 3034 | 3032 | intel_cpufreq.attr = hwp_cpufreq_attrs; |
| 3033 | + intel_cpufreq.flags |= CPUFREQ_NEED_UPDATE_LIMITS; | |
| 3035 | 3034 | if (!default_driver) |
| 3036 | 3035 | default_driver = &intel_pstate; |
| 3037 | 3036 | |
| @@ -593,7 +593,6 @@ static void longhaul_setup_voltagescaling(void) · 592 unmodified lines | ||
| 593 | 593 | break; |
| 594 | 594 | default: |
| 595 | 595 | return; |
| 596 | − break; | |
| 597 | 596 | } |
| 598 | 597 | if (min_vid_speed >= highest_speed) |
| 599 | 598 | return; |
| @@ -240,7 +240,7 @@ unsigned int speedstep_get_frequency(enum speedstep_processor processor) · 239 unmodified lines | ||
| 240 | 240 | return pentium3_get_frequency(processor); |
| 241 | 241 | default: |
| 242 | 242 | return 0; |
| 243 | − }; | |
| 243 | + } | |
| 244 | 244 | return 0; |
| 245 | 245 | } |
| 246 | 246 | EXPORT_SYMBOL_GPL(speedstep_get_frequency); |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * |
| 8 | 8 | * This file add support for MD5 and SHA1/SHA224/SHA256/SHA384/SHA512. |
| 9 | 9 | * |
| 10 | − * You could find the datasheet in Documentation/arm/sunxi/README | |
| 10 | + * You could find the datasheet in Documentation/arm/sunxi.rst | |
| 11 | 11 | */ |
| 12 | 12 | #include <linux/dma-mapping.h> |
| 13 | 13 | #include <linux/pm_runtime.h> |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * |
| 8 | 8 | * This file handle the PRNG |
| 9 | 9 | * |
| 10 | − * You could find a link for the datasheet in Documentation/arm/sunxi/README | |
| 10 | + * You could find a link for the datasheet in Documentation/arm/sunxi.rst | |
| 11 | 11 | */ |
| 12 | 12 | #include "sun8i-ce.h" |
| 13 | 13 | #include <linux/dma-mapping.h> |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * |
| 8 | 8 | * This file handle the TRNG |
| 9 | 9 | * |
| 10 | − * You could find a link for the datasheet in Documentation/arm/sunxi/README | |
| 10 | + * You could find a link for the datasheet in Documentation/arm/sunxi.rst | |
| 11 | 11 | */ |
| 12 | 12 | #include "sun8i-ce.h" |
| 13 | 13 | #include <linux/dma-mapping.h> |
| @@ -318,24 +318,6 @@ config INTEL_IOP_ADMA · 317 unmodified lines | ||
| 318 | 318 | help |
| 319 | 319 | Enable support for the Intel(R) IOP Series RAID engines. |
| 320 | 320 | |
| 321 | −config INTEL_MIC_X100_DMA | |
| 322 | − tristate "Intel MIC X100 DMA Driver" | |
| 323 | − depends on 64BIT && X86 && INTEL_MIC_BUS | |
| 324 | − select DMA_ENGINE | |
| 325 | − help | |
| 326 | − This enables DMA support for the Intel Many Integrated Core | |
| 327 | − (MIC) family of PCIe form factor coprocessor X100 devices that | |
| 328 | − run a 64 bit Linux OS. This driver will be used by both MIC | |
| 329 | − host and card drivers. | |
| 330 | − | |
| 331 | − If you are building host kernel with a MIC device or a card | |
| 332 | − kernel for a MIC device, then say M (recommended) or Y, else | |
| 333 | − say N. If unsure say N. | |
| 334 | − | |
| 335 | − More information about the Intel MIC family as well as the Linux | |
| 336 | − OS and tools for MIC to use with this driver are available from | |
| 337 | − <http://software.intel.com/en-us/mic-developer>. | |
| 338 | − | |
| 339 | 321 | config K3_DMA |
| 340 | 322 | tristate "Hisilicon K3 DMA support" |
| 341 | 323 | depends on ARCH_HI3xxx || ARCH_HISI || COMPILE_TEST |
| @@ -44,7 +44,6 @@ obj-$(CONFIG_INTEL_IDMA64) += idma64.o · 43 unmodified lines | ||
| 44 | 44 | obj-$(CONFIG_INTEL_IOATDMA) += ioat/ |
| 45 | 45 | obj-$(CONFIG_INTEL_IDXD) += idxd/ |
| 46 | 46 | obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o |
| 47 | −obj-$(CONFIG_INTEL_MIC_X100_DMA) += mic_x100_dma.o | |
| 48 | 47 | obj-$(CONFIG_K3_DMA) += k3dma.o |
| 49 | 48 | obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o |
| 50 | 49 | obj-$(CONFIG_MILBEAUT_HDMAC) += milbeaut-hdmac.o |
| @@ -1,770 +0,0 @@ | ||
| 1 | −// SPDX-License-Identifier: GPL-2.0-only | |
| 2 | −/* | |
| 3 | − * Intel MIC Platform Software Stack (MPSS) | |
| 4 | − * | |
| 5 | − * Copyright(c) 2014 Intel Corporation. | |
| 6 | − * | |
| 7 | − * Intel MIC X100 DMA Driver. | |
| 8 | − * | |
| 9 | − * Adapted from IOAT dma driver. | |
| 10 | − */ | |
| 11 | −#include <linux/module.h> | |
| 12 | −#include <linux/io.h> | |
| 13 | −#include <linux/seq_file.h> | |
| 14 | −#include <linux/vmalloc.h> | |
| 15 | − | |
| 16 | −#include "mic_x100_dma.h" | |
| 17 | − | |
| 18 | −#define MIC_DMA_MAX_XFER_SIZE_CARD (1 * 1024 * 1024 -\ | |
| 19 | − MIC_DMA_ALIGN_BYTES) | |
| 20 | −#define MIC_DMA_MAX_XFER_SIZE_HOST (1 * 1024 * 1024 >> 1) | |
| 21 | −#define MIC_DMA_DESC_TYPE_SHIFT 60 | |
| 22 | −#define MIC_DMA_MEMCPY_LEN_SHIFT 46 | |
| 23 | −#define MIC_DMA_STAT_INTR_SHIFT 59 | |
| 24 | − | |
| 25 | −/* high-water mark for pushing dma descriptors */ | |
| 26 | −static int mic_dma_pending_level = 4; | |
| 27 | − | |
| 28 | −/* Status descriptor is used to write a 64 bit value to a memory location */ | |
| 29 | −enum mic_dma_desc_format_type { | |
| 30 | − MIC_DMA_MEMCPY = 1, | |
| 31 | − MIC_DMA_STATUS, | |
| 32 | −}; | |
| 33 | − | |
| 34 | −static inline u32 mic_dma_hw_ring_inc(u32 val) | |
| 35 | −{ | |
| 36 | − return (val + 1) % MIC_DMA_DESC_RX_SIZE; | |
| 37 | −} | |
| 38 | − | |
| 39 | −static inline u32 mic_dma_hw_ring_dec(u32 val) | |
| 40 | −{ | |
| 41 | − return val ? val - 1 : MIC_DMA_DESC_RX_SIZE - 1; | |
| 42 | −} | |
| 43 | − | |
| 44 | −static inline void mic_dma_hw_ring_inc_head(struct mic_dma_chan *ch) | |
| 45 | −{ | |
| 46 | − ch->head = mic_dma_hw_ring_inc(ch->head); | |
| 47 | −} | |
| 48 | − | |
| 49 | −/* Prepare a memcpy desc */ | |
| 50 | −static inline void mic_dma_memcpy_desc(struct mic_dma_desc *desc, | |
| 51 | − dma_addr_t src_phys, dma_addr_t dst_phys, u64 size) | |
| 52 | −{ | |
| 53 | − u64 qw0, qw1; | |
| 54 | − | |
| 55 | − qw0 = src_phys; | |
| 56 | − qw0 |= (size >> MIC_DMA_ALIGN_SHIFT) << MIC_DMA_MEMCPY_LEN_SHIFT; | |
| 57 | − qw1 = MIC_DMA_MEMCPY; | |
| 58 | − qw1 <<= MIC_DMA_DESC_TYPE_SHIFT; | |
| 59 | − qw1 |= dst_phys; | |
| 60 | − desc->qw0 = qw0; | |
| 61 | − desc->qw1 = qw1; | |
| 62 | −} | |
| 63 | − | |
| 64 | −/* Prepare a status desc. with @data to be written at @dst_phys */ | |
| 65 | −static inline void mic_dma_prep_status_desc(struct mic_dma_desc *desc, u64 data, | |
| 66 | − dma_addr_t dst_phys, bool generate_intr) | |
| 67 | −{ | |
| 68 | − u64 qw0, qw1; | |
| 69 | − | |
| 70 | − qw0 = data; | |
| 71 | − qw1 = (u64) MIC_DMA_STATUS << MIC_DMA_DESC_TYPE_SHIFT | dst_phys; | |
| 72 | − if (generate_intr) | |
| 73 | − qw1 |= (1ULL << MIC_DMA_STAT_INTR_SHIFT); | |
| 74 | − desc->qw0 = qw0; | |
| 75 | − desc->qw1 = qw1; | |
| 76 | −} | |
| 77 | − | |
| 78 | −static void mic_dma_cleanup(struct mic_dma_chan *ch) | |
| 79 | −{ | |
| 80 | − struct dma_async_tx_descriptor *tx; | |
| 81 | − u32 tail; | |
| 82 | − u32 last_tail; | |
| 83 | − | |
| 84 | − spin_lock(&ch->cleanup_lock); | |
| 85 | − tail = mic_dma_read_cmp_cnt(ch); | |
| 86 | − /* | |
| 87 | − * This is the barrier pair for smp_wmb() in fn. | |
| 88 | − * mic_dma_tx_submit_unlock. It's required so that we read the | |
| 89 | − * updated cookie value from tx->cookie. | |
| 90 | − */ | |
| 91 | − smp_rmb(); | |
| 92 | − for (last_tail = ch->last_tail; tail != last_tail;) { | |
| 93 | − tx = &ch->tx_array[last_tail]; | |
| 94 | − if (tx->cookie) { | |
| 95 | − dma_cookie_complete(tx); | |
| 96 | − dmaengine_desc_get_callback_invoke(tx, NULL); | |
| 97 | − tx->callback = NULL; | |
| 98 | − } | |
| 99 | − last_tail = mic_dma_hw_ring_inc(last_tail); | |
| 100 | − } | |
| 101 | − /* finish all completion callbacks before incrementing tail */ | |
| 102 | − smp_mb(); | |
| 103 | − ch->last_tail = last_tail; | |
| 104 | − spin_unlock(&ch->cleanup_lock); | |
| 105 | −} | |
| 106 | − | |
| 107 | −static u32 mic_dma_ring_count(u32 head, u32 tail) | |
| 108 | −{ | |
| 109 | − u32 count; | |
| 110 | − | |
| 111 | − if (head >= tail) | |
| 112 | − count = (tail - 0) + (MIC_DMA_DESC_RX_SIZE - head); | |
| 113 | − else | |
| 114 | − count = tail - head; | |
| 115 | − return count - 1; | |
| 116 | −} | |
| 117 | − | |
| 118 | −/* Returns the num. of free descriptors on success, -ENOMEM on failure */ | |
| 119 | −static int mic_dma_avail_desc_ring_space(struct mic_dma_chan *ch, int required) | |
| 120 | −{ | |
| 121 | − struct device *dev = mic_dma_ch_to_device(ch); | |
| 122 | − u32 count; | |
| 123 | − | |
| 124 | − count = mic_dma_ring_count(ch->head, ch->last_tail); | |
| 125 | − if (count < required) { | |
| 126 | − mic_dma_cleanup(ch); | |
| 127 | − count = mic_dma_ring_count(ch->head, ch->last_tail); | |
| 128 | − } | |
| 129 | − | |
| 130 | − if (count < required) { | |
| 131 | − dev_dbg(dev, "Not enough desc space"); | |
| 132 | − dev_dbg(dev, "%s %d required=%u, avail=%u\n", | |
| 133 | − __func__, __LINE__, required, count); | |
| 134 | − return -ENOMEM; | |
| 135 | − } else { | |
| 136 | − return count; | |
| 137 | − } | |
| 138 | −} | |
| 139 | − | |
| 140 | −/* Program memcpy descriptors into the descriptor ring and update s/w head ptr*/ | |
| 141 | −static int mic_dma_prog_memcpy_desc(struct mic_dma_chan *ch, dma_addr_t src, | |
| 142 | − dma_addr_t dst, size_t len) | |
| 143 | −{ | |
| 144 | − size_t current_transfer_len; | |
| 145 | − size_t max_xfer_size = to_mic_dma_dev(ch)->max_xfer_size; | |
| 146 | − /* 3 is added to make sure we have enough space for status desc */ | |
| 147 | − int num_desc = len / max_xfer_size + 3; | |
| 148 | − int ret; | |
| 149 | − | |
| 150 | − if (len % max_xfer_size) | |
| 151 | − num_desc++; | |
| 152 | − | |
| 153 | − ret = mic_dma_avail_desc_ring_space(ch, num_desc); | |
| 154 | − if (ret < 0) | |
| 155 | − return ret; | |
| 156 | − do { | |
| 157 | − current_transfer_len = min(len, max_xfer_size); | |
| 158 | − mic_dma_memcpy_desc(&ch->desc_ring[ch->head], | |
| 159 | − src, dst, current_transfer_len); | |
| 160 | − mic_dma_hw_ring_inc_head(ch); | |
| 161 | − len -= current_transfer_len; | |
| 162 | − dst = dst + current_transfer_len; | |
| 163 | − src = src + current_transfer_len; | |
| 164 | − } while (len > 0); | |
| 165 | − return 0; | |
| 166 | −} | |
| 167 | − | |
| 168 | −/* It's a h/w quirk and h/w needs 2 status descriptors for every status desc */ | |
| 169 | −static void mic_dma_prog_intr(struct mic_dma_chan *ch) | |
| 170 | −{ | |
| 171 | − mic_dma_prep_status_desc(&ch->desc_ring[ch->head], 0, | |
| 172 | − ch->status_dest_micpa, false); | |
| 173 | − mic_dma_hw_ring_inc_head(ch); | |
| 174 | − mic_dma_prep_status_desc(&ch->desc_ring[ch->head], 0, | |
| 175 | − ch->status_dest_micpa, true); | |
| 176 | − mic_dma_hw_ring_inc_head(ch); | |
| 177 | −} | |
| 178 | − | |
| 179 | −/* Wrapper function to program memcpy descriptors/status descriptors */ | |
| 180 | −static int mic_dma_do_dma(struct mic_dma_chan *ch, int flags, dma_addr_t src, | |
| 181 | − dma_addr_t dst, size_t len) | |
| 182 | −{ | |
| 183 | − if (len && -ENOMEM == mic_dma_prog_memcpy_desc(ch, src, dst, len)) { | |
| 184 | − return -ENOMEM; | |
| 185 | − } else { | |
| 186 | − /* 3 is the maximum number of status descriptors */ | |
| 187 | − int ret = mic_dma_avail_desc_ring_space(ch, 3); | |
| 188 | − | |
| 189 | − if (ret < 0) | |
| 190 | − return ret; | |
| 191 | − } | |
| 192 | − | |
| 193 | − /* Above mic_dma_prog_memcpy_desc() makes sure we have enough space */ | |
| 194 | − if (flags & DMA_PREP_FENCE) { | |
| 195 | − mic_dma_prep_status_desc(&ch->desc_ring[ch->head], 0, | |
| 196 | − ch->status_dest_micpa, false); | |
| 197 | − mic_dma_hw_ring_inc_head(ch); | |
| 198 | − } | |
| 199 | − | |
| 200 | − if (flags & DMA_PREP_INTERRUPT) | |
| 201 | − mic_dma_prog_intr(ch); | |
| 202 | − | |
| 203 | − return 0; | |
| 204 | −} | |
| 205 | − | |
| 206 | −static inline void mic_dma_issue_pending(struct dma_chan *ch) | |
| 207 | −{ | |
| 208 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 209 | − | |
| 210 | − spin_lock(&mic_ch->issue_lock); | |
| 211 | − /* | |
| 212 | − * Write to head triggers h/w to act on the descriptors. | |
| 213 | − * On MIC, writing the same head value twice causes | |
| 214 | − * a h/w error. On second write, h/w assumes we filled | |
| 215 | − * the entire ring & overwrote some of the descriptors. | |
| 216 | − */ | |
| 217 | − if (mic_ch->issued == mic_ch->submitted) | |
| 218 | − goto out; | |
| 219 | − mic_ch->issued = mic_ch->submitted; | |
| 220 | − /* | |
| 221 | − * make descriptor updates visible before advancing head, | |
| 222 | − * this is purposefully not smp_wmb() since we are also | |
| 223 | − * publishing the descriptor updates to a dma device | |
| 224 | − */ | |
| 225 | − wmb(); | |
| 226 | − mic_dma_write_reg(mic_ch, MIC_DMA_REG_DHPR, mic_ch->issued); | |
| 227 | −out: | |
| 228 | − spin_unlock(&mic_ch->issue_lock); | |
| 229 | −} | |
| 230 | − | |
| 231 | −static inline void mic_dma_update_pending(struct mic_dma_chan *ch) | |
| 232 | −{ | |
| 233 | − if (mic_dma_ring_count(ch->issued, ch->submitted) | |
| 234 | − > mic_dma_pending_level) | |
| 235 | − mic_dma_issue_pending(&ch->api_ch); | |
| 236 | −} | |
| 237 | − | |
| 238 | −static dma_cookie_t mic_dma_tx_submit_unlock(struct dma_async_tx_descriptor *tx) | |
| 239 | −{ | |
| 240 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(tx->chan); | |
| 241 | − dma_cookie_t cookie; | |
| 242 | − | |
| 243 | − dma_cookie_assign(tx); | |
| 244 | − cookie = tx->cookie; | |
| 245 | − /* | |
| 246 | − * We need an smp write barrier here because another CPU might see | |
| 247 | − * an update to submitted and update h/w head even before we | |
| 248 | − * assigned a cookie to this tx. | |
| 249 | − */ | |
| 250 | − smp_wmb(); | |
| 251 | − mic_ch->submitted = mic_ch->head; | |
| 252 | − spin_unlock(&mic_ch->prep_lock); | |
| 253 | − mic_dma_update_pending(mic_ch); | |
| 254 | − return cookie; | |
| 255 | −} | |
| 256 | − | |
| 257 | −static inline struct dma_async_tx_descriptor * | |
| 258 | −allocate_tx(struct mic_dma_chan *ch) | |
| 259 | −{ | |
| 260 | − u32 idx = mic_dma_hw_ring_dec(ch->head); | |
| 261 | − struct dma_async_tx_descriptor *tx = &ch->tx_array[idx]; | |
| 262 | − | |
| 263 | − dma_async_tx_descriptor_init(tx, &ch->api_ch); | |
| 264 | − tx->tx_submit = mic_dma_tx_submit_unlock; | |
| 265 | − return tx; | |
| 266 | −} | |
| 267 | − | |
| 268 | −/* Program a status descriptor with dst as address and value to be written */ | |
| 269 | −static struct dma_async_tx_descriptor * | |
| 270 | −mic_dma_prep_status_lock(struct dma_chan *ch, dma_addr_t dst, u64 src_val, | |
| 271 | − unsigned long flags) | |
| 272 | −{ | |
| 273 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 274 | − int result; | |
| 275 | − | |
| 276 | − spin_lock(&mic_ch->prep_lock); | |
| 277 | − result = mic_dma_avail_desc_ring_space(mic_ch, 4); | |
| 278 | − if (result < 0) | |
| 279 | − goto error; | |
| 280 | − mic_dma_prep_status_desc(&mic_ch->desc_ring[mic_ch->head], src_val, dst, | |
| 281 | − false); | |
| 282 | − mic_dma_hw_ring_inc_head(mic_ch); | |
| 283 | − result = mic_dma_do_dma(mic_ch, flags, 0, 0, 0); | |
| 284 | − if (result < 0) | |
| 285 | − goto error; | |
| 286 | − | |
| 287 | − return allocate_tx(mic_ch); | |
| 288 | −error: | |
| 289 | − dev_err(mic_dma_ch_to_device(mic_ch), | |
| 290 | − "Error enqueueing dma status descriptor, error=%d\n", result); | |
| 291 | − spin_unlock(&mic_ch->prep_lock); | |
| 292 | − return NULL; | |
| 293 | −} | |
| 294 | − | |
| 295 | −/* | |
| 296 | − * Prepare a memcpy descriptor to be added to the ring. | |
| 297 | − * Note that the temporary descriptor adds an extra overhead of copying the | |
| 298 | − * descriptor to ring. So, we copy directly to the descriptor ring | |
| 299 | − */ | |
| 300 | −static struct dma_async_tx_descriptor * | |
| 301 | −mic_dma_prep_memcpy_lock(struct dma_chan *ch, dma_addr_t dma_dest, | |
| 302 | − dma_addr_t dma_src, size_t len, unsigned long flags) | |
| 303 | −{ | |
| 304 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 305 | − struct device *dev = mic_dma_ch_to_device(mic_ch); | |
| 306 | − int result; | |
| 307 | − | |
| 308 | − if (!len && !flags) | |
| 309 | − return NULL; | |
| 310 | − | |
| 311 | − spin_lock(&mic_ch->prep_lock); | |
| 312 | − result = mic_dma_do_dma(mic_ch, flags, dma_src, dma_dest, len); | |
| 313 | − if (result >= 0) | |
| 314 | − return allocate_tx(mic_ch); | |
| 315 | − dev_err(dev, "Error enqueueing dma, error=%d\n", result); | |
| 316 | − spin_unlock(&mic_ch->prep_lock); | |
| 317 | − return NULL; | |
| 318 | −} | |
| 319 | − | |
| 320 | −static struct dma_async_tx_descriptor * | |
| 321 | −mic_dma_prep_interrupt_lock(struct dma_chan *ch, unsigned long flags) | |
| 322 | −{ | |
| 323 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 324 | − int ret; | |
| 325 | − | |
| 326 | − spin_lock(&mic_ch->prep_lock); | |
| 327 | − ret = mic_dma_do_dma(mic_ch, flags, 0, 0, 0); | |
| 328 | − if (!ret) | |
| 329 | − return allocate_tx(mic_ch); | |
| 330 | − spin_unlock(&mic_ch->prep_lock); | |
| 331 | − return NULL; | |
| 332 | −} | |
| 333 | − | |
| 334 | −/* Return the status of the transaction */ | |
| 335 | −static enum dma_status | |
| 336 | −mic_dma_tx_status(struct dma_chan *ch, dma_cookie_t cookie, | |
| 337 | − struct dma_tx_state *txstate) | |
| 338 | −{ | |
| 339 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 340 | − | |
| 341 | − if (DMA_COMPLETE != dma_cookie_status(ch, cookie, txstate)) | |
| 342 | − mic_dma_cleanup(mic_ch); | |
| 343 | − | |
| 344 | − return dma_cookie_status(ch, cookie, txstate); | |
| 345 | −} | |
| 346 | − | |
| 347 | −static irqreturn_t mic_dma_thread_fn(int irq, void *data) | |
| 348 | −{ | |
| 349 | − mic_dma_cleanup((struct mic_dma_chan *)data); | |
| 350 | − return IRQ_HANDLED; | |
| 351 | −} | |
| 352 | − | |
| 353 | −static irqreturn_t mic_dma_intr_handler(int irq, void *data) | |
| 354 | −{ | |
| 355 | − struct mic_dma_chan *ch = ((struct mic_dma_chan *)data); | |
| 356 | − | |
| 357 | − mic_dma_ack_interrupt(ch); | |
| 358 | − return IRQ_WAKE_THREAD; | |
| 359 | −} | |
| 360 | − | |
| 361 | −static int mic_dma_alloc_desc_ring(struct mic_dma_chan *ch) | |
| 362 | −{ | |
| 363 | − u64 desc_ring_size = MIC_DMA_DESC_RX_SIZE * sizeof(*ch->desc_ring); | |
| 364 | − struct device *dev = &to_mbus_device(ch)->dev; | |
| 365 | − | |
| 366 | − desc_ring_size = ALIGN(desc_ring_size, MIC_DMA_ALIGN_BYTES); | |
| 367 | − ch->desc_ring = kzalloc(desc_ring_size, GFP_KERNEL); | |
| 368 | − | |
| 369 | − if (!ch->desc_ring) | |
| 370 | − return -ENOMEM; | |
| 371 | − | |
| 372 | − ch->desc_ring_micpa = dma_map_single(dev, ch->desc_ring, | |
| 373 | − desc_ring_size, DMA_BIDIRECTIONAL); | |
| 374 | − if (dma_mapping_error(dev, ch->desc_ring_micpa)) | |
| 375 | − goto map_error; | |
| 376 | − | |
| 377 | − ch->tx_array = vzalloc(array_size(MIC_DMA_DESC_RX_SIZE, | |
| 378 | − sizeof(*ch->tx_array))); | |
| 379 | − if (!ch->tx_array) | |
| 380 | − goto tx_error; | |
| 381 | − return 0; | |
| 382 | −tx_error: | |
| 383 | − dma_unmap_single(dev, ch->desc_ring_micpa, desc_ring_size, | |
| 384 | − DMA_BIDIRECTIONAL); | |
| 385 | −map_error: | |
| 386 | − kfree(ch->desc_ring); | |
| 387 | − return -ENOMEM; | |
| 388 | −} | |
| 389 | − | |
| 390 | −static void mic_dma_free_desc_ring(struct mic_dma_chan *ch) | |
| 391 | −{ | |
| 392 | − u64 desc_ring_size = MIC_DMA_DESC_RX_SIZE * sizeof(*ch->desc_ring); | |
| 393 | − | |
| 394 | − vfree(ch->tx_array); | |
| 395 | − desc_ring_size = ALIGN(desc_ring_size, MIC_DMA_ALIGN_BYTES); | |
| 396 | − dma_unmap_single(&to_mbus_device(ch)->dev, ch->desc_ring_micpa, | |
| 397 | − desc_ring_size, DMA_BIDIRECTIONAL); | |
| 398 | − kfree(ch->desc_ring); | |
| 399 | − ch->desc_ring = NULL; | |
| 400 | −} | |
| 401 | − | |
| 402 | −static void mic_dma_free_status_dest(struct mic_dma_chan *ch) | |
| 403 | −{ | |
| 404 | − dma_unmap_single(&to_mbus_device(ch)->dev, ch->status_dest_micpa, | |
| 405 | − L1_CACHE_BYTES, DMA_BIDIRECTIONAL); | |
| 406 | − kfree(ch->status_dest); | |
| 407 | −} | |
| 408 | − | |
| 409 | −static int mic_dma_alloc_status_dest(struct mic_dma_chan *ch) | |
| 410 | −{ | |
| 411 | − struct device *dev = &to_mbus_device(ch)->dev; | |
| 412 | − | |
| 413 | − ch->status_dest = kzalloc(L1_CACHE_BYTES, GFP_KERNEL); | |
| 414 | − if (!ch->status_dest) | |
| 415 | − return -ENOMEM; | |
| 416 | − ch->status_dest_micpa = dma_map_single(dev, ch->status_dest, | |
| 417 | − L1_CACHE_BYTES, DMA_BIDIRECTIONAL); | |
| 418 | − if (dma_mapping_error(dev, ch->status_dest_micpa)) { | |
| 419 | − kfree(ch->status_dest); | |
| 420 | − ch->status_dest = NULL; | |
| 421 | − return -ENOMEM; | |
| 422 | − } | |
| 423 | − return 0; | |
| 424 | −} | |
| 425 | − | |
| 426 | −static int mic_dma_check_chan(struct mic_dma_chan *ch) | |
| 427 | −{ | |
| 428 | − if (mic_dma_read_reg(ch, MIC_DMA_REG_DCHERR) || | |
| 429 | − mic_dma_read_reg(ch, MIC_DMA_REG_DSTAT) & MIC_DMA_CHAN_QUIESCE) { | |
| 430 | − mic_dma_disable_chan(ch); | |
| 431 | − mic_dma_chan_mask_intr(ch); | |
| 432 | − dev_err(mic_dma_ch_to_device(ch), | |
| 433 | − "%s %d error setting up mic dma chan %d\n", | |
| 434 | − __func__, __LINE__, ch->ch_num); | |
| 435 | − return -EBUSY; | |
| 436 | − } | |
| 437 | − return 0; | |
| 438 | −} | |
| 439 | − | |
| 440 | −static int mic_dma_chan_setup(struct mic_dma_chan *ch) | |
| 441 | −{ | |
| 442 | − if (MIC_DMA_CHAN_MIC == ch->owner) | |
| 443 | − mic_dma_chan_set_owner(ch); | |
| 444 | − mic_dma_disable_chan(ch); | |
| 445 | − mic_dma_chan_mask_intr(ch); | |
| 446 | − mic_dma_write_reg(ch, MIC_DMA_REG_DCHERRMSK, 0); | |
| 447 | − mic_dma_chan_set_desc_ring(ch); | |
| 448 | − ch->last_tail = mic_dma_read_reg(ch, MIC_DMA_REG_DTPR); | |
| 449 | − ch->head = ch->last_tail; | |
| 450 | − ch->issued = 0; | |
| 451 | − mic_dma_chan_unmask_intr(ch); | |
| 452 | − mic_dma_enable_chan(ch); | |
| 453 | − return mic_dma_check_chan(ch); | |
| 454 | −} | |
| 455 | − | |
| 456 | −static void mic_dma_chan_destroy(struct mic_dma_chan *ch) | |
| 457 | −{ | |
| 458 | − mic_dma_disable_chan(ch); | |
| 459 | − mic_dma_chan_mask_intr(ch); | |
| 460 | −} | |
| 461 | − | |
| 462 | −static int mic_dma_setup_irq(struct mic_dma_chan *ch) | |
| 463 | −{ | |
| 464 | − ch->cookie = | |
| 465 | − to_mbus_hw_ops(ch)->request_threaded_irq(to_mbus_device(ch), | |
| 466 | − mic_dma_intr_handler, mic_dma_thread_fn, | |
| 467 | − "mic dma_channel", ch, ch->ch_num); | |
| 468 | − return PTR_ERR_OR_ZERO(ch->cookie); | |
| 469 | −} | |
| 470 | − | |
| 471 | −static inline void mic_dma_free_irq(struct mic_dma_chan *ch) | |
| 472 | −{ | |
| 473 | − to_mbus_hw_ops(ch)->free_irq(to_mbus_device(ch), ch->cookie, ch); | |
| 474 | −} | |
| 475 | − | |
| 476 | −static int mic_dma_chan_init(struct mic_dma_chan *ch) | |
| 477 | −{ | |
| 478 | − int ret = mic_dma_alloc_desc_ring(ch); | |
| 479 | − | |
| 480 | − if (ret) | |
| 481 | − goto ring_error; | |
| 482 | − ret = mic_dma_alloc_status_dest(ch); | |
| 483 | − if (ret) | |
| 484 | − goto status_error; | |
| 485 | − ret = mic_dma_chan_setup(ch); | |
| 486 | − if (ret) | |
| 487 | − goto chan_error; | |
| 488 | − return ret; | |
| 489 | −chan_error: | |
| 490 | − mic_dma_free_status_dest(ch); | |
| 491 | −status_error: | |
| 492 | − mic_dma_free_desc_ring(ch); | |
| 493 | −ring_error: | |
| 494 | − return ret; | |
| 495 | −} | |
| 496 | − | |
| 497 | −static int mic_dma_drain_chan(struct mic_dma_chan *ch) | |
| 498 | −{ | |
| 499 | − struct dma_async_tx_descriptor *tx; | |
| 500 | − int err = 0; | |
| 501 | − dma_cookie_t cookie; | |
| 502 | − | |
| 503 | − tx = mic_dma_prep_memcpy_lock(&ch->api_ch, 0, 0, 0, DMA_PREP_FENCE); | |
| 504 | − if (!tx) { | |
| 505 | − err = -ENOMEM; | |
| 506 | − goto error; | |
| 507 | − } | |
| 508 | − | |
| 509 | − cookie = tx->tx_submit(tx); | |
| 510 | − if (dma_submit_error(cookie)) | |
| 511 | − err = -ENOMEM; | |
| 512 | − else | |
| 513 | − err = dma_sync_wait(&ch->api_ch, cookie); | |
| 514 | − if (err) { | |
| 515 | − dev_err(mic_dma_ch_to_device(ch), "%s %d TO chan 0x%x\n", | |
| 516 | − __func__, __LINE__, ch->ch_num); | |
| 517 | − err = -EIO; | |
| 518 | − } | |
| 519 | −error: | |
| 520 | − mic_dma_cleanup(ch); | |
| 521 | − return err; | |
| 522 | −} | |
| 523 | − | |
| 524 | −static inline void mic_dma_chan_uninit(struct mic_dma_chan *ch) | |
| 525 | −{ | |
| 526 | − mic_dma_chan_destroy(ch); | |
| 527 | − mic_dma_cleanup(ch); | |
| 528 | − mic_dma_free_status_dest(ch); | |
| 529 | − mic_dma_free_desc_ring(ch); | |
| 530 | −} | |
| 531 | − | |
| 532 | −static int mic_dma_init(struct mic_dma_device *mic_dma_dev, | |
| 533 | − enum mic_dma_chan_owner owner) | |
| 534 | −{ | |
| 535 | − int i, first_chan = mic_dma_dev->start_ch; | |
| 536 | − struct mic_dma_chan *ch; | |
| 537 | − int ret; | |
| 538 | − | |
| 539 | − for (i = first_chan; i < first_chan + MIC_DMA_NUM_CHAN; i++) { | |
| 540 | − ch = &mic_dma_dev->mic_ch[i]; | |
| 541 | − ch->ch_num = i; | |
| 542 | − ch->owner = owner; | |
| 543 | − spin_lock_init(&ch->cleanup_lock); | |
| 544 | − spin_lock_init(&ch->prep_lock); | |
| 545 | − spin_lock_init(&ch->issue_lock); | |
| 546 | − ret = mic_dma_setup_irq(ch); | |
| 547 | − if (ret) | |
| 548 | − goto error; | |
| 549 | − } | |
| 550 | − return 0; | |
| 551 | −error: | |
| 552 | − for (i = i - 1; i >= first_chan; i--) | |
| 553 | − mic_dma_free_irq(ch); | |
| 554 | − return ret; | |
| 555 | −} | |
| 556 | − | |
| 557 | −static void mic_dma_uninit(struct mic_dma_device *mic_dma_dev) | |
| 558 | −{ | |
| 559 | − int i, first_chan = mic_dma_dev->start_ch; | |
| 560 | − struct mic_dma_chan *ch; | |
| 561 | − | |
| 562 | − for (i = first_chan; i < first_chan + MIC_DMA_NUM_CHAN; i++) { | |
| 563 | − ch = &mic_dma_dev->mic_ch[i]; | |
| 564 | − mic_dma_free_irq(ch); | |
| 565 | − } | |
| 566 | −} | |
| 567 | − | |
| 568 | −static int mic_dma_alloc_chan_resources(struct dma_chan *ch) | |
| 569 | −{ | |
| 570 | − int ret = mic_dma_chan_init(to_mic_dma_chan(ch)); | |
| 571 | − if (ret) | |
| 572 | − return ret; | |
| 573 | − return MIC_DMA_DESC_RX_SIZE; | |
| 574 | −} | |
| 575 | − | |
| 576 | −static void mic_dma_free_chan_resources(struct dma_chan *ch) | |
| 577 | −{ | |
| 578 | − struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); | |
| 579 | − mic_dma_drain_chan(mic_ch); | |
| 580 | − mic_dma_chan_uninit(mic_ch); | |
| 581 | −} | |
| 582 | − | |
| 583 | −/* Set the fn. handlers and register the dma device with dma api */ | |
| 584 | −static int mic_dma_register_dma_device(struct mic_dma_device *mic_dma_dev, | |
| 585 | − enum mic_dma_chan_owner owner) | |
| 586 | −{ | |
| 587 | − int i, first_chan = mic_dma_dev->start_ch; | |
| 588 | − | |
| 589 | − dma_cap_zero(mic_dma_dev->dma_dev.cap_mask); | |
| 590 | − /* | |
| 591 | − * This dma engine is not capable of host memory to host memory | |
| 592 | − * transfers | |
| 593 | − */ | |
| 594 | − dma_cap_set(DMA_MEMCPY, mic_dma_dev->dma_dev.cap_mask); | |
| 595 | − | |
| 596 | − if (MIC_DMA_CHAN_HOST == owner) | |
| 597 | − dma_cap_set(DMA_PRIVATE, mic_dma_dev->dma_dev.cap_mask); | |
| 598 | − mic_dma_dev->dma_dev.device_alloc_chan_resources = | |
| 599 | − mic_dma_alloc_chan_resources; | |
| 600 | − mic_dma_dev->dma_dev.device_free_chan_resources = | |
| 601 | − mic_dma_free_chan_resources; | |
| 602 | − mic_dma_dev->dma_dev.device_tx_status = mic_dma_tx_status; | |
| 603 | − mic_dma_dev->dma_dev.device_prep_dma_memcpy = mic_dma_prep_memcpy_lock; | |
| 604 | − mic_dma_dev->dma_dev.device_prep_dma_imm_data = | |
| 605 | − mic_dma_prep_status_lock; | |
| 606 | − mic_dma_dev->dma_dev.device_prep_dma_interrupt = | |
| 607 | − mic_dma_prep_interrupt_lock; | |
| 608 | − mic_dma_dev->dma_dev.device_issue_pending = mic_dma_issue_pending; | |
| 609 | − mic_dma_dev->dma_dev.copy_align = MIC_DMA_ALIGN_SHIFT; | |
| 610 | − INIT_LIST_HEAD(&mic_dma_dev->dma_dev.channels); | |
| 611 | − for (i = first_chan; i < first_chan + MIC_DMA_NUM_CHAN; i++) { | |
| 612 | − mic_dma_dev->mic_ch[i].api_ch.device = &mic_dma_dev->dma_dev; | |
| 613 | − dma_cookie_init(&mic_dma_dev->mic_ch[i].api_ch); | |
| 614 | − list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node, | |
| 615 | − &mic_dma_dev->dma_dev.channels); | |
| 616 | − } | |
| 617 | − return dmaenginem_async_device_register(&mic_dma_dev->dma_dev); | |
| 618 | −} | |
| 619 | − | |
| 620 | −/* | |
| 621 | − * Initializes dma channels and registers the dma device with the | |
| 622 | − * dma engine api. | |
| 623 | − */ | |
| 624 | −static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev, | |
| 625 | − enum mic_dma_chan_owner owner) | |
| 626 | −{ | |
| 627 | − struct mic_dma_device *mic_dma_dev; | |
| 628 | − int ret; | |
| 629 | − struct device *dev = &mbdev->dev; | |
| 630 | − | |
| 631 | − mic_dma_dev = devm_kzalloc(dev, sizeof(*mic_dma_dev), GFP_KERNEL); | |
| 632 | − if (!mic_dma_dev) { | |
| 633 | − ret = -ENOMEM; | |
| 634 | − goto alloc_error; | |
| 635 | − } | |
| 636 | − mic_dma_dev->mbdev = mbdev; | |
| 637 | − mic_dma_dev->dma_dev.dev = dev; | |
| 638 | − mic_dma_dev->mmio = mbdev->mmio_va; | |
| 639 | − if (MIC_DMA_CHAN_HOST == owner) { | |
| 640 | − mic_dma_dev->start_ch = 0; | |
| 641 | − mic_dma_dev->max_xfer_size = MIC_DMA_MAX_XFER_SIZE_HOST; | |
| 642 | − } else { | |
| 643 | − mic_dma_dev->start_ch = 4; | |
| 644 | − mic_dma_dev->max_xfer_size = MIC_DMA_MAX_XFER_SIZE_CARD; | |
| 645 | − } | |
| 646 | − ret = mic_dma_init(mic_dma_dev, owner); | |
| 647 | − if (ret) | |
| 648 | − goto init_error; | |
| 649 | − ret = mic_dma_register_dma_device(mic_dma_dev, owner); | |
| 650 | − if (ret) | |
| 651 | − goto reg_error; | |
| 652 | − return mic_dma_dev; | |
| 653 | −reg_error: | |
| 654 | − mic_dma_uninit(mic_dma_dev); | |
| 655 | −init_error: | |
| 656 | − mic_dma_dev = NULL; | |
| 657 | −alloc_error: | |
| 658 | − dev_err(dev, "Error at %s %d ret=%d\n", __func__, __LINE__, ret); | |
| 659 | − return mic_dma_dev; | |
| 660 | −} | |
| 661 | − | |
| 662 | −static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev) | |
| 663 | −{ | |
| 664 | − mic_dma_uninit(mic_dma_dev); | |
| 665 | −} | |
| 666 | − | |
| 667 | −/* DEBUGFS CODE */ | |
| 668 | −static int mic_dma_reg_show(struct seq_file *s, void *pos) | |
| 669 | −{ | |
| 670 | − struct mic_dma_device *mic_dma_dev = s->private; | |
| 671 | − int i, chan_num, first_chan = mic_dma_dev->start_ch; | |
| 672 | − struct mic_dma_chan *ch; | |
| 673 | − | |
| 674 | − seq_printf(s, "SBOX_DCR: %#x\n", | |
| 675 | − mic_dma_mmio_read(&mic_dma_dev->mic_ch[first_chan], | |
| 676 | − MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR)); | |
| 677 | − seq_puts(s, "DMA Channel Registers\n"); | |
| 678 | − seq_printf(s, "%-10s| %-10s %-10s %-10s %-10s %-10s", | |
| 679 | − "Channel", "DCAR", "DTPR", "DHPR", "DRAR_HI", "DRAR_LO"); | |
| 680 | − seq_printf(s, " %-11s %-14s %-10s\n", "DCHERR", "DCHERRMSK", "DSTAT"); | |
| 681 | − for (i = first_chan; i < first_chan + MIC_DMA_NUM_CHAN; i++) { | |
| 682 | − ch = &mic_dma_dev->mic_ch[i]; | |
| 683 | − chan_num = ch->ch_num; | |
| 684 | − seq_printf(s, "%-10i| %-#10x %-#10x %-#10x %-#10x", | |
| 685 | − chan_num, | |
| 686 | − mic_dma_read_reg(ch, MIC_DMA_REG_DCAR), | |
| 687 | − mic_dma_read_reg(ch, MIC_DMA_REG_DTPR), | |
| 688 | − mic_dma_read_reg(ch, MIC_DMA_REG_DHPR), | |
| 689 | − mic_dma_read_reg(ch, MIC_DMA_REG_DRAR_HI)); | |
| 690 | − seq_printf(s, " %-#10x %-#10x %-#14x %-#10x\n", | |
| 691 | − mic_dma_read_reg(ch, MIC_DMA_REG_DRAR_LO), | |
| 692 | − mic_dma_read_reg(ch, MIC_DMA_REG_DCHERR), | |
| 693 | − mic_dma_read_reg(ch, MIC_DMA_REG_DCHERRMSK), | |
| 694 | − mic_dma_read_reg(ch, MIC_DMA_REG_DSTAT)); | |
| 695 | − } | |
| 696 | − return 0; | |
| 697 | −} | |
| 698 | − | |
| 699 | −DEFINE_SHOW_ATTRIBUTE(mic_dma_reg); | |
| 700 | − | |
| 701 | −/* Debugfs parent dir */ | |
| 702 | −static struct dentry *mic_dma_dbg; | |
| 703 | − | |
| 704 | −static int mic_dma_driver_probe(struct mbus_device *mbdev) | |
| 705 | −{ | |
| 706 | − struct mic_dma_device *mic_dma_dev; | |
| 707 | − enum mic_dma_chan_owner owner; | |
| 708 | − | |
| 709 | − if (MBUS_DEV_DMA_MIC == mbdev->id.device) | |
| 710 | − owner = MIC_DMA_CHAN_MIC; | |
| 711 | − else | |
| 712 | − owner = MIC_DMA_CHAN_HOST; | |
| 713 | − | |
| 714 | − mic_dma_dev = mic_dma_dev_reg(mbdev, owner); | |
| 715 | − dev_set_drvdata(&mbdev->dev, mic_dma_dev); | |
| 716 | − | |
| 717 | − if (mic_dma_dbg) { | |
| 718 | − mic_dma_dev->dbg_dir = debugfs_create_dir(dev_name(&mbdev->dev), | |
| 719 | − mic_dma_dbg); | |
| 720 | − debugfs_create_file("mic_dma_reg", 0444, mic_dma_dev->dbg_dir, | |
| 721 | − mic_dma_dev, &mic_dma_reg_fops); | |
| 722 | − } | |
| 723 | − return 0; | |
| 724 | −} | |
| 725 | − | |
| 726 | −static void mic_dma_driver_remove(struct mbus_device *mbdev) | |
| 727 | −{ | |
| 728 | − struct mic_dma_device *mic_dma_dev; | |
| 729 | − | |
| 730 | − mic_dma_dev = dev_get_drvdata(&mbdev->dev); | |
| 731 | − debugfs_remove_recursive(mic_dma_dev->dbg_dir); | |
| 732 | − mic_dma_dev_unreg(mic_dma_dev); | |
| 733 | −} | |
| 734 | − | |
| 735 | −static struct mbus_device_id id_table[] = { | |
| 736 | − {MBUS_DEV_DMA_MIC, MBUS_DEV_ANY_ID}, | |
| 737 | − {MBUS_DEV_DMA_HOST, MBUS_DEV_ANY_ID}, | |
| 738 | − {0}, | |
| 739 | −}; | |
| 740 | − | |
| 741 | −static struct mbus_driver mic_dma_driver = { | |
| 742 | − .driver.name = KBUILD_MODNAME, | |
| 743 | − .driver.owner = THIS_MODULE, | |
| 744 | − .id_table = id_table, | |
| 745 | − .probe = mic_dma_driver_probe, | |
| 746 | − .remove = mic_dma_driver_remove, | |
| 747 | −}; | |
| 748 | − | |
| 749 | −static int __init mic_x100_dma_init(void) | |
| 750 | −{ | |
| 751 | − int rc = mbus_register_driver(&mic_dma_driver); | |
| 752 | − if (rc) | |
| 753 | − return rc; | |
| 754 | − mic_dma_dbg = debugfs_create_dir(KBUILD_MODNAME, NULL); | |
| 755 | − return 0; | |
| 756 | −} | |
| 757 | − | |
| 758 | −static void __exit mic_x100_dma_exit(void) | |
| 759 | −{ | |
| 760 | − debugfs_remove_recursive(mic_dma_dbg); | |
| 761 | − mbus_unregister_driver(&mic_dma_driver); | |
| 762 | −} | |
| 763 | − | |
| 764 | −module_init(mic_x100_dma_init); | |
| 765 | −module_exit(mic_x100_dma_exit); | |
| 766 | − | |
| 767 | −MODULE_DEVICE_TABLE(mbus, id_table); | |
| 768 | −MODULE_AUTHOR("Intel Corporation"); | |
| 769 | −MODULE_DESCRIPTION("Intel(R) MIC X100 DMA Driver"); | |
| 770 | −MODULE_LICENSE("GPL v2"); | |
| @@ -1,275 +0,0 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0-only */ | |
| 2 | −/* | |
| 3 | − * Intel MIC Platform Software Stack (MPSS) | |
| 4 | − * | |
| 5 | − * Copyright(c) 2014 Intel Corporation. | |
| 6 | − * | |
| 7 | − * Intel MIC X100 DMA Driver. | |
| 8 | − * | |
| 9 | − * Adapted from IOAT dma driver. | |
| 10 | − */ | |
| 11 | −#ifndef _MIC_X100_DMA_H_ | |
| 12 | −#define _MIC_X100_DMA_H_ | |
| 13 | − | |
| 14 | −#include <linux/kernel.h> | |
| 15 | −#include <linux/delay.h> | |
| 16 | −#include <linux/sched.h> | |
| 17 | −#include <linux/debugfs.h> | |
| 18 | −#include <linux/slab.h> | |
| 19 | −#include <linux/interrupt.h> | |
| 20 | −#include <linux/mic_bus.h> | |
| 21 | − | |
| 22 | −#include "dmaengine.h" | |
| 23 | − | |
| 24 | −/* | |
| 25 | − * MIC has a total of 8 dma channels. | |
| 26 | − * Four channels are assigned for host SW use & the remaining for MIC SW. | |
| 27 | − * MIC DMA transfer size & addresses need to be 64 byte aligned. | |
| 28 | − */ | |
| 29 | −#define MIC_DMA_MAX_NUM_CHAN 8 | |
| 30 | −#define MIC_DMA_NUM_CHAN 4 | |
| 31 | −#define MIC_DMA_ALIGN_SHIFT DMAENGINE_ALIGN_64_BYTES | |
| 32 | −#define MIC_DMA_ALIGN_BYTES (1 << MIC_DMA_ALIGN_SHIFT) | |
| 33 | −#define MIC_DMA_DESC_RX_SIZE (128 * 1024 - 4) | |
| 34 | − | |
| 35 | −/* | |
| 36 | − * Register descriptions | |
| 37 | − * All the registers are 32 bit registers. | |
| 38 | − * DCR is a global register and all others are per-channel. | |
| 39 | − * DCR - bits 0, 2, 4, 6, 8, 10, 12, 14 - enable bits for channels 0 to 7 | |
| 40 | − * bits 1, 3, 5, 7, 9, 11, 13, 15 - owner bits for channels 0 to 7 | |
| 41 | − * DCAR - bit 24 & 25 interrupt masks for mic owned & host owned channels | |
| 42 | − * DHPR - head of the descriptor ring updated by s/w | |
| 43 | − * DTPR - tail of the descriptor ring updated by h/w | |
| 44 | − * DRAR_LO - lower 32 bits of descriptor ring's mic address | |
| 45 | − * DRAR_HI - 3:0 - remaining 4 bits of descriptor ring's mic address | |
| 46 | − * 20:4 descriptor ring size | |
| 47 | − * 25:21 mic smpt entry number | |
| 48 | − * DSTAT - 16:0 h/w completion count; 31:28 dma engine status | |
| 49 | − * DCHERR - this register is non-zero on error | |
| 50 | − * DCHERRMSK - interrupt mask register | |
| 51 | − */ | |
| 52 | −#define MIC_DMA_HW_CMP_CNT_MASK 0x1ffff | |
| 53 | −#define MIC_DMA_CHAN_QUIESCE 0x20000000 | |
| 54 | −#define MIC_DMA_SBOX_BASE 0x00010000 | |
| 55 | −#define MIC_DMA_SBOX_DCR 0x0000A280 | |
| 56 | −#define MIC_DMA_SBOX_CH_BASE 0x0001A000 | |
| 57 | −#define MIC_DMA_SBOX_CHAN_OFF 0x40 | |
| 58 | −#define MIC_DMA_SBOX_DCAR_IM0 (0x1 << 24) | |
| 59 | −#define MIC_DMA_SBOX_DCAR_IM1 (0x1 << 25) | |
| 60 | −#define MIC_DMA_SBOX_DRARHI_SYS_MASK (0x1 << 26) | |
| 61 | −#define MIC_DMA_REG_DCAR 0 | |
| 62 | −#define MIC_DMA_REG_DHPR 4 | |
| 63 | −#define MIC_DMA_REG_DTPR 8 | |
| 64 | −#define MIC_DMA_REG_DRAR_LO 20 | |
| 65 | −#define MIC_DMA_REG_DRAR_HI 24 | |
| 66 | −#define MIC_DMA_REG_DSTAT 32 | |
| 67 | −#define MIC_DMA_REG_DCHERR 44 | |
| 68 | −#define MIC_DMA_REG_DCHERRMSK 48 | |
| 69 | − | |
| 70 | −/* HW dma desc */ | |
| 71 | −struct mic_dma_desc { | |
| 72 | − u64 qw0; | |
| 73 | − u64 qw1; | |
| 74 | −}; | |
| 75 | − | |
| 76 | −enum mic_dma_chan_owner { | |
| 77 | − MIC_DMA_CHAN_MIC = 0, | |
| 78 | − MIC_DMA_CHAN_HOST | |
| 79 | −}; | |
| 80 | − | |
| 81 | −/* | |
| 82 | − * mic_dma_chan - channel specific information | |
| 83 | − * @ch_num: channel number | |
| 84 | − * @owner: owner of this channel | |
| 85 | − * @last_tail: cached value of descriptor ring tail | |
| 86 | − * @head: index of next descriptor in desc_ring | |
| 87 | − * @issued: hardware notification point | |
| 88 | − * @submitted: index that will be used to submit descriptors to h/w | |
| 89 | − * @api_ch: dma engine api channel | |
| 90 | − * @desc_ring: dma descriptor ring | |
| 91 | − * @desc_ring_micpa: mic physical address of desc_ring | |
| 92 | − * @status_dest: destination for status (fence) descriptor | |
| 93 | − * @status_dest_micpa: mic address for status_dest, | |
| 94 | − * DMA controller uses this address | |
| 95 | − * @tx_array: array of async_tx | |
| 96 | − * @cleanup_lock: lock held when processing completed tx | |
| 97 | − * @prep_lock: lock held in prep_memcpy & released in tx_submit | |
| 98 | − * @issue_lock: lock used to synchronize writes to head | |
| 99 | − * @cookie: mic_irq cookie used with mic irq request | |
| 100 | − */ | |
| 101 | −struct mic_dma_chan { | |
| 102 | − int ch_num; | |
| 103 | − enum mic_dma_chan_owner owner; | |
| 104 | − u32 last_tail; | |
| 105 | − u32 head; | |
| 106 | − u32 issued; | |
| 107 | − u32 submitted; | |
| 108 | − struct dma_chan api_ch; | |
| 109 | − struct mic_dma_desc *desc_ring; | |
| 110 | − dma_addr_t desc_ring_micpa; | |
| 111 | − u64 *status_dest; | |
| 112 | − dma_addr_t status_dest_micpa; | |
| 113 | − struct dma_async_tx_descriptor *tx_array; | |
| 114 | − spinlock_t cleanup_lock; | |
| 115 | − spinlock_t prep_lock; | |
| 116 | − spinlock_t issue_lock; | |
| 117 | − struct mic_irq *cookie; | |
| 118 | −}; | |
| 119 | − | |
| 120 | −/* | |
| 121 | − * struct mic_dma_device - per mic device | |
| 122 | − * @mic_ch: dma channels | |
| 123 | − * @dma_dev: underlying dma device | |
| 124 | − * @mbdev: mic bus dma device | |
| 125 | − * @mmio: virtual address of the mmio space | |
| 126 | − * @dbg_dir: debugfs directory | |
| 127 | − * @start_ch: first channel number that can be used | |
| 128 | − * @max_xfer_size: maximum transfer size per dma descriptor | |
| 129 | − */ | |
| 130 | −struct mic_dma_device { | |
| 131 | − struct mic_dma_chan mic_ch[MIC_DMA_MAX_NUM_CHAN]; | |
| 132 | − struct dma_device dma_dev; | |
| 133 | − struct mbus_device *mbdev; | |
| 134 | − void __iomem *mmio; | |
| 135 | − struct dentry *dbg_dir; | |
| 136 | − int start_ch; | |
| 137 | − size_t max_xfer_size; | |
| 138 | −}; | |
| 139 | − | |
| 140 | −static inline struct mic_dma_chan *to_mic_dma_chan(struct dma_chan *ch) | |
| 141 | −{ | |
| 142 | − return container_of(ch, struct mic_dma_chan, api_ch); | |
| 143 | −} | |
| 144 | − | |
| 145 | −static inline struct mic_dma_device *to_mic_dma_dev(struct mic_dma_chan *ch) | |
| 146 | −{ | |
| 147 | − return | |
| 148 | − container_of((const typeof(((struct mic_dma_device *)0)->mic_ch)*) | |
| 149 | − (ch - ch->ch_num), struct mic_dma_device, mic_ch); | |
| 150 | −} | |
| 151 | − | |
| 152 | −static inline struct mbus_device *to_mbus_device(struct mic_dma_chan *ch) | |
| 153 | −{ | |
| 154 | − return to_mic_dma_dev(ch)->mbdev; | |
| 155 | −} | |
| 156 | − | |
| 157 | −static inline struct mbus_hw_ops *to_mbus_hw_ops(struct mic_dma_chan *ch) | |
| 158 | −{ | |
| 159 | − return to_mbus_device(ch)->hw_ops; | |
| 160 | −} | |
| 161 | − | |
| 162 | −static inline struct device *mic_dma_ch_to_device(struct mic_dma_chan *ch) | |
| 163 | −{ | |
| 164 | − return to_mic_dma_dev(ch)->dma_dev.dev; | |
| 165 | −} | |
| 166 | − | |
| 167 | −static inline void __iomem *mic_dma_chan_to_mmio(struct mic_dma_chan *ch) | |
| 168 | −{ | |
| 169 | − return to_mic_dma_dev(ch)->mmio; | |
| 170 | −} | |
| 171 | − | |
| 172 | −static inline u32 mic_dma_read_reg(struct mic_dma_chan *ch, u32 reg) | |
| 173 | −{ | |
| 174 | − return ioread32(mic_dma_chan_to_mmio(ch) + MIC_DMA_SBOX_CH_BASE + | |
| 175 | − ch->ch_num * MIC_DMA_SBOX_CHAN_OFF + reg); | |
| 176 | −} | |
| 177 | − | |
| 178 | −static inline void mic_dma_write_reg(struct mic_dma_chan *ch, u32 reg, u32 val) | |
| 179 | −{ | |
| 180 | − iowrite32(val, mic_dma_chan_to_mmio(ch) + MIC_DMA_SBOX_CH_BASE + | |
| 181 | − ch->ch_num * MIC_DMA_SBOX_CHAN_OFF + reg); | |
| 182 | −} | |
| 183 | − | |
| 184 | −static inline u32 mic_dma_mmio_read(struct mic_dma_chan *ch, u32 offset) | |
| 185 | −{ | |
| 186 | − return ioread32(mic_dma_chan_to_mmio(ch) + offset); | |
| 187 | −} | |
| 188 | − | |
| 189 | −static inline void mic_dma_mmio_write(struct mic_dma_chan *ch, u32 val, | |
| 190 | − u32 offset) | |
| 191 | −{ | |
| 192 | − iowrite32(val, mic_dma_chan_to_mmio(ch) + offset); | |
| 193 | −} | |
| 194 | − | |
| 195 | −static inline u32 mic_dma_read_cmp_cnt(struct mic_dma_chan *ch) | |
| 196 | −{ | |
| 197 | − return mic_dma_read_reg(ch, MIC_DMA_REG_DSTAT) & | |
| 198 | − MIC_DMA_HW_CMP_CNT_MASK; | |
| 199 | −} | |
| 200 | − | |
| 201 | −static inline void mic_dma_chan_set_owner(struct mic_dma_chan *ch) | |
| 202 | −{ | |
| 203 | − u32 dcr = mic_dma_mmio_read(ch, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 204 | − u32 chan_num = ch->ch_num; | |
| 205 | − | |
| 206 | − dcr = (dcr & ~(0x1 << (chan_num * 2))) | (ch->owner << (chan_num * 2)); | |
| 207 | − mic_dma_mmio_write(ch, dcr, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 208 | −} | |
| 209 | − | |
| 210 | −static inline void mic_dma_enable_chan(struct mic_dma_chan *ch) | |
| 211 | −{ | |
| 212 | − u32 dcr = mic_dma_mmio_read(ch, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 213 | − | |
| 214 | − dcr |= 2 << (ch->ch_num << 1); | |
| 215 | − mic_dma_mmio_write(ch, dcr, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 216 | −} | |
| 217 | − | |
| 218 | −static inline void mic_dma_disable_chan(struct mic_dma_chan *ch) | |
| 219 | −{ | |
| 220 | − u32 dcr = mic_dma_mmio_read(ch, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 221 | − | |
| 222 | − dcr &= ~(2 << (ch->ch_num << 1)); | |
| 223 | − mic_dma_mmio_write(ch, dcr, MIC_DMA_SBOX_BASE + MIC_DMA_SBOX_DCR); | |
| 224 | −} | |
| 225 | − | |
| 226 | −static void mic_dma_chan_set_desc_ring(struct mic_dma_chan *ch) | |
| 227 | −{ | |
| 228 | − u32 drar_hi; | |
| 229 | − dma_addr_t desc_ring_micpa = ch->desc_ring_micpa; | |
| 230 | − | |
| 231 | − drar_hi = (MIC_DMA_DESC_RX_SIZE & 0x1ffff) << 4; | |
| 232 | − if (MIC_DMA_CHAN_MIC == ch->owner) { | |
| 233 | − drar_hi |= (desc_ring_micpa >> 32) & 0xf; | |
| 234 | − } else { | |
| 235 | − drar_hi |= MIC_DMA_SBOX_DRARHI_SYS_MASK; | |
| 236 | − drar_hi |= ((desc_ring_micpa >> 34) | |
| 237 | − & 0x1f) << 21; | |
| 238 | − drar_hi |= (desc_ring_micpa >> 32) & 0x3; | |
| 239 | − } | |
| 240 | − mic_dma_write_reg(ch, MIC_DMA_REG_DRAR_LO, (u32) desc_ring_micpa); | |
| 241 | − mic_dma_write_reg(ch, MIC_DMA_REG_DRAR_HI, drar_hi); | |
| 242 | −} | |
| 243 | − | |
| 244 | −static inline void mic_dma_chan_mask_intr(struct mic_dma_chan *ch) | |
| 245 | −{ | |
| 246 | − u32 dcar = mic_dma_read_reg(ch, MIC_DMA_REG_DCAR); | |
| 247 | − | |
| 248 | − if (MIC_DMA_CHAN_MIC == ch->owner) | |
| 249 | − dcar |= MIC_DMA_SBOX_DCAR_IM0; | |
| 250 | − else | |
| 251 | − dcar |= MIC_DMA_SBOX_DCAR_IM1; | |
| 252 | − mic_dma_write_reg(ch, MIC_DMA_REG_DCAR, dcar); | |
| 253 | −} | |
| 254 | − | |
| 255 | −static inline void mic_dma_chan_unmask_intr(struct mic_dma_chan *ch) | |
| 256 | −{ | |
| 257 | − u32 dcar = mic_dma_read_reg(ch, MIC_DMA_REG_DCAR); | |
| 258 | − | |
| 259 | − if (MIC_DMA_CHAN_MIC == ch->owner) | |
| 260 | − dcar &= ~MIC_DMA_SBOX_DCAR_IM0; | |
| 261 | − else | |
| 262 | − dcar &= ~MIC_DMA_SBOX_DCAR_IM1; | |
| 263 | − mic_dma_write_reg(ch, MIC_DMA_REG_DCAR, dcar); | |
| 264 | −} | |
| 265 | − | |
| 266 | −static void mic_dma_ack_interrupt(struct mic_dma_chan *ch) | |
| 267 | −{ | |
| 268 | − if (MIC_DMA_CHAN_MIC == ch->owner) { | |
| 269 | − /* HW errata */ | |
| 270 | − mic_dma_chan_mask_intr(ch); | |
| 271 | − mic_dma_chan_unmask_intr(ch); | |
| 272 | − } | |
| 273 | − to_mbus_hw_ops(ch)->ack_interrupt(to_mbus_device(ch), ch->ch_num); | |
| 274 | −} | |
| 275 | −#endif | |
| @@ -197,6 +197,8 @@ static int scmi_base_implementation_list_get(const struct scmi_handle *handle, · 196 unmodified lines | ||
| 197 | 197 | protocols_imp[tot_num_ret + loop] = *(list + loop); |
| 198 | 198 | |
| 199 | 199 | tot_num_ret += loop_num_ret; |
| 200 | + | |
| 201 | + scmi_reset_rx_to_maxsz(handle, t); | |
| 200 | 202 | } while (loop_num_ret); |
| 201 | 203 | |
| 202 | 204 | scmi_xfer_put(handle, t); |
| @@ -192,6 +192,8 @@ scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id, · 191 unmodified lines | ||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | tot_rate_cnt += num_returned; |
| 195 | + | |
| 196 | + scmi_reset_rx_to_maxsz(handle, t); | |
| 195 | 197 | /* |
| 196 | 198 | * check for both returned and remaining to avoid infinite |
| 197 | 199 | * loop due to buggy firmware |
| @@ -147,6 +147,8 @@ int scmi_do_xfer_with_response(const struct scmi_handle *h, · 146 unmodified lines | ||
| 147 | 147 | struct scmi_xfer *xfer); |
| 148 | 148 | int scmi_xfer_get_init(const struct scmi_handle *h, u8 msg_id, u8 prot_id, |
| 149 | 149 | size_t tx_size, size_t rx_size, struct scmi_xfer **p); |
| 150 | +void scmi_reset_rx_to_maxsz(const struct scmi_handle *handle, | |
| 151 | + struct scmi_xfer *xfer); | |
| 150 | 152 | int scmi_handle_put(const struct scmi_handle *handle); |
| 151 | 153 | struct scmi_handle *scmi_handle_get(struct device *dev); |
| 152 | 154 | void scmi_set_handle(struct scmi_device *scmi_dev); |
| @@ -402,6 +402,14 @@ int scmi_do_xfer(const struct scmi_handle *handle, struct scmi_xfer *xfer) · 401 unmodified lines | ||
| 402 | 402 | return ret; |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | +void scmi_reset_rx_to_maxsz(const struct scmi_handle *handle, | |
| 406 | + struct scmi_xfer *xfer) | |
| 407 | +{ | |
| 408 | + struct scmi_info *info = handle_to_scmi_info(handle); | |
| 409 | + | |
| 410 | + xfer->rx.len = info->desc->max_msg_size; | |
| 411 | +} | |
| 412 | + | |
| 405 | 413 | #define SCMI_MAX_RESPONSE_TIMEOUT (2 * MSEC_PER_SEC) |
| 406 | 414 | |
| 407 | 415 | /** |
| @@ -1403,15 +1403,21 @@ static void scmi_protocols_late_init(struct work_struct *work) · 1402 unmodified lines | ||
| 1403 | 1403 | "finalized PENDING handler - key:%X\n", |
| 1404 | 1404 | hndl->key); |
| 1405 | 1405 | ret = scmi_event_handler_enable_events(hndl); |
| 1406 | + if (ret) { | |
| 1407 | + dev_dbg(ni->handle->dev, | |
| 1408 | + "purging INVALID handler - key:%X\n", | |
| 1409 | + hndl->key); | |
| 1410 | + scmi_put_active_handler(ni, hndl); | |
| 1411 | + } | |
| 1406 | 1412 | } else { |
| 1407 | 1413 | ret = scmi_valid_pending_handler(ni, hndl); |
| 1408 | − } | |
| 1409 | − if (ret) { | |
| 1410 | − dev_dbg(ni->handle->dev, | |
| 1411 | − "purging PENDING handler - key:%X\n", | |
| 1412 | − hndl->key); | |
| 1413 | − /* this hndl can be only a pending one */ | |
| 1414 | − scmi_put_handler_unlocked(ni, hndl); | |
| 1414 | + if (ret) { | |
| 1415 | + dev_dbg(ni->handle->dev, | |
| 1416 | + "purging PENDING handler - key:%X\n", | |
| 1417 | + hndl->key); | |
| 1418 | + /* this hndl can be only a pending one */ | |
| 1419 | + scmi_put_handler_unlocked(ni, hndl); | |
| 1420 | + } | |
| 1415 | 1421 | } |
| 1416 | 1422 | } |
| 1417 | 1423 | mutex_unlock(&ni->pending_mtx); |
| @@ -1468,7 +1474,7 @@ int scmi_notification_init(struct scmi_handle *handle) · 50 unmodified lines | ||
| 1468 | 1474 | ni->gid = gid; |
| 1469 | 1475 | ni->handle = handle; |
| 1470 | 1476 | |
| 1471 | − ni->notify_wq = alloc_workqueue("scmi_notify", | |
| 1477 | + ni->notify_wq = alloc_workqueue(dev_name(handle->dev), | |
| 1472 | 1478 | WQ_UNBOUND | WQ_FREEZABLE | WQ_SYSFS, |
| 1473 | 1479 | 0); |
| 1474 | 1480 | if (!ni->notify_wq) |
| @@ -304,6 +304,8 @@ scmi_perf_describe_levels_get(const struct scmi_handle *handle, u32 domain, · 303 unmodified lines | ||
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | tot_opp_cnt += num_returned; |
| 307 | + | |
| 308 | + scmi_reset_rx_to_maxsz(handle, t); | |
| 307 | 309 | /* |
| 308 | 310 | * check for both returned and remaining to avoid infinite |
| 309 | 311 | * loop due to buggy firmware |
| @@ -36,9 +36,7 @@ struct scmi_msg_reset_domain_reset { · 35 unmodified lines | ||
| 36 | 36 | #define EXPLICIT_RESET_ASSERT BIT(1) |
| 37 | 37 | #define ASYNCHRONOUS_RESET BIT(2) |
| 38 | 38 | __le32 reset_state; |
| 39 | −#define ARCH_RESET_TYPE BIT(31) | |
| 40 | −#define COLD_RESET_STATE BIT(0) | |
| 41 | −#define ARCH_COLD_RESET (ARCH_RESET_TYPE | COLD_RESET_STATE) | |
| 39 | +#define ARCH_COLD_RESET 0 | |
| 42 | 40 | }; |
| 43 | 41 | |
| 44 | 42 | struct scmi_msg_reset_notify { |
| @@ -166,6 +166,8 @@ static int scmi_sensor_description_get(const struct scmi_handle *handle, · 165 unmodified lines | ||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | desc_index += num_returned; |
| 169 | + | |
| 170 | + scmi_reset_rx_to_maxsz(handle, t); | |
| 169 | 171 | /* |
| 170 | 172 | * check for both returned and remaining to avoid infinite |
| 171 | 173 | * loop due to buggy firmware |
| @@ -149,6 +149,6 @@ static const struct scmi_transport_ops scmi_smc_ops = { · 148 unmodified lines | ||
| 149 | 149 | const struct scmi_desc scmi_smc_desc = { |
| 150 | 150 | .ops = &scmi_smc_ops, |
| 151 | 151 | .max_rx_timeout_ms = 30, |
| 152 | − .max_msg = 1, | |
| 152 | + .max_msg = 20, | |
| 153 | 153 | .max_msg_size = 128, |
| 154 | 154 | }; |
| @@ -80,6 +80,7 @@ MODULE_FIRMWARE("amdgpu/renoir_gpu_info.bin"); · 79 unmodified lines | ||
| 80 | 80 | MODULE_FIRMWARE("amdgpu/navi10_gpu_info.bin"); |
| 81 | 81 | MODULE_FIRMWARE("amdgpu/navi14_gpu_info.bin"); |
| 82 | 82 | MODULE_FIRMWARE("amdgpu/navi12_gpu_info.bin"); |
| 83 | +MODULE_FIRMWARE("amdgpu/green_sardine_gpu_info.bin"); | |
| 83 | 84 | |
| 84 | 85 | #define AMDGPU_RESUME_MS 2000 |
| 85 | 86 | |
| @@ -239,9 +240,11 @@ bool amdgpu_device_supports_baco(struct drm_device *dev) · 153 unmodified lines | ||
| 239 | 240 | return amdgpu_asic_supports_baco(adev); |
| 240 | 241 | } |
| 241 | 242 | |
| 243 | +/* | |
| 244 | + * VRAM access helper functions | |
| 245 | + */ | |
| 246 | + | |
| 242 | 247 | /** |
| 243 | − * VRAM access helper functions. | |
| 244 | − * | |
| 245 | 248 | * amdgpu_device_vram_access - read/write a buffer in vram |
| 246 | 249 | * |
| 247 | 250 | * @adev: amdgpu_device pointer |
| @@ -705,7 +708,7 @@ void amdgpu_device_indirect_wreg64(struct amdgpu_device *adev, · 457 unmodified lines | ||
| 705 | 708 | /** |
| 706 | 709 | * amdgpu_invalid_rreg - dummy reg read function |
| 707 | 710 | * |
| 708 | − * @adev: amdgpu device pointer | |
| 711 | + * @adev: amdgpu_device pointer | |
| 709 | 712 | * @reg: offset of register |
| 710 | 713 | * |
| 711 | 714 | * Dummy register read function. Used for register blocks |
| @@ -722,7 +725,7 @@ static uint32_t amdgpu_invalid_rreg(struct amdgpu_device *adev, uint32_t reg) · 10 unmodified lines | ||
| 722 | 725 | /** |
| 723 | 726 | * amdgpu_invalid_wreg - dummy reg write function |
| 724 | 727 | * |
| 725 | − * @adev: amdgpu device pointer | |
| 728 | + * @adev: amdgpu_device pointer | |
| 726 | 729 | * @reg: offset of register |
| 727 | 730 | * @v: value to write to the register |
| 728 | 731 | * |
| @@ -739,7 +742,7 @@ static void amdgpu_invalid_wreg(struct amdgpu_device *adev, uint32_t reg, uint32 · 10 unmodified lines | ||
| 739 | 742 | /** |
| 740 | 743 | * amdgpu_invalid_rreg64 - dummy 64 bit reg read function |
| 741 | 744 | * |
| 742 | − * @adev: amdgpu device pointer | |
| 745 | + * @adev: amdgpu_device pointer | |
| 743 | 746 | * @reg: offset of register |
| 744 | 747 | * |
| 745 | 748 | * Dummy register read function. Used for register blocks |
| @@ -756,7 +759,7 @@ static uint64_t amdgpu_invalid_rreg64(struct amdgpu_device *adev, uint32_t reg) · 10 unmodified lines | ||
| 756 | 759 | /** |
| 757 | 760 | * amdgpu_invalid_wreg64 - dummy reg write function |
| 758 | 761 | * |
| 759 | − * @adev: amdgpu device pointer | |
| 762 | + * @adev: amdgpu_device pointer | |
| 760 | 763 | * @reg: offset of register |
| 761 | 764 | * @v: value to write to the register |
| 762 | 765 | * |
| @@ -773,7 +776,7 @@ static void amdgpu_invalid_wreg64(struct amdgpu_device *adev, uint32_t reg, uint · 10 unmodified lines | ||
| 773 | 776 | /** |
| 774 | 777 | * amdgpu_block_invalid_rreg - dummy reg read function |
| 775 | 778 | * |
| 776 | − * @adev: amdgpu device pointer | |
| 779 | + * @adev: amdgpu_device pointer | |
| 777 | 780 | * @block: offset of instance |
| 778 | 781 | * @reg: offset of register |
| 779 | 782 | * |
| @@ -793,7 +796,7 @@ static uint32_t amdgpu_block_invalid_rreg(struct amdgpu_device *adev, · 13 unmodified lines | ||
| 793 | 796 | /** |
| 794 | 797 | * amdgpu_block_invalid_wreg - dummy reg write function |
| 795 | 798 | * |
| 796 | − * @adev: amdgpu device pointer | |
| 799 | + * @adev: amdgpu_device pointer | |
| 797 | 800 | * @block: offset of instance |
| 798 | 801 | * @reg: offset of register |
| 799 | 802 | * @v: value to write to the register |
| @@ -813,7 +816,7 @@ static void amdgpu_block_invalid_wreg(struct amdgpu_device *adev, · 13 unmodified lines | ||
| 813 | 816 | /** |
| 814 | 817 | * amdgpu_device_asic_init - Wrapper for atom asic_init |
| 815 | 818 | * |
| 816 | − * @dev: drm_device pointer | |
| 819 | + * @adev: amdgpu_device pointer | |
| 817 | 820 | * |
| 818 | 821 | * Does any asic specific work and then calls atom asic init. |
| 819 | 822 | */ |
| @@ -827,7 +830,7 @@ static int amdgpu_device_asic_init(struct amdgpu_device *adev) · 7 unmodified lines | ||
| 827 | 830 | /** |
| 828 | 831 | * amdgpu_device_vram_scratch_init - allocate the VRAM scratch page |
| 829 | 832 | * |
| 830 | − * @adev: amdgpu device pointer | |
| 833 | + * @adev: amdgpu_device pointer | |
| 831 | 834 | * |
| 832 | 835 | * Allocates a scratch page of VRAM for use by various things in the |
| 833 | 836 | * driver. |
| @@ -844,7 +847,7 @@ static int amdgpu_device_vram_scratch_init(struct amdgpu_device *adev) · 10 unmodified lines | ||
| 844 | 847 | /** |
| 845 | 848 | * amdgpu_device_vram_scratch_fini - Free the VRAM scratch page |
| 846 | 849 | * |
| 847 | − * @adev: amdgpu device pointer | |
| 850 | + * @adev: amdgpu_device pointer | |
| 848 | 851 | * |
| 849 | 852 | * Frees the VRAM scratch page. |
| 850 | 853 | */ |
| @@ -1803,7 +1806,10 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) · 952 unmodified lines | ||
| 1803 | 1806 | chip_name = "arcturus"; |
| 1804 | 1807 | break; |
| 1805 | 1808 | case CHIP_RENOIR: |
| 1806 | − chip_name = "renoir"; | |
| 1809 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 1810 | + chip_name = "renoir"; | |
| 1811 | + else | |
| 1812 | + chip_name = "green_sardine"; | |
| 1807 | 1813 | break; |
| 1808 | 1814 | case CHIP_NAVI10: |
| 1809 | 1815 | chip_name = "navi10"; |
| @@ -3011,7 +3017,7 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type) · 1201 unmodified lines | ||
| 3011 | 3017 | /** |
| 3012 | 3018 | * amdgpu_device_has_dc_support - check if dc is supported |
| 3013 | 3019 | * |
| 3014 | − * @adev: amdgpu_device_pointer | |
| 3020 | + * @adev: amdgpu_device pointer | |
| 3015 | 3021 | * |
| 3016 | 3022 | * Returns true for supported, false for not supported |
| 3017 | 3023 | */ |
| @@ -4045,7 +4051,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) · 1027 unmodified lines | ||
| 4045 | 4051 | /** |
| 4046 | 4052 | * amdgpu_device_reset_sriov - reset ASIC for SR-IOV vf |
| 4047 | 4053 | * |
| 4048 | − * @adev: amdgpu device pointer | |
| 4054 | + * @adev: amdgpu_device pointer | |
| 4049 | 4055 | * @from_hypervisor: request from hypervisor |
| 4050 | 4056 | * |
| 4051 | 4057 | * do VF FLR and reinitialize Asic |
| @@ -4100,7 +4106,7 @@ error: · 48 unmodified lines | ||
| 4100 | 4106 | /** |
| 4101 | 4107 | * amdgpu_device_has_job_running - check if there is any job in mirror list |
| 4102 | 4108 | * |
| 4103 | − * @adev: amdgpu device pointer | |
| 4109 | + * @adev: amdgpu_device pointer | |
| 4104 | 4110 | * |
| 4105 | 4111 | * check if there is any job in mirror list |
| 4106 | 4112 | */ |
| @@ -4128,7 +4134,7 @@ bool amdgpu_device_has_job_running(struct amdgpu_device *adev) · 21 unmodified lines | ||
| 4128 | 4134 | /** |
| 4129 | 4135 | * amdgpu_device_should_recover_gpu - check if we should try GPU recovery |
| 4130 | 4136 | * |
| 4131 | − * @adev: amdgpu device pointer | |
| 4137 | + * @adev: amdgpu_device pointer | |
| 4132 | 4138 | * |
| 4133 | 4139 | * Check amdgpu_gpu_recovery and SRIOV status to see if we should try to recover |
| 4134 | 4140 | * a hung GPU. |
| @@ -4477,7 +4483,7 @@ static int amdgpu_device_suspend_display_audio(struct amdgpu_device *adev) · 342 unmodified lines | ||
| 4477 | 4483 | /** |
| 4478 | 4484 | * amdgpu_device_gpu_recover - reset the asic and recover scheduler |
| 4479 | 4485 | * |
| 4480 | − * @adev: amdgpu device pointer | |
| 4486 | + * @adev: amdgpu_device pointer | |
| 4481 | 4487 | * @job: which job trigger hang |
| 4482 | 4488 | * |
| 4483 | 4489 | * Attempt to reset the GPU if it has hung (all asics). |
| @@ -4497,7 +4503,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 13 unmodified lines | ||
| 4497 | 4503 | bool need_emergency_restart = false; |
| 4498 | 4504 | bool audio_suspended = false; |
| 4499 | 4505 | |
| 4500 | − /** | |
| 4506 | + /* | |
| 4501 | 4507 | * Special case: RAS triggered and full reset isn't supported |
| 4502 | 4508 | */ |
| 4503 | 4509 | need_emergency_restart = amdgpu_ras_need_emergency_restart(adev); |
| @@ -1066,6 +1066,7 @@ static const struct pci_device_id pciidlist[] = { · 1065 unmodified lines | ||
| 1066 | 1066 | {0x1002, 0x7319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10}, |
| 1067 | 1067 | {0x1002, 0x731A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10}, |
| 1068 | 1068 | {0x1002, 0x731B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10}, |
| 1069 | + {0x1002, 0x731E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10}, | |
| 1069 | 1070 | {0x1002, 0x731F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI10}, |
| 1070 | 1071 | /* Navi14 */ |
| 1071 | 1072 | {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14}, |
| @@ -596,6 +596,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 595 unmodified lines | ||
| 596 | 596 | struct ww_acquire_ctx ticket; |
| 597 | 597 | struct list_head list, duplicates; |
| 598 | 598 | uint64_t va_flags; |
| 599 | + uint64_t vm_size; | |
| 599 | 600 | int r = 0; |
| 600 | 601 | |
| 601 | 602 | if (args->va_address < AMDGPU_VA_RESERVED_SIZE) { |
| @@ -616,6 +617,15 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, · 14 unmodified lines | ||
| 616 | 617 | |
| 617 | 618 | args->va_address &= AMDGPU_GMC_HOLE_MASK; |
| 618 | 619 | |
| 620 | + vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE; | |
| 621 | + vm_size -= AMDGPU_VA_RESERVED_SIZE; | |
| 622 | + if (args->va_address + args->map_size > vm_size) { | |
| 623 | + dev_dbg(&dev->pdev->dev, | |
| 624 | + "va_address 0x%llx is in top reserved area 0x%llx\n", | |
| 625 | + args->va_address + args->map_size, vm_size); | |
| 626 | + return -EINVAL; | |
| 627 | + } | |
| 628 | + | |
| 619 | 629 | if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) { |
| 620 | 630 | dev_dbg(&dev->pdev->dev, "invalid flags combination 0x%08X\n", |
| 621 | 631 | args->flags); |
| @@ -81,8 +81,8 @@ static const struct ttm_resource_manager_func amdgpu_gtt_mgr_func; · 80 unmodified lines | ||
| 81 | 81 | /** |
| 82 | 82 | * amdgpu_gtt_mgr_init - init GTT manager and DRM MM |
| 83 | 83 | * |
| 84 | − * @man: TTM memory type manager | |
| 85 | − * @p_size: maximum size of GTT | |
| 84 | + * @adev: amdgpu_device pointer | |
| 85 | + * @gtt_size: maximum size of GTT | |
| 86 | 86 | * |
| 87 | 87 | * Allocate and initialize the GTT manager. |
| 88 | 88 | */ |
| @@ -123,7 +123,7 @@ int amdgpu_gtt_mgr_init(struct amdgpu_device *adev, uint64_t gtt_size) · 34 unmodified lines | ||
| 123 | 123 | /** |
| 124 | 124 | * amdgpu_gtt_mgr_fini - free and destroy GTT manager |
| 125 | 125 | * |
| 126 | − * @man: TTM memory type manager | |
| 126 | + * @adev: amdgpu_device pointer | |
| 127 | 127 | * |
| 128 | 128 | * Destroy and free the GTT manager, returns -EBUSY if ranges are still |
| 129 | 129 | * allocated inside it. |
| @@ -2524,6 +2524,7 @@ int parse_ta_bin_descriptor(struct psp_context *psp, · 2523 unmodified lines | ||
| 2524 | 2524 | psp->asd_feature_version = le32_to_cpu(desc->fw_version); |
| 2525 | 2525 | psp->asd_ucode_size = le32_to_cpu(desc->size_bytes); |
| 2526 | 2526 | psp->asd_start_addr = ucode_start_addr; |
| 2527 | + psp->asd_fw = psp->ta_fw; | |
| 2527 | 2528 | break; |
| 2528 | 2529 | case TA_FW_TYPE_PSP_XGMI: |
| 2529 | 2530 | psp->ta_xgmi_ucode_version = le32_to_cpu(desc->fw_version); |
| @@ -39,6 +39,7 @@ · 38 unmodified lines | ||
| 39 | 39 | #define FIRMWARE_RAVEN2 "amdgpu/raven2_vcn.bin" |
| 40 | 40 | #define FIRMWARE_ARCTURUS "amdgpu/arcturus_vcn.bin" |
| 41 | 41 | #define FIRMWARE_RENOIR "amdgpu/renoir_vcn.bin" |
| 42 | +#define FIRMWARE_GREEN_SARDINE "amdgpu/green_sardine_vcn.bin" | |
| 42 | 43 | #define FIRMWARE_NAVI10 "amdgpu/navi10_vcn.bin" |
| 43 | 44 | #define FIRMWARE_NAVI14 "amdgpu/navi14_vcn.bin" |
| 44 | 45 | #define FIRMWARE_NAVI12 "amdgpu/navi12_vcn.bin" |
| @@ -50,6 +51,7 @@ MODULE_FIRMWARE(FIRMWARE_PICASSO); · 5 unmodified lines | ||
| 50 | 51 | MODULE_FIRMWARE(FIRMWARE_RAVEN2); |
| 51 | 52 | MODULE_FIRMWARE(FIRMWARE_ARCTURUS); |
| 52 | 53 | MODULE_FIRMWARE(FIRMWARE_RENOIR); |
| 54 | +MODULE_FIRMWARE(FIRMWARE_GREEN_SARDINE); | |
| 53 | 55 | MODULE_FIRMWARE(FIRMWARE_NAVI10); |
| 54 | 56 | MODULE_FIRMWARE(FIRMWARE_NAVI14); |
| 55 | 57 | MODULE_FIRMWARE(FIRMWARE_NAVI12); |
| @@ -89,7 +91,11 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) · 33 unmodified lines | ||
| 89 | 91 | adev->vcn.indirect_sram = true; |
| 90 | 92 | break; |
| 91 | 93 | case CHIP_RENOIR: |
| 92 | − fw_name = FIRMWARE_RENOIR; | |
| 94 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 95 | + fw_name = FIRMWARE_RENOIR; | |
| 96 | + else | |
| 97 | + fw_name = FIRMWARE_GREEN_SARDINE; | |
| 98 | + | |
| 93 | 99 | if ((adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) && |
| 94 | 100 | (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)) |
| 95 | 101 | adev->vcn.indirect_sram = true; |
| @@ -112,8 +112,8 @@ struct amdgpu_bo_list_entry; · 111 unmodified lines | ||
| 112 | 112 | #define AMDGPU_MMHUB_0 1 |
| 113 | 113 | #define AMDGPU_MMHUB_1 2 |
| 114 | 114 | |
| 115 | −/* hardcode that limit for now */ | |
| 116 | −#define AMDGPU_VA_RESERVED_SIZE (1ULL << 20) | |
| 115 | +/* Reserve 2MB at top/bottom of address space for kernel use */ | |
| 116 | +#define AMDGPU_VA_RESERVED_SIZE (2ULL << 20) | |
| 117 | 117 | |
| 118 | 118 | /* max vmids dedicated for process */ |
| 119 | 119 | #define AMDGPU_VM_MAX_RESERVED_VMID 1 |
| @@ -168,8 +168,7 @@ static const struct ttm_resource_manager_func amdgpu_vram_mgr_func; · 167 unmodified lines | ||
| 168 | 168 | /** |
| 169 | 169 | * amdgpu_vram_mgr_init - init VRAM manager and DRM MM |
| 170 | 170 | * |
| 171 | − * @man: TTM memory type manager | |
| 172 | − * @p_size: maximum size of VRAM | |
| 171 | + * @adev: amdgpu_device pointer | |
| 173 | 172 | * |
| 174 | 173 | * Allocate and initialize the VRAM manager. |
| 175 | 174 | */ |
| @@ -199,7 +198,7 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev) · 23 unmodified lines | ||
| 199 | 198 | /** |
| 200 | 199 | * amdgpu_vram_mgr_fini - free and destroy VRAM manager |
| 201 | 200 | * |
| 202 | − * @man: TTM memory type manager | |
| 201 | + * @adev: amdgpu_device pointer | |
| 203 | 202 | * |
| 204 | 203 | * Destroy and free the VRAM manager, returns -EBUSY if ranges are still |
| 205 | 204 | * allocated inside it. |
| @@ -229,7 +228,7 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev) · 23 unmodified lines | ||
| 229 | 228 | /** |
| 230 | 229 | * amdgpu_vram_mgr_vis_size - Calculate visible node size |
| 231 | 230 | * |
| 232 | − * @adev: amdgpu device structure | |
| 231 | + * @adev: amdgpu_device pointer | |
| 233 | 232 | * @node: MM node structure |
| 234 | 233 | * |
| 235 | 234 | * Calculate how many bytes of the MM node are inside visible VRAM |
| @@ -1336,11 +1336,13 @@ cik_asic_reset_method(struct amdgpu_device *adev) · 1335 unmodified lines | ||
| 1336 | 1336 | |
| 1337 | 1337 | switch (adev->asic_type) { |
| 1338 | 1338 | case CHIP_BONAIRE: |
| 1339 | − case CHIP_HAWAII: | |
| 1340 | 1339 | /* disable baco reset until it works */ |
| 1341 | 1340 | /* smu7_asic_get_baco_capability(adev, &baco_reset); */ |
| 1342 | 1341 | baco_reset = false; |
| 1343 | 1342 | break; |
| 1343 | + case CHIP_HAWAII: | |
| 1344 | + baco_reset = cik_asic_supports_baco(adev); | |
| 1345 | + break; | |
| 1344 | 1346 | default: |
| 1345 | 1347 | baco_reset = false; |
| 1346 | 1348 | break; |
| @@ -1071,22 +1071,19 @@ static int cik_sdma_soft_reset(void *handle) · 1070 unmodified lines | ||
| 1071 | 1071 | { |
| 1072 | 1072 | u32 srbm_soft_reset = 0; |
| 1073 | 1073 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 1074 | − u32 tmp = RREG32(mmSRBM_STATUS2); | |
| 1074 | + u32 tmp; | |
| 1075 | 1075 | |
| 1076 | − if (tmp & SRBM_STATUS2__SDMA_BUSY_MASK) { | |
| 1077 | − /* sdma0 */ | |
| 1078 | − tmp = RREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET); | |
| 1079 | − tmp |= SDMA0_F32_CNTL__HALT_MASK; | |
| 1080 | − WREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET, tmp); | |
| 1081 | − srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK; | |
| 1082 | − } | |
| 1083 | − if (tmp & SRBM_STATUS2__SDMA1_BUSY_MASK) { | |
| 1084 | − /* sdma1 */ | |
| 1085 | − tmp = RREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET); | |
| 1086 | − tmp |= SDMA0_F32_CNTL__HALT_MASK; | |
| 1087 | − WREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET, tmp); | |
| 1088 | − srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK; | |
| 1089 | − } | |
| 1076 | + /* sdma0 */ | |
| 1077 | + tmp = RREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET); | |
| 1078 | + tmp |= SDMA0_F32_CNTL__HALT_MASK; | |
| 1079 | + WREG32(mmSDMA0_F32_CNTL + SDMA0_REGISTER_OFFSET, tmp); | |
| 1080 | + srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA_MASK; | |
| 1081 | + | |
| 1082 | + /* sdma1 */ | |
| 1083 | + tmp = RREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET); | |
| 1084 | + tmp |= SDMA0_F32_CNTL__HALT_MASK; | |
| 1085 | + WREG32(mmSDMA0_F32_CNTL + SDMA1_REGISTER_OFFSET, tmp); | |
| 1086 | + srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_SDMA1_MASK; | |
| 1090 | 1087 | |
| 1091 | 1088 | if (srbm_soft_reset) { |
| 1092 | 1089 | tmp = RREG32(mmSRBM_SOFT_RESET); |
| @@ -128,6 +128,9 @@ · 127 unmodified lines | ||
| 128 | 128 | #define PA_SC_ENHANCE_3__FORCE_PBB_WORKLOAD_MODE_TO_ZERO__SHIFT 0x3 |
| 129 | 129 | #define PA_SC_ENHANCE_3__FORCE_PBB_WORKLOAD_MODE_TO_ZERO_MASK 0x00000008L |
| 130 | 130 | |
| 131 | +#define mmCGTT_SPI_CS_CLK_CTRL 0x507c | |
| 132 | +#define mmCGTT_SPI_CS_CLK_CTRL_BASE_IDX 1 | |
| 133 | + | |
| 131 | 134 | MODULE_FIRMWARE("amdgpu/navi10_ce.bin"); |
| 132 | 135 | MODULE_FIRMWARE("amdgpu/navi10_pfp.bin"); |
| 133 | 136 | MODULE_FIRMWARE("amdgpu/navi10_me.bin"); |
| @@ -3094,6 +3097,7 @@ static const struct soc15_reg_golden golden_settings_gc_rlc_spm_10_1_2_nv12[] = · 2960 unmodified lines | ||
| 3094 | 3097 | |
| 3095 | 3098 | static const struct soc15_reg_golden golden_settings_gc_10_3[] = |
| 3096 | 3099 | { |
| 3100 | + SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0x78000000, 0x78000100), | |
| 3097 | 3101 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_PS_CLK_CTRL, 0xff7f0fff, 0x78000100), |
| 3098 | 3102 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0xff7f0fff, 0x30000100), |
| 3099 | 3103 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0xff7f0fff, 0x7e000100), |
| @@ -117,6 +117,13 @@ MODULE_FIRMWARE("amdgpu/renoir_mec.bin"); · 116 unmodified lines | ||
| 117 | 117 | MODULE_FIRMWARE("amdgpu/renoir_mec2.bin"); |
| 118 | 118 | MODULE_FIRMWARE("amdgpu/renoir_rlc.bin"); |
| 119 | 119 | |
| 120 | +MODULE_FIRMWARE("amdgpu/green_sardine_ce.bin"); | |
| 121 | +MODULE_FIRMWARE("amdgpu/green_sardine_pfp.bin"); | |
| 122 | +MODULE_FIRMWARE("amdgpu/green_sardine_me.bin"); | |
| 123 | +MODULE_FIRMWARE("amdgpu/green_sardine_mec.bin"); | |
| 124 | +MODULE_FIRMWARE("amdgpu/green_sardine_mec2.bin"); | |
| 125 | +MODULE_FIRMWARE("amdgpu/green_sardine_rlc.bin"); | |
| 126 | + | |
| 120 | 127 | #define mmTCP_CHAN_STEER_0_ARCT 0x0b03 |
| 121 | 128 | #define mmTCP_CHAN_STEER_0_ARCT_BASE_IDX 0 |
| 122 | 129 | #define mmTCP_CHAN_STEER_1_ARCT 0x0b04 |
| @@ -1630,7 +1637,10 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev) · 1507 unmodified lines | ||
| 1630 | 1637 | chip_name = "arcturus"; |
| 1631 | 1638 | break; |
| 1632 | 1639 | case CHIP_RENOIR: |
| 1633 | − chip_name = "renoir"; | |
| 1640 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 1641 | + chip_name = "renoir"; | |
| 1642 | + else | |
| 1643 | + chip_name = "green_sardine"; | |
| 1634 | 1644 | break; |
| 1635 | 1645 | default: |
| 1636 | 1646 | BUG(); |
| @@ -455,6 +455,15 @@ void nv_set_virt_ops(struct amdgpu_device *adev) · 454 unmodified lines | ||
| 455 | 455 | adev->virt.ops = &xgpu_nv_virt_ops; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | +static bool nv_is_headless_sku(struct pci_dev *pdev) | |
| 459 | +{ | |
| 460 | + if ((pdev->device == 0x731E && | |
| 461 | + (pdev->revision == 0xC6 || pdev->revision == 0xC7)) || | |
| 462 | + (pdev->device == 0x7340 && pdev->revision == 0xC9)) | |
| 463 | + return true; | |
| 464 | + return false; | |
| 465 | +} | |
| 466 | + | |
| 458 | 467 | int nv_set_ip_blocks(struct amdgpu_device *adev) |
| 459 | 468 | { |
| 460 | 469 | int r; |
| @@ -483,7 +492,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) · 22 unmodified lines | ||
| 483 | 492 | if (adev->enable_virtual_display || amdgpu_sriov_vf(adev)) |
| 484 | 493 | amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block); |
| 485 | 494 | #if defined(CONFIG_DRM_AMD_DC) |
| 486 | − else if (amdgpu_device_has_dc_support(adev)) | |
| 495 | + else if (amdgpu_device_has_dc_support(adev) && | |
| 496 | + !nv_is_headless_sku(adev->pdev)) | |
| 487 | 497 | amdgpu_device_ip_block_add(adev, &dm_ip_block); |
| 488 | 498 | #endif |
| 489 | 499 | amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block); |
| @@ -491,7 +501,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) · 1 unmodified line | ||
| 491 | 501 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT && |
| 492 | 502 | !amdgpu_sriov_vf(adev)) |
| 493 | 503 | amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block); |
| 494 | − amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block); | |
| 504 | + if (!nv_is_headless_sku(adev->pdev)) | |
| 505 | + amdgpu_device_ip_block_add(adev, &vcn_v2_0_ip_block); | |
| 495 | 506 | amdgpu_device_ip_block_add(adev, &jpeg_v2_0_ip_block); |
| 496 | 507 | if (adev->enable_mes) |
| 497 | 508 | amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block); |
| @@ -39,6 +39,7 @@ · 38 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | MODULE_FIRMWARE("amdgpu/renoir_asd.bin"); |
| 41 | 41 | MODULE_FIRMWARE("amdgpu/renoir_ta.bin"); |
| 42 | +MODULE_FIRMWARE("amdgpu/green_sardine_asd.bin"); | |
| 42 | 43 | |
| 43 | 44 | /* address block */ |
| 44 | 45 | #define smnMP1_FIRMWARE_FLAGS 0x3010024 |
| @@ -54,7 +55,10 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) · 9 unmodified lines | ||
| 54 | 55 | |
| 55 | 56 | switch (adev->asic_type) { |
| 56 | 57 | case CHIP_RENOIR: |
| 57 | − chip_name = "renoir"; | |
| 58 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 59 | + chip_name = "renoir"; | |
| 60 | + else | |
| 61 | + chip_name = "green_sardine"; | |
| 58 | 62 | break; |
| 59 | 63 | default: |
| 60 | 64 | BUG(); |
| @@ -69,6 +69,7 @@ MODULE_FIRMWARE("amdgpu/picasso_sdma.bin"); · 68 unmodified lines | ||
| 69 | 69 | MODULE_FIRMWARE("amdgpu/raven2_sdma.bin"); |
| 70 | 70 | MODULE_FIRMWARE("amdgpu/arcturus_sdma.bin"); |
| 71 | 71 | MODULE_FIRMWARE("amdgpu/renoir_sdma.bin"); |
| 72 | +MODULE_FIRMWARE("amdgpu/green_sardine_sdma.bin"); | |
| 72 | 73 | |
| 73 | 74 | #define SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK 0x000000F8L |
| 74 | 75 | #define SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK 0xFC000000L |
| @@ -619,7 +620,10 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev) · 544 unmodified lines | ||
| 619 | 620 | chip_name = "arcturus"; |
| 620 | 621 | break; |
| 621 | 622 | case CHIP_RENOIR: |
| 622 | − chip_name = "renoir"; | |
| 623 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 624 | + chip_name = "renoir"; | |
| 625 | + else | |
| 626 | + chip_name = "green_sardine"; | |
| 623 | 627 | break; |
| 624 | 628 | default: |
| 625 | 629 | BUG(); |
| @@ -1195,8 +1195,7 @@ static int soc15_common_early_init(void *handle) · 1194 unmodified lines | ||
| 1195 | 1195 | |
| 1196 | 1196 | adev->pg_flags = AMD_PG_SUPPORT_SDMA | |
| 1197 | 1197 | AMD_PG_SUPPORT_MMHUB | |
| 1198 | − AMD_PG_SUPPORT_VCN | | |
| 1199 | − AMD_PG_SUPPORT_VCN_DPG; | |
| 1198 | + AMD_PG_SUPPORT_VCN; | |
| 1200 | 1199 | } else { |
| 1201 | 1200 | adev->cg_flags = AMD_CG_SUPPORT_GFX_MGCG | |
| 1202 | 1201 | AMD_CG_SUPPORT_GFX_MGLS | |
| @@ -1243,7 +1242,15 @@ static int soc15_common_early_init(void *handle) · 40 unmodified lines | ||
| 1243 | 1242 | break; |
| 1244 | 1243 | case CHIP_RENOIR: |
| 1245 | 1244 | adev->asic_funcs = &soc15_asic_funcs; |
| 1246 | − adev->apu_flags |= AMD_APU_IS_RENOIR; | |
| 1245 | + if (adev->pdev->device == 0x1636) | |
| 1246 | + adev->apu_flags |= AMD_APU_IS_RENOIR; | |
| 1247 | + else | |
| 1248 | + adev->apu_flags |= AMD_APU_IS_GREEN_SARDINE; | |
| 1249 | + | |
| 1250 | + if (adev->apu_flags & AMD_APU_IS_RENOIR) | |
| 1251 | + adev->external_rev_id = adev->rev_id + 0x91; | |
| 1252 | + else | |
| 1253 | + adev->external_rev_id = adev->rev_id + 0xa1; | |
| 1247 | 1254 | adev->cg_flags = AMD_CG_SUPPORT_GFX_MGCG | |
| 1248 | 1255 | AMD_CG_SUPPORT_GFX_MGLS | |
| 1249 | 1256 | AMD_CG_SUPPORT_GFX_3D_CGCG | |
| @@ -1268,7 +1275,6 @@ static int soc15_common_early_init(void *handle) · 18 unmodified lines | ||
| 1268 | 1275 | AMD_PG_SUPPORT_VCN | |
| 1269 | 1276 | AMD_PG_SUPPORT_JPEG | |
| 1270 | 1277 | AMD_PG_SUPPORT_VCN_DPG; |
| 1271 | − adev->external_rev_id = adev->rev_id + 0x91; | |
| 1272 | 1278 | break; |
| 1273 | 1279 | default: |
| 1274 | 1280 | /* FIXME: not supported yet */ |
| @@ -798,10 +798,10 @@ int kfd_create_crat_image_acpi(void **crat_image, size_t *size) · 797 unmodified lines | ||
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | pcrat_image = kvmalloc(crat_table->length, GFP_KERNEL); |
| 801 | − memcpy(pcrat_image, crat_table, crat_table->length); | |
| 802 | 801 | if (!pcrat_image) |
| 803 | 802 | return -ENOMEM; |
| 804 | 803 | |
| 804 | + memcpy(pcrat_image, crat_table, crat_table->length); | |
| 805 | 805 | *crat_image = pcrat_image; |
| 806 | 806 | *size = crat_table->length; |
| 807 | 807 | |
| @@ -42,6 +42,7 @@ config DRM_AMD_DC_SI · 41 unmodified lines | ||
| 42 | 42 | config DEBUG_KERNEL_DC |
| 43 | 43 | bool "Enable kgdb break in DC" |
| 44 | 44 | depends on DRM_AMD_DC |
| 45 | + depends on KGDB | |
| 45 | 46 | help |
| 46 | 47 | Choose this option if you want to hit kdgb_break in assert. |
| 47 | 48 | |
| @@ -100,6 +100,8 @@ MODULE_FIRMWARE(FIRMWARE_SIENNA_CICHLID_DMUB); · 99 unmodified lines | ||
| 100 | 100 | #define FIRMWARE_NAVY_FLOUNDER_DMUB "amdgpu/navy_flounder_dmcub.bin" |
| 101 | 101 | MODULE_FIRMWARE(FIRMWARE_NAVY_FLOUNDER_DMUB); |
| 102 | 102 | #endif |
| 103 | +#define FIRMWARE_GREEN_SARDINE_DMUB "amdgpu/green_sardine_dmcub.bin" | |
| 104 | +MODULE_FIRMWARE(FIRMWARE_GREEN_SARDINE_DMUB); | |
| 103 | 105 | |
| 104 | 106 | #define FIRMWARE_RAVEN_DMCU "amdgpu/raven_dmcu.bin" |
| 105 | 107 | MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU); |
| @@ -583,7 +585,7 @@ static void amdgpu_dm_fbc_init(struct drm_connector *connector) · 477 unmodified lines | ||
| 583 | 585 | { |
| 584 | 586 | struct drm_device *dev = connector->dev; |
| 585 | 587 | struct amdgpu_device *adev = drm_to_adev(dev); |
| 586 | − struct dm_comressor_info *compressor = &adev->dm.compressor; | |
| 588 | + struct dm_compressor_info *compressor = &adev->dm.compressor; | |
| 587 | 589 | struct amdgpu_dm_connector *aconn = to_amdgpu_dm_connector(connector); |
| 588 | 590 | struct drm_display_mode *mode; |
| 589 | 591 | unsigned long max_size = 0; |
| @@ -973,6 +975,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) · 383 unmodified lines | ||
| 973 | 975 | case CHIP_RAVEN: |
| 974 | 976 | case CHIP_RENOIR: |
| 975 | 977 | init_data.flags.gpu_vm_support = true; |
| 978 | + if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id)) | |
| 979 | + init_data.flags.disable_dmcu = true; | |
| 976 | 980 | break; |
| 977 | 981 | default: |
| 978 | 982 | break; |
| @@ -1267,6 +1271,8 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) · 288 unmodified lines | ||
| 1267 | 1271 | case CHIP_RENOIR: |
| 1268 | 1272 | dmub_asic = DMUB_ASIC_DCN21; |
| 1269 | 1273 | fw_name_dmub = FIRMWARE_RENOIR_DMUB; |
| 1274 | + if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id)) | |
| 1275 | + fw_name_dmub = FIRMWARE_GREEN_SARDINE_DMUB; | |
| 1270 | 1276 | break; |
| 1271 | 1277 | #if defined(CONFIG_DRM_AMD_DC_DCN3_0) |
| 1272 | 1278 | case CHIP_SIENNA_CICHLID: |
| @@ -86,7 +86,7 @@ struct irq_list_head { · 85 unmodified lines | ||
| 86 | 86 | * @bo_ptr: Pointer to the buffer object |
| 87 | 87 | * @gpu_addr: MMIO gpu addr |
| 88 | 88 | */ |
| 89 | −struct dm_comressor_info { | |
| 89 | +struct dm_compressor_info { | |
| 90 | 90 | void *cpu_addr; |
| 91 | 91 | struct amdgpu_bo *bo_ptr; |
| 92 | 92 | uint64_t gpu_addr; |
| @@ -148,7 +148,7 @@ struct amdgpu_dm_backlight_caps { · 55 unmodified lines | ||
| 148 | 148 | * @soc_bounding_box: SOC bounding box values provided by gpu_info FW |
| 149 | 149 | * @cached_state: Caches device atomic state for suspend/resume |
| 150 | 150 | * @cached_dc_state: Cached state of content streams |
| 151 | − * @compressor: Frame buffer compression buffer. See &struct dm_comressor_info | |
| 151 | + * @compressor: Frame buffer compression buffer. See &struct dm_compressor_info | |
| 152 | 152 | * @force_timing_sync: set via debugfs. When set, indicates that all connected |
| 153 | 153 | * displays will be forced to synchronize. |
| 154 | 154 | */ |
| @@ -324,7 +324,7 @@ struct amdgpu_display_manager { · 169 unmodified lines | ||
| 324 | 324 | struct drm_atomic_state *cached_state; |
| 325 | 325 | struct dc_state *cached_dc_state; |
| 326 | 326 | |
| 327 | − struct dm_comressor_info compressor; | |
| 327 | + struct dm_compressor_info compressor; | |
| 328 | 328 | |
| 329 | 329 | const struct firmware *fw_dmcu; |
| 330 | 330 | uint32_t dmcu_fw_version; |
| @@ -166,6 +166,11 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p · 165 unmodified lines | ||
| 166 | 166 | rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg); |
| 167 | 167 | break; |
| 168 | 168 | } |
| 169 | + | |
| 170 | + if (ASICREV_IS_GREEN_SARDINE(asic_id.hw_internal_rev)) { | |
| 171 | + rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg); | |
| 172 | + break; | |
| 173 | + } | |
| 169 | 174 | if (ASICREV_IS_RAVEN2(asic_id.hw_internal_rev)) { |
| 170 | 175 | rv2_clk_mgr_construct(ctx, clk_mgr, pp_smu); |
| 171 | 176 | break; |
| @@ -1571,8 +1571,8 @@ static void init_state(struct dc *dc, struct dc_state *context) · 1570 unmodified lines | ||
| 1571 | 1571 | |
| 1572 | 1572 | struct dc_state *dc_create_state(struct dc *dc) |
| 1573 | 1573 | { |
| 1574 | − struct dc_state *context = kzalloc(sizeof(struct dc_state), | |
| 1575 | − GFP_KERNEL); | |
| 1574 | + struct dc_state *context = kvzalloc(sizeof(struct dc_state), | |
| 1575 | + GFP_KERNEL); | |
| 1576 | 1576 | |
| 1577 | 1577 | if (!context) |
| 1578 | 1578 | return NULL; |
| @@ -120,6 +120,8 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id) · 119 unmodified lines | ||
| 120 | 120 | dc_version = DCN_VERSION_1_01; |
| 121 | 121 | if (ASICREV_IS_RENOIR(asic_id.hw_internal_rev)) |
| 122 | 122 | dc_version = DCN_VERSION_2_1; |
| 123 | + if (ASICREV_IS_GREEN_SARDINE(asic_id.hw_internal_rev)) | |
| 124 | + dc_version = DCN_VERSION_2_1; | |
| 123 | 125 | break; |
| 124 | 126 | #endif |
| 125 | 127 | |
| @@ -1149,7 +1149,8 @@ static uint32_t dcn3_get_pix_clk_dividers( · 1148 unmodified lines | ||
| 1149 | 1149 | static const struct clock_source_funcs dcn3_clk_src_funcs = { |
| 1150 | 1150 | .cs_power_down = dce110_clock_source_power_down, |
| 1151 | 1151 | .program_pix_clk = dcn3_program_pix_clk, |
| 1152 | − .get_pix_clk_dividers = dcn3_get_pix_clk_dividers | |
| 1152 | + .get_pix_clk_dividers = dcn3_get_pix_clk_dividers, | |
| 1153 | + .get_pixel_clk_frequency_100hz = get_pixel_clk_frequency_100hz | |
| 1153 | 1154 | }; |
| 1154 | 1155 | #endif |
| 1155 | 1156 | /*****************************************/ |
| @@ -2105,12 +2105,12 @@ static bool dcn30_internal_validate_bw( · 2104 unmodified lines | ||
| 2105 | 2105 | |
| 2106 | 2106 | if (split[i]) { |
| 2107 | 2107 | if (odm) { |
| 2108 | − if (split[i] == 4 && old_pipe->next_odm_pipe->next_odm_pipe) | |
| 2108 | + if (split[i] == 4 && old_pipe->next_odm_pipe && old_pipe->next_odm_pipe->next_odm_pipe) | |
| 2109 | 2109 | old_index = old_pipe->next_odm_pipe->next_odm_pipe->pipe_idx; |
| 2110 | 2110 | else if (old_pipe->next_odm_pipe) |
| 2111 | 2111 | old_index = old_pipe->next_odm_pipe->pipe_idx; |
| 2112 | 2112 | } else { |
| 2113 | − if (split[i] == 4 && old_pipe->bottom_pipe->bottom_pipe && | |
| 2113 | + if (split[i] == 4 && old_pipe->bottom_pipe && old_pipe->bottom_pipe->bottom_pipe && | |
| 2114 | 2114 | old_pipe->bottom_pipe->bottom_pipe->plane_state == old_pipe->plane_state) |
| 2115 | 2115 | old_index = old_pipe->bottom_pipe->bottom_pipe->pipe_idx; |
| 2116 | 2116 | else if (old_pipe->bottom_pipe && |
| @@ -2150,10 +2150,12 @@ static bool dcn30_internal_validate_bw( · 33 unmodified lines | ||
| 2150 | 2150 | goto validate_fail; |
| 2151 | 2151 | newly_split[pipe_4to1->pipe_idx] = true; |
| 2152 | 2152 | |
| 2153 | − if (odm && old_pipe->next_odm_pipe->next_odm_pipe->next_odm_pipe) | |
| 2153 | + if (odm && old_pipe->next_odm_pipe && old_pipe->next_odm_pipe->next_odm_pipe | |
| 2154 | + && old_pipe->next_odm_pipe->next_odm_pipe->next_odm_pipe) | |
| 2154 | 2155 | old_index = old_pipe->next_odm_pipe->next_odm_pipe->next_odm_pipe->pipe_idx; |
| 2155 | − else if (!odm && old_pipe->bottom_pipe->bottom_pipe->bottom_pipe && | |
| 2156 | − old_pipe->bottom_pipe->bottom_pipe->bottom_pipe->plane_state == old_pipe->plane_state) | |
| 2156 | + else if (!odm && old_pipe->bottom_pipe && old_pipe->bottom_pipe->bottom_pipe && | |
| 2157 | + old_pipe->bottom_pipe->bottom_pipe->bottom_pipe && | |
| 2158 | + old_pipe->bottom_pipe->bottom_pipe->bottom_pipe->plane_state == old_pipe->plane_state) | |
| 2157 | 2159 | old_index = old_pipe->bottom_pipe->bottom_pipe->bottom_pipe->pipe_idx; |
| 2158 | 2160 | else |
| 2159 | 2161 | old_index = -1; |
| @@ -117,6 +117,12 @@ static const struct ddc_registers ddc_data_regs_dcn[] = { · 116 unmodified lines | ||
| 117 | 117 | ddc_data_regs_dcn2(4), |
| 118 | 118 | ddc_data_regs_dcn2(5), |
| 119 | 119 | ddc_data_regs_dcn2(6), |
| 120 | + { | |
| 121 | + DDC_GPIO_VGA_REG_LIST(DATA), | |
| 122 | + .ddc_setup = 0, | |
| 123 | + .phy_aux_cntl = 0, | |
| 124 | + .dc_gpio_aux_ctrl_5 = 0 | |
| 125 | + } | |
| 120 | 126 | }; |
| 121 | 127 | |
| 122 | 128 | static const struct ddc_registers ddc_clk_regs_dcn[] = { |
| @@ -126,6 +132,12 @@ static const struct ddc_registers ddc_clk_regs_dcn[] = { · 3 unmodified lines | ||
| 126 | 132 | ddc_clk_regs_dcn2(4), |
| 127 | 133 | ddc_clk_regs_dcn2(5), |
| 128 | 134 | ddc_clk_regs_dcn2(6), |
| 135 | + { | |
| 136 | + DDC_GPIO_VGA_REG_LIST(CLK), | |
| 137 | + .ddc_setup = 0, | |
| 138 | + .phy_aux_cntl = 0, | |
| 139 | + .dc_gpio_aux_ctrl_5 = 0 | |
| 140 | + } | |
| 129 | 141 | }; |
| 130 | 142 | |
| 131 | 143 | static const struct ddc_sh_mask ddc_shift[] = { |
| @@ -63,13 +63,13 @@ enum gpio_result dal_gpio_open_ex( · 62 unmodified lines | ||
| 63 | 63 | enum gpio_mode mode) |
| 64 | 64 | { |
| 65 | 65 | if (gpio->pin) { |
| 66 | − ASSERT_CRITICAL(false); | |
| 66 | + BREAK_TO_DEBUGGER(); | |
| 67 | 67 | return GPIO_RESULT_ALREADY_OPENED; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // No action if allocation failed during gpio construct |
| 71 | 71 | if (!gpio->hw_container.ddc) { |
| 72 | − ASSERT_CRITICAL(false); | |
| 72 | + BREAK_TO_DEBUGGER(); | |
| 73 | 73 | return GPIO_RESULT_NON_SPECIFIC_ERROR; |
| 74 | 74 | } |
| 75 | 75 | gpio->mode = mode; |
| @@ -94,36 +94,27 @@ · 93 unmodified lines | ||
| 94 | 94 | * general debug capabilities |
| 95 | 95 | * |
| 96 | 96 | */ |
| 97 | −#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB) | |
| 98 | −#define ASSERT_CRITICAL(expr) do { \ | |
| 99 | − if (WARN_ON(!(expr))) { \ | |
| 100 | − kgdb_breakpoint(); \ | |
| 101 | − } \ | |
| 102 | −} while (0) | |
| 97 | +#ifdef CONFIG_DEBUG_KERNEL_DC | |
| 98 | +#define dc_breakpoint() kgdb_breakpoint() | |
| 103 | 99 | #else |
| 104 | −#define ASSERT_CRITICAL(expr) do { \ | |
| 105 | − if (WARN_ON(!(expr))) { \ | |
| 106 | − ; \ | |
| 107 | − } \ | |
| 108 | −} while (0) | |
| 100 | +#define dc_breakpoint() do {} while (0) | |
| 109 | 101 | #endif |
| 110 | 102 | |
| 111 | −#if defined(CONFIG_DEBUG_KERNEL_DC) | |
| 112 | −#define ASSERT(expr) ASSERT_CRITICAL(expr) | |
| 103 | +#define ASSERT_CRITICAL(expr) do { \ | |
| 104 | + if (WARN_ON(!(expr))) \ | |
| 105 | + dc_breakpoint(); \ | |
| 106 | + } while (0) | |
| 113 | 107 | |
| 114 | −#else | |
| 115 | −#define ASSERT(expr) WARN_ON_ONCE(!(expr)) | |
| 116 | −#endif | |
| 108 | +#define ASSERT(expr) do { \ | |
| 109 | + if (WARN_ON_ONCE(!(expr))) \ | |
| 110 | + dc_breakpoint(); \ | |
| 111 | + } while (0) | |
| 117 | 112 | |
| 118 | −#if defined(CONFIG_DEBUG_KERNEL_DC) && (defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)) | |
| 119 | 113 | #define BREAK_TO_DEBUGGER() \ |
| 120 | 114 | do { \ |
| 121 | 115 | DRM_DEBUG_DRIVER("%s():%d\n", __func__, __LINE__); \ |
| 122 | − kgdb_breakpoint(); \ | |
| 116 | + dc_breakpoint(); \ | |
| 123 | 117 | } while (0) |
| 124 | −#else | |
| 125 | −#define BREAK_TO_DEBUGGER() DRM_DEBUG_DRIVER("%s():%d\n", __func__, __LINE__) | |
| 126 | −#endif | |
| 127 | 118 | |
| 128 | 119 | #define DC_ERR(...) do { \ |
| 129 | 120 | dm_error(__VA_ARGS__); \ |
| @@ -205,6 +205,10 @@ enum { · 204 unmodified lines | ||
| 205 | 205 | #if defined(CONFIG_DRM_AMD_DC_DCN3_0) |
| 206 | 206 | #define ASICREV_IS_SIENNA_CICHLID_P(eChipRev) ((eChipRev >= NV_SIENNA_CICHLID_P_A0)) |
| 207 | 207 | #endif |
| 208 | +#define GREEN_SARDINE_A0 0xA1 | |
| 209 | +#ifndef ASICREV_IS_GREEN_SARDINE | |
| 210 | +#define ASICREV_IS_GREEN_SARDINE(eChipRev) ((eChipRev >= GREEN_SARDINE_A0) && (eChipRev < 0xFF)) | |
| 211 | +#endif | |
| 208 | 212 | |
| 209 | 213 | /* |
| 210 | 214 | * ASIC chip ID |
| @@ -45,6 +45,7 @@ enum amd_apu_flags { · 44 unmodified lines | ||
| 45 | 45 | AMD_APU_IS_RAVEN2 = 0x00000002UL, |
| 46 | 46 | AMD_APU_IS_PICASSO = 0x00000004UL, |
| 47 | 47 | AMD_APU_IS_RENOIR = 0x00000008UL, |
| 48 | + AMD_APU_IS_GREEN_SARDINE = 0x00000010UL, | |
| 48 | 49 | }; |
| 49 | 50 | |
| 50 | 51 | /** |
| @@ -229,6 +229,7 @@ struct pp_smumgr_func { · 228 unmodified lines | ||
| 229 | 229 | bool (*is_hw_avfs_present)(struct pp_hwmgr *hwmgr); |
| 230 | 230 | int (*update_dpm_settings)(struct pp_hwmgr *hwmgr, void *profile_setting); |
| 231 | 231 | int (*smc_table_manager)(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool rw); /*rw: true for read, false for write */ |
| 232 | + int (*stop_smc)(struct pp_hwmgr *hwmgr); | |
| 232 | 233 | }; |
| 233 | 234 | |
| 234 | 235 | struct pp_hwmgr_func { |
| @@ -113,4 +113,6 @@ extern int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_settin · 112 unmodified lines | ||
| 113 | 113 | |
| 114 | 114 | extern int smum_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool rw); |
| 115 | 115 | |
| 116 | +extern int smum_stop_smc(struct pp_hwmgr *hwmgr); | |
| 117 | + | |
| 116 | 118 | #endif |
| @@ -142,12 +142,12 @@ static const struct baco_cmd_entry exit_baco_tbl[] = · 141 unmodified lines | ||
| 142 | 142 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_BCLK_OFF_MASK, BACO_CNTL__BACO_BCLK_OFF__SHIFT, 0, 0x00 }, |
| 143 | 143 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_POWER_OFF_MASK, BACO_CNTL__BACO_POWER_OFF__SHIFT, 0, 0x00 }, |
| 144 | 144 | { CMD_DELAY_MS, 0, 0, 0, 20, 0 }, |
| 145 | − { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_BF_MASK, 0, 0xffffffff, 0x20 }, | |
| 145 | + { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_BF_MASK, 0, 0xffffffff, 0x200 }, | |
| 146 | 146 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_ISO_DIS_MASK, BACO_CNTL__BACO_ISO_DIS__SHIFT, 0, 0x01 }, |
| 147 | − { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_MASK, 0, 5, 0x1c }, | |
| 147 | + { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_MASK, 0, 5, 0x1c00 }, | |
| 148 | 148 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_ANA_ISO_DIS_MASK, BACO_CNTL__BACO_ANA_ISO_DIS__SHIFT, 0, 0x01 }, |
| 149 | 149 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_RESET_EN_MASK, BACO_CNTL__BACO_RESET_EN__SHIFT, 0, 0x00 }, |
| 150 | − { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__RCU_BIF_CONFIG_DONE_MASK, 0, 5, 0x10 }, | |
| 150 | + { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__RCU_BIF_CONFIG_DONE_MASK, 0, 5, 0x100 }, | |
| 151 | 151 | { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_EN_MASK, BACO_CNTL__BACO_EN__SHIFT, 0, 0x00 }, |
| 152 | 152 | { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__BACO_MODE_MASK, 0, 0xffffffff, 0x00 } |
| 153 | 153 | }; |
| @@ -155,6 +155,7 @@ static const struct baco_cmd_entry exit_baco_tbl[] = · 1 unmodified line | ||
| 155 | 155 | static const struct baco_cmd_entry clean_baco_tbl[] = |
| 156 | 156 | { |
| 157 | 157 | { CMD_WRITE, mmBIOS_SCRATCH_6, 0, 0, 0, 0 }, |
| 158 | + { CMD_WRITE, mmBIOS_SCRATCH_7, 0, 0, 0, 0 }, | |
| 158 | 159 | { CMD_WRITE, mmCP_PFP_UCODE_ADDR, 0, 0, 0, 0 } |
| 159 | 160 | }; |
| 160 | 161 | |
| @@ -1541,6 +1541,10 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr) · 1540 unmodified lines | ||
| 1541 | 1541 | PP_ASSERT_WITH_CODE((tmp_result == 0), |
| 1542 | 1542 | "Failed to reset to default!", result = tmp_result); |
| 1543 | 1543 | |
| 1544 | + tmp_result = smum_stop_smc(hwmgr); | |
| 1545 | + PP_ASSERT_WITH_CODE((tmp_result == 0), | |
| 1546 | + "Failed to stop smc!", result = tmp_result); | |
| 1547 | + | |
| 1544 | 1548 | tmp_result = smu7_force_switch_to_arbf0(hwmgr); |
| 1545 | 1549 | PP_ASSERT_WITH_CODE((tmp_result == 0), |
| 1546 | 1550 | "Failed to force to switch arbf0!", result = tmp_result); |
| @@ -1585,18 +1589,24 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr) · 38 unmodified lines | ||
| 1585 | 1589 | data->current_profile_setting.sclk_down_hyst = 100; |
| 1586 | 1590 | data->current_profile_setting.sclk_activity = SMU7_SCLK_TARGETACTIVITY_DFLT; |
| 1587 | 1591 | data->current_profile_setting.bupdate_mclk = 1; |
| 1588 | − if (adev->gmc.vram_width == 256) { | |
| 1589 | − data->current_profile_setting.mclk_up_hyst = 10; | |
| 1590 | − data->current_profile_setting.mclk_down_hyst = 60; | |
| 1591 | − data->current_profile_setting.mclk_activity = 25; | |
| 1592 | − } else if (adev->gmc.vram_width == 128) { | |
| 1593 | − data->current_profile_setting.mclk_up_hyst = 5; | |
| 1594 | − data->current_profile_setting.mclk_down_hyst = 16; | |
| 1595 | − data->current_profile_setting.mclk_activity = 20; | |
| 1596 | − } else if (adev->gmc.vram_width == 64) { | |
| 1597 | − data->current_profile_setting.mclk_up_hyst = 3; | |
| 1598 | − data->current_profile_setting.mclk_down_hyst = 16; | |
| 1599 | − data->current_profile_setting.mclk_activity = 20; | |
| 1592 | + if (hwmgr->chip_id >= CHIP_POLARIS10) { | |
| 1593 | + if (adev->gmc.vram_width == 256) { | |
| 1594 | + data->current_profile_setting.mclk_up_hyst = 10; | |
| 1595 | + data->current_profile_setting.mclk_down_hyst = 60; | |
| 1596 | + data->current_profile_setting.mclk_activity = 25; | |
| 1597 | + } else if (adev->gmc.vram_width == 128) { | |
| 1598 | + data->current_profile_setting.mclk_up_hyst = 5; | |
| 1599 | + data->current_profile_setting.mclk_down_hyst = 16; | |
| 1600 | + data->current_profile_setting.mclk_activity = 20; | |
| 1601 | + } else if (adev->gmc.vram_width == 64) { | |
| 1602 | + data->current_profile_setting.mclk_up_hyst = 3; | |
| 1603 | + data->current_profile_setting.mclk_down_hyst = 16; | |
| 1604 | + data->current_profile_setting.mclk_activity = 20; | |
| 1605 | + } | |
| 1606 | + } else { | |
| 1607 | + data->current_profile_setting.mclk_up_hyst = 0; | |
| 1608 | + data->current_profile_setting.mclk_down_hyst = 100; | |
| 1609 | + data->current_profile_setting.mclk_activity = SMU7_MCLK_TARGETACTIVITY_DFLT; | |
| 1600 | 1610 | } |
| 1601 | 1611 | hwmgr->workload_mask = 1 << hwmgr->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D]; |
| 1602 | 1612 | hwmgr->power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D; |
| @@ -2726,10 +2726,7 @@ static int ci_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) · 2725 unmodified lines | ||
| 2726 | 2726 | |
| 2727 | 2727 | static bool ci_is_dpm_running(struct pp_hwmgr *hwmgr) |
| 2728 | 2728 | { |
| 2729 | − return (1 == PHM_READ_INDIRECT_FIELD(hwmgr->device, | |
| 2730 | − CGS_IND_REG__SMC, FEATURE_STATUS, | |
| 2731 | − VOLTAGE_CONTROLLER_ON)) | |
| 2732 | − ? true : false; | |
| 2729 | + return ci_is_smc_ram_running(hwmgr); | |
| 2733 | 2730 | } |
| 2734 | 2731 | |
| 2735 | 2732 | static int ci_smu_init(struct pp_hwmgr *hwmgr) |
| @@ -2939,6 +2936,29 @@ static int ci_update_smc_table(struct pp_hwmgr *hwmgr, uint32_t type) · 203 unmodified lines | ||
| 2939 | 2936 | return 0; |
| 2940 | 2937 | } |
| 2941 | 2938 | |
| 2939 | +static void ci_reset_smc(struct pp_hwmgr *hwmgr) | |
| 2940 | +{ | |
| 2941 | + PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, | |
| 2942 | + SMC_SYSCON_RESET_CNTL, | |
| 2943 | + rst_reg, 1); | |
| 2944 | +} | |
| 2945 | + | |
| 2946 | + | |
| 2947 | +static void ci_stop_smc_clock(struct pp_hwmgr *hwmgr) | |
| 2948 | +{ | |
| 2949 | + PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, | |
| 2950 | + SMC_SYSCON_CLOCK_CNTL_0, | |
| 2951 | + ck_disable, 1); | |
| 2952 | +} | |
| 2953 | + | |
| 2954 | +static int ci_stop_smc(struct pp_hwmgr *hwmgr) | |
| 2955 | +{ | |
| 2956 | + ci_reset_smc(hwmgr); | |
| 2957 | + ci_stop_smc_clock(hwmgr); | |
| 2958 | + | |
| 2959 | + return 0; | |
| 2960 | +} | |
| 2961 | + | |
| 2942 | 2962 | const struct pp_smumgr_func ci_smu_funcs = { |
| 2943 | 2963 | .name = "ci_smu", |
| 2944 | 2964 | .smu_init = ci_smu_init, |
| @@ -2964,4 +2984,5 @@ const struct pp_smumgr_func ci_smu_funcs = { · 19 unmodified lines | ||
| 2964 | 2984 | .is_dpm_running = ci_is_dpm_running, |
| 2965 | 2985 | .update_dpm_settings = ci_update_dpm_settings, |
| 2966 | 2986 | .update_smc_table = ci_update_smc_table, |
| 2987 | + .stop_smc = ci_stop_smc, | |
| 2967 | 2988 | }; |
| @@ -245,3 +245,11 @@ int smum_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t tabl · 244 unmodified lines | ||
| 245 | 245 | |
| 246 | 246 | return -EINVAL; |
| 247 | 247 | } |
| 248 | + | |
| 249 | +int smum_stop_smc(struct pp_hwmgr *hwmgr) | |
| 250 | +{ | |
| 251 | + if (hwmgr->smumgr_funcs->stop_smc) | |
| 252 | + return hwmgr->smumgr_funcs->stop_smc(hwmgr); | |
| 253 | + | |
| 254 | + return 0; | |
| 255 | +} | |
| @@ -1029,17 +1029,6 @@ static int smu_smc_hw_setup(struct smu_context *smu) · 1028 unmodified lines | ||
| 1029 | 1029 | return ret; |
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | − /* | |
| 1033 | − * Set initialized values (get from vbios) to dpm tables context such as | |
| 1034 | − * gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each | |
| 1035 | − * type of clks. | |
| 1036 | − */ | |
| 1037 | − ret = smu_set_default_dpm_table(smu); | |
| 1038 | − if (ret) { | |
| 1039 | − dev_err(adev->dev, "Failed to setup default dpm clock tables!\n"); | |
| 1040 | − return ret; | |
| 1041 | − } | |
| 1042 | − | |
| 1043 | 1032 | ret = smu_notify_display_change(smu); |
| 1044 | 1033 | if (ret) |
| 1045 | 1034 | return ret; |
| @@ -1361,14 +1361,9 @@ static int navi10_get_fan_speed_rpm(struct smu_context *smu, · 1360 unmodified lines | ||
| 1361 | 1361 | if (!speed) |
| 1362 | 1362 | return -EINVAL; |
| 1363 | 1363 | |
| 1364 | − switch (smu_v11_0_get_fan_control_mode(smu)) { | |
| 1365 | − case AMD_FAN_CTRL_AUTO: | |
| 1366 | − return navi10_get_smu_metrics_data(smu, | |
| 1367 | − METRICS_CURR_FANSPEED, | |
| 1368 | − speed); | |
| 1369 | − default: | |
| 1370 | − return smu_v11_0_get_fan_speed_rpm(smu, speed); | |
| 1371 | − } | |
| 1364 | + return navi10_get_smu_metrics_data(smu, | |
| 1365 | + METRICS_CURR_FANSPEED, | |
| 1366 | + speed); | |
| 1372 | 1367 | } |
| 1373 | 1368 | |
| 1374 | 1369 | static int navi10_get_fan_parameters(struct smu_context *smu) |
| @@ -2534,29 +2529,6 @@ static const struct i2c_algorithm navi10_i2c_algo = { · 1159 unmodified lines | ||
| 2534 | 2529 | .functionality = navi10_i2c_func, |
| 2535 | 2530 | }; |
| 2536 | 2531 | |
| 2537 | −static int navi10_i2c_control_init(struct smu_context *smu, struct i2c_adapter *control) | |
| 2538 | −{ | |
| 2539 | − struct amdgpu_device *adev = to_amdgpu_device(control); | |
| 2540 | − int res; | |
| 2541 | − | |
| 2542 | − control->owner = THIS_MODULE; | |
| 2543 | − control->class = I2C_CLASS_SPD; | |
| 2544 | − control->dev.parent = &adev->pdev->dev; | |
| 2545 | − control->algo = &navi10_i2c_algo; | |
| 2546 | − snprintf(control->name, sizeof(control->name), "AMDGPU SMU"); | |
| 2547 | − | |
| 2548 | − res = i2c_add_adapter(control); | |
| 2549 | − if (res) | |
| 2550 | − DRM_ERROR("Failed to register hw i2c, err: %d\n", res); | |
| 2551 | − | |
| 2552 | − return res; | |
| 2553 | −} | |
| 2554 | − | |
| 2555 | −static void navi10_i2c_control_fini(struct smu_context *smu, struct i2c_adapter *control) | |
| 2556 | −{ | |
| 2557 | − i2c_del_adapter(control); | |
| 2558 | −} | |
| 2559 | − | |
| 2560 | 2532 | static ssize_t navi10_get_gpu_metrics(struct smu_context *smu, |
| 2561 | 2533 | void **table) |
| 2562 | 2534 | { |
| @@ -2687,8 +2659,6 @@ static const struct pptable_funcs navi10_ppt_funcs = { · 124 unmodified lines | ||
| 2687 | 2659 | .set_default_dpm_table = navi10_set_default_dpm_table, |
| 2688 | 2660 | .dpm_set_vcn_enable = navi10_dpm_set_vcn_enable, |
| 2689 | 2661 | .dpm_set_jpeg_enable = navi10_dpm_set_jpeg_enable, |
| 2690 | − .i2c_init = navi10_i2c_control_init, | |
| 2691 | − .i2c_fini = navi10_i2c_control_fini, | |
| 2692 | 2662 | .print_clk_levels = navi10_print_clk_levels, |
| 2693 | 2663 | .force_clk_levels = navi10_force_clk_levels, |
| 2694 | 2664 | .populate_umd_state_clk = navi10_populate_umd_state_clk, |
| @@ -1177,14 +1177,9 @@ static int sienna_cichlid_get_fan_speed_rpm(struct smu_context *smu, · 1176 unmodified lines | ||
| 1177 | 1177 | if (!speed) |
| 1178 | 1178 | return -EINVAL; |
| 1179 | 1179 | |
| 1180 | − switch (smu_v11_0_get_fan_control_mode(smu)) { | |
| 1181 | − case AMD_FAN_CTRL_AUTO: | |
| 1182 | − return sienna_cichlid_get_smu_metrics_data(smu, | |
| 1183 | − METRICS_CURR_FANSPEED, | |
| 1184 | − speed); | |
| 1185 | − default: | |
| 1186 | − return smu_v11_0_get_fan_speed_rpm(smu, speed); | |
| 1187 | − } | |
| 1180 | + return sienna_cichlid_get_smu_metrics_data(smu, | |
| 1181 | + METRICS_CURR_FANSPEED, | |
| 1182 | + speed); | |
| 1188 | 1183 | } |
| 1189 | 1184 | |
| 1190 | 1185 | static int sienna_cichlid_get_fan_parameters(struct smu_context *smu) |
| @@ -374,6 +374,10 @@ static bool is_edid_digital_input_dp(const struct edid *edid) · 373 unmodified lines | ||
| 374 | 374 | * drm_dp_downstream_is_type() - is the downstream facing port of certain type? |
| 375 | 375 | * @dpcd: DisplayPort configuration data |
| 376 | 376 | * @port_cap: port capabilities |
| 377 | + * @type: port type to be checked. Can be: | |
| 378 | + * %DP_DS_PORT_TYPE_DP, %DP_DS_PORT_TYPE_VGA, %DP_DS_PORT_TYPE_DVI, | |
| 379 | + * %DP_DS_PORT_TYPE_HDMI, %DP_DS_PORT_TYPE_NON_EDID, | |
| 380 | + * %DP_DS_PORT_TYPE_DP_DUALMODE or %DP_DS_PORT_TYPE_WIRELESS. | |
| 377 | 381 | * |
| 378 | 382 | * Caveat: Only works with DPCD 1.1+ port caps. |
| 379 | 383 | * |
| @@ -870,6 +874,7 @@ EXPORT_SYMBOL(drm_dp_downstream_444_to_420_conversion); · 490 unmodified lines | ||
| 870 | 874 | |
| 871 | 875 | /** |
| 872 | 876 | * drm_dp_downstream_mode() - return a mode for downstream facing port |
| 877 | + * @dev: DRM device | |
| 873 | 878 | * @dpcd: DisplayPort configuration data |
| 874 | 879 | * @port_cap: port capabilities |
| 875 | 880 | * |
| @@ -1028,7 +1033,8 @@ EXPORT_SYMBOL(drm_dp_downstream_debug); · 152 unmodified lines | ||
| 1028 | 1033 | |
| 1029 | 1034 | /** |
| 1030 | 1035 | * drm_dp_subconnector_type() - get DP branch device type |
| 1031 | − * | |
| 1036 | + * @dpcd: DisplayPort configuration data | |
| 1037 | + * @port_cap: port capabilities | |
| 1032 | 1038 | */ |
| 1033 | 1039 | enum drm_mode_subconnector |
| 1034 | 1040 | drm_dp_subconnector_type(const u8 dpcd[DP_RECEIVER_CAP_SIZE], |
| @@ -1079,6 +1085,10 @@ EXPORT_SYMBOL(drm_dp_subconnector_type); · 44 unmodified lines | ||
| 1079 | 1085 | |
| 1080 | 1086 | /** |
| 1081 | 1087 | * drm_mode_set_dp_subconnector_property - set subconnector for DP connector |
| 1088 | + * @connector: connector to set property on | |
| 1089 | + * @status: connector status | |
| 1090 | + * @dpcd: DisplayPort configuration data | |
| 1091 | + * @port_cap: port capabilities | |
| 1082 | 1092 | * |
| 1083 | 1093 | * Called by a driver on every detect event. |
| 1084 | 1094 | */ |
| @@ -3741,7 +3741,7 @@ drm_add_cmdb_modes(struct drm_connector *connector, u8 svd) · 3740 unmodified lines | ||
| 3741 | 3741 | /** |
| 3742 | 3742 | * drm_display_mode_from_cea_vic() - return a mode for CEA VIC |
| 3743 | 3743 | * @dev: DRM device |
| 3744 | − * @vic: CEA VIC of the mode | |
| 3744 | + * @video_code: CEA VIC of the mode | |
| 3745 | 3745 | * |
| 3746 | 3746 | * Creates a new mode matching the specified CEA VIC. |
| 3747 | 3747 | * |
| @@ -1085,6 +1085,8 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, · 1084 unmodified lines | ||
| 1085 | 1085 | */ |
| 1086 | 1086 | drm_gem_object_get(obj); |
| 1087 | 1087 | |
| 1088 | + vma->vm_private_data = obj; | |
| 1089 | + | |
| 1088 | 1090 | if (obj->funcs && obj->funcs->mmap) { |
| 1089 | 1091 | ret = obj->funcs->mmap(obj, vma); |
| 1090 | 1092 | if (ret) { |
| @@ -1107,8 +1109,6 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, · 16 unmodified lines | ||
| 1107 | 1109 | vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); |
| 1108 | 1110 | } |
| 1109 | 1111 | |
| 1110 | − vma->vm_private_data = obj; | |
| 1111 | − | |
| 1112 | 1112 | return 0; |
| 1113 | 1113 | } |
| 1114 | 1114 | EXPORT_SYMBOL(drm_gem_mmap_obj); |
| @@ -593,8 +593,13 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) · 592 unmodified lines | ||
| 593 | 593 | /* Remove the fake offset */ |
| 594 | 594 | vma->vm_pgoff -= drm_vma_node_start(&obj->vma_node); |
| 595 | 595 | |
| 596 | − if (obj->import_attach) | |
| 596 | + if (obj->import_attach) { | |
| 597 | + /* Drop the reference drm_gem_mmap_obj() acquired.*/ | |
| 598 | + drm_gem_object_put(obj); | |
| 599 | + vma->vm_private_data = NULL; | |
| 600 | + | |
| 597 | 601 | return dma_buf_mmap(obj->dma_buf, vma, 0); |
| 602 | + } | |
| 598 | 603 | |
| 599 | 604 | shmem = to_drm_gem_shmem_obj(obj); |
| 600 | 605 | |
| @@ -794,6 +794,7 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { · 793 unmodified lines | ||
| 794 | 794 | |
| 795 | 795 | /** |
| 796 | 796 | * drm_prime_pages_to_sg - converts a page array into an sg list |
| 797 | + * @dev: DRM device | |
| 797 | 798 | * @pages: pointer to the array of page pointers to convert |
| 798 | 799 | * @nr_pages: length of the page vector |
| 799 | 800 | * |
| @@ -10636,6 +10636,10 @@ skl_get_initial_plane_config(struct intel_crtc *crtc, · 10635 unmodified lines | ||
| 10636 | 10636 | val & PLANE_CTL_FLIP_HORIZONTAL) |
| 10637 | 10637 | plane_config->rotation |= DRM_MODE_REFLECT_X; |
| 10638 | 10638 | |
| 10639 | + /* 90/270 degree rotation would require extra work */ | |
| 10640 | + if (drm_rotation_90_or_270(plane_config->rotation)) | |
| 10641 | + goto error; | |
| 10642 | + | |
| 10639 | 10643 | base = intel_de_read(dev_priv, PLANE_SURF(pipe, plane_id)) & 0xfffff000; |
| 10640 | 10644 | plane_config->base = base; |
| 10641 | 10645 | |
| @@ -1754,7 +1754,7 @@ void intel_psr_atomic_check(struct drm_connector *connector, · 1753 unmodified lines | ||
| 1754 | 1754 | return; |
| 1755 | 1755 | |
| 1756 | 1756 | intel_connector = to_intel_connector(connector); |
| 1757 | − dig_port = enc_to_dig_port(intel_attached_encoder(intel_connector)); | |
| 1757 | + dig_port = enc_to_dig_port(to_intel_encoder(new_state->best_encoder)); | |
| 1758 | 1758 | if (dev_priv->psr.dp != &dig_port->dp) |
| 1759 | 1759 | return; |
| 1760 | 1760 | |
| @@ -508,21 +508,6 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data, · 507 unmodified lines | ||
| 508 | 508 | if (!obj) |
| 509 | 509 | return -ENOENT; |
| 510 | 510 | |
| 511 | − /* | |
| 512 | − * Already in the desired write domain? Nothing for us to do! | |
| 513 | − * | |
| 514 | − * We apply a little bit of cunning here to catch a broader set of | |
| 515 | − * no-ops. If obj->write_domain is set, we must be in the same | |
| 516 | − * obj->read_domains, and only that domain. Therefore, if that | |
| 517 | − * obj->write_domain matches the request read_domains, we are | |
| 518 | − * already in the same read/write domain and can skip the operation, | |
| 519 | − * without having to further check the requested write_domain. | |
| 520 | − */ | |
| 521 | − if (READ_ONCE(obj->write_domain) == read_domains) { | |
| 522 | − err = 0; | |
| 523 | − goto out; | |
| 524 | − } | |
| 525 | − | |
| 526 | 511 | /* |
| 527 | 512 | * Try to flush the object off the GPU without holding the lock. |
| 528 | 513 | * We will repeat the flush holding the lock in the normal manner |
| @@ -560,6 +545,19 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data, · 31 unmodified lines | ||
| 560 | 545 | if (err) |
| 561 | 546 | goto out; |
| 562 | 547 | |
| 548 | + /* | |
| 549 | + * Already in the desired write domain? Nothing for us to do! | |
| 550 | + * | |
| 551 | + * We apply a little bit of cunning here to catch a broader set of | |
| 552 | + * no-ops. If obj->write_domain is set, we must be in the same | |
| 553 | + * obj->read_domains, and only that domain. Therefore, if that | |
| 554 | + * obj->write_domain matches the request read_domains, we are | |
| 555 | + * already in the same read/write domain and can skip the operation, | |
| 556 | + * without having to further check the requested write_domain. | |
| 557 | + */ | |
| 558 | + if (READ_ONCE(obj->write_domain) == read_domains) | |
| 559 | + goto out_unpin; | |
| 560 | + | |
| 563 | 561 | err = i915_gem_object_lock_interruptible(obj, NULL); |
| 564 | 562 | if (err) |
| 565 | 563 | goto out_unpin; |
| @@ -245,22 +245,14 @@ static inline u32 *gen12_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u · 244 unmodified lines | ||
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | static inline u32 * |
| 248 | −__gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags0, u32 flags1) | |
| 248 | +__gen8_emit_write_rcs(u32 *cs, u32 value, u32 offset, u32 flags0, u32 flags1) | |
| 249 | 249 | { |
| 250 | − /* We're using qword write, offset should be aligned to 8 bytes. */ | |
| 251 | − GEM_BUG_ON(!IS_ALIGNED(gtt_offset, 8)); | |
| 252 | − | |
| 253 | − /* w/a for post sync ops following a GPGPU operation we | |
| 254 | − * need a prior CS_STALL, which is emitted by the flush | |
| 255 | − * following the batch. | |
| 256 | − */ | |
| 257 | 250 | *cs++ = GFX_OP_PIPE_CONTROL(6) | flags0; |
| 258 | − *cs++ = flags1 | PIPE_CONTROL_QW_WRITE | PIPE_CONTROL_GLOBAL_GTT_IVB; | |
| 259 | − *cs++ = gtt_offset; | |
| 251 | + *cs++ = flags1 | PIPE_CONTROL_QW_WRITE; | |
| 252 | + *cs++ = offset; | |
| 260 | 253 | *cs++ = 0; |
| 261 | 254 | *cs++ = value; |
| 262 | − /* We're thrashing one dword of HWS. */ | |
| 263 | − *cs++ = 0; | |
| 255 | + *cs++ = 0; /* We're thrashing one extra dword. */ | |
| 264 | 256 | |
| 265 | 257 | return cs; |
| 266 | 258 | } |
| @@ -268,13 +260,38 @@ __gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags0, u32 f · 1 unmodified line | ||
| 268 | 260 | static inline u32* |
| 269 | 261 | gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags) |
| 270 | 262 | { |
| 271 | − return __gen8_emit_ggtt_write_rcs(cs, value, gtt_offset, 0, flags); | |
| 263 | + /* We're using qword write, offset should be aligned to 8 bytes. */ | |
| 264 | + GEM_BUG_ON(!IS_ALIGNED(gtt_offset, 8)); | |
| 265 | + | |
| 266 | + return __gen8_emit_write_rcs(cs, | |
| 267 | + value, | |
| 268 | + gtt_offset, | |
| 269 | + 0, | |
| 270 | + flags | PIPE_CONTROL_GLOBAL_GTT_IVB); | |
| 272 | 271 | } |
| 273 | 272 | |
| 274 | 273 | static inline u32* |
| 275 | 274 | gen12_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags0, u32 flags1) |
| 276 | 275 | { |
| 277 | − return __gen8_emit_ggtt_write_rcs(cs, value, gtt_offset, flags0, flags1); | |
| 276 | + /* We're using qword write, offset should be aligned to 8 bytes. */ | |
| 277 | + GEM_BUG_ON(!IS_ALIGNED(gtt_offset, 8)); | |
| 278 | + | |
| 279 | + return __gen8_emit_write_rcs(cs, | |
| 280 | + value, | |
| 281 | + gtt_offset, | |
| 282 | + flags0, | |
| 283 | + flags1 | PIPE_CONTROL_GLOBAL_GTT_IVB); | |
| 284 | +} | |
| 285 | + | |
| 286 | +static inline u32 * | |
| 287 | +__gen8_emit_flush_dw(u32 *cs, u32 value, u32 gtt_offset, u32 flags) | |
| 288 | +{ | |
| 289 | + *cs++ = (MI_FLUSH_DW + 1) | flags; | |
| 290 | + *cs++ = gtt_offset; | |
| 291 | + *cs++ = 0; | |
| 292 | + *cs++ = value; | |
| 293 | + | |
| 294 | + return cs; | |
| 278 | 295 | } |
| 279 | 296 | |
| 280 | 297 | static inline u32 * |
| @@ -285,12 +302,10 @@ gen8_emit_ggtt_write(u32 *cs, u32 value, u32 gtt_offset, u32 flags) · 4 unmodified lines | ||
| 285 | 302 | /* Offset should be aligned to 8 bytes for both (QW/DW) write types */ |
| 286 | 303 | GEM_BUG_ON(!IS_ALIGNED(gtt_offset, 8)); |
| 287 | 304 | |
| 288 | − *cs++ = (MI_FLUSH_DW + 1) | MI_FLUSH_DW_OP_STOREDW | flags; | |
| 289 | − *cs++ = gtt_offset | MI_FLUSH_DW_USE_GTT; | |
| 290 | − *cs++ = 0; | |
| 291 | − *cs++ = value; | |
| 292 | − | |
| 293 | − return cs; | |
| 305 | + return __gen8_emit_flush_dw(cs, | |
| 306 | + value, | |
| 307 | + gtt_offset | MI_FLUSH_DW_USE_GTT, | |
| 308 | + flags | MI_FLUSH_DW_OP_STOREDW); | |
| 294 | 309 | } |
| 295 | 310 | |
| 296 | 311 | static inline void __intel_engine_reset(struct intel_engine_cs *engine, |
| @@ -3547,6 +3547,19 @@ static const struct intel_context_ops execlists_context_ops = { · 3546 unmodified lines | ||
| 3547 | 3547 | .destroy = execlists_context_destroy, |
| 3548 | 3548 | }; |
| 3549 | 3549 | |
| 3550 | +static u32 hwsp_offset(const struct i915_request *rq) | |
| 3551 | +{ | |
| 3552 | + const struct intel_timeline_cacheline *cl; | |
| 3553 | + | |
| 3554 | + /* Before the request is executed, the timeline/cachline is fixed */ | |
| 3555 | + | |
| 3556 | + cl = rcu_dereference_protected(rq->hwsp_cacheline, 1); | |
| 3557 | + if (cl) | |
| 3558 | + return cl->ggtt_offset; | |
| 3559 | + | |
| 3560 | + return rcu_dereference_protected(rq->timeline, 1)->hwsp_offset; | |
| 3561 | +} | |
| 3562 | + | |
| 3550 | 3563 | static int gen8_emit_init_breadcrumb(struct i915_request *rq) |
| 3551 | 3564 | { |
| 3552 | 3565 | u32 *cs; |
| @@ -3569,7 +3582,7 @@ static int gen8_emit_init_breadcrumb(struct i915_request *rq) · 16 unmodified lines | ||
| 3569 | 3582 | *cs++ = MI_NOOP; |
| 3570 | 3583 | |
| 3571 | 3584 | *cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT; |
| 3572 | − *cs++ = i915_request_timeline(rq)->hwsp_offset; | |
| 3585 | + *cs++ = hwsp_offset(rq); | |
| 3573 | 3586 | *cs++ = 0; |
| 3574 | 3587 | *cs++ = rq->fence.seqno - 1; |
| 3575 | 3588 | |
| @@ -4886,11 +4899,9 @@ gen8_emit_fini_breadcrumb_tail(struct i915_request *request, u32 *cs) · 1310 unmodified lines | ||
| 4886 | 4899 | return gen8_emit_wa_tail(request, cs); |
| 4887 | 4900 | } |
| 4888 | 4901 | |
| 4889 | −static u32 *emit_xcs_breadcrumb(struct i915_request *request, u32 *cs) | |
| 4902 | +static u32 *emit_xcs_breadcrumb(struct i915_request *rq, u32 *cs) | |
| 4890 | 4903 | { |
| 4891 | − u32 addr = i915_request_active_timeline(request)->hwsp_offset; | |
| 4892 | − | |
| 4893 | − return gen8_emit_ggtt_write(cs, request->fence.seqno, addr, 0); | |
| 4904 | + return gen8_emit_ggtt_write(cs, rq->fence.seqno, hwsp_offset(rq), 0); | |
| 4894 | 4905 | } |
| 4895 | 4906 | |
| 4896 | 4907 | static u32 *gen8_emit_fini_breadcrumb(struct i915_request *rq, u32 *cs) |
| @@ -4909,7 +4920,7 @@ static u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs) · 12 unmodified lines | ||
| 4909 | 4920 | /* XXX flush+write+CS_STALL all in one upsets gem_concurrent_blt:kbl */ |
| 4910 | 4921 | cs = gen8_emit_ggtt_write_rcs(cs, |
| 4911 | 4922 | request->fence.seqno, |
| 4912 | − i915_request_active_timeline(request)->hwsp_offset, | |
| 4923 | + hwsp_offset(request), | |
| 4913 | 4924 | PIPE_CONTROL_FLUSH_ENABLE | |
| 4914 | 4925 | PIPE_CONTROL_CS_STALL); |
| 4915 | 4926 | |
| @@ -4921,7 +4932,7 @@ gen11_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs) · 5 unmodified lines | ||
| 4921 | 4932 | { |
| 4922 | 4933 | cs = gen8_emit_ggtt_write_rcs(cs, |
| 4923 | 4934 | request->fence.seqno, |
| 4924 | − i915_request_active_timeline(request)->hwsp_offset, | |
| 4935 | + hwsp_offset(request), | |
| 4925 | 4936 | PIPE_CONTROL_CS_STALL | |
| 4926 | 4937 | PIPE_CONTROL_TILE_CACHE_FLUSH | |
| 4927 | 4938 | PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH | |
| @@ -4983,7 +4994,9 @@ gen12_emit_fini_breadcrumb_tail(struct i915_request *request, u32 *cs) · 55 unmodified lines | ||
| 4983 | 4994 | |
| 4984 | 4995 | static u32 *gen12_emit_fini_breadcrumb(struct i915_request *rq, u32 *cs) |
| 4985 | 4996 | { |
| 4986 | − return gen12_emit_fini_breadcrumb_tail(rq, emit_xcs_breadcrumb(rq, cs)); | |
| 4997 | + /* XXX Stalling flush before seqno write; post-sync not */ | |
| 4998 | + cs = emit_xcs_breadcrumb(rq, __gen8_emit_flush_dw(cs, 0, 0, 0)); | |
| 4999 | + return gen12_emit_fini_breadcrumb_tail(rq, cs); | |
| 4987 | 5000 | } |
| 4988 | 5001 | |
| 4989 | 5002 | static u32 * |
| @@ -4991,7 +5004,7 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs) · 1 unmodified line | ||
| 4991 | 5004 | { |
| 4992 | 5005 | cs = gen12_emit_ggtt_write_rcs(cs, |
| 4993 | 5006 | request->fence.seqno, |
| 4994 | − i915_request_active_timeline(request)->hwsp_offset, | |
| 5007 | + hwsp_offset(request), | |
| 4995 | 5008 | PIPE_CONTROL0_HDC_PIPELINE_FLUSH, |
| 4996 | 5009 | PIPE_CONTROL_CS_STALL | |
| 4997 | 5010 | PIPE_CONTROL_TILE_CACHE_FLUSH | |
| @@ -188,10 +188,14 @@ cacheline_alloc(struct intel_timeline_hwsp *hwsp, unsigned int cacheline) · 187 unmodified lines | ||
| 188 | 188 | return cl; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | −static void cacheline_acquire(struct intel_timeline_cacheline *cl) | |
| 191 | +static void cacheline_acquire(struct intel_timeline_cacheline *cl, | |
| 192 | + u32 ggtt_offset) | |
| 192 | 193 | { |
| 193 | − if (cl) | |
| 194 | − i915_active_acquire(&cl->active); | |
| 194 | + if (!cl) | |
| 195 | + return; | |
| 196 | + | |
| 197 | + cl->ggtt_offset = ggtt_offset; | |
| 198 | + i915_active_acquire(&cl->active); | |
| 195 | 199 | } |
| 196 | 200 | |
| 197 | 201 | static void cacheline_release(struct intel_timeline_cacheline *cl) |
| @@ -340,7 +344,7 @@ int intel_timeline_pin(struct intel_timeline *tl, struct i915_gem_ww_ctx *ww) · 142 unmodified lines | ||
| 340 | 344 | GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n", |
| 341 | 345 | tl->fence_context, tl->hwsp_offset); |
| 342 | 346 | |
| 343 | − cacheline_acquire(tl->hwsp_cacheline); | |
| 347 | + cacheline_acquire(tl->hwsp_cacheline, tl->hwsp_offset); | |
| 344 | 348 | if (atomic_fetch_inc(&tl->pin_count)) { |
| 345 | 349 | cacheline_release(tl->hwsp_cacheline); |
| 346 | 350 | __i915_vma_unpin(tl->hwsp_ggtt); |
| @@ -515,7 +519,7 @@ __intel_timeline_get_seqno(struct intel_timeline *tl, · 168 unmodified lines | ||
| 515 | 519 | GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n", |
| 516 | 520 | tl->fence_context, tl->hwsp_offset); |
| 517 | 521 | |
| 518 | − cacheline_acquire(cl); | |
| 522 | + cacheline_acquire(cl, tl->hwsp_offset); | |
| 519 | 523 | tl->hwsp_cacheline = cl; |
| 520 | 524 | |
| 521 | 525 | *seqno = timeline_advance(tl); |
| @@ -573,9 +577,7 @@ int intel_timeline_read_hwsp(struct i915_request *from, · 51 unmodified lines | ||
| 573 | 577 | if (err) |
| 574 | 578 | goto out; |
| 575 | 579 | |
| 576 | − *hwsp = i915_ggtt_offset(cl->hwsp->vma) + | |
| 577 | − ptr_unmask_bits(cl->vaddr, CACHELINE_BITS) * CACHELINE_BYTES; | |
| 578 | − | |
| 580 | + *hwsp = cl->ggtt_offset; | |
| 579 | 581 | out: |
| 580 | 582 | i915_active_release(&cl->active); |
| 581 | 583 | return err; |
| @@ -94,6 +94,8 @@ struct intel_timeline_cacheline { · 93 unmodified lines | ||
| 94 | 94 | struct intel_timeline_hwsp *hwsp; |
| 95 | 95 | void *vaddr; |
| 96 | 96 | |
| 97 | + u32 ggtt_offset; | |
| 98 | + | |
| 97 | 99 | struct rcu_head rcu; |
| 98 | 100 | }; |
| 99 | 101 | |
| @@ -1489,7 +1489,8 @@ static int hws_pga_write(struct intel_vgpu *vgpu, unsigned int offset, · 1488 unmodified lines | ||
| 1489 | 1489 | const struct intel_engine_cs *engine = |
| 1490 | 1490 | intel_gvt_render_mmio_to_engine(vgpu->gvt, offset); |
| 1491 | 1491 | |
| 1492 | − if (!intel_gvt_ggtt_validate_range(vgpu, value, I915_GTT_PAGE_SIZE)) { | |
| 1492 | + if (value != 0 && | |
| 1493 | + !intel_gvt_ggtt_validate_range(vgpu, value, I915_GTT_PAGE_SIZE)) { | |
| 1493 | 1494 | gvt_vgpu_err("write invalid HWSP address, reg:0x%x, value:0x%x\n", |
| 1494 | 1495 | offset, value); |
| 1495 | 1496 | return -EINVAL; |
| @@ -1650,6 +1651,34 @@ static int edp_psr_imr_iir_write(struct intel_vgpu *vgpu, · 154 unmodified lines | ||
| 1650 | 1651 | return 0; |
| 1651 | 1652 | } |
| 1652 | 1653 | |
| 1654 | +/** | |
| 1655 | + * FixMe: | |
| 1656 | + * If guest fills non-priv batch buffer on ApolloLake/Broxton as Mesa i965 did: | |
| 1657 | + * 717e7539124d (i965: Use a WC map and memcpy for the batch instead of pwrite.) | |
| 1658 | + * Due to the missing flush of bb filled by VM vCPU, host GPU hangs on executing | |
| 1659 | + * these MI_BATCH_BUFFER. | |
| 1660 | + * Temporarily workaround this by setting SNOOP bit for PAT3 used by PPGTT | |
| 1661 | + * PML4 PTE: PAT(0) PCD(1) PWT(1). | |
| 1662 | + * The performance is still expected to be low, will need further improvement. | |
| 1663 | + */ | |
| 1664 | +static int bxt_ppat_low_write(struct intel_vgpu *vgpu, unsigned int offset, | |
| 1665 | + void *p_data, unsigned int bytes) | |
| 1666 | +{ | |
| 1667 | + u64 pat = | |
| 1668 | + GEN8_PPAT(0, CHV_PPAT_SNOOP) | | |
| 1669 | + GEN8_PPAT(1, 0) | | |
| 1670 | + GEN8_PPAT(2, 0) | | |
| 1671 | + GEN8_PPAT(3, CHV_PPAT_SNOOP) | | |
| 1672 | + GEN8_PPAT(4, CHV_PPAT_SNOOP) | | |
| 1673 | + GEN8_PPAT(5, CHV_PPAT_SNOOP) | | |
| 1674 | + GEN8_PPAT(6, CHV_PPAT_SNOOP) | | |
| 1675 | + GEN8_PPAT(7, CHV_PPAT_SNOOP); | |
| 1676 | + | |
| 1677 | + vgpu_vreg(vgpu, offset) = lower_32_bits(pat); | |
| 1678 | + | |
| 1679 | + return 0; | |
| 1680 | +} | |
| 1681 | + | |
| 1653 | 1682 | static int guc_status_read(struct intel_vgpu *vgpu, |
| 1654 | 1683 | unsigned int offset, void *p_data, |
| 1655 | 1684 | unsigned int bytes) |
| @@ -2812,7 +2841,7 @@ static int init_bdw_mmio_info(struct intel_gvt *gvt) · 1156 unmodified lines | ||
| 2812 | 2841 | |
| 2813 | 2842 | MMIO_DH(GEN6_PCODE_MAILBOX, D_BDW_PLUS, NULL, mailbox_write); |
| 2814 | 2843 | |
| 2815 | − MMIO_D(GEN8_PRIVATE_PAT_LO, D_BDW_PLUS); | |
| 2844 | + MMIO_D(GEN8_PRIVATE_PAT_LO, D_BDW_PLUS & ~D_BXT); | |
| 2816 | 2845 | MMIO_D(GEN8_PRIVATE_PAT_HI, D_BDW_PLUS); |
| 2817 | 2846 | |
| 2818 | 2847 | MMIO_D(GAMTARBMODE, D_BDW_PLUS); |
| @@ -3139,7 +3168,7 @@ static int init_skl_mmio_info(struct intel_gvt *gvt) · 320 unmodified lines | ||
| 3139 | 3168 | NULL, NULL); |
| 3140 | 3169 | |
| 3141 | 3170 | MMIO_DFH(GAMT_CHKN_BIT_REG, D_KBL | D_CFL, F_CMD_ACCESS, NULL, NULL); |
| 3142 | − MMIO_D(GEN9_CTX_PREEMPT_REG, D_SKL_PLUS); | |
| 3171 | + MMIO_D(GEN9_CTX_PREEMPT_REG, D_SKL_PLUS & ~D_BXT); | |
| 3143 | 3172 | |
| 3144 | 3173 | return 0; |
| 3145 | 3174 | } |
| @@ -3313,9 +3342,21 @@ static int init_bxt_mmio_info(struct intel_gvt *gvt) · 167 unmodified lines | ||
| 3313 | 3342 | MMIO_D(GEN8_PUSHBUS_SHIFT, D_BXT); |
| 3314 | 3343 | MMIO_D(GEN6_GFXPAUSE, D_BXT); |
| 3315 | 3344 | MMIO_DFH(GEN8_L3SQCREG1, D_BXT, F_CMD_ACCESS, NULL, NULL); |
| 3345 | + MMIO_DFH(GEN8_L3CNTLREG, D_BXT, F_CMD_ACCESS, NULL, NULL); | |
| 3346 | + MMIO_DFH(_MMIO(0x20D8), D_BXT, F_CMD_ACCESS, NULL, NULL); | |
| 3347 | + MMIO_F(GEN8_RING_CS_GPR(RENDER_RING_BASE, 0), 0x40, F_CMD_ACCESS, | |
| 3348 | + 0, 0, D_BXT, NULL, NULL); | |
| 3349 | + MMIO_F(GEN8_RING_CS_GPR(GEN6_BSD_RING_BASE, 0), 0x40, F_CMD_ACCESS, | |
| 3350 | + 0, 0, D_BXT, NULL, NULL); | |
| 3351 | + MMIO_F(GEN8_RING_CS_GPR(BLT_RING_BASE, 0), 0x40, F_CMD_ACCESS, | |
| 3352 | + 0, 0, D_BXT, NULL, NULL); | |
| 3353 | + MMIO_F(GEN8_RING_CS_GPR(VEBOX_RING_BASE, 0), 0x40, F_CMD_ACCESS, | |
| 3354 | + 0, 0, D_BXT, NULL, NULL); | |
| 3316 | 3355 | |
| 3317 | 3356 | MMIO_DFH(GEN9_CTX_PREEMPT_REG, D_BXT, F_CMD_ACCESS, NULL, NULL); |
| 3318 | 3357 | |
| 3358 | + MMIO_DH(GEN8_PRIVATE_PAT_LO, D_BXT, NULL, bxt_ppat_low_write); | |
| 3359 | + | |
| 3319 | 3360 | return 0; |
| 3320 | 3361 | } |
| 3321 | 3362 | |
| @@ -1277,7 +1277,7 @@ void intel_vgpu_clean_submission(struct intel_vgpu *vgpu) · 1276 unmodified lines | ||
| 1277 | 1277 | |
| 1278 | 1278 | i915_context_ppgtt_root_restore(s, i915_vm_to_ppgtt(s->shadow[0]->vm)); |
| 1279 | 1279 | for_each_engine(engine, vgpu->gvt->gt, id) |
| 1280 | − intel_context_unpin(s->shadow[id]); | |
| 1280 | + intel_context_put(s->shadow[id]); | |
| 1281 | 1281 | |
| 1282 | 1282 | kmem_cache_destroy(s->workloads); |
| 1283 | 1283 | } |
| @@ -1369,11 +1369,6 @@ int intel_vgpu_setup_submission(struct intel_vgpu *vgpu) · 85 unmodified lines | ||
| 1369 | 1369 | ce->ring = __intel_context_ring_size(ring_size); |
| 1370 | 1370 | } |
| 1371 | 1371 | |
| 1372 | − ret = intel_context_pin(ce); | |
| 1373 | − intel_context_put(ce); | |
| 1374 | − if (ret) | |
| 1375 | − goto out_shadow_ctx; | |
| 1376 | − | |
| 1377 | 1372 | s->shadow[i] = ce; |
| 1378 | 1373 | } |
| 1379 | 1374 | |
| @@ -1405,7 +1400,6 @@ out_shadow_ctx: · 25 unmodified lines | ||
| 1405 | 1400 | if (IS_ERR(s->shadow[i])) |
| 1406 | 1401 | break; |
| 1407 | 1402 | |
| 1408 | − intel_context_unpin(s->shadow[i]); | |
| 1409 | 1403 | intel_context_put(s->shadow[i]); |
| 1410 | 1404 | } |
| 1411 | 1405 | i915_vm_put(&ppgtt->vm); |
| @@ -1479,6 +1473,7 @@ void intel_vgpu_destroy_workload(struct intel_vgpu_workload *workload) · 67 unmodified lines | ||
| 1479 | 1473 | { |
| 1480 | 1474 | struct intel_vgpu_submission *s = &workload->vgpu->submission; |
| 1481 | 1475 | |
| 1476 | + intel_context_unpin(s->shadow[workload->engine->id]); | |
| 1482 | 1477 | release_shadow_batch_buffer(workload); |
| 1483 | 1478 | release_shadow_wa_ctx(&workload->wa_ctx); |
| 1484 | 1479 | |
| @@ -1724,6 +1719,12 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, · 239 unmodified lines | ||
| 1724 | 1719 | return ERR_PTR(ret); |
| 1725 | 1720 | } |
| 1726 | 1721 | |
| 1722 | + ret = intel_context_pin(s->shadow[engine->id]); | |
| 1723 | + if (ret) { | |
| 1724 | + intel_vgpu_destroy_workload(workload); | |
| 1725 | + return ERR_PTR(ret); | |
| 1726 | + } | |
| 1727 | + | |
| 1727 | 1728 | return workload; |
| 1728 | 1729 | } |
| 1729 | 1730 | |
| @@ -389,6 +389,7 @@ static const struct intel_device_info ilk_m_info = { · 388 unmodified lines | ||
| 389 | 389 | GEN5_FEATURES, |
| 390 | 390 | PLATFORM(INTEL_IRONLAKE), |
| 391 | 391 | .is_mobile = 1, |
| 392 | + .has_rps = true, | |
| 392 | 393 | .display.has_fbc = 1, |
| 393 | 394 | }; |
| 394 | 395 | |
| @@ -314,8 +314,10 @@ static void __vma_release(struct dma_fence_work *work) · 313 unmodified lines | ||
| 314 | 314 | { |
| 315 | 315 | struct i915_vma_work *vw = container_of(work, typeof(*vw), base); |
| 316 | 316 | |
| 317 | − if (vw->pinned) | |
| 317 | + if (vw->pinned) { | |
| 318 | 318 | __i915_gem_object_unpin_pages(vw->pinned); |
| 319 | + i915_gem_object_put(vw->pinned); | |
| 320 | + } | |
| 319 | 321 | |
| 320 | 322 | i915_vm_free_pt_stash(vw->vm, &vw->stash); |
| 321 | 323 | i915_vm_put(vw->vm); |
| @@ -431,7 +433,7 @@ int i915_vma_bind(struct i915_vma *vma, · 109 unmodified lines | ||
| 431 | 433 | |
| 432 | 434 | if (vma->obj) { |
| 433 | 435 | __i915_gem_object_pin_pages(vma->obj); |
| 434 | − work->pinned = vma->obj; | |
| 436 | + work->pinned = i915_gem_object_get(vma->obj); | |
| 435 | 437 | } |
| 436 | 438 | } else { |
| 437 | 439 | vma->ops->bind_vma(vma->vm, NULL, vma, cache_level, bind_flags); |
| @@ -87,7 +87,7 @@ __intel_memory_region_get_pages_buddy(struct intel_memory_region *mem, · 86 unmodified lines | ||
| 87 | 87 | min_order = ilog2(size) - ilog2(mem->mm.chunk_size); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | − if (size > BIT(mem->mm.max_order) * mem->mm.chunk_size) | |
| 90 | + if (size > mem->mm.size) | |
| 91 | 91 | return -E2BIG; |
| 92 | 92 | |
| 93 | 93 | n_pages = size >> ilog2(mem->mm.chunk_size); |
| @@ -261,6 +261,82 @@ err_close_objects: · 260 unmodified lines | ||
| 261 | 261 | return err; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | +static int igt_mock_splintered_region(void *arg) | |
| 265 | +{ | |
| 266 | + struct intel_memory_region *mem = arg; | |
| 267 | + struct drm_i915_private *i915 = mem->i915; | |
| 268 | + struct drm_i915_gem_object *obj; | |
| 269 | + unsigned int expected_order; | |
| 270 | + LIST_HEAD(objects); | |
| 271 | + u64 size; | |
| 272 | + int err = 0; | |
| 273 | + | |
| 274 | + /* | |
| 275 | + * Sanity check we can still allocate everything even if the | |
| 276 | + * mm.max_order != mm.size. i.e our starting address space size is not a | |
| 277 | + * power-of-two. | |
| 278 | + */ | |
| 279 | + | |
| 280 | + size = (SZ_4G - 1) & PAGE_MASK; | |
| 281 | + mem = mock_region_create(i915, 0, size, PAGE_SIZE, 0); | |
| 282 | + if (IS_ERR(mem)) | |
| 283 | + return PTR_ERR(mem); | |
| 284 | + | |
| 285 | + if (mem->mm.size != size) { | |
| 286 | + pr_err("%s size mismatch(%llu != %llu)\n", | |
| 287 | + __func__, mem->mm.size, size); | |
| 288 | + err = -EINVAL; | |
| 289 | + goto out_put; | |
| 290 | + } | |
| 291 | + | |
| 292 | + expected_order = get_order(rounddown_pow_of_two(size)); | |
| 293 | + if (mem->mm.max_order != expected_order) { | |
| 294 | + pr_err("%s order mismatch(%u != %u)\n", | |
| 295 | + __func__, mem->mm.max_order, expected_order); | |
| 296 | + err = -EINVAL; | |
| 297 | + goto out_put; | |
| 298 | + } | |
| 299 | + | |
| 300 | + obj = igt_object_create(mem, &objects, size, 0); | |
| 301 | + if (IS_ERR(obj)) { | |
| 302 | + err = PTR_ERR(obj); | |
| 303 | + goto out_close; | |
| 304 | + } | |
| 305 | + | |
| 306 | + close_objects(mem, &objects); | |
| 307 | + | |
| 308 | + /* | |
| 309 | + * While we should be able allocate everything without any flag | |
| 310 | + * restrictions, if we consider I915_BO_ALLOC_CONTIGUOUS then we are | |
| 311 | + * actually limited to the largest power-of-two for the region size i.e | |
| 312 | + * max_order, due to the inner workings of the buddy allocator. So make | |
| 313 | + * sure that does indeed hold true. | |
| 314 | + */ | |
| 315 | + | |
| 316 | + obj = igt_object_create(mem, &objects, size, I915_BO_ALLOC_CONTIGUOUS); | |
| 317 | + if (!IS_ERR(obj)) { | |
| 318 | + pr_err("%s too large contiguous allocation was not rejected\n", | |
| 319 | + __func__); | |
| 320 | + err = -EINVAL; | |
| 321 | + goto out_close; | |
| 322 | + } | |
| 323 | + | |
| 324 | + obj = igt_object_create(mem, &objects, rounddown_pow_of_two(size), | |
| 325 | + I915_BO_ALLOC_CONTIGUOUS); | |
| 326 | + if (IS_ERR(obj)) { | |
| 327 | + pr_err("%s largest possible contiguous allocation failed\n", | |
| 328 | + __func__); | |
| 329 | + err = PTR_ERR(obj); | |
| 330 | + goto out_close; | |
| 331 | + } | |
| 332 | + | |
| 333 | +out_close: | |
| 334 | + close_objects(mem, &objects); | |
| 335 | +out_put: | |
| 336 | + intel_memory_region_put(mem); | |
| 337 | + return err; | |
| 338 | +} | |
| 339 | + | |
| 264 | 340 | static int igt_gpu_write_dw(struct intel_context *ce, |
| 265 | 341 | struct i915_vma *vma, |
| 266 | 342 | u32 dword, |
| @@ -771,6 +847,7 @@ int intel_memory_region_mock_selftests(void) · 504 unmodified lines | ||
| 771 | 847 | static const struct i915_subtest tests[] = { |
| 772 | 848 | SUBTEST(igt_mock_fill), |
| 773 | 849 | SUBTEST(igt_mock_contiguous), |
| 850 | + SUBTEST(igt_mock_splintered_region), | |
| 774 | 851 | }; |
| 775 | 852 | struct intel_memory_region *mem; |
| 776 | 853 | struct drm_i915_private *i915; |
| @@ -24,7 +24,7 @@ mock_object_create(struct intel_memory_region *mem, · 23 unmodified lines | ||
| 24 | 24 | struct drm_i915_private *i915 = mem->i915; |
| 25 | 25 | struct drm_i915_gem_object *obj; |
| 26 | 26 | |
| 27 | − if (size > BIT(mem->mm.max_order) * mem->mm.chunk_size) | |
| 27 | + if (size > mem->mm.size) | |
| 28 | 28 | return ERR_PTR(-E2BIG); |
| 29 | 29 | |
| 30 | 30 | obj = i915_gem_object_alloc(); |
| @@ -111,10 +111,6 @@ static int dw_hdmi_imx_parse_dt(struct imx_hdmi *hdmi) · 110 unmodified lines | ||
| 111 | 111 | return 0; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | −static void dw_hdmi_imx_encoder_disable(struct drm_encoder *encoder) | |
| 115 | −{ | |
| 116 | −} | |
| 117 | − | |
| 118 | 114 | static void dw_hdmi_imx_encoder_enable(struct drm_encoder *encoder) |
| 119 | 115 | { |
| 120 | 116 | struct imx_hdmi *hdmi = enc_to_imx_hdmi(encoder); |
| @@ -140,7 +136,6 @@ static int dw_hdmi_imx_atomic_check(struct drm_encoder *encoder, · 19 unmodified lines | ||
| 140 | 136 | |
| 141 | 137 | static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { |
| 142 | 138 | .enable = dw_hdmi_imx_encoder_enable, |
| 143 | − .disable = dw_hdmi_imx_encoder_disable, | |
| 144 | 139 | .atomic_check = dw_hdmi_imx_atomic_check, |
| 145 | 140 | }; |
| 146 | 141 | |
| @@ -219,15 +214,9 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master, · 72 unmodified lines | ||
| 219 | 214 | hdmi->dev = &pdev->dev; |
| 220 | 215 | encoder = &hdmi->encoder; |
| 221 | 216 | |
| 222 | − encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); | |
| 223 | − /* | |
| 224 | − * If we failed to find the CRTC(s) which this encoder is | |
| 225 | − * supposed to be connected to, it's because the CRTC has | |
| 226 | − * not been registered yet. Defer probing, and hope that | |
| 227 | − * the required CRTC is added later. | |
| 228 | − */ | |
| 229 | − if (encoder->possible_crtcs == 0) | |
| 230 | − return -EPROBE_DEFER; | |
| 217 | + ret = imx_drm_encoder_parse_of(drm, encoder, dev->of_node); | |
| 218 | + if (ret) | |
| 219 | + return ret; | |
| 231 | 220 | |
| 232 | 221 | ret = dw_hdmi_imx_parse_dt(hdmi); |
| 233 | 222 | if (ret < 0) |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | #include <drm/drm_fb_helper.h> |
| 21 | 21 | #include <drm/drm_gem_cma_helper.h> |
| 22 | 22 | #include <drm/drm_gem_framebuffer_helper.h> |
| 23 | +#include <drm/drm_managed.h> | |
| 23 | 24 | #include <drm/drm_of.h> |
| 24 | 25 | #include <drm/drm_plane_helper.h> |
| 25 | 26 | #include <drm/drm_probe_helper.h> |
| @@ -212,7 +213,9 @@ static int imx_drm_bind(struct device *dev) · 186 unmodified lines | ||
| 212 | 213 | drm->mode_config.allow_fb_modifiers = true; |
| 213 | 214 | drm->mode_config.normalize_zpos = true; |
| 214 | 215 | |
| 215 | − drm_mode_config_init(drm); | |
| 216 | + ret = drmm_mode_config_init(drm); | |
| 217 | + if (ret) | |
| 218 | + return ret; | |
| 216 | 219 | |
| 217 | 220 | ret = drm_vblank_init(drm, MAX_CRTC); |
| 218 | 221 | if (ret) |
| @@ -251,7 +254,6 @@ err_poll_fini: · 32 unmodified lines | ||
| 251 | 254 | drm_kms_helper_poll_fini(drm); |
| 252 | 255 | component_unbind_all(drm->dev, drm); |
| 253 | 256 | err_kms: |
| 254 | − drm_mode_config_cleanup(drm); | |
| 255 | 257 | drm_dev_put(drm); |
| 256 | 258 | |
| 257 | 259 | return ret; |
| @@ -267,11 +269,9 @@ static void imx_drm_unbind(struct device *dev) · 9 unmodified lines | ||
| 267 | 269 | |
| 268 | 270 | component_unbind_all(drm->dev, drm); |
| 269 | 271 | |
| 270 | − drm_mode_config_cleanup(drm); | |
| 272 | + drm_dev_put(drm); | |
| 271 | 273 | |
| 272 | 274 | dev_set_drvdata(dev, NULL); |
| 273 | − | |
| 274 | − drm_dev_put(drm); | |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | static const struct component_master_ops imx_drm_ops = { |
| @@ -62,7 +62,6 @@ struct imx_ldb_channel { · 61 unmodified lines | ||
| 62 | 62 | struct i2c_adapter *ddc; |
| 63 | 63 | int chno; |
| 64 | 64 | void *edid; |
| 65 | − int edid_len; | |
| 66 | 65 | struct drm_display_mode mode; |
| 67 | 66 | int mode_valid; |
| 68 | 67 | u32 bus_format; |
| @@ -536,15 +535,14 @@ static int imx_ldb_panel_ddc(struct device *dev, · 467 unmodified lines | ||
| 536 | 535 | } |
| 537 | 536 | |
| 538 | 537 | if (!channel->ddc) { |
| 538 | + int edid_len; | |
| 539 | + | |
| 539 | 540 | /* if no DDC available, fallback to hardcoded EDID */ |
| 540 | 541 | dev_dbg(dev, "no ddc available\n"); |
| 541 | 542 | |
| 542 | − edidp = of_get_property(child, "edid", | |
| 543 | − &channel->edid_len); | |
| 543 | + edidp = of_get_property(child, "edid", &edid_len); | |
| 544 | 544 | if (edidp) { |
| 545 | − channel->edid = kmemdup(edidp, | |
| 546 | − channel->edid_len, | |
| 547 | − GFP_KERNEL); | |
| 545 | + channel->edid = kmemdup(edidp, edid_len, GFP_KERNEL); | |
| 548 | 546 | } else if (!channel->panel) { |
| 549 | 547 | /* fallback to display-timings node */ |
| 550 | 548 | ret = of_get_drm_display_mode(child, |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <linux/platform_device.h> |
| 14 | 14 | #include <linux/regmap.h> |
| 15 | 15 | #include <linux/regulator/consumer.h> |
| 16 | −#include <linux/spinlock.h> | |
| 17 | 16 | #include <linux/videodev2.h> |
| 18 | 17 | |
| 19 | 18 | #include <video/imx-ipu-v3.h> |
| @@ -104,8 +103,6 @@ struct imx_tve { · 84 unmodified lines | ||
| 104 | 103 | struct drm_connector connector; |
| 105 | 104 | struct drm_encoder encoder; |
| 106 | 105 | struct device *dev; |
| 107 | − spinlock_t lock; /* register lock */ | |
| 108 | − bool enabled; | |
| 109 | 106 | int mode; |
| 110 | 107 | int di_hsync_pin; |
| 111 | 108 | int di_vsync_pin; |
| @@ -129,30 +126,10 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e) · 17 unmodified lines | ||
| 129 | 126 | return container_of(e, struct imx_tve, encoder); |
| 130 | 127 | } |
| 131 | 128 | |
| 132 | −static void tve_lock(void *__tve) | |
| 133 | −__acquires(&tve->lock) | |
| 134 | −{ | |
| 135 | − struct imx_tve *tve = __tve; | |
| 136 | − | |
| 137 | − spin_lock(&tve->lock); | |
| 138 | −} | |
| 139 | − | |
| 140 | −static void tve_unlock(void *__tve) | |
| 141 | −__releases(&tve->lock) | |
| 142 | −{ | |
| 143 | − struct imx_tve *tve = __tve; | |
| 144 | − | |
| 145 | − spin_unlock(&tve->lock); | |
| 146 | −} | |
| 147 | − | |
| 148 | 129 | static void tve_enable(struct imx_tve *tve) |
| 149 | 130 | { |
| 150 | − if (!tve->enabled) { | |
| 151 | − tve->enabled = true; | |
| 152 | − clk_prepare_enable(tve->clk); | |
| 153 | − regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, | |
| 154 | − TVE_EN, TVE_EN); | |
| 155 | − } | |
| 131 | + clk_prepare_enable(tve->clk); | |
| 132 | + regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, TVE_EN); | |
| 156 | 133 | |
| 157 | 134 | /* clear interrupt status register */ |
| 158 | 135 | regmap_write(tve->regmap, TVE_STAT_REG, 0xffffffff); |
| @@ -169,11 +146,8 @@ static void tve_enable(struct imx_tve *tve) · 10 unmodified lines | ||
| 169 | 146 | |
| 170 | 147 | static void tve_disable(struct imx_tve *tve) |
| 171 | 148 | { |
| 172 | − if (tve->enabled) { | |
| 173 | − tve->enabled = false; | |
| 174 | − regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, 0); | |
| 175 | − clk_disable_unprepare(tve->clk); | |
| 176 | − } | |
| 149 | + regmap_update_bits(tve->regmap, TVE_COM_CONF_REG, TVE_EN, 0); | |
| 150 | + clk_disable_unprepare(tve->clk); | |
| 177 | 151 | } |
| 178 | 152 | |
| 179 | 153 | static int tve_setup_tvout(struct imx_tve *tve) |
| @@ -500,8 +474,7 @@ static struct regmap_config tve_regmap_config = { · 320 unmodified lines | ||
| 500 | 474 | |
| 501 | 475 | .readable_reg = imx_tve_readable_reg, |
| 502 | 476 | |
| 503 | − .lock = tve_lock, | |
| 504 | − .unlock = tve_unlock, | |
| 477 | + .fast_io = true, | |
| 505 | 478 | |
| 506 | 479 | .max_register = 0xdc, |
| 507 | 480 | }; |
| @@ -511,7 +484,7 @@ static const char * const imx_tve_modes[] = { · 3 unmodified lines | ||
| 511 | 484 | [TVE_MODE_VGA] = "vga", |
| 512 | 485 | }; |
| 513 | 486 | |
| 514 | −static const int of_get_tve_mode(struct device_node *np) | |
| 487 | +static int of_get_tve_mode(struct device_node *np) | |
| 515 | 488 | { |
| 516 | 489 | const char *bm; |
| 517 | 490 | int ret, i; |
| @@ -544,7 +517,6 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) · 26 unmodified lines | ||
| 544 | 517 | memset(tve, 0, sizeof(*tve)); |
| 545 | 518 | |
| 546 | 519 | tve->dev = dev; |
| 547 | − spin_lock_init(&tve->lock); | |
| 548 | 520 | |
| 549 | 521 | ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); |
| 550 | 522 | if (ddc_node) { |
| @@ -28,7 +28,6 @@ struct imx_parallel_display { · 27 unmodified lines | ||
| 28 | 28 | struct drm_bridge bridge; |
| 29 | 29 | struct device *dev; |
| 30 | 30 | void *edid; |
| 31 | − int edid_len; | |
| 32 | 31 | u32 bus_format; |
| 33 | 32 | u32 bus_flags; |
| 34 | 33 | struct drm_display_mode mode; |
| @@ -41,11 +40,6 @@ static inline struct imx_parallel_display *con_to_imxpd(struct drm_connector *c) · 6 unmodified lines | ||
| 41 | 40 | return container_of(c, struct imx_parallel_display, connector); |
| 42 | 41 | } |
| 43 | 42 | |
| 44 | −static inline struct imx_parallel_display *enc_to_imxpd(struct drm_encoder *e) | |
| 45 | −{ | |
| 46 | − return container_of(e, struct imx_parallel_display, encoder); | |
| 47 | −} | |
| 48 | − | |
| 49 | 43 | static inline struct imx_parallel_display *bridge_to_imxpd(struct drm_bridge *b) |
| 50 | 44 | { |
| 51 | 45 | return container_of(b, struct imx_parallel_display, bridge); |
| @@ -310,6 +304,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) · 258 unmodified lines | ||
| 310 | 304 | struct device_node *np = dev->of_node; |
| 311 | 305 | const u8 *edidp; |
| 312 | 306 | struct imx_parallel_display *imxpd; |
| 307 | + int edid_len; | |
| 313 | 308 | int ret; |
| 314 | 309 | u32 bus_format = 0; |
| 315 | 310 | const char *fmt; |
| @@ -323,9 +318,9 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) · 7 unmodified lines | ||
| 323 | 318 | if (ret && ret != -ENODEV) |
| 324 | 319 | return ret; |
| 325 | 320 | |
| 326 | − edidp = of_get_property(np, "edid", &imxpd->edid_len); | |
| 321 | + edidp = of_get_property(np, "edid", &edid_len); | |
| 327 | 322 | if (edidp) |
| 328 | − imxpd->edid = kmemdup(edidp, imxpd->edid_len, GFP_KERNEL); | |
| 323 | + imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL); | |
| 329 | 324 | |
| 330 | 325 | ret = of_property_read_string(np, "interface-pix-fmt", &fmt); |
| 331 | 326 | if (!ret) { |
| @@ -349,17 +344,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) · 17 unmodified lines | ||
| 349 | 344 | return 0; |
| 350 | 345 | } |
| 351 | 346 | |
| 352 | −static void imx_pd_unbind(struct device *dev, struct device *master, | |
| 353 | − void *data) | |
| 354 | −{ | |
| 355 | − struct imx_parallel_display *imxpd = dev_get_drvdata(dev); | |
| 356 | − | |
| 357 | − kfree(imxpd->edid); | |
| 358 | −} | |
| 359 | − | |
| 360 | 347 | static const struct component_ops imx_pd_ops = { |
| 361 | 348 | .bind = imx_pd_bind, |
| 362 | − .unbind = imx_pd_unbind, | |
| 363 | 349 | }; |
| 364 | 350 | |
| 365 | 351 | static int imx_pd_probe(struct platform_device *pdev) |
| @@ -44,6 +44,7 @@ int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32, · 43 unmodified lines | ||
| 44 | 44 | struct nv50_core **); |
14 more lines aren’t shown here.
This diff is large: its 58 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 57 lines aren’t shown here.
This diff is large: its 43 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 59 lines aren’t shown here.
This diff is large: its 67 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 67 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 39 lines aren’t shown here.
This diff is large: its 82 lines aren’t shown here.
This diff is large: its 98 lines aren’t shown here.
This diff is large: its 60 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 116 lines aren’t shown here.
This diff is large: its 42 lines aren’t shown here.
This diff is large: its 74 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 51 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 142 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 131 lines aren’t shown here.
This diff is large: its 126 lines aren’t shown here.
This diff is large: its 195 lines aren’t shown here.
This diff is large: its 202 lines aren’t shown here.
This diff is large: its 126 lines aren’t shown here.
This diff is large: its 195 lines aren’t shown here.
This diff is large: its 130 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 86 lines aren’t shown here.
This diff is large: its 418 lines aren’t shown here.
This diff is large: its 138 lines aren’t shown here.
This diff is large: its 348 lines aren’t shown here.
This diff is large: its 38 lines aren’t shown here.
This diff is large: its 56 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 117 lines aren’t shown here.
This diff is large: its 383 lines aren’t shown here.
This diff is large: its 62 lines aren’t shown here.
This diff is large: its 400 lines aren’t shown here.
This diff is large: its 450 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 270 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 589 lines aren’t shown here.
This diff is large: its 150 lines aren’t shown here.
This diff is large: its 158 lines aren’t shown here.
This diff is large: its 636 lines aren’t shown here.
This diff is large: its 138 lines aren’t shown here.
This diff is large: its 336 lines aren’t shown here.
This diff is large: its 428 lines aren’t shown here.
This diff is large: its 88 lines aren’t shown here.
This diff is large: its 586 lines aren’t shown here.
This diff is large: its 78 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 1486 lines aren’t shown here.
This diff is large: its 117 lines aren’t shown here.
This diff is large: its 1941 lines aren’t shown here.
This diff is large: its 358 lines aren’t shown here.
This diff is large: its 201 lines aren’t shown here.
This diff is large: its 463 lines aren’t shown here.
This diff is large: its 784 lines aren’t shown here.
This diff is large: its 352 lines aren’t shown here.
This diff is large: its 275 lines aren’t shown here.
This diff is large: its 128 lines aren’t shown here.
This diff is large: its 691 lines aren’t shown here.
This diff is large: its 230 lines aren’t shown here.
This diff is large: its 1350 lines aren’t shown here.
This diff is large: its 222 lines aren’t shown here.
This diff is large: its 176 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 117 lines aren’t shown here.
This diff is large: its 241 lines aren’t shown here.
This diff is large: its 101 lines aren’t shown here.
This diff is large: its 1761 lines aren’t shown here.
This diff is large: its 478 lines aren’t shown here.
This diff is large: its 283 lines aren’t shown here.
This diff is large: its 49 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 185 lines aren’t shown here.
This diff is large: its 785 lines aren’t shown here.
This diff is large: its 159 lines aren’t shown here.
This diff is large: its 1167 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 56 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 57 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 33 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 42 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 35 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 61 lines aren’t shown here.
This diff is large: its 95 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 59 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 63 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 83 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 394 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 43 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 31 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 53 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 49 lines aren’t shown here.
This diff is large: its 69 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 106 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 35 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 31 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 40 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 65 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 62 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 66 lines aren’t shown here.
This diff is large: its 165 lines aren’t shown here.
This diff is large: its 123 lines aren’t shown here.
This diff is large: its 249 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 66 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 55 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 7 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 55 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 82 lines aren’t shown here.
This diff is large: its 31 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 78 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 31 lines aren’t shown here.
This diff is large: its 260 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 194 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 65 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 44 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 92 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 69 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 42 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 178 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 52 lines aren’t shown here.
This diff is large: its 49 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 33 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 101 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 33 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 76 lines aren’t shown here.
This diff is large: its 60 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 220 lines aren’t shown here.
This diff is large: its 1340 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 236 lines aren’t shown here.
This diff is large: its 78 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 53 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 58 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 62 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 97 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 52 lines aren’t shown here.
This diff is large: its 55 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 7 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 241 lines aren’t shown here.
This diff is large: its 53 lines aren’t shown here.
This diff is large: its 48 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 92 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 54 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 102 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 67 lines aren’t shown here.
This diff is large: its 46 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 38 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 90 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 3 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 163 lines aren’t shown here.
This diff is large: its 190 lines aren’t shown here.
This diff is large: its 1816 lines aren’t shown here.
This diff is large: its 90 lines aren’t shown here.
This diff is large: its 92 lines aren’t shown here.
This diff is large: its 574 lines aren’t shown here.
This diff is large: its 44 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 103 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 139 lines aren’t shown here.
This diff is large: its 123 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 39 lines aren’t shown here.
This diff is large: its 6 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 57 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 41 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 46 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 41 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 41 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 38 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 87 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 42 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 31 lines aren’t shown here.
This diff is large: its 35 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 73 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 100 lines aren’t shown here.
This diff is large: its 198 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 143 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.