diff options
Diffstat (limited to 'Documentation')
105 files changed, 4795 insertions, 493 deletions
diff --git a/Documentation/ABI/stable/sysfs-devices-system-cpu b/Documentation/ABI/stable/sysfs-devices-system-cpu new file mode 100644 index 000000000000..33c133e2a631 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-system-cpu | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | What: /sys/devices/system/cpu/dscr_default | ||
| 2 | Date: 13-May-2014 | ||
| 3 | KernelVersion: v3.15.0 | ||
| 4 | Contact: | ||
| 5 | Description: Writes are equivalent to writing to | ||
| 6 | /sys/devices/system/cpu/cpuN/dscr on all CPUs. | ||
| 7 | Reads return the last written value or 0. | ||
| 8 | This value is not a global default: it is a way to set | ||
| 9 | all per-CPU defaults at the same time. | ||
| 10 | Values: 64 bit unsigned integer (bit field) | ||
| 11 | |||
| 12 | What: /sys/devices/system/cpu/cpu[0-9]+/dscr | ||
| 13 | Date: 13-May-2014 | ||
| 14 | KernelVersion: v3.15.0 | ||
| 15 | Contact: | ||
| 16 | Description: Default value for the Data Stream Control Register (DSCR) on | ||
| 17 | a CPU. | ||
| 18 | This default value is used when the kernel is executing and | ||
| 19 | for any process that has not set the DSCR itself. | ||
| 20 | If a process ever sets the DSCR (via direct access to the | ||
| 21 | SPR) that value will be persisted for that process and used | ||
| 22 | on any CPU where it executes (overriding the value described | ||
| 23 | here). | ||
| 24 | If set by a process it will be inherited by child processes. | ||
| 25 | Values: 64 bit unsigned integer (bit field) | ||
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index f1c5cc9d17a8..4c3efe434806 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy | |||
| @@ -23,7 +23,7 @@ Description: | |||
| 23 | [fowner]] | 23 | [fowner]] |
| 24 | lsm: [[subj_user=] [subj_role=] [subj_type=] | 24 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
| 25 | [obj_user=] [obj_role=] [obj_type=]] | 25 | [obj_user=] [obj_role=] [obj_type=]] |
| 26 | option: [[appraise_type=]] | 26 | option: [[appraise_type=]] [permit_directio] |
| 27 | 27 | ||
| 28 | base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] | 28 | base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] |
| 29 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | 29 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] |
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net index d922060e455d..416c5d59f52e 100644 --- a/Documentation/ABI/testing/sysfs-class-net +++ b/Documentation/ABI/testing/sysfs-class-net | |||
| @@ -169,6 +169,14 @@ Description: | |||
| 169 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", | 169 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", |
| 170 | "dormant", "up". | 170 | "dormant", "up". |
| 171 | 171 | ||
| 172 | What: /sys/class/net/<iface>/phys_port_id | ||
| 173 | Date: July 2013 | ||
| 174 | KernelVersion: 3.12 | ||
| 175 | Contact: netdev@vger.kernel.org | ||
| 176 | Description: | ||
| 177 | Indicates the interface unique physical port identifier within | ||
| 178 | the NIC, as a string. | ||
| 179 | |||
| 172 | What: /sys/class/net/<iface>/speed | 180 | What: /sys/class/net/<iface>/speed |
| 173 | Date: October 2009 | 181 | Date: October 2009 |
| 174 | KernelVersion: 2.6.33 | 182 | KernelVersion: 2.6.33 |
diff --git a/Documentation/ABI/testing/sysfs-class-net-cdc_ncm b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm new file mode 100644 index 000000000000..5cedf72df358 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | What: /sys/class/net/<iface>/cdc_ncm/min_tx_pkt | ||
| 2 | Date: May 2014 | ||
| 3 | KernelVersion: 3.16 | ||
| 4 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 5 | Description: | ||
| 6 | The driver will pad NCM Transfer Blocks (NTBs) longer | ||
| 7 | than this to tx_max, allowing the device to receive | ||
| 8 | tx_max sized frames with no terminating short | ||
| 9 | packet. NTBs shorter than this limit are transmitted | ||
| 10 | as-is, without any padding, and are terminated with a | ||
| 11 | short USB packet. | ||
| 12 | |||
| 13 | Padding to tx_max allows the driver to transmit NTBs | ||
| 14 | back-to-back without any interleaving short USB | ||
| 15 | packets. This reduces the number of short packet | ||
| 16 | interrupts in the device, and represents a tradeoff | ||
| 17 | between USB bus bandwidth and device DMA optimization. | ||
| 18 | |||
| 19 | Set to 0 to pad all frames. Set greater than tx_max to | ||
| 20 | disable all padding. | ||
| 21 | |||
| 22 | What: /sys/class/net/<iface>/cdc_ncm/rx_max | ||
| 23 | Date: May 2014 | ||
| 24 | KernelVersion: 3.16 | ||
| 25 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 26 | Description: | ||
| 27 | The maximum NTB size for RX. Cannot exceed the | ||
| 28 | maximum value supported by the device. Must allow at | ||
| 29 | least one max sized datagram plus headers. | ||
| 30 | |||
| 31 | The actual limits are device dependent. See | ||
| 32 | dwNtbInMaxSize. | ||
| 33 | |||
| 34 | Note: Some devices will silently ignore changes to | ||
| 35 | this value, resulting in oversized NTBs and | ||
| 36 | corresponding framing errors. | ||
| 37 | |||
| 38 | What: /sys/class/net/<iface>/cdc_ncm/tx_max | ||
| 39 | Date: May 2014 | ||
| 40 | KernelVersion: 3.16 | ||
| 41 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 42 | Description: | ||
| 43 | The maximum NTB size for TX. Cannot exceed the | ||
| 44 | maximum value supported by the device. Must allow at | ||
| 45 | least one max sized datagram plus headers. | ||
| 46 | |||
| 47 | The actual limits are device dependent. See | ||
| 48 | dwNtbOutMaxSize. | ||
| 49 | |||
| 50 | What: /sys/class/net/<iface>/cdc_ncm/tx_timer_usecs | ||
| 51 | Date: May 2014 | ||
| 52 | KernelVersion: 3.16 | ||
| 53 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 54 | Description: | ||
| 55 | Datagram aggregation timeout in µs. The driver will | ||
| 56 | wait up to 3 times this timeout for more datagrams to | ||
| 57 | aggregate before transmitting an NTB frame. | ||
| 58 | |||
| 59 | Valid range: 5 to 4000000 | ||
| 60 | |||
| 61 | Set to 0 to disable aggregation. | ||
| 62 | |||
| 63 | The following read-only attributes all represent fields of the | ||
| 64 | structure defined in section 6.2.1 "GetNtbParameters" of "Universal | ||
| 65 | Serial Bus Communications Class Subclass Specifications for Network | ||
| 66 | Control Model Devices" (CDC NCM), Revision 1.0 (Errata 1), November | ||
| 67 | 24, 2010 from USB Implementers Forum, Inc. The descriptions are | ||
| 68 | quoted from table 6-3 of CDC NCM: "NTB Parameter Structure". | ||
| 69 | |||
| 70 | What: /sys/class/net/<iface>/cdc_ncm/bmNtbFormatsSupported | ||
| 71 | Date: May 2014 | ||
| 72 | KernelVersion: 3.16 | ||
| 73 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 74 | Description: | ||
| 75 | Bit 0: 16-bit NTB supported (set to 1) | ||
| 76 | Bit 1: 32-bit NTB supported | ||
| 77 | Bits 2 – 15: reserved (reset to zero; must be ignored by host) | ||
| 78 | |||
| 79 | What: /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize | ||
| 80 | Date: May 2014 | ||
| 81 | KernelVersion: 3.16 | ||
| 82 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 83 | Description: | ||
| 84 | IN NTB Maximum Size in bytes | ||
| 85 | |||
| 86 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInDivisor | ||
| 87 | Date: May 2014 | ||
| 88 | KernelVersion: 3.16 | ||
| 89 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 90 | Description: | ||
| 91 | Divisor used for IN NTB Datagram payload alignment | ||
| 92 | |||
| 93 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInPayloadRemainder | ||
| 94 | Date: May 2014 | ||
| 95 | KernelVersion: 3.16 | ||
| 96 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 97 | Description: | ||
| 98 | Remainder used to align input datagram payload within | ||
| 99 | the NTB: (Payload Offset) mod (wNdpInDivisor) = | ||
| 100 | wNdpInPayloadRemainder | ||
| 101 | |||
| 102 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInAlignment | ||
| 103 | Date: May 2014 | ||
| 104 | KernelVersion: 3.16 | ||
| 105 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 106 | Description: | ||
| 107 | NDP alignment modulus for NTBs on the IN pipe. Shall | ||
| 108 | be a power of 2, and shall be at least 4. | ||
| 109 | |||
| 110 | What: /sys/class/net/<iface>/cdc_ncm/dwNtbOutMaxSize | ||
| 111 | Date: May 2014 | ||
| 112 | KernelVersion: 3.16 | ||
| 113 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 114 | Description: | ||
| 115 | OUT NTB Maximum Size | ||
| 116 | |||
| 117 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutDivisor | ||
| 118 | Date: May 2014 | ||
| 119 | KernelVersion: 3.16 | ||
| 120 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 121 | Description: | ||
| 122 | OUT NTB Datagram alignment modulus | ||
| 123 | |||
| 124 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutPayloadRemainder | ||
| 125 | Date: May 2014 | ||
| 126 | KernelVersion: 3.16 | ||
| 127 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 128 | Description: | ||
| 129 | Remainder used to align output datagram payload | ||
| 130 | offsets within the NTB: Padding, shall be transmitted | ||
| 131 | as zero by function, and ignored by host. (Payload | ||
| 132 | Offset) mod (wNdpOutDivisor) = wNdpOutPayloadRemainder | ||
| 133 | |||
| 134 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutAlignment | ||
| 135 | Date: May 2014 | ||
| 136 | KernelVersion: 3.16 | ||
| 137 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 138 | Description: | ||
| 139 | NDP alignment modulus for use in NTBs on the OUT | ||
| 140 | pipe. Shall be a power of 2, and shall be at least 4. | ||
| 141 | |||
| 142 | What: /sys/class/net/<iface>/cdc_ncm/wNtbOutMaxDatagrams | ||
| 143 | Date: May 2014 | ||
| 144 | KernelVersion: 3.16 | ||
| 145 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 146 | Description: | ||
| 147 | Maximum number of datagrams that the host may pack | ||
| 148 | into a single OUT NTB. Zero means that the device | ||
| 149 | imposes no limit. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-queues b/Documentation/ABI/testing/sysfs-class-net-queues new file mode 100644 index 000000000000..5e9aeb91d355 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-queues | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | What: /sys/class/<iface>/queues/rx-<queue>/rps_cpus | ||
| 2 | Date: March 2010 | ||
| 3 | KernelVersion: 2.6.35 | ||
| 4 | Contact: netdev@vger.kernel.org | ||
| 5 | Description: | ||
| 6 | Mask of the CPU(s) currently enabled to participate into the | ||
| 7 | Receive Packet Steering packet processing flow for this | ||
| 8 | network device queue. Possible values depend on the number | ||
| 9 | of available CPU(s) in the system. | ||
| 10 | |||
| 11 | What: /sys/class/<iface>/queues/rx-<queue>/rps_flow_cnt | ||
| 12 | Date: April 2010 | ||
| 13 | KernelVersion: 2.6.35 | ||
| 14 | Contact: netdev@vger.kernel.org | ||
| 15 | Description: | ||
| 16 | Number of Receive Packet Steering flows being currently | ||
| 17 | processed by this particular network device receive queue. | ||
| 18 | |||
| 19 | What: /sys/class/<iface>/queues/tx-<queue>/tx_timeout | ||
| 20 | Date: November 2011 | ||
| 21 | KernelVersion: 3.3 | ||
| 22 | Contact: netdev@vger.kernel.org | ||
| 23 | Description: | ||
| 24 | Indicates the number of transmit timeout events seen by this | ||
| 25 | network interface transmit queue. | ||
| 26 | |||
| 27 | What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus | ||
| 28 | Date: November 2010 | ||
| 29 | KernelVersion: 2.6.38 | ||
| 30 | Contact: netdev@vger.kernel.org | ||
| 31 | Description: | ||
| 32 | Mask of the CPU(s) currently enabled to participate into the | ||
| 33 | Transmit Packet Steering packet processing flow for this | ||
| 34 | network device transmit queue. Possible vaules depend on the | ||
| 35 | number of available CPU(s) in the system. | ||
| 36 | |||
| 37 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/hold_time | ||
| 38 | Date: November 2011 | ||
| 39 | KernelVersion: 3.3 | ||
| 40 | Contact: netdev@vger.kernel.org | ||
| 41 | Description: | ||
| 42 | Indicates the hold time in milliseconds to measure the slack | ||
| 43 | of this particular network device transmit queue. | ||
| 44 | Default value is 1000. | ||
| 45 | |||
| 46 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/inflight | ||
| 47 | Date: November 2011 | ||
| 48 | KernelVersion: 3.3 | ||
| 49 | Contact: netdev@vger.kernel.org | ||
| 50 | Description: | ||
| 51 | Indicates the number of bytes (objects) in flight on this | ||
| 52 | network device transmit queue. | ||
| 53 | |||
| 54 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit | ||
| 55 | Date: November 2011 | ||
| 56 | KernelVersion: 3.3 | ||
| 57 | Contact: netdev@vger.kernel.org | ||
| 58 | Description: | ||
| 59 | Indicates the current limit of bytes allowed to be queued | ||
| 60 | on this network device transmit queue. This value is clamped | ||
| 61 | to be within the bounds defined by limit_max and limit_min. | ||
| 62 | |||
| 63 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_max | ||
| 64 | Date: November 2011 | ||
| 65 | KernelVersion: 3.3 | ||
| 66 | Contact: netdev@vger.kernel.org | ||
| 67 | Description: | ||
| 68 | Indicates the absolute maximum limit of bytes allowed to be | ||
| 69 | queued on this network device transmit queue. See | ||
| 70 | include/linux/dynamic_queue_limits.h for the default value. | ||
| 71 | |||
| 72 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_min | ||
| 73 | Date: November 2011 | ||
| 74 | KernelVersion: 3.3 | ||
| 75 | Contact: netdev@vger.kernel.org | ||
| 76 | Description: | ||
| 77 | Indicates the absolute minimum limit of bytes allowed to be | ||
| 78 | queued on this network device transmit queue. Default value is | ||
| 79 | 0. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-statistics b/Documentation/ABI/testing/sysfs-class-net-statistics new file mode 100644 index 000000000000..397118de7b5e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-statistics | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | What: /sys/class/<iface>/statistics/collisions | ||
| 2 | Date: April 2005 | ||
| 3 | KernelVersion: 2.6.12 | ||
| 4 | Contact: netdev@vger.kernel.org | ||
| 5 | Description: | ||
| 6 | Indicates the number of collisions seen by this network device. | ||
| 7 | This value might not be relevant with all MAC layers. | ||
| 8 | |||
| 9 | What: /sys/class/<iface>/statistics/multicast | ||
| 10 | Date: April 2005 | ||
| 11 | KernelVersion: 2.6.12 | ||
| 12 | Contact: netdev@vger.kernel.org | ||
| 13 | Description: | ||
| 14 | Indicates the number of multicast packets received by this | ||
| 15 | network device. | ||
| 16 | |||
| 17 | What: /sys/class/<iface>/statistics/rx_bytes | ||
| 18 | Date: April 2005 | ||
| 19 | KernelVersion: 2.6.12 | ||
| 20 | Contact: netdev@vger.kernel.org | ||
| 21 | Description: | ||
| 22 | Indicates the number of bytes received by this network device. | ||
| 23 | See the network driver for the exact meaning of when this | ||
| 24 | value is incremented. | ||
| 25 | |||
| 26 | What: /sys/class/<iface>/statistics/rx_compressed | ||
| 27 | Date: April 2005 | ||
| 28 | KernelVersion: 2.6.12 | ||
| 29 | Contact: netdev@vger.kernel.org | ||
| 30 | Description: | ||
| 31 | Indicates the number of compressed packets received by this | ||
| 32 | network device. This value might only be relevant for interfaces | ||
| 33 | that support packet compression (e.g: PPP). | ||
| 34 | |||
| 35 | What: /sys/class/<iface>/statistics/rx_crc_errors | ||
| 36 | Date: April 2005 | ||
| 37 | KernelVersion: 2.6.12 | ||
| 38 | Contact: netdev@vger.kernel.org | ||
| 39 | Description: | ||
| 40 | Indicates the number of packets received with a CRC (FCS) error | ||
| 41 | by this network device. Note that the specific meaning might | ||
| 42 | depend on the MAC layer used by the interface. | ||
| 43 | |||
| 44 | What: /sys/class/<iface>/statistics/rx_dropped | ||
| 45 | Date: April 2005 | ||
| 46 | KernelVersion: 2.6.12 | ||
| 47 | Contact: netdev@vger.kernel.org | ||
| 48 | Description: | ||
| 49 | Indicates the number of packets received by the network device | ||
| 50 | but dropped, that are not forwarded to the upper layers for | ||
| 51 | packet processing. See the network driver for the exact | ||
| 52 | meaning of this value. | ||
| 53 | |||
| 54 | What: /sys/class/<iface>/statistics/rx_fifo_errors | ||
| 55 | Date: April 2005 | ||
| 56 | KernelVersion: 2.6.12 | ||
| 57 | Contact: netdev@vger.kernel.org | ||
| 58 | Description: | ||
| 59 | Indicates the number of receive FIFO errors seen by this | ||
| 60 | network device. See the network driver for the exact | ||
| 61 | meaning of this value. | ||
| 62 | |||
| 63 | What: /sys/class/<iface>/statistics/rx_frame_errors | ||
| 64 | Date: April 2005 | ||
| 65 | KernelVersion: 2.6.12 | ||
| 66 | Contact: netdev@vger.kernel.org | ||
| 67 | Description: | ||
| 68 | Indicates the number of received frames with error, such as | ||
| 69 | alignment errors. Note that the specific meaning depends on | ||
| 70 | on the MAC layer protocol used. See the network driver for | ||
| 71 | the exact meaning of this value. | ||
| 72 | |||
| 73 | What: /sys/class/<iface>/statistics/rx_length_errors | ||
| 74 | Date: April 2005 | ||
| 75 | KernelVersion: 2.6.12 | ||
| 76 | Contact: netdev@vger.kernel.org | ||
| 77 | Description: | ||
| 78 | Indicates the number of received error packet with a length | ||
| 79 | error, oversized or undersized. See the network driver for the | ||
| 80 | exact meaning of this value. | ||
| 81 | |||
| 82 | What: /sys/class/<iface>/statistics/rx_missed_errors | ||
| 83 | Date: April 2005 | ||
| 84 | KernelVersion: 2.6.12 | ||
| 85 | Contact: netdev@vger.kernel.org | ||
| 86 | Description: | ||
| 87 | Indicates the number of received packets that have been missed | ||
| 88 | due to lack of capacity in the receive side. See the network | ||
| 89 | driver for the exact meaning of this value. | ||
| 90 | |||
| 91 | What: /sys/class/<iface>/statistics/rx_over_errors | ||
| 92 | Date: April 2005 | ||
| 93 | KernelVersion: 2.6.12 | ||
| 94 | Contact: netdev@vger.kernel.org | ||
| 95 | Description: | ||
| 96 | Indicates the number of received packets that are oversized | ||
| 97 | compared to what the network device is configured to accept | ||
| 98 | (e.g: larger than MTU). See the network driver for the exact | ||
| 99 | meaning of this value. | ||
| 100 | |||
| 101 | What: /sys/class/<iface>/statistics/rx_packets | ||
| 102 | Date: April 2005 | ||
| 103 | KernelVersion: 2.6.12 | ||
| 104 | Contact: netdev@vger.kernel.org | ||
| 105 | Description: | ||
| 106 | Indicates the total number of good packets received by this | ||
| 107 | network device. | ||
| 108 | |||
| 109 | What: /sys/class/<iface>/statistics/tx_aborted_errors | ||
| 110 | Date: April 2005 | ||
| 111 | KernelVersion: 2.6.12 | ||
| 112 | Contact: netdev@vger.kernel.org | ||
| 113 | Description: | ||
| 114 | Indicates the number of packets that have been aborted | ||
| 115 | during transmission by a network device (e.g: because of | ||
| 116 | a medium collision). See the network driver for the exact | ||
| 117 | meaning of this value. | ||
| 118 | |||
| 119 | What: /sys/class/<iface>/statistics/tx_bytes | ||
| 120 | Date: April 2005 | ||
| 121 | KernelVersion: 2.6.12 | ||
| 122 | Contact: netdev@vger.kernel.org | ||
| 123 | Description: | ||
| 124 | Indicates the number of bytes transmitted by a network | ||
| 125 | device. See the network driver for the exact meaning of this | ||
| 126 | value, in particular whether this accounts for all successfully | ||
| 127 | transmitted packets or all packets that have been queued for | ||
| 128 | transmission. | ||
| 129 | |||
| 130 | What: /sys/class/<iface>/statistics/tx_carrier_errors | ||
| 131 | Date: April 2005 | ||
| 132 | KernelVersion: 2.6.12 | ||
| 133 | Contact: netdev@vger.kernel.org | ||
| 134 | Description: | ||
| 135 | Indicates the number of packets that could not be transmitted | ||
| 136 | because of carrier errors (e.g: physical link down). See the | ||
| 137 | network driver for the exact meaning of this value. | ||
| 138 | |||
| 139 | What: /sys/class/<iface>/statistics/tx_compressed | ||
| 140 | Date: April 2005 | ||
| 141 | KernelVersion: 2.6.12 | ||
| 142 | Contact: netdev@vger.kernel.org | ||
| 143 | Description: | ||
| 144 | Indicates the number of transmitted compressed packets. Note | ||
| 145 | this might only be relevant for devices that support | ||
| 146 | compression (e.g: PPP). | ||
| 147 | |||
| 148 | What: /sys/class/<iface>/statistics/tx_dropped | ||
| 149 | Date: April 2005 | ||
| 150 | KernelVersion: 2.6.12 | ||
| 151 | Contact: netdev@vger.kernel.org | ||
| 152 | Description: | ||
| 153 | Indicates the number of packets dropped during transmission. | ||
| 154 | See the driver for the exact reasons as to why the packets were | ||
| 155 | dropped. | ||
| 156 | |||
| 157 | What: /sys/class/<iface>/statistics/tx_errors | ||
| 158 | Date: April 2005 | ||
| 159 | KernelVersion: 2.6.12 | ||
| 160 | Contact: netdev@vger.kernel.org | ||
| 161 | Description: | ||
| 162 | Indicates the number of packets in error during transmission by | ||
| 163 | a network device. See the driver for the exact reasons as to | ||
| 164 | why the packets were dropped. | ||
| 165 | |||
| 166 | What: /sys/class/<iface>/statistics/tx_fifo_errors | ||
| 167 | Date: April 2005 | ||
| 168 | KernelVersion: 2.6.12 | ||
| 169 | Contact: netdev@vger.kernel.org | ||
| 170 | Description: | ||
| 171 | Indicates the number of packets having caused a transmit | ||
| 172 | FIFO error. See the driver for the exact reasons as to why the | ||
| 173 | packets were dropped. | ||
| 174 | |||
| 175 | What: /sys/class/<iface>/statistics/tx_heartbeat_errors | ||
| 176 | Date: April 2005 | ||
| 177 | KernelVersion: 2.6.12 | ||
| 178 | Contact: netdev@vger.kernel.org | ||
| 179 | Description: | ||
| 180 | Indicates the number of packets transmitted that have been | ||
| 181 | reported as heartbeat errors. See the driver for the exact | ||
| 182 | reasons as to why the packets were dropped. | ||
| 183 | |||
| 184 | What: /sys/class/<iface>/statistics/tx_packets | ||
| 185 | Date: April 2005 | ||
| 186 | KernelVersion: 2.6.12 | ||
| 187 | Contact: netdev@vger.kernel.org | ||
| 188 | Description: | ||
| 189 | Indicates the number of packets transmitted by a network | ||
| 190 | device. See the driver for whether this reports the number of all | ||
| 191 | attempted or successful transmissions. | ||
| 192 | |||
| 193 | What: /sys/class/<iface>/statistics/tx_window_errors | ||
| 194 | Date: April 2005 | ||
| 195 | KernelVersion: 2.6.12 | ||
| 196 | Contact: netdev@vger.kernel.org | ||
| 197 | Description: | ||
| 198 | Indicates the number of packets not successfully transmitted | ||
| 199 | due to a window collision. The specific meaning depends on the | ||
| 200 | MAC layer used. On Ethernet this is usually used to report | ||
| 201 | late collisions errors. | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 044b76436e83..d9b9416c989f 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
| @@ -100,6 +100,7 @@ | |||
| 100 | !Finclude/net/cfg80211.h wdev_priv | 100 | !Finclude/net/cfg80211.h wdev_priv |
| 101 | !Finclude/net/cfg80211.h ieee80211_iface_limit | 101 | !Finclude/net/cfg80211.h ieee80211_iface_limit |
| 102 | !Finclude/net/cfg80211.h ieee80211_iface_combination | 102 | !Finclude/net/cfg80211.h ieee80211_iface_combination |
| 103 | !Finclude/net/cfg80211.h cfg80211_check_combinations | ||
| 103 | </chapter> | 104 | </chapter> |
| 104 | <chapter> | 105 | <chapter> |
| 105 | <title>Actions and configuration</title> | 106 | <title>Actions and configuration</title> |
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index ba60d93c1855..7df3134ebc0e 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
| @@ -142,6 +142,12 @@ | |||
| 142 | to register it with the DRM subsystem. | 142 | to register it with the DRM subsystem. |
| 143 | </para> | 143 | </para> |
| 144 | <para> | 144 | <para> |
| 145 | Newer drivers that no longer require a <structname>drm_bus</structname> | ||
| 146 | structure can alternatively use the low-level device initialization and | ||
| 147 | registration functions such as <function>drm_dev_alloc()</function> and | ||
| 148 | <function>drm_dev_register()</function> directly. | ||
| 149 | </para> | ||
| 150 | <para> | ||
| 145 | The <structname>drm_driver</structname> structure contains static | 151 | The <structname>drm_driver</structname> structure contains static |
| 146 | information that describes the driver and features it supports, and | 152 | information that describes the driver and features it supports, and |
| 147 | pointers to methods that the DRM core will call to implement the DRM API. | 153 | pointers to methods that the DRM core will call to implement the DRM API. |
| @@ -282,6 +288,36 @@ char *date;</synopsis> | |||
| 282 | </sect3> | 288 | </sect3> |
| 283 | </sect2> | 289 | </sect2> |
| 284 | <sect2> | 290 | <sect2> |
| 291 | <title>Device Registration</title> | ||
| 292 | <para> | ||
| 293 | A number of functions are provided to help with device registration. | ||
| 294 | The functions deal with PCI, USB and platform devices, respectively. | ||
| 295 | </para> | ||
| 296 | !Edrivers/gpu/drm/drm_pci.c | ||
| 297 | !Edrivers/gpu/drm/drm_usb.c | ||
| 298 | !Edrivers/gpu/drm/drm_platform.c | ||
| 299 | <para> | ||
| 300 | New drivers that no longer rely on the services provided by the | ||
| 301 | <structname>drm_bus</structname> structure can call the low-level | ||
| 302 | device registration functions directly. The | ||
| 303 | <function>drm_dev_alloc()</function> function can be used to allocate | ||
| 304 | and initialize a new <structname>drm_device</structname> structure. | ||
| 305 | Drivers will typically want to perform some additional setup on this | ||
| 306 | structure, such as allocating driver-specific data and storing a | ||
| 307 | pointer to it in the DRM device's <structfield>dev_private</structfield> | ||
| 308 | field. Drivers should also set the device's unique name using the | ||
| 309 | <function>drm_dev_set_unique()</function> function. After it has been | ||
| 310 | set up a device can be registered with the DRM subsystem by calling | ||
| 311 | <function>drm_dev_register()</function>. This will cause the device to | ||
| 312 | be exposed to userspace and will call the driver's | ||
| 313 | <structfield>.load()</structfield> implementation. When a device is | ||
| 314 | removed, the DRM device can safely be unregistered and freed by calling | ||
| 315 | <function>drm_dev_unregister()</function> followed by a call to | ||
| 316 | <function>drm_dev_unref()</function>. | ||
| 317 | </para> | ||
| 318 | !Edrivers/gpu/drm/drm_stub.c | ||
| 319 | </sect2> | ||
| 320 | <sect2> | ||
| 285 | <title>Driver Load</title> | 321 | <title>Driver Load</title> |
| 286 | <para> | 322 | <para> |
| 287 | The <methodname>load</methodname> method is the driver and device | 323 | The <methodname>load</methodname> method is the driver and device |
| @@ -342,21 +378,13 @@ char *date;</synopsis> | |||
| 342 | <sect4> | 378 | <sect4> |
| 343 | <title>Managed IRQ Registration</title> | 379 | <title>Managed IRQ Registration</title> |
| 344 | <para> | 380 | <para> |
| 345 | Both the <function>drm_irq_install</function> and | ||
| 346 | <function>drm_irq_uninstall</function> functions get the device IRQ by | ||
| 347 | calling <function>drm_dev_to_irq</function>. This inline function will | ||
| 348 | call a bus-specific operation to retrieve the IRQ number. For platform | ||
| 349 | devices, <function>platform_get_irq</function>(..., 0) is used to | ||
| 350 | retrieve the IRQ number. | ||
| 351 | </para> | ||
| 352 | <para> | ||
| 353 | <function>drm_irq_install</function> starts by calling the | 381 | <function>drm_irq_install</function> starts by calling the |
| 354 | <methodname>irq_preinstall</methodname> driver operation. The operation | 382 | <methodname>irq_preinstall</methodname> driver operation. The operation |
| 355 | is optional and must make sure that the interrupt will not get fired by | 383 | is optional and must make sure that the interrupt will not get fired by |
| 356 | clearing all pending interrupt flags or disabling the interrupt. | 384 | clearing all pending interrupt flags or disabling the interrupt. |
| 357 | </para> | 385 | </para> |
| 358 | <para> | 386 | <para> |
| 359 | The IRQ will then be requested by a call to | 387 | The passed-in IRQ will then be requested by a call to |
| 360 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver | 388 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver |
| 361 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be | 389 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be |
| 362 | requested. | 390 | requested. |
| @@ -1799,6 +1827,12 @@ void intel_crt_init(struct drm_device *dev) | |||
| 1799 | <title>KMS API Functions</title> | 1827 | <title>KMS API Functions</title> |
| 1800 | !Edrivers/gpu/drm/drm_crtc.c | 1828 | !Edrivers/gpu/drm/drm_crtc.c |
| 1801 | </sect2> | 1829 | </sect2> |
| 1830 | <sect2> | ||
| 1831 | <title>KMS Locking</title> | ||
| 1832 | !Pdrivers/gpu/drm/drm_modeset_lock.c kms locking | ||
| 1833 | !Iinclude/drm/drm_modeset_lock.h | ||
| 1834 | !Edrivers/gpu/drm/drm_modeset_lock.c | ||
| 1835 | </sect2> | ||
| 1802 | </sect1> | 1836 | </sect1> |
| 1803 | 1837 | ||
| 1804 | <!-- Internals: kms helper functions --> | 1838 | <!-- Internals: kms helper functions --> |
| @@ -1903,8 +1937,8 @@ void intel_crt_init(struct drm_device *dev) | |||
| 1903 | <para> | 1937 | <para> |
| 1904 | The function filters out modes larger than | 1938 | The function filters out modes larger than |
| 1905 | <parameter>max_width</parameter> and <parameter>max_height</parameter> | 1939 | <parameter>max_width</parameter> and <parameter>max_height</parameter> |
| 1906 | if specified. It then calls the connector | 1940 | if specified. It then calls the optional connector |
| 1907 | <methodname>mode_valid</methodname> helper operation for each mode in | 1941 | <methodname>mode_valid</methodname> helper operation for each mode in |
| 1908 | the probed list to check whether the mode is valid for the connector. | 1942 | the probed list to check whether the mode is valid for the connector. |
| 1909 | </para> | 1943 | </para> |
| 1910 | </listitem> | 1944 | </listitem> |
| @@ -2265,7 +2299,7 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2265 | <para> | 2299 | <para> |
| 2266 | Verify whether a mode is valid for the connector. Return MODE_OK for | 2300 | Verify whether a mode is valid for the connector. Return MODE_OK for |
| 2267 | supported modes and one of the enum drm_mode_status values (MODE_*) | 2301 | supported modes and one of the enum drm_mode_status values (MODE_*) |
| 2268 | for unsupported modes. This operation is mandatory. | 2302 | for unsupported modes. This operation is optional. |
| 2269 | </para> | 2303 | </para> |
| 2270 | <para> | 2304 | <para> |
| 2271 | As the mode rejection reason is currently not used beside for | 2305 | As the mode rejection reason is currently not used beside for |
| @@ -2450,6 +2484,863 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2450 | pointer to the target object, a pointer to the previously created property | 2484 | pointer to the target object, a pointer to the previously created property |
| 2451 | and an initial instance value. | 2485 | and an initial instance value. |
| 2452 | </para> | 2486 | </para> |
| 2487 | <sect2> | ||
| 2488 | <title>Existing KMS Properties</title> | ||
| 2489 | <para> | ||
| 2490 | The following table gives description of drm properties exposed by various | ||
| 2491 | modules/drivers. | ||
| 2492 | </para> | ||
| 2493 | <table border="1" cellpadding="0" cellspacing="0"> | ||
| 2494 | <tbody> | ||
| 2495 | <tr style="font-weight: bold;"> | ||
| 2496 | <td valign="top" >Owner Module/Drivers</td> | ||
| 2497 | <td valign="top" >Group</td> | ||
| 2498 | <td valign="top" >Property Name</td> | ||
| 2499 | <td valign="top" >Type</td> | ||
| 2500 | <td valign="top" >Property Values</td> | ||
| 2501 | <td valign="top" >Object attached</td> | ||
| 2502 | <td valign="top" >Description/Restrictions</td> | ||
| 2503 | </tr> | ||
| 2504 | <tr> | ||
| 2505 | <td rowspan="20" valign="top" >DRM</td> | ||
| 2506 | <td rowspan="2" valign="top" >Generic</td> | ||
| 2507 | <td valign="top" >“EDIDâ€</td> | ||
| 2508 | <td valign="top" >BLOB | IMMUTABLE</td> | ||
| 2509 | <td valign="top" >0</td> | ||
| 2510 | <td valign="top" >Connector</td> | ||
| 2511 | <td valign="top" >Contains id of edid blob ptr object.</td> | ||
| 2512 | </tr> | ||
| 2513 | <tr> | ||
| 2514 | <td valign="top" >“DPMSâ€</td> | ||
| 2515 | <td valign="top" >ENUM</td> | ||
| 2516 | <td valign="top" >{ “Onâ€, “Standbyâ€, “Suspendâ€, “Off†}</td> | ||
| 2517 | <td valign="top" >Connector</td> | ||
| 2518 | <td valign="top" >Contains DPMS operation mode value.</td> | ||
| 2519 | </tr> | ||
| 2520 | <tr> | ||
| 2521 | <td rowspan="1" valign="top" >Plane</td> | ||
| 2522 | <td valign="top" >“typeâ€</td> | ||
| 2523 | <td valign="top" >ENUM | IMMUTABLE</td> | ||
| 2524 | <td valign="top" >{ "Overlay", "Primary", "Cursor" }</td> | ||
| 2525 | <td valign="top" >Plane</td> | ||
| 2526 | <td valign="top" >Plane type</td> | ||
| 2527 | </tr> | ||
| 2528 | <tr> | ||
| 2529 | <td rowspan="2" valign="top" >DVI-I</td> | ||
| 2530 | <td valign="top" >“subconnectorâ€</td> | ||
| 2531 | <td valign="top" >ENUM</td> | ||
| 2532 | <td valign="top" >{ “Unknownâ€, “DVI-Dâ€, “DVI-A†}</td> | ||
| 2533 | <td valign="top" >Connector</td> | ||
| 2534 | <td valign="top" >TBD</td> | ||
| 2535 | </tr> | ||
| 2536 | <tr> | ||
| 2537 | <td valign="top" >“select subconnectorâ€</td> | ||
| 2538 | <td valign="top" >ENUM</td> | ||
| 2539 | <td valign="top" >{ “Automaticâ€, “DVI-Dâ€, “DVI-A†}</td> | ||
| 2540 | <td valign="top" >Connector</td> | ||
| 2541 | <td valign="top" >TBD</td> | ||
| 2542 | </tr> | ||
| 2543 | <tr> | ||
| 2544 | <td rowspan="13" valign="top" >TV</td> | ||
| 2545 | <td valign="top" >“subconnectorâ€</td> | ||
| 2546 | <td valign="top" >ENUM</td> | ||
| 2547 | <td valign="top" >{ "Unknown", "Composite", "SVIDEO", "Component", "SCART" }</td> | ||
| 2548 | <td valign="top" >Connector</td> | ||
| 2549 | <td valign="top" >TBD</td> | ||
| 2550 | </tr> | ||
| 2551 | <tr> | ||
| 2552 | <td valign="top" >“select subconnectorâ€</td> | ||
| 2553 | <td valign="top" >ENUM</td> | ||
| 2554 | <td valign="top" >{ "Automatic", "Composite", "SVIDEO", "Component", "SCART" }</td> | ||
| 2555 | <td valign="top" >Connector</td> | ||
| 2556 | <td valign="top" >TBD</td> | ||
| 2557 | </tr> | ||
| 2558 | <tr> | ||
| 2559 | <td valign="top" >“modeâ€</td> | ||
| 2560 | <td valign="top" >ENUM</td> | ||
| 2561 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2562 | <td valign="top" >Connector</td> | ||
| 2563 | <td valign="top" >TBD</td> | ||
| 2564 | </tr> | ||
| 2565 | <tr> | ||
| 2566 | <td valign="top" >“left marginâ€</td> | ||
| 2567 | <td valign="top" >RANGE</td> | ||
| 2568 | <td valign="top" >Min=0, Max=100</td> | ||
| 2569 | <td valign="top" >Connector</td> | ||
| 2570 | <td valign="top" >TBD</td> | ||
| 2571 | </tr> | ||
| 2572 | <tr> | ||
| 2573 | <td valign="top" >“right marginâ€</td> | ||
| 2574 | <td valign="top" >RANGE</td> | ||
| 2575 | <td valign="top" >Min=0, Max=100</td> | ||
| 2576 | <td valign="top" >Connector</td> | ||
| 2577 | <td valign="top" >TBD</td> | ||
| 2578 | </tr> | ||
| 2579 | <tr> | ||
| 2580 | <td valign="top" >“top marginâ€</td> | ||
| 2581 | <td valign="top" >RANGE</td> | ||
| 2582 | <td valign="top" >Min=0, Max=100</td> | ||
| 2583 | <td valign="top" >Connector</td> | ||
| 2584 | <td valign="top" >TBD</td> | ||
| 2585 | </tr> | ||
| 2586 | <tr> | ||
| 2587 | <td valign="top" >“bottom marginâ€</td> | ||
| 2588 | <td valign="top" >RANGE</td> | ||
| 2589 | <td valign="top" >Min=0, Max=100</td> | ||
| 2590 | <td valign="top" >Connector</td> | ||
| 2591 | <td valign="top" >TBD</td> | ||
| 2592 | </tr> | ||
| 2593 | <tr> | ||
| 2594 | <td valign="top" >“brightnessâ€</td> | ||
| 2595 | <td valign="top" >RANGE</td> | ||
| 2596 | <td valign="top" >Min=0, Max=100</td> | ||
| 2597 | <td valign="top" >Connector</td> | ||
| 2598 | <td valign="top" >TBD</td> | ||
| 2599 | </tr> | ||
| 2600 | <tr> | ||
| 2601 | <td valign="top" >“contrastâ€</td> | ||
| 2602 | <td valign="top" >RANGE</td> | ||
| 2603 | <td valign="top" >Min=0, Max=100</td> | ||
| 2604 | <td valign="top" >Connector</td> | ||
| 2605 | <td valign="top" >TBD</td> | ||
| 2606 | </tr> | ||
| 2607 | <tr> | ||
| 2608 | <td valign="top" >“flicker reductionâ€</td> | ||
| 2609 | <td valign="top" >RANGE</td> | ||
| 2610 | <td valign="top" >Min=0, Max=100</td> | ||
| 2611 | <td valign="top" >Connector</td> | ||
| 2612 | <td valign="top" >TBD</td> | ||
| 2613 | </tr> | ||
| 2614 | <tr> | ||
| 2615 | <td valign="top" >“overscanâ€</td> | ||
| 2616 | <td valign="top" >RANGE</td> | ||
| 2617 | <td valign="top" >Min=0, Max=100</td> | ||
| 2618 | <td valign="top" >Connector</td> | ||
| 2619 | <td valign="top" >TBD</td> | ||
| 2620 | </tr> | ||
| 2621 | <tr> | ||
| 2622 | <td valign="top" >“saturationâ€</td> | ||
| 2623 | <td valign="top" >RANGE</td> | ||
| 2624 | <td valign="top" >Min=0, Max=100</td> | ||
| 2625 | <td valign="top" >Connector</td> | ||
| 2626 | <td valign="top" >TBD</td> | ||
| 2627 | </tr> | ||
| 2628 | <tr> | ||
| 2629 | <td valign="top" >“hueâ€</td> | ||
| 2630 | <td valign="top" >RANGE</td> | ||
| 2631 | <td valign="top" >Min=0, Max=100</td> | ||
| 2632 | <td valign="top" >Connector</td> | ||
| 2633 | <td valign="top" >TBD</td> | ||
| 2634 | </tr> | ||
| 2635 | <tr> | ||
| 2636 | <td rowspan="2" valign="top" >Optional</td> | ||
| 2637 | <td valign="top" >“scaling modeâ€</td> | ||
| 2638 | <td valign="top" >ENUM</td> | ||
| 2639 | <td valign="top" >{ "None", "Full", "Center", "Full aspect" }</td> | ||
| 2640 | <td valign="top" >Connector</td> | ||
| 2641 | <td valign="top" >TBD</td> | ||
| 2642 | </tr> | ||
| 2643 | <tr> | ||
| 2644 | <td valign="top" >“dirtyâ€</td> | ||
| 2645 | <td valign="top" >ENUM | IMMUTABLE</td> | ||
| 2646 | <td valign="top" >{ "Off", "On", "Annotate" }</td> | ||
| 2647 | <td valign="top" >Connector</td> | ||
| 2648 | <td valign="top" >TBD</td> | ||
| 2649 | </tr> | ||
| 2650 | <tr> | ||
| 2651 | <td rowspan="21" valign="top" >i915</td> | ||
| 2652 | <td rowspan="3" valign="top" >Generic</td> | ||
| 2653 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2654 | <td valign="top" >ENUM</td> | ||
| 2655 | <td valign="top" >{ "Automatic", "Full", "Limited 16:235" }</td> | ||
| 2656 | <td valign="top" >Connector</td> | ||
| 2657 | <td valign="top" >TBD</td> | ||
| 2658 | </tr> | ||
| 2659 | <tr> | ||
| 2660 | <td valign="top" >“audioâ€</td> | ||
| 2661 | <td valign="top" >ENUM</td> | ||
| 2662 | <td valign="top" >{ "force-dvi", "off", "auto", "on" }</td> | ||
| 2663 | <td valign="top" >Connector</td> | ||
| 2664 | <td valign="top" >TBD</td> | ||
| 2665 | </tr> | ||
| 2666 | <tr> | ||
| 2667 | <td valign="top" >Standard name as in DRM</td> | ||
| 2668 | <td valign="top" >Standard type as in DRM</td> | ||
| 2669 | <td valign="top" >Standard value as in DRM</td> | ||
| 2670 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2671 | <td valign="top" >TBD</td> | ||
| 2672 | </tr> | ||
| 2673 | <tr> | ||
| 2674 | <td rowspan="17" valign="top" >SDVO-TV</td> | ||
| 2675 | <td valign="top" >“modeâ€</td> | ||
| 2676 | <td valign="top" >ENUM</td> | ||
| 2677 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2678 | <td valign="top" >Connector</td> | ||
| 2679 | <td valign="top" >TBD</td> | ||
| 2680 | </tr> | ||
| 2681 | <tr> | ||
| 2682 | <td valign="top" >"left_margin"</td> | ||
| 2683 | <td valign="top" >RANGE</td> | ||
| 2684 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2685 | <td valign="top" >Connector</td> | ||
| 2686 | <td valign="top" >TBD</td> | ||
| 2687 | </tr> | ||
| 2688 | <tr> | ||
| 2689 | <td valign="top" >"right_margin"</td> | ||
| 2690 | <td valign="top" >RANGE</td> | ||
| 2691 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2692 | <td valign="top" >Connector</td> | ||
| 2693 | <td valign="top" >TBD</td> | ||
| 2694 | </tr> | ||
| 2695 | <tr> | ||
| 2696 | <td valign="top" >"top_margin"</td> | ||
| 2697 | <td valign="top" >RANGE</td> | ||
| 2698 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2699 | <td valign="top" >Connector</td> | ||
| 2700 | <td valign="top" >TBD</td> | ||
| 2701 | </tr> | ||
| 2702 | <tr> | ||
| 2703 | <td valign="top" >"bottom_margin"</td> | ||
| 2704 | <td valign="top" >RANGE</td> | ||
| 2705 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2706 | <td valign="top" >Connector</td> | ||
| 2707 | <td valign="top" >TBD</td> | ||
| 2708 | </tr> | ||
| 2709 | <tr> | ||
| 2710 | <td valign="top" >“hposâ€</td> | ||
| 2711 | <td valign="top" >RANGE</td> | ||
| 2712 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2713 | <td valign="top" >Connector</td> | ||
| 2714 | <td valign="top" >TBD</td> | ||
| 2715 | </tr> | ||
| 2716 | <tr> | ||
| 2717 | <td valign="top" >“vposâ€</td> | ||
| 2718 | <td valign="top" >RANGE</td> | ||
| 2719 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2720 | <td valign="top" >Connector</td> | ||
| 2721 | <td valign="top" >TBD</td> | ||
| 2722 | </tr> | ||
| 2723 | <tr> | ||
| 2724 | <td valign="top" >“contrastâ€</td> | ||
| 2725 | <td valign="top" >RANGE</td> | ||
| 2726 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2727 | <td valign="top" >Connector</td> | ||
| 2728 | <td valign="top" >TBD</td> | ||
| 2729 | </tr> | ||
| 2730 | <tr> | ||
| 2731 | <td valign="top" >“saturationâ€</td> | ||
| 2732 | <td valign="top" >RANGE</td> | ||
| 2733 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2734 | <td valign="top" >Connector</td> | ||
| 2735 | <td valign="top" >TBD</td> | ||
| 2736 | </tr> | ||
| 2737 | <tr> | ||
| 2738 | <td valign="top" >“hueâ€</td> | ||
| 2739 | <td valign="top" >RANGE</td> | ||
| 2740 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2741 | <td valign="top" >Connector</td> | ||
| 2742 | <td valign="top" >TBD</td> | ||
| 2743 | </tr> | ||
| 2744 | <tr> | ||
| 2745 | <td valign="top" >“sharpnessâ€</td> | ||
| 2746 | <td valign="top" >RANGE</td> | ||
| 2747 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2748 | <td valign="top" >Connector</td> | ||
| 2749 | <td valign="top" >TBD</td> | ||
| 2750 | </tr> | ||
| 2751 | <tr> | ||
| 2752 | <td valign="top" >“flicker_filterâ€</td> | ||
| 2753 | <td valign="top" >RANGE</td> | ||
| 2754 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2755 | <td valign="top" >Connector</td> | ||
| 2756 | <td valign="top" >TBD</td> | ||
| 2757 | </tr> | ||
| 2758 | <tr> | ||
| 2759 | <td valign="top" >“flicker_filter_adaptiveâ€</td> | ||
| 2760 | <td valign="top" >RANGE</td> | ||
| 2761 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2762 | <td valign="top" >Connector</td> | ||
| 2763 | <td valign="top" >TBD</td> | ||
| 2764 | </tr> | ||
| 2765 | <tr> | ||
| 2766 | <td valign="top" >“flicker_filter_2dâ€</td> | ||
| 2767 | <td valign="top" >RANGE</td> | ||
| 2768 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2769 | <td valign="top" >Connector</td> | ||
| 2770 | <td valign="top" >TBD</td> | ||
| 2771 | </tr> | ||
| 2772 | <tr> | ||
| 2773 | <td valign="top" >“tv_chroma_filterâ€</td> | ||
| 2774 | <td valign="top" >RANGE</td> | ||
| 2775 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2776 | <td valign="top" >Connector</td> | ||
| 2777 | <td valign="top" >TBD</td> | ||
| 2778 | </tr> | ||
| 2779 | <tr> | ||
| 2780 | <td valign="top" >“tv_luma_filterâ€</td> | ||
| 2781 | <td valign="top" >RANGE</td> | ||
| 2782 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2783 | <td valign="top" >Connector</td> | ||
| 2784 | <td valign="top" >TBD</td> | ||
| 2785 | </tr> | ||
| 2786 | <tr> | ||
| 2787 | <td valign="top" >“dot_crawlâ€</td> | ||
| 2788 | <td valign="top" >RANGE</td> | ||
| 2789 | <td valign="top" >Min=0, Max=1</td> | ||
| 2790 | <td valign="top" >Connector</td> | ||
| 2791 | <td valign="top" >TBD</td> | ||
| 2792 | </tr> | ||
| 2793 | <tr> | ||
| 2794 | <td valign="top" >SDVO-TV/LVDS</td> | ||
| 2795 | <td valign="top" >“brightnessâ€</td> | ||
| 2796 | <td valign="top" >RANGE</td> | ||
| 2797 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2798 | <td valign="top" >Connector</td> | ||
| 2799 | <td valign="top" >TBD</td> | ||
| 2800 | </tr> | ||
| 2801 | <tr> | ||
| 2802 | <td rowspan="3" valign="top" >CDV gma-500</td> | ||
| 2803 | <td rowspan="3" valign="top" >Generic</td> | ||
| 2804 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2805 | <td valign="top" >ENUM</td> | ||
| 2806 | <td valign="top" >{ “Fullâ€, “Limited 16:235†}</td> | ||
| 2807 | <td valign="top" >Connector</td> | ||
| 2808 | <td valign="top" >TBD</td> | ||
| 2809 | </tr> | ||
| 2810 | <tr> | ||
| 2811 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2812 | <td valign="top" >ENUM</td> | ||
| 2813 | <td valign="top" >{ “offâ€, “autoâ€, “on†}</td> | ||
| 2814 | <td valign="top" >Connector</td> | ||
| 2815 | <td valign="top" >TBD</td> | ||
| 2816 | </tr> | ||
| 2817 | <tr> | ||
| 2818 | <td valign="top" >Standard name as in DRM</td> | ||
| 2819 | <td valign="top" >Standard type as in DRM</td> | ||
| 2820 | <td valign="top" >Standard value as in DRM</td> | ||
| 2821 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2822 | <td valign="top" >TBD</td> | ||
| 2823 | </tr> | ||
| 2824 | <tr> | ||
| 2825 | <td rowspan="20" valign="top" >Poulsbo</td> | ||
| 2826 | <td rowspan="2" valign="top" >Generic</td> | ||
| 2827 | <td valign="top" >“backlightâ€</td> | ||
| 2828 | <td valign="top" >RANGE</td> | ||
| 2829 | <td valign="top" >Min=0, Max=100</td> | ||
| 2830 | <td valign="top" >Connector</td> | ||
| 2831 | <td valign="top" >TBD</td> | ||
| 2832 | </tr> | ||
| 2833 | <tr> | ||
| 2834 | <td valign="top" >Standard name as in DRM</td> | ||
| 2835 | <td valign="top" >Standard type as in DRM</td> | ||
| 2836 | <td valign="top" >Standard value as in DRM</td> | ||
| 2837 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2838 | <td valign="top" >TBD</td> | ||
| 2839 | </tr> | ||
| 2840 | <tr> | ||
| 2841 | <td rowspan="17" valign="top" >SDVO-TV</td> | ||
| 2842 | <td valign="top" >“modeâ€</td> | ||
| 2843 | <td valign="top" >ENUM</td> | ||
| 2844 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2845 | <td valign="top" >Connector</td> | ||
| 2846 | <td valign="top" >TBD</td> | ||
| 2847 | </tr> | ||
| 2848 | <tr> | ||
| 2849 | <td valign="top" >"left_margin"</td> | ||
| 2850 | <td valign="top" >RANGE</td> | ||
| 2851 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2852 | <td valign="top" >Connector</td> | ||
| 2853 | <td valign="top" >TBD</td> | ||
| 2854 | </tr> | ||
| 2855 | <tr> | ||
| 2856 | <td valign="top" >"right_margin"</td> | ||
| 2857 | <td valign="top" >RANGE</td> | ||
| 2858 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2859 | <td valign="top" >Connector</td> | ||
| 2860 | <td valign="top" >TBD</td> | ||
| 2861 | </tr> | ||
| 2862 | <tr> | ||
| 2863 | <td valign="top" >"top_margin"</td> | ||
| 2864 | <td valign="top" >RANGE</td> | ||
| 2865 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2866 | <td valign="top" >Connector</td> | ||
| 2867 | <td valign="top" >TBD</td> | ||
| 2868 | </tr> | ||
| 2869 | <tr> | ||
| 2870 | <td valign="top" >"bottom_margin"</td> | ||
| 2871 | <td valign="top" >RANGE</td> | ||
| 2872 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2873 | <td valign="top" >Connector</td> | ||
| 2874 | <td valign="top" >TBD</td> | ||
| 2875 | </tr> | ||
| 2876 | <tr> | ||
| 2877 | <td valign="top" >“hposâ€</td> | ||
| 2878 | <td valign="top" >RANGE</td> | ||
| 2879 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2880 | <td valign="top" >Connector</td> | ||
| 2881 | <td valign="top" >TBD</td> | ||
| 2882 | </tr> | ||
| 2883 | <tr> | ||
| 2884 | <td valign="top" >“vposâ€</td> | ||
| 2885 | <td valign="top" >RANGE</td> | ||
| 2886 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2887 | <td valign="top" >Connector</td> | ||
| 2888 | <td valign="top" >TBD</td> | ||
| 2889 | </tr> | ||
| 2890 | <tr> | ||
| 2891 | <td valign="top" >“contrastâ€</td> | ||
| 2892 | <td valign="top" >RANGE</td> | ||
| 2893 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2894 | <td valign="top" >Connector</td> | ||
| 2895 | <td valign="top" >TBD</td> | ||
| 2896 | </tr> | ||
| 2897 | <tr> | ||
| 2898 | <td valign="top" >“saturationâ€</td> | ||
| 2899 | <td valign="top" >RANGE</td> | ||
| 2900 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2901 | <td valign="top" >Connector</td> | ||
| 2902 | <td valign="top" >TBD</td> | ||
| 2903 | </tr> | ||
| 2904 | <tr> | ||
| 2905 | <td valign="top" >“hueâ€</td> | ||
| 2906 | <td valign="top" >RANGE</td> | ||
| 2907 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2908 | <td valign="top" >Connector</td> | ||
| 2909 | <td valign="top" >TBD</td> | ||
| 2910 | </tr> | ||
| 2911 | <tr> | ||
| 2912 | <td valign="top" >“sharpnessâ€</td> | ||
| 2913 | <td valign="top" >RANGE</td> | ||
| 2914 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2915 | <td valign="top" >Connector</td> | ||
| 2916 | <td valign="top" >TBD</td> | ||
| 2917 | </tr> | ||
| 2918 | <tr> | ||
| 2919 | <td valign="top" >“flicker_filterâ€</td> | ||
| 2920 | <td valign="top" >RANGE</td> | ||
| 2921 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2922 | <td valign="top" >Connector</td> | ||
| 2923 | <td valign="top" >TBD</td> | ||
| 2924 | </tr> | ||
| 2925 | <tr> | ||
| 2926 | <td valign="top" >“flicker_filter_adaptiveâ€</td> | ||
| 2927 | <td valign="top" >RANGE</td> | ||
| 2928 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2929 | <td valign="top" >Connector</td> | ||
| 2930 | <td valign="top" >TBD</td> | ||
| 2931 | </tr> | ||
| 2932 | <tr> | ||
| 2933 | <td valign="top" >“flicker_filter_2dâ€</td> | ||
| 2934 | <td valign="top" >RANGE</td> | ||
| 2935 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2936 | <td valign="top" >Connector</td> | ||
| 2937 | <td valign="top" >TBD</td> | ||
| 2938 | </tr> | ||
| 2939 | <tr> | ||
| 2940 | <td valign="top" >“tv_chroma_filterâ€</td> | ||
| 2941 | <td valign="top" >RANGE</td> | ||
| 2942 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2943 | <td valign="top" >Connector</td> | ||
| 2944 | <td valign="top" >TBD</td> | ||
| 2945 | </tr> | ||
| 2946 | <tr> | ||
| 2947 | <td valign="top" >“tv_luma_filterâ€</td> | ||
| 2948 | <td valign="top" >RANGE</td> | ||
| 2949 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2950 | <td valign="top" >Connector</td> | ||
| 2951 | <td valign="top" >TBD</td> | ||
| 2952 | </tr> | ||
| 2953 | <tr> | ||
| 2954 | <td valign="top" >“dot_crawlâ€</td> | ||
| 2955 | <td valign="top" >RANGE</td> | ||
| 2956 | <td valign="top" >Min=0, Max=1</td> | ||
| 2957 | <td valign="top" >Connector</td> | ||
| 2958 | <td valign="top" >TBD</td> | ||
| 2959 | </tr> | ||
| 2960 | <tr> | ||
| 2961 | <td valign="top" >SDVO-TV/LVDS</td> | ||
| 2962 | <td valign="top" >“brightnessâ€</td> | ||
| 2963 | <td valign="top" >RANGE</td> | ||
| 2964 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2965 | <td valign="top" >Connector</td> | ||
| 2966 | <td valign="top" >TBD</td> | ||
| 2967 | </tr> | ||
| 2968 | <tr> | ||
| 2969 | <td rowspan="11" valign="top" >armada</td> | ||
| 2970 | <td rowspan="2" valign="top" >CRTC</td> | ||
| 2971 | <td valign="top" >"CSC_YUV"</td> | ||
| 2972 | <td valign="top" >ENUM</td> | ||
| 2973 | <td valign="top" >{ "Auto" , "CCIR601", "CCIR709" }</td> | ||
| 2974 | <td valign="top" >CRTC</td> | ||
| 2975 | <td valign="top" >TBD</td> | ||
| 2976 | </tr> | ||
| 2977 | <tr> | ||
| 2978 | <td valign="top" >"CSC_RGB"</td> | ||
| 2979 | <td valign="top" >ENUM</td> | ||
| 2980 | <td valign="top" >{ "Auto", "Computer system", "Studio" }</td> | ||
| 2981 | <td valign="top" >CRTC</td> | ||
| 2982 | <td valign="top" >TBD</td> | ||
| 2983 | </tr> | ||
| 2984 | <tr> | ||
| 2985 | <td rowspan="9" valign="top" >Overlay</td> | ||
| 2986 | <td valign="top" >"colorkey"</td> | ||
| 2987 | <td valign="top" >RANGE</td> | ||
| 2988 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 2989 | <td valign="top" >Plane</td> | ||
| 2990 | <td valign="top" >TBD</td> | ||
| 2991 | </tr> | ||
| 2992 | <tr> | ||
| 2993 | <td valign="top" >"colorkey_min"</td> | ||
| 2994 | <td valign="top" >RANGE</td> | ||
| 2995 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 2996 | <td valign="top" >Plane</td> | ||
| 2997 | <td valign="top" >TBD</td> | ||
| 2998 | </tr> | ||
| 2999 | <tr> | ||
| 3000 | <td valign="top" >"colorkey_max"</td> | ||
| 3001 | <td valign="top" >RANGE</td> | ||
| 3002 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3003 | <td valign="top" >Plane</td> | ||
| 3004 | <td valign="top" >TBD</td> | ||
| 3005 | </tr> | ||
| 3006 | <tr> | ||
| 3007 | <td valign="top" >"colorkey_val"</td> | ||
| 3008 | <td valign="top" >RANGE</td> | ||
| 3009 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3010 | <td valign="top" >Plane</td> | ||
| 3011 | <td valign="top" >TBD</td> | ||
| 3012 | </tr> | ||
| 3013 | <tr> | ||
| 3014 | <td valign="top" >"colorkey_alpha"</td> | ||
| 3015 | <td valign="top" >RANGE</td> | ||
| 3016 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3017 | <td valign="top" >Plane</td> | ||
| 3018 | <td valign="top" >TBD</td> | ||
| 3019 | </tr> | ||
| 3020 | <tr> | ||
| 3021 | <td valign="top" >"colorkey_mode"</td> | ||
| 3022 | <td valign="top" >ENUM</td> | ||
| 3023 | <td valign="top" >{ "disabled", "Y component", "U component" | ||
| 3024 | , "V component", "RGB", “R component", "G component", "B component" }</td> | ||
| 3025 | <td valign="top" >Plane</td> | ||
| 3026 | <td valign="top" >TBD</td> | ||
| 3027 | </tr> | ||
| 3028 | <tr> | ||
| 3029 | <td valign="top" >"brightness"</td> | ||
| 3030 | <td valign="top" >RANGE</td> | ||
| 3031 | <td valign="top" >Min=0, Max=256 + 255</td> | ||
| 3032 | <td valign="top" >Plane</td> | ||
| 3033 | <td valign="top" >TBD</td> | ||
| 3034 | </tr> | ||
| 3035 | <tr> | ||
| 3036 | <td valign="top" >"contrast"</td> | ||
| 3037 | <td valign="top" >RANGE</td> | ||
| 3038 | <td valign="top" >Min=0, Max=0x7fff</td> | ||
| 3039 | <td valign="top" >Plane</td> | ||
| 3040 | <td valign="top" >TBD</td> | ||
| 3041 | </tr> | ||
| 3042 | <tr> | ||
| 3043 | <td valign="top" >"saturation"</td> | ||
| 3044 | <td valign="top" >RANGE</td> | ||
| 3045 | <td valign="top" >Min=0, Max=0x7fff</td> | ||
| 3046 | <td valign="top" >Plane</td> | ||
| 3047 | <td valign="top" >TBD</td> | ||
| 3048 | </tr> | ||
| 3049 | <tr> | ||
| 3050 | <td rowspan="2" valign="top" >exynos</td> | ||
| 3051 | <td valign="top" >CRTC</td> | ||
| 3052 | <td valign="top" >“modeâ€</td> | ||
| 3053 | <td valign="top" >ENUM</td> | ||
| 3054 | <td valign="top" >{ "normal", "blank" }</td> | ||
| 3055 | <td valign="top" >CRTC</td> | ||
| 3056 | <td valign="top" >TBD</td> | ||
| 3057 | </tr> | ||
| 3058 | <tr> | ||
| 3059 | <td valign="top" >Overlay</td> | ||
| 3060 | <td valign="top" >“zposâ€</td> | ||
| 3061 | <td valign="top" >RANGE</td> | ||
| 3062 | <td valign="top" >Min=0, Max=MAX_PLANE-1</td> | ||
| 3063 | <td valign="top" >Plane</td> | ||
| 3064 | <td valign="top" >TBD</td> | ||
| 3065 | </tr> | ||
| 3066 | <tr> | ||
| 3067 | <td rowspan="3" valign="top" >i2c/ch7006_drv</td> | ||
| 3068 | <td valign="top" >Generic</td> | ||
| 3069 | <td valign="top" >“scaleâ€</td> | ||
| 3070 | <td valign="top" >RANGE</td> | ||
| 3071 | <td valign="top" >Min=0, Max=2</td> | ||
| 3072 | <td valign="top" >Connector</td> | ||
| 3073 | <td valign="top" >TBD</td> | ||
| 3074 | </tr> | ||
| 3075 | <tr> | ||
| 3076 | <td rowspan="2" valign="top" >TV</td> | ||
| 3077 | <td valign="top" >Standard names as in DRM</td> | ||
| 3078 | <td valign="top" >Standard types as in DRM</td> | ||
| 3079 | <td valign="top" >Standard Values as in DRM</td> | ||
| 3080 | <td valign="top" >Standard object as in DRM</td> | ||
| 3081 | <td valign="top" >TBD</td> | ||
| 3082 | </tr> | ||
| 3083 | <tr> | ||
| 3084 | <td valign="top" >“modeâ€</td> | ||
| 3085 | <td valign="top" >ENUM</td> | ||
| 3086 | <td valign="top" >{ "PAL", "PAL-M","PAL-N"}, â€PAL-Nc" | ||
| 3087 | , "PAL-60", "NTSC-M", "NTSC-J" }</td> | ||
| 3088 | <td valign="top" >Connector</td> | ||
| 3089 | <td valign="top" >TBD</td> | ||
| 3090 | </tr> | ||
| 3091 | <tr> | ||
| 3092 | <td rowspan="16" valign="top" >nouveau</td> | ||
| 3093 | <td rowspan="6" valign="top" >NV10 Overlay</td> | ||
| 3094 | <td valign="top" >"colorkey"</td> | ||
| 3095 | <td valign="top" >RANGE</td> | ||
| 3096 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3097 | <td valign="top" >Plane</td> | ||
| 3098 | <td valign="top" >TBD</td> | ||
| 3099 | </tr> | ||
| 3100 | <tr> | ||
| 3101 | <td valign="top" >“contrastâ€</td> | ||
| 3102 | <td valign="top" >RANGE</td> | ||
| 3103 | <td valign="top" >Min=0, Max=8192-1</td> | ||
| 3104 | <td valign="top" >Plane</td> | ||
| 3105 | <td valign="top" >TBD</td> | ||
| 3106 | </tr> | ||
| 3107 | <tr> | ||
| 3108 | <td valign="top" >“brightnessâ€</td> | ||
| 3109 | <td valign="top" >RANGE</td> | ||
| 3110 | <td valign="top" >Min=0, Max=1024</td> | ||
| 3111 | <td valign="top" >Plane</td> | ||
| 3112 | <td valign="top" >TBD</td> | ||
| 3113 | </tr> | ||
| 3114 | <tr> | ||
| 3115 | <td valign="top" >“hueâ€</td> | ||
| 3116 | <td valign="top" >RANGE</td> | ||
| 3117 | <td valign="top" >Min=0, Max=359</td> | ||
| 3118 | <td valign="top" >Plane</td> | ||
| 3119 | <td valign="top" >TBD</td> | ||
| 3120 | </tr> | ||
| 3121 | <tr> | ||
| 3122 | <td valign="top" >“saturationâ€</td> | ||
| 3123 | <td valign="top" >RANGE</td> | ||
| 3124 | <td valign="top" >Min=0, Max=8192-1</td> | ||
| 3125 | <td valign="top" >Plane</td> | ||
| 3126 | <td valign="top" >TBD</td> | ||
| 3127 | </tr> | ||
| 3128 | <tr> | ||
| 3129 | <td valign="top" >“iturbt_709â€</td> | ||
| 3130 | <td valign="top" >RANGE</td> | ||
| 3131 | <td valign="top" >Min=0, Max=1</td> | ||
| 3132 | <td valign="top" >Plane</td> | ||
| 3133 | <td valign="top" >TBD</td> | ||
| 3134 | </tr> | ||
| 3135 | <tr> | ||
| 3136 | <td rowspan="2" valign="top" >Nv04 Overlay</td> | ||
| 3137 | <td valign="top" >“colorkeyâ€</td> | ||
| 3138 | <td valign="top" >RANGE</td> | ||
| 3139 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3140 | <td valign="top" >Plane</td> | ||
| 3141 | <td valign="top" >TBD</td> | ||
| 3142 | </tr> | ||
| 3143 | <tr> | ||
| 3144 | <td valign="top" >“brightnessâ€</td> | ||
| 3145 | <td valign="top" >RANGE</td> | ||
| 3146 | <td valign="top" >Min=0, Max=1024</td> | ||
| 3147 | <td valign="top" >Plane</td> | ||
| 3148 | <td valign="top" >TBD</td> | ||
| 3149 | </tr> | ||
| 3150 | <tr> | ||
| 3151 | <td rowspan="7" valign="top" >Display</td> | ||
| 3152 | <td valign="top" >“dithering modeâ€</td> | ||
| 3153 | <td valign="top" >ENUM</td> | ||
| 3154 | <td valign="top" >{ "auto", "off", "on" }</td> | ||
| 3155 | <td valign="top" >Connector</td> | ||
| 3156 | <td valign="top" >TBD</td> | ||
| 3157 | </tr> | ||
| 3158 | <tr> | ||
| 3159 | <td valign="top" >“dithering depthâ€</td> | ||
| 3160 | <td valign="top" >ENUM</td> | ||
| 3161 | <td valign="top" >{ "auto", "off", "on", "static 2x2", "dynamic 2x2", "temporal" }</td> | ||
| 3162 | <td valign="top" >Connector</td> | ||
| 3163 | <td valign="top" >TBD</td> | ||
| 3164 | </tr> | ||
| 3165 | <tr> | ||
| 3166 | <td valign="top" >“underscanâ€</td> | ||
| 3167 | <td valign="top" >ENUM</td> | ||
| 3168 | <td valign="top" >{ "auto", "6 bpc", "8 bpc" }</td> | ||
| 3169 | <td valign="top" >Connector</td> | ||
| 3170 | <td valign="top" >TBD</td> | ||
| 3171 | </tr> | ||
| 3172 | <tr> | ||
| 3173 | <td valign="top" >“underscan hborderâ€</td> | ||
| 3174 | <td valign="top" >RANGE</td> | ||
| 3175 | <td valign="top" >Min=0, Max=128</td> | ||
| 3176 | <td valign="top" >Connector</td> | ||
| 3177 | <td valign="top" >TBD</td> | ||
| 3178 | </tr> | ||
| 3179 | <tr> | ||
| 3180 | <td valign="top" >“underscan vborderâ€</td> | ||
| 3181 | <td valign="top" >RANGE</td> | ||
| 3182 | <td valign="top" >Min=0, Max=128</td> | ||
| 3183 | <td valign="top" >Connector</td> | ||
| 3184 | <td valign="top" >TBD</td> | ||
| 3185 | </tr> | ||
| 3186 | <tr> | ||
| 3187 | <td valign="top" >“vibrant hueâ€</td> | ||
| 3188 | <td valign="top" >RANGE</td> | ||
| 3189 | <td valign="top" >Min=0, Max=180</td> | ||
| 3190 | <td valign="top" >Connector</td> | ||
| 3191 | <td valign="top" >TBD</td> | ||
| 3192 | </tr> | ||
| 3193 | <tr> | ||
| 3194 | <td valign="top" >“color vibranceâ€</td> | ||
| 3195 | <td valign="top" >RANGE</td> | ||
| 3196 | <td valign="top" >Min=0, Max=200</td> | ||
| 3197 | <td valign="top" >Connector</td> | ||
| 3198 | <td valign="top" >TBD</td> | ||
| 3199 | </tr> | ||
| 3200 | <tr> | ||
| 3201 | <td valign="top" >Generic</td> | ||
| 3202 | <td valign="top" >Standard name as in DRM</td> | ||
| 3203 | <td valign="top" >Standard type as in DRM</td> | ||
| 3204 | <td valign="top" >Standard value as in DRM</td> | ||
| 3205 | <td valign="top" >Standard Object as in DRM</td> | ||
| 3206 | <td valign="top" >TBD</td> | ||
| 3207 | </tr> | ||
| 3208 | <tr> | ||
| 3209 | <td rowspan="2" valign="top" >omap</td> | ||
| 3210 | <td rowspan="2" valign="top" >Generic</td> | ||
| 3211 | <td valign="top" >“rotationâ€</td> | ||
| 3212 | <td valign="top" >BITMASK</td> | ||
| 3213 | <td valign="top" >{ 0, "rotate-0" }, | ||
| 3214 | { 1, "rotate-90" }, | ||
| 3215 | { 2, "rotate-180" }, | ||
| 3216 | { 3, "rotate-270" }, | ||
| 3217 | { 4, "reflect-x" }, | ||
| 3218 | { 5, "reflect-y" }</td> | ||
| 3219 | <td valign="top" >CRTC, Plane</td> | ||
| 3220 | <td valign="top" >TBD</td> | ||
| 3221 | </tr> | ||
| 3222 | <tr> | ||
| 3223 | <td valign="top" >“zorderâ€</td> | ||
| 3224 | <td valign="top" >RANGE</td> | ||
| 3225 | <td valign="top" >Min=0, Max=3</td> | ||
| 3226 | <td valign="top" >CRTC, Plane</td> | ||
| 3227 | <td valign="top" >TBD</td> | ||
| 3228 | </tr> | ||
| 3229 | <tr> | ||
| 3230 | <td valign="top" >qxl</td> | ||
| 3231 | <td valign="top" >Generic</td> | ||
| 3232 | <td valign="top" >“hotplug_mode_update"</td> | ||
| 3233 | <td valign="top" >RANGE</td> | ||
| 3234 | <td valign="top" >Min=0, Max=1</td> | ||
| 3235 | <td valign="top" >Connector</td> | ||
| 3236 | <td valign="top" >TBD</td> | ||
| 3237 | </tr> | ||
| 3238 | <tr> | ||
| 3239 | <td rowspan="10" valign="top" >radeon</td> | ||
| 3240 | <td valign="top" >DVI-I</td> | ||
| 3241 | <td valign="top" >“coherentâ€</td> | ||
| 3242 | <td valign="top" >RANGE</td> | ||
| 3243 | <td valign="top" >Min=0, Max=1</td> | ||
| 3244 | <td valign="top" >Connector</td> | ||
| 3245 | <td valign="top" >TBD</td> | ||
| 3246 | </tr> | ||
| 3247 | <tr> | ||
| 3248 | <td valign="top" >DAC enable load detect</td> | ||
| 3249 | <td valign="top" >“load detectionâ€</td> | ||
| 3250 | <td valign="top" >RANGE</td> | ||
| 3251 | <td valign="top" >Min=0, Max=1</td> | ||
| 3252 | <td valign="top" >Connector</td> | ||
| 3253 | <td valign="top" >TBD</td> | ||
| 3254 | </tr> | ||
| 3255 | <tr> | ||
| 3256 | <td valign="top" >TV Standard</td> | ||
| 3257 | <td valign="top" >"tv standard"</td> | ||
| 3258 | <td valign="top" >ENUM</td> | ||
| 3259 | <td valign="top" >{ "ntsc", "pal", "pal-m", "pal-60", "ntsc-j" | ||
| 3260 | , "scart-pal", "pal-cn", "secam" }</td> | ||
| 3261 | <td valign="top" >Connector</td> | ||
| 3262 | <td valign="top" >TBD</td> | ||
| 3263 | </tr> | ||
| 3264 | <tr> | ||
| 3265 | <td valign="top" >legacy TMDS PLL detect</td> | ||
| 3266 | <td valign="top" >"tmds_pll"</td> | ||
| 3267 | <td valign="top" >ENUM</td> | ||
| 3268 | <td valign="top" >{ "driver", "bios" }</td> | ||
| 3269 | <td valign="top" >-</td> | ||
| 3270 | <td valign="top" >TBD</td> | ||
| 3271 | </tr> | ||
| 3272 | <tr> | ||
| 3273 | <td rowspan="3" valign="top" >Underscan</td> | ||
| 3274 | <td valign="top" >"underscan"</td> | ||
| 3275 | <td valign="top" >ENUM</td> | ||
| 3276 | <td valign="top" >{ "off", "on", "auto" }</td> | ||
| 3277 | <td valign="top" >Connector</td> | ||
| 3278 | <td valign="top" >TBD</td> | ||
| 3279 | </tr> | ||
| 3280 | <tr> | ||
| 3281 | <td valign="top" >"underscan hborder"</td> | ||
| 3282 | <td valign="top" >RANGE</td> | ||
| 3283 | <td valign="top" >Min=0, Max=128</td> | ||
| 3284 | <td valign="top" >Connector</td> | ||
| 3285 | <td valign="top" >TBD</td> | ||
| 3286 | </tr> | ||
| 3287 | <tr> | ||
| 3288 | <td valign="top" >"underscan vborder"</td> | ||
| 3289 | <td valign="top" >RANGE</td> | ||
| 3290 | <td valign="top" >Min=0, Max=128</td> | ||
| 3291 | <td valign="top" >Connector</td> | ||
| 3292 | <td valign="top" >TBD</td> | ||
| 3293 | </tr> | ||
| 3294 | <tr> | ||
| 3295 | <td valign="top" >Audio</td> | ||
| 3296 | <td valign="top" >“audioâ€</td> | ||
| 3297 | <td valign="top" >ENUM</td> | ||
| 3298 | <td valign="top" >{ "off", "on", "auto" }</td> | ||
| 3299 | <td valign="top" >Connector</td> | ||
| 3300 | <td valign="top" >TBD</td> | ||
| 3301 | </tr> | ||
| 3302 | <tr> | ||
| 3303 | <td valign="top" >FMT Dithering</td> | ||
| 3304 | <td valign="top" >“ditherâ€</td> | ||
| 3305 | <td valign="top" >ENUM</td> | ||
| 3306 | <td valign="top" >{ "off", "on" }</td> | ||
| 3307 | <td valign="top" >Connector</td> | ||
| 3308 | <td valign="top" >TBD</td> | ||
| 3309 | </tr> | ||
| 3310 | <tr> | ||
| 3311 | <td valign="top" >Generic</td> | ||
| 3312 | <td valign="top" >Standard name as in DRM</td> | ||
| 3313 | <td valign="top" >Standard type as in DRM</td> | ||
| 3314 | <td valign="top" >Standard value as in DRM</td> | ||
| 3315 | <td valign="top" >Standard Object as in DRM</td> | ||
| 3316 | <td valign="top" >TBD</td> | ||
| 3317 | </tr> | ||
| 3318 | <tr> | ||
| 3319 | <td rowspan="3" valign="top" >rcar-du</td> | ||
| 3320 | <td rowspan="3" valign="top" >Generic</td> | ||
| 3321 | <td valign="top" >"alpha"</td> | ||
| 3322 | <td valign="top" >RANGE</td> | ||
| 3323 | <td valign="top" >Min=0, Max=255</td> | ||
| 3324 | <td valign="top" >Plane</td> | ||
| 3325 | <td valign="top" >TBD</td> | ||
| 3326 | </tr> | ||
| 3327 | <tr> | ||
| 3328 | <td valign="top" >"colorkey"</td> | ||
| 3329 | <td valign="top" >RANGE</td> | ||
| 3330 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3331 | <td valign="top" >Plane</td> | ||
| 3332 | <td valign="top" >TBD</td> | ||
| 3333 | </tr> | ||
| 3334 | <tr> | ||
| 3335 | <td valign="top" >"zpos"</td> | ||
| 3336 | <td valign="top" >RANGE</td> | ||
| 3337 | <td valign="top" >Min=1, Max=7</td> | ||
| 3338 | <td valign="top" >Plane</td> | ||
| 3339 | <td valign="top" >TBD</td> | ||
| 3340 | </tr> | ||
| 3341 | </tbody> | ||
| 3342 | </table> | ||
| 3343 | </sect2> | ||
| 2453 | </sect1> | 3344 | </sect1> |
| 2454 | 3345 | ||
| 2455 | <!-- Internals: vertical blanking --> | 3346 | <!-- Internals: vertical blanking --> |
| @@ -2527,6 +3418,10 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis> | |||
| 2527 | with a call to <function>drm_vblank_cleanup</function> in the driver | 3418 | with a call to <function>drm_vblank_cleanup</function> in the driver |
| 2528 | <methodname>unload</methodname> operation handler. | 3419 | <methodname>unload</methodname> operation handler. |
| 2529 | </para> | 3420 | </para> |
| 3421 | <sect2> | ||
| 3422 | <title>Vertical Blanking and Interrupt Handling Functions Reference</title> | ||
| 3423 | !Edrivers/gpu/drm/drm_irq.c | ||
| 3424 | </sect2> | ||
| 2530 | </sect1> | 3425 | </sect1> |
| 2531 | 3426 | ||
| 2532 | <!-- Internals: open/close, file operations and ioctls --> | 3427 | <!-- Internals: open/close, file operations and ioctls --> |
| @@ -2869,17 +3764,16 @@ int num_ioctls;</synopsis> | |||
| 2869 | <term>DRM_IOCTL_MODESET_CTL</term> | 3764 | <term>DRM_IOCTL_MODESET_CTL</term> |
| 2870 | <listitem> | 3765 | <listitem> |
| 2871 | <para> | 3766 | <para> |
| 2872 | This should be called by application level drivers before and | 3767 | This was only used for user-mode-settind drivers around |
| 2873 | after mode setting, since on many devices the vertical blank | 3768 | modesetting changes to allow the kernel to update the vblank |
| 2874 | counter is reset at that time. Internally, the DRM snapshots | 3769 | interrupt after mode setting, since on many devices the vertical |
| 2875 | the last vblank count when the ioctl is called with the | 3770 | blank counter is reset to 0 at some point during modeset. Modern |
| 2876 | _DRM_PRE_MODESET command, so that the counter won't go backwards | 3771 | drivers should not call this any more since with kernel mode |
| 2877 | (which is dealt with when _DRM_POST_MODESET is used). | 3772 | setting it is a no-op. |
| 2878 | </para> | 3773 | </para> |
| 2879 | </listitem> | 3774 | </listitem> |
| 2880 | </varlistentry> | 3775 | </varlistentry> |
| 2881 | </variablelist> | 3776 | </variablelist> |
| 2882 | <!--!Edrivers/char/drm/drm_irq.c--> | ||
| 2883 | </para> | 3777 | </para> |
| 2884 | </sect1> | 3778 | </sect1> |
| 2885 | 3779 | ||
| @@ -2942,6 +3836,96 @@ int num_ioctls;</synopsis> | |||
| 2942 | probing, so those sections fully apply. | 3836 | probing, so those sections fully apply. |
| 2943 | </para> | 3837 | </para> |
| 2944 | </sect2> | 3838 | </sect2> |
| 3839 | <sect2> | ||
| 3840 | <title>DPIO</title> | ||
| 3841 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO | ||
| 3842 | <table id="dpiox2"> | ||
| 3843 | <title>Dual channel PHY (VLV/CHV)</title> | ||
| 3844 | <tgroup cols="8"> | ||
| 3845 | <colspec colname="c0" /> | ||
| 3846 | <colspec colname="c1" /> | ||
| 3847 | <colspec colname="c2" /> | ||
| 3848 | <colspec colname="c3" /> | ||
| 3849 | <colspec colname="c4" /> | ||
| 3850 | <colspec colname="c5" /> | ||
| 3851 | <colspec colname="c6" /> | ||
| 3852 | <colspec colname="c7" /> | ||
| 3853 | <spanspec spanname="ch0" namest="c0" nameend="c3" /> | ||
| 3854 | <spanspec spanname="ch1" namest="c4" nameend="c7" /> | ||
| 3855 | <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" /> | ||
| 3856 | <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" /> | ||
| 3857 | <spanspec spanname="ch1pcs01" namest="c4" nameend="c5" /> | ||
| 3858 | <spanspec spanname="ch1pcs23" namest="c6" nameend="c7" /> | ||
| 3859 | <thead> | ||
| 3860 | <row> | ||
| 3861 | <entry spanname="ch0">CH0</entry> | ||
| 3862 | <entry spanname="ch1">CH1</entry> | ||
| 3863 | </row> | ||
| 3864 | </thead> | ||
| 3865 | <tbody valign="top" align="center"> | ||
| 3866 | <row> | ||
| 3867 | <entry spanname="ch0">CMN/PLL/REF</entry> | ||
| 3868 | <entry spanname="ch1">CMN/PLL/REF</entry> | ||
| 3869 | </row> | ||
| 3870 | <row> | ||
| 3871 | <entry spanname="ch0pcs01">PCS01</entry> | ||
| 3872 | <entry spanname="ch0pcs23">PCS23</entry> | ||
| 3873 | <entry spanname="ch1pcs01">PCS01</entry> | ||
| 3874 | <entry spanname="ch1pcs23">PCS23</entry> | ||
| 3875 | </row> | ||
| 3876 | <row> | ||
| 3877 | <entry>TX0</entry> | ||
| 3878 | <entry>TX1</entry> | ||
| 3879 | <entry>TX2</entry> | ||
| 3880 | <entry>TX3</entry> | ||
| 3881 | <entry>TX0</entry> | ||
| 3882 | <entry>TX1</entry> | ||
| 3883 | <entry>TX2</entry> | ||
| 3884 | <entry>TX3</entry> | ||
| 3885 | </row> | ||
| 3886 | <row> | ||
| 3887 | <entry spanname="ch0">DDI0</entry> | ||
| 3888 | <entry spanname="ch1">DDI1</entry> | ||
| 3889 | </row> | ||
| 3890 | </tbody> | ||
| 3891 | </tgroup> | ||
| 3892 | </table> | ||
| 3893 | <table id="dpiox1"> | ||
| 3894 | <title>Single channel PHY (CHV)</title> | ||
| 3895 | <tgroup cols="4"> | ||
| 3896 | <colspec colname="c0" /> | ||
| 3897 | <colspec colname="c1" /> | ||
| 3898 | <colspec colname="c2" /> | ||
| 3899 | <colspec colname="c3" /> | ||
| 3900 | <spanspec spanname="ch0" namest="c0" nameend="c3" /> | ||
| 3901 | <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" /> | ||
| 3902 | <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" /> | ||
| 3903 | <thead> | ||
| 3904 | <row> | ||
| 3905 | <entry spanname="ch0">CH0</entry> | ||
| 3906 | </row> | ||
| 3907 | </thead> | ||
| 3908 | <tbody valign="top" align="center"> | ||
| 3909 | <row> | ||
| 3910 | <entry spanname="ch0">CMN/PLL/REF</entry> | ||
| 3911 | </row> | ||
| 3912 | <row> | ||
| 3913 | <entry spanname="ch0pcs01">PCS01</entry> | ||
| 3914 | <entry spanname="ch0pcs23">PCS23</entry> | ||
| 3915 | </row> | ||
| 3916 | <row> | ||
| 3917 | <entry>TX0</entry> | ||
| 3918 | <entry>TX1</entry> | ||
| 3919 | <entry>TX2</entry> | ||
| 3920 | <entry>TX3</entry> | ||
| 3921 | </row> | ||
| 3922 | <row> | ||
| 3923 | <entry spanname="ch0">DDI2</entry> | ||
| 3924 | </row> | ||
| 3925 | </tbody> | ||
| 3926 | </tgroup> | ||
| 3927 | </table> | ||
| 3928 | </sect2> | ||
| 2945 | </sect1> | 3929 | </sect1> |
| 2946 | 3930 | ||
| 2947 | <sect1> | 3931 | <sect1> |
| @@ -2950,6 +3934,11 @@ int num_ioctls;</synopsis> | |||
| 2950 | This sections covers all things related to the GEM implementation in the | 3934 | This sections covers all things related to the GEM implementation in the |
| 2951 | i915 driver. | 3935 | i915 driver. |
| 2952 | </para> | 3936 | </para> |
| 3937 | <sect2> | ||
| 3938 | <title>Batchbuffer Parsing</title> | ||
| 3939 | !Pdrivers/gpu/drm/i915/i915_cmd_parser.c batch buffer command parser | ||
| 3940 | !Idrivers/gpu/drm/i915/i915_cmd_parser.c | ||
| 3941 | </sect2> | ||
| 2953 | </sect1> | 3942 | </sect1> |
| 2954 | </chapter> | 3943 | </chapter> |
| 2955 | </part> | 3944 | </part> |
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S index 4b486fe31b32..6f3e4b75e49e 100644 --- a/Documentation/EDID/1024x768.S +++ b/Documentation/EDID/1024x768.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux XGA" | 38 | #define TIMING_NAME "Linux XGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ | 39 | #define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ |
| 40 | #define HSYNC_POL 0 | 40 | #define HSYNC_POL 0 |
| 41 | #define VSYNC_POL 0 | 41 | #define VSYNC_POL 0 |
| 42 | #define CRC 0x55 | 42 | #define CRC 0x55 |
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S index a2799fe33a4d..bd9bef2a65af 100644 --- a/Documentation/EDID/1280x1024.S +++ b/Documentation/EDID/1280x1024.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux SXGA" | 38 | #define TIMING_NAME "Linux SXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0xa0 | 42 | #define CRC 0xa0 |
diff --git a/Documentation/EDID/1600x1200.S b/Documentation/EDID/1600x1200.S index 0ded64cfd1f5..a45101c6160c 100644 --- a/Documentation/EDID/1600x1200.S +++ b/Documentation/EDID/1600x1200.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux UXGA" | 38 | #define TIMING_NAME "Linux UXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x9d | 42 | #define CRC 0x9d |
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S index 96f67cafcf2e..b0d7c69282b4 100644 --- a/Documentation/EDID/1680x1050.S +++ b/Documentation/EDID/1680x1050.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 96 | 36 | #define DPI 96 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux WSXGA" | 38 | #define TIMING_NAME "Linux WSXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x26 | 42 | #define CRC 0x26 |
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S index 36ed5d571d0a..3084355e81e7 100644 --- a/Documentation/EDID/1920x1080.S +++ b/Documentation/EDID/1920x1080.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 96 | 36 | #define DPI 96 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux FHD" | 38 | #define TIMING_NAME "Linux FHD" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x05 | 42 | #define CRC 0x05 |
diff --git a/Documentation/EDID/800x600.S b/Documentation/EDID/800x600.S new file mode 100644 index 000000000000..6644e26d5801 --- /dev/null +++ b/Documentation/EDID/800x600.S | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | 800x600.S: EDID data set for standard 800x600 60 Hz monitor | ||
| 3 | |||
| 4 | Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org> | ||
| 5 | Copyright (C) 2014 Linaro Limited | ||
| 6 | |||
| 7 | This program is free software; you can redistribute it and/or | ||
| 8 | modify it under the terms of the GNU General Public License | ||
| 9 | as published by the Free Software Foundation; either version 2 | ||
| 10 | of the License, or (at your option) any later version. | ||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | /* EDID */ | ||
| 19 | #define VERSION 1 | ||
| 20 | #define REVISION 3 | ||
| 21 | |||
| 22 | /* Display */ | ||
| 23 | #define CLOCK 40000 /* kHz */ | ||
| 24 | #define XPIX 800 | ||
| 25 | #define YPIX 600 | ||
| 26 | #define XY_RATIO XY_RATIO_4_3 | ||
| 27 | #define XBLANK 256 | ||
| 28 | #define YBLANK 28 | ||
| 29 | #define XOFFSET 40 | ||
| 30 | #define XPULSE 128 | ||
| 31 | #define YOFFSET (63+1) | ||
| 32 | #define YPULSE (63+4) | ||
| 33 | #define DPI 72 | ||
| 34 | #define VFREQ 60 /* Hz */ | ||
| 35 | #define TIMING_NAME "Linux SVGA" | ||
| 36 | #define ESTABLISHED_TIMING1_BITS 0x01 /* Bit 0: 800x600 @ 60Hz */ | ||
| 37 | #define HSYNC_POL 1 | ||
| 38 | #define VSYNC_POL 1 | ||
| 39 | #define CRC 0xc2 | ||
| 40 | |||
| 41 | #include "edid.S" | ||
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt index 7146db1d9e8c..835db332289b 100644 --- a/Documentation/EDID/HOWTO.txt +++ b/Documentation/EDID/HOWTO.txt | |||
| @@ -18,7 +18,7 @@ CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an | |||
| 18 | individually prepared or corrected EDID data set in the /lib/firmware | 18 | individually prepared or corrected EDID data set in the /lib/firmware |
| 19 | directory from where it is loaded via the firmware interface. The code | 19 | directory from where it is loaded via the firmware interface. The code |
| 20 | (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for | 20 | (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for |
| 21 | commonly used screen resolutions (1024x768, 1280x1024, 1600x1200, | 21 | commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200, |
| 22 | 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does | 22 | 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does |
| 23 | not contain code to create these data. In order to elucidate the origin | 23 | not contain code to create these data. In order to elucidate the origin |
| 24 | of the built-in binary EDID blobs and to facilitate the creation of | 24 | of the built-in binary EDID blobs and to facilitate the creation of |
diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S index ea97ae275fca..7ac03276d7a2 100644 --- a/Documentation/EDID/edid.S +++ b/Documentation/EDID/edid.S | |||
| @@ -33,6 +33,17 @@ | |||
| 33 | #define XY_RATIO_5_4 0b10 | 33 | #define XY_RATIO_5_4 0b10 |
| 34 | #define XY_RATIO_16_9 0b11 | 34 | #define XY_RATIO_16_9 0b11 |
| 35 | 35 | ||
| 36 | /* Provide defaults for the timing bits */ | ||
| 37 | #ifndef ESTABLISHED_TIMING1_BITS | ||
| 38 | #define ESTABLISHED_TIMING1_BITS 0x00 | ||
| 39 | #endif | ||
| 40 | #ifndef ESTABLISHED_TIMING2_BITS | ||
| 41 | #define ESTABLISHED_TIMING2_BITS 0x00 | ||
| 42 | #endif | ||
| 43 | #ifndef ESTABLISHED_TIMING3_BITS | ||
| 44 | #define ESTABLISHED_TIMING3_BITS 0x00 | ||
| 45 | #endif | ||
| 46 | |||
| 36 | #define mfgname2id(v1,v2,v3) \ | 47 | #define mfgname2id(v1,v2,v3) \ |
| 37 | ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) | 48 | ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) |
| 38 | #define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) | 49 | #define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) |
| @@ -139,7 +150,7 @@ white_x_y_msb: .byte 0x50,0x54 | |||
| 139 | Bit 2 640x480 @ 75 Hz | 150 | Bit 2 640x480 @ 75 Hz |
| 140 | Bit 1 800x600 @ 56 Hz | 151 | Bit 1 800x600 @ 56 Hz |
| 141 | Bit 0 800x600 @ 60 Hz */ | 152 | Bit 0 800x600 @ 60 Hz */ |
| 142 | estbl_timing1: .byte 0x00 | 153 | estbl_timing1: .byte ESTABLISHED_TIMING1_BITS |
| 143 | 154 | ||
| 144 | /* Bit 7 800x600 @ 72 Hz | 155 | /* Bit 7 800x600 @ 72 Hz |
| 145 | Bit 6 800x600 @ 75 Hz | 156 | Bit 6 800x600 @ 75 Hz |
| @@ -149,11 +160,11 @@ estbl_timing1: .byte 0x00 | |||
| 149 | Bit 2 1024x768 @ 72 Hz | 160 | Bit 2 1024x768 @ 72 Hz |
| 150 | Bit 1 1024x768 @ 75 Hz | 161 | Bit 1 1024x768 @ 75 Hz |
| 151 | Bit 0 1280x1024 @ 75 Hz */ | 162 | Bit 0 1280x1024 @ 75 Hz */ |
| 152 | estbl_timing2: .byte ESTABLISHED_TIMINGS_BITS | 163 | estbl_timing2: .byte ESTABLISHED_TIMING2_BITS |
| 153 | 164 | ||
| 154 | /* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) | 165 | /* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) |
| 155 | Bits 6-0 Other manufacturer-specific display mod */ | 166 | Bits 6-0 Other manufacturer-specific display mod */ |
| 156 | estbl_timing3: .byte 0x00 | 167 | estbl_timing3: .byte ESTABLISHED_TIMING3_BITS |
| 157 | 168 | ||
| 158 | /* Standard timing */ | 169 | /* Standard timing */ |
| 159 | /* X resolution, less 31, divided by 8 (256-2288 pixels) */ | 170 | /* X resolution, less 31, divided by 8 (256-2288 pixels) */ |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index b3429aec444c..02ab997a1ed2 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
| @@ -458,15 +458,11 @@ About use_hierarchy, see Section 6. | |||
| 458 | 458 | ||
| 459 | 5.1 force_empty | 459 | 5.1 force_empty |
| 460 | memory.force_empty interface is provided to make cgroup's memory usage empty. | 460 | memory.force_empty interface is provided to make cgroup's memory usage empty. |
| 461 | You can use this interface only when the cgroup has no tasks. | ||
| 462 | When writing anything to this | 461 | When writing anything to this |
| 463 | 462 | ||
| 464 | # echo 0 > memory.force_empty | 463 | # echo 0 > memory.force_empty |
| 465 | 464 | ||
| 466 | Almost all pages tracked by this memory cgroup will be unmapped and freed. | 465 | the cgroup will be reclaimed and as many pages reclaimed as possible. |
| 467 | Some pages cannot be freed because they are locked or in-use. Such pages are | ||
| 468 | moved to parent (if use_hierarchy==1) or root (if use_hierarchy==0) and this | ||
| 469 | cgroup will be empty. | ||
| 470 | 466 | ||
| 471 | The typical use case for this interface is before calling rmdir(). | 467 | The typical use case for this interface is before calling rmdir(). |
| 472 | Because rmdir() moves all pages to parent, some out-of-use page caches can be | 468 | Because rmdir() moves all pages to parent, some out-of-use page caches can be |
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt new file mode 100644 index 000000000000..324b182e6000 --- /dev/null +++ b/Documentation/cgroups/unified-hierarchy.txt | |||
| @@ -0,0 +1,359 @@ | |||
| 1 | |||
| 2 | Cgroup unified hierarchy | ||
| 3 | |||
| 4 | April, 2014 Tejun Heo <tj@kernel.org> | ||
| 5 | |||
| 6 | This document describes the changes made by unified hierarchy and | ||
| 7 | their rationales. It will eventually be merged into the main cgroup | ||
| 8 | documentation. | ||
| 9 | |||
| 10 | CONTENTS | ||
| 11 | |||
| 12 | 1. Background | ||
| 13 | 2. Basic Operation | ||
| 14 | 2-1. Mounting | ||
| 15 | 2-2. cgroup.subtree_control | ||
| 16 | 2-3. cgroup.controllers | ||
| 17 | 3. Structural Constraints | ||
| 18 | 3-1. Top-down | ||
| 19 | 3-2. No internal tasks | ||
| 20 | 4. Other Changes | ||
| 21 | 4-1. [Un]populated Notification | ||
| 22 | 4-2. Other Core Changes | ||
| 23 | 4-3. Per-Controller Changes | ||
| 24 | 4-3-1. blkio | ||
| 25 | 4-3-2. cpuset | ||
| 26 | 4-3-3. memory | ||
| 27 | 5. Planned Changes | ||
| 28 | 5-1. CAP for resource control | ||
| 29 | |||
| 30 | |||
| 31 | 1. Background | ||
| 32 | |||
| 33 | cgroup allows an arbitrary number of hierarchies and each hierarchy | ||
| 34 | can host any number of controllers. While this seems to provide a | ||
| 35 | high level of flexibility, it isn't quite useful in practice. | ||
| 36 | |||
| 37 | For example, as there is only one instance of each controller, utility | ||
| 38 | type controllers such as freezer which can be useful in all | ||
| 39 | hierarchies can only be used in one. The issue is exacerbated by the | ||
| 40 | fact that controllers can't be moved around once hierarchies are | ||
| 41 | populated. Another issue is that all controllers bound to a hierarchy | ||
| 42 | are forced to have exactly the same view of the hierarchy. It isn't | ||
| 43 | possible to vary the granularity depending on the specific controller. | ||
| 44 | |||
| 45 | In practice, these issues heavily limit which controllers can be put | ||
| 46 | on the same hierarchy and most configurations resort to putting each | ||
| 47 | controller on its own hierarchy. Only closely related ones, such as | ||
| 48 | the cpu and cpuacct controllers, make sense to put on the same | ||
| 49 | hierarchy. This often means that userland ends up managing multiple | ||
| 50 | similar hierarchies repeating the same steps on each hierarchy | ||
| 51 | whenever a hierarchy management operation is necessary. | ||
| 52 | |||
| 53 | Unfortunately, support for multiple hierarchies comes at a steep cost. | ||
| 54 | Internal implementation in cgroup core proper is dazzlingly | ||
| 55 | complicated but more importantly the support for multiple hierarchies | ||
| 56 | restricts how cgroup is used in general and what controllers can do. | ||
| 57 | |||
| 58 | There's no limit on how many hierarchies there may be, which means | ||
| 59 | that a task's cgroup membership can't be described in finite length. | ||
| 60 | The key may contain any varying number of entries and is unlimited in | ||
| 61 | length, which makes it highly awkward to handle and leads to addition | ||
| 62 | of controllers which exist only to identify membership, which in turn | ||
| 63 | exacerbates the original problem. | ||
| 64 | |||
| 65 | Also, as a controller can't have any expectation regarding what shape | ||
| 66 | of hierarchies other controllers would be on, each controller has to | ||
| 67 | assume that all other controllers are operating on completely | ||
| 68 | orthogonal hierarchies. This makes it impossible, or at least very | ||
| 69 | cumbersome, for controllers to cooperate with each other. | ||
| 70 | |||
| 71 | In most use cases, putting controllers on hierarchies which are | ||
| 72 | completely orthogonal to each other isn't necessary. What usually is | ||
| 73 | called for is the ability to have differing levels of granularity | ||
| 74 | depending on the specific controller. In other words, hierarchy may | ||
| 75 | be collapsed from leaf towards root when viewed from specific | ||
| 76 | controllers. For example, a given configuration might not care about | ||
| 77 | how memory is distributed beyond a certain level while still wanting | ||
| 78 | to control how CPU cycles are distributed. | ||
| 79 | |||
| 80 | Unified hierarchy is the next version of cgroup interface. It aims to | ||
| 81 | address the aforementioned issues by having more structure while | ||
| 82 | retaining enough flexibility for most use cases. Various other | ||
| 83 | general and controller-specific interface issues are also addressed in | ||
| 84 | the process. | ||
| 85 | |||
| 86 | |||
| 87 | 2. Basic Operation | ||
| 88 | |||
| 89 | 2-1. Mounting | ||
| 90 | |||
| 91 | Currently, unified hierarchy can be mounted with the following mount | ||
| 92 | command. Note that this is still under development and scheduled to | ||
| 93 | change soon. | ||
| 94 | |||
| 95 | mount -t cgroup -o __DEVEL__sane_behavior cgroup $MOUNT_POINT | ||
| 96 | |||
| 97 | All controllers which are not bound to other hierarchies are | ||
| 98 | automatically bound to unified hierarchy and show up at the root of | ||
| 99 | it. Controllers which are enabled only in the root of unified | ||
| 100 | hierarchy can be bound to other hierarchies at any time. This allows | ||
| 101 | mixing unified hierarchy with the traditional multiple hierarchies in | ||
| 102 | a fully backward compatible way. | ||
| 103 | |||
| 104 | |||
| 105 | 2-2. cgroup.subtree_control | ||
| 106 | |||
| 107 | All cgroups on unified hierarchy have a "cgroup.subtree_control" file | ||
| 108 | which governs which controllers are enabled on the children of the | ||
| 109 | cgroup. Let's assume a hierarchy like the following. | ||
| 110 | |||
| 111 | root - A - B - C | ||
| 112 | \ D | ||
| 113 | |||
| 114 | root's "cgroup.subtree_control" file determines which controllers are | ||
| 115 | enabled on A. A's on B. B's on C and D. This coincides with the | ||
| 116 | fact that controllers on the immediate sub-level are used to | ||
| 117 | distribute the resources of the parent. In fact, it's natural to | ||
| 118 | assume that resource control knobs of a child belong to its parent. | ||
| 119 | Enabling a controller in a "cgroup.subtree_control" file declares that | ||
| 120 | distribution of the respective resources of the cgroup will be | ||
| 121 | controlled. Note that this means that controller enable states are | ||
| 122 | shared among siblings. | ||
| 123 | |||
| 124 | When read, the file contains a space-separated list of currently | ||
| 125 | enabled controllers. A write to the file should contain a | ||
| 126 | space-separated list of controllers with '+' or '-' prefixed (without | ||
| 127 | the quotes). Controllers prefixed with '+' are enabled and '-' | ||
| 128 | disabled. If a controller is listed multiple times, the last entry | ||
| 129 | wins. The specific operations are executed atomically - either all | ||
| 130 | succeed or fail. | ||
| 131 | |||
| 132 | |||
| 133 | 2-3. cgroup.controllers | ||
| 134 | |||
| 135 | Read-only "cgroup.controllers" file contains a space-separated list of | ||
| 136 | controllers which can be enabled in the cgroup's | ||
| 137 | "cgroup.subtree_control" file. | ||
| 138 | |||
| 139 | In the root cgroup, this lists controllers which are not bound to | ||
| 140 | other hierarchies and the content changes as controllers are bound to | ||
| 141 | and unbound from other hierarchies. | ||
| 142 | |||
| 143 | In non-root cgroups, the content of this file equals that of the | ||
| 144 | parent's "cgroup.subtree_control" file as only controllers enabled | ||
| 145 | from the parent can be used in its children. | ||
| 146 | |||
| 147 | |||
| 148 | 3. Structural Constraints | ||
| 149 | |||
| 150 | 3-1. Top-down | ||
| 151 | |||
| 152 | As it doesn't make sense to nest control of an uncontrolled resource, | ||
| 153 | all non-root "cgroup.subtree_control" files can only contain | ||
| 154 | controllers which are enabled in the parent's "cgroup.subtree_control" | ||
| 155 | file. A controller can be enabled only if the parent has the | ||
| 156 | controller enabled and a controller can't be disabled if one or more | ||
| 157 | children have it enabled. | ||
| 158 | |||
| 159 | |||
| 160 | 3-2. No internal tasks | ||
| 161 | |||
| 162 | One long-standing issue that cgroup faces is the competition between | ||
| 163 | tasks belonging to the parent cgroup and its children cgroups. This | ||
| 164 | is inherently nasty as two different types of entities compete and | ||
| 165 | there is no agreed-upon obvious way to handle it. Different | ||
| 166 | controllers are doing different things. | ||
| 167 | |||
| 168 | The cpu controller considers tasks and cgroups as equivalents and maps | ||
| 169 | nice levels to cgroup weights. This works for some cases but falls | ||
| 170 | flat when children should be allocated specific ratios of CPU cycles | ||
| 171 | and the number of internal tasks fluctuates - the ratios constantly | ||
| 172 | change as the number of competing entities fluctuates. There also are | ||
| 173 | other issues. The mapping from nice level to weight isn't obvious or | ||
| 174 | universal, and there are various other knobs which simply aren't | ||
| 175 | available for tasks. | ||
| 176 | |||
| 177 | The blkio controller implicitly creates a hidden leaf node for each | ||
| 178 | cgroup to host the tasks. The hidden leaf has its own copies of all | ||
| 179 | the knobs with "leaf_" prefixed. While this allows equivalent control | ||
| 180 | over internal tasks, it's with serious drawbacks. It always adds an | ||
| 181 | extra layer of nesting which may not be necessary, makes the interface | ||
| 182 | messy and significantly complicates the implementation. | ||
| 183 | |||
| 184 | The memory controller currently doesn't have a way to control what | ||
| 185 | happens between internal tasks and child cgroups and the behavior is | ||
| 186 | not clearly defined. There have been attempts to add ad-hoc behaviors | ||
| 187 | and knobs to tailor the behavior to specific workloads. Continuing | ||
| 188 | this direction will lead to problems which will be extremely difficult | ||
| 189 | to resolve in the long term. | ||
| 190 | |||
| 191 | Multiple controllers struggle with internal tasks and came up with | ||
| 192 | different ways to deal with it; unfortunately, all the approaches in | ||
| 193 | use now are severely flawed and, furthermore, the widely different | ||
| 194 | behaviors make cgroup as whole highly inconsistent. | ||
| 195 | |||
| 196 | It is clear that this is something which needs to be addressed from | ||
| 197 | cgroup core proper in a uniform way so that controllers don't need to | ||
| 198 | worry about it and cgroup as a whole shows a consistent and logical | ||
| 199 | behavior. To achieve that, unified hierarchy enforces the following | ||
| 200 | structural constraint: | ||
| 201 | |||
| 202 | Except for the root, only cgroups which don't contain any task may | ||
| 203 | have controllers enabled in their "cgroup.subtree_control" files. | ||
| 204 | |||
| 205 | Combined with other properties, this guarantees that, when a | ||
| 206 | controller is looking at the part of the hierarchy which has it | ||
| 207 | enabled, tasks are always only on the leaves. This rules out | ||
| 208 | situations where child cgroups compete against internal tasks of the | ||
| 209 | parent. | ||
| 210 | |||
| 211 | There are two things to note. Firstly, the root cgroup is exempt from | ||
| 212 | the restriction. Root contains tasks and anonymous resource | ||
| 213 | consumption which can't be associated with any other cgroup and | ||
| 214 | requires special treatment from most controllers. How resource | ||
| 215 | consumption in the root cgroup is governed is up to each controller. | ||
| 216 | |||
| 217 | Secondly, the restriction doesn't take effect if there is no enabled | ||
| 218 | controller in the cgroup's "cgroup.subtree_control" file. This is | ||
| 219 | important as otherwise it wouldn't be possible to create children of a | ||
| 220 | populated cgroup. To control resource distribution of a cgroup, the | ||
| 221 | cgroup must create children and transfer all its tasks to the children | ||
| 222 | before enabling controllers in its "cgroup.subtree_control" file. | ||
| 223 | |||
| 224 | |||
| 225 | 4. Other Changes | ||
| 226 | |||
| 227 | 4-1. [Un]populated Notification | ||
| 228 | |||
| 229 | cgroup users often need a way to determine when a cgroup's | ||
| 230 | subhierarchy becomes empty so that it can be cleaned up. cgroup | ||
| 231 | currently provides release_agent for it; unfortunately, this mechanism | ||
| 232 | is riddled with issues. | ||
| 233 | |||
| 234 | - It delivers events by forking and execing a userland binary | ||
| 235 | specified as the release_agent. This is a long deprecated method of | ||
| 236 | notification delivery. It's extremely heavy, slow and cumbersome to | ||
| 237 | integrate with larger infrastructure. | ||
| 238 | |||
| 239 | - There is single monitoring point at the root. There's no way to | ||
| 240 | delegate management of a subtree. | ||
| 241 | |||
| 242 | - The event isn't recursive. It triggers when a cgroup doesn't have | ||
| 243 | any tasks or child cgroups. Events for internal nodes trigger only | ||
| 244 | after all children are removed. This again makes it impossible to | ||
| 245 | delegate management of a subtree. | ||
| 246 | |||
| 247 | - Events are filtered from the kernel side. A "notify_on_release" | ||
| 248 | file is used to subscribe to or suppress release events. This is | ||
| 249 | unnecessarily complicated and probably done this way because event | ||
| 250 | delivery itself was expensive. | ||
| 251 | |||
| 252 | Unified hierarchy implements an interface file "cgroup.populated" | ||
| 253 | which can be used to monitor whether the cgroup's subhierarchy has | ||
| 254 | tasks in it or not. Its value is 0 if there is no task in the cgroup | ||
| 255 | and its descendants; otherwise, 1. poll and [id]notify events are | ||
| 256 | triggered when the value changes. | ||
| 257 | |||
| 258 | This is significantly lighter and simpler and trivially allows | ||
| 259 | delegating management of subhierarchy - subhierarchy monitoring can | ||
| 260 | block further propagation simply by putting itself or another process | ||
| 261 | in the subhierarchy and monitor events that it's interested in from | ||
| 262 | there without interfering with monitoring higher in the tree. | ||
| 263 | |||
| 264 | In unified hierarchy, the release_agent mechanism is no longer | ||
| 265 | supported and the interface files "release_agent" and | ||
| 266 | "notify_on_release" do not exist. | ||
| 267 | |||
| 268 | |||
| 269 | 4-2. Other Core Changes | ||
| 270 | |||
| 271 | - None of the mount options is allowed. | ||
| 272 | |||
| 273 | - remount is disallowed. | ||
| 274 | |||
| 275 | - rename(2) is disallowed. | ||
| 276 | |||
| 277 | - The "tasks" file is removed. Everything should at process | ||
| 278 | granularity. Use the "cgroup.procs" file instead. | ||
| 279 | |||
| 280 | - The "cgroup.procs" file is not sorted. pids will be unique unless | ||
| 281 | they got recycled in-between reads. | ||
| 282 | |||
| 283 | - The "cgroup.clone_children" file is removed. | ||
| 284 | |||
| 285 | |||
| 286 | 4-3. Per-Controller Changes | ||
| 287 | |||
| 288 | 4-3-1. blkio | ||
| 289 | |||
| 290 | - blk-throttle becomes properly hierarchical. | ||
| 291 | |||
| 292 | |||
| 293 | 4-3-2. cpuset | ||
| 294 | |||
| 295 | - Tasks are kept in empty cpusets after hotplug and take on the masks | ||
| 296 | of the nearest non-empty ancestor, instead of being moved to it. | ||
| 297 | |||
| 298 | - A task can be moved into an empty cpuset, and again it takes on the | ||
| 299 | masks of the nearest non-empty ancestor. | ||
| 300 | |||
| 301 | |||
| 302 | 4-3-3. memory | ||
| 303 | |||
| 304 | - use_hierarchy is on by default and the cgroup file for the flag is | ||
| 305 | not created. | ||
| 306 | |||
| 307 | |||
| 308 | 5. Planned Changes | ||
| 309 | |||
| 310 | 5-1. CAP for resource control | ||
| 311 | |||
| 312 | Unified hierarchy will require one of the capabilities(7), which is | ||
| 313 | yet to be decided, for all resource control related knobs. Process | ||
| 314 | organization operations - creation of sub-cgroups and migration of | ||
| 315 | processes in sub-hierarchies may be delegated by changing the | ||
| 316 | ownership and/or permissions on the cgroup directory and | ||
| 317 | "cgroup.procs" interface file; however, all operations which affect | ||
| 318 | resource control - writes to a "cgroup.subtree_control" file or any | ||
| 319 | controller-specific knobs - will require an explicit CAP privilege. | ||
| 320 | |||
| 321 | This, in part, is to prevent the cgroup interface from being | ||
| 322 | inadvertently promoted to programmable API used by non-privileged | ||
| 323 | binaries. cgroup exposes various aspects of the system in ways which | ||
| 324 | aren't properly abstracted for direct consumption by regular programs. | ||
| 325 | This is an administration interface much closer to sysctl knobs than | ||
| 326 | system calls. Even the basic access model, being filesystem path | ||
| 327 | based, isn't suitable for direct consumption. There's no way to | ||
| 328 | access "my cgroup" in a race-free way or make multiple operations | ||
| 329 | atomic against migration to another cgroup. | ||
| 330 | |||
| 331 | Another aspect is that, for better or for worse, the cgroup interface | ||
| 332 | goes through far less scrutiny than regular interfaces for | ||
| 333 | unprivileged userland. The upside is that cgroup is able to expose | ||
| 334 | useful features which may not be suitable for general consumption in a | ||
| 335 | reasonable time frame. It provides a relatively short path between | ||
| 336 | internal details and userland-visible interface. Of course, this | ||
| 337 | shortcut comes with high risk. We go through what we go through for | ||
| 338 | general kernel APIs for good reasons. It may end up leaking internal | ||
| 339 | details in a way which can exert significant pain by locking the | ||
| 340 | kernel into a contract that can't be maintained in a reasonable | ||
| 341 | manner. | ||
| 342 | |||
| 343 | Also, due to the specific nature, cgroup and its controllers don't | ||
| 344 | tend to attract attention from a wide scope of developers. cgroup's | ||
| 345 | short history is already fraught with severely mis-designed | ||
| 346 | interfaces, unnecessary commitments to and exposing of internal | ||
| 347 | details, broken and dangerous implementations of various features. | ||
| 348 | |||
| 349 | Keeping cgroup as an administration interface is both advantageous for | ||
| 350 | its role and imperative given its nature. Some of the cgroup features | ||
| 351 | may make sense for unprivileged access. If deemed justified, those | ||
| 352 | must be further abstracted and implemented as a different interface, | ||
| 353 | be it a system call or process-private filesystem, and survive through | ||
| 354 | the scrutiny that any interface for general consumption is required to | ||
| 355 | go through. | ||
| 356 | |||
| 357 | Requiring CAP is not a complete solution but should serve as a | ||
| 358 | significant deterrent against spraying cgroup usages in non-privileged | ||
| 359 | programs. | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index b045fe54986a..14f4e6336d88 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
| @@ -26,6 +26,7 @@ Contents: | |||
| 26 | 1.4 target/target_index or setpolicy? | 26 | 1.4 target/target_index or setpolicy? |
| 27 | 1.5 target/target_index | 27 | 1.5 target/target_index |
| 28 | 1.6 setpolicy | 28 | 1.6 setpolicy |
| 29 | 1.7 get_intermediate and target_intermediate | ||
| 29 | 2. Frequency Table Helpers | 30 | 2. Frequency Table Helpers |
| 30 | 31 | ||
| 31 | 32 | ||
| @@ -79,6 +80,10 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of | |||
| 79 | "struct freq_attr" which allow to | 80 | "struct freq_attr" which allow to |
| 80 | export values to sysfs. | 81 | export values to sysfs. |
| 81 | 82 | ||
| 83 | cpufreq_driver.get_intermediate | ||
| 84 | and target_intermediate Used to switch to stable frequency while | ||
| 85 | changing CPU frequency. | ||
| 86 | |||
| 82 | 87 | ||
| 83 | 1.2 Per-CPU Initialization | 88 | 1.2 Per-CPU Initialization |
| 84 | -------------------------- | 89 | -------------------------- |
| @@ -151,7 +156,7 @@ Some cpufreq-capable processors switch the frequency between certain | |||
| 151 | limits on their own. These shall use the ->setpolicy call | 156 | limits on their own. These shall use the ->setpolicy call |
| 152 | 157 | ||
| 153 | 158 | ||
| 154 | 1.4. target/target_index | 159 | 1.5. target/target_index |
| 155 | ------------- | 160 | ------------- |
| 156 | 161 | ||
| 157 | The target_index call has two arguments: struct cpufreq_policy *policy, | 162 | The target_index call has two arguments: struct cpufreq_policy *policy, |
| @@ -160,6 +165,9 @@ and unsigned int index (into the exposed frequency table). | |||
| 160 | The CPUfreq driver must set the new frequency when called here. The | 165 | The CPUfreq driver must set the new frequency when called here. The |
| 161 | actual frequency must be determined by freq_table[index].frequency. | 166 | actual frequency must be determined by freq_table[index].frequency. |
| 162 | 167 | ||
| 168 | It should always restore to earlier frequency (i.e. policy->restore_freq) in | ||
| 169 | case of errors, even if we switched to intermediate frequency earlier. | ||
| 170 | |||
| 163 | Deprecated: | 171 | Deprecated: |
| 164 | ---------- | 172 | ---------- |
| 165 | The target call has three arguments: struct cpufreq_policy *policy, | 173 | The target call has three arguments: struct cpufreq_policy *policy, |
| @@ -179,7 +187,7 @@ Here again the frequency table helper might assist you - see section 2 | |||
| 179 | for details. | 187 | for details. |
| 180 | 188 | ||
| 181 | 189 | ||
| 182 | 1.5 setpolicy | 190 | 1.6 setpolicy |
| 183 | --------------- | 191 | --------------- |
| 184 | 192 | ||
| 185 | The setpolicy call only takes a struct cpufreq_policy *policy as | 193 | The setpolicy call only takes a struct cpufreq_policy *policy as |
| @@ -190,6 +198,23 @@ setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a | |||
| 190 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check | 198 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check |
| 191 | the reference implementation in drivers/cpufreq/longrun.c | 199 | the reference implementation in drivers/cpufreq/longrun.c |
| 192 | 200 | ||
| 201 | 1.7 get_intermediate and target_intermediate | ||
| 202 | -------------------------------------------- | ||
| 203 | |||
| 204 | Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION unset. | ||
| 205 | |||
| 206 | get_intermediate should return a stable intermediate frequency platform wants to | ||
| 207 | switch to, and target_intermediate() should set CPU to to that frequency, before | ||
| 208 | jumping to the frequency corresponding to 'index'. Core will take care of | ||
| 209 | sending notifications and driver doesn't have to handle them in | ||
| 210 | target_intermediate() or target_index(). | ||
| 211 | |||
| 212 | Drivers can return '0' from get_intermediate() in case they don't wish to switch | ||
| 213 | to intermediate frequency for some target frequency. In that case core will | ||
| 214 | directly call ->target_index(). | ||
| 215 | |||
| 216 | NOTE: ->target_index() should restore to policy->restore_freq in case of | ||
| 217 | failures as core would send notifications for that. | ||
| 193 | 218 | ||
| 194 | 219 | ||
| 195 | 2. Frequency Table Helpers | 220 | 2. Frequency Table Helpers |
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 48b285ffa3a6..c96d8dcf98fd 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
| @@ -4,10 +4,16 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. | |||
| 4 | Each SATA controller should have its own node. | 4 | Each SATA controller should have its own node. |
| 5 | 5 | ||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible : compatible list, one of "snps,spear-ahci", | 7 | - compatible : compatible string, one of: |
| 8 | "snps,exynos5440-ahci", "ibm,476gtr-ahci", | 8 | - "allwinner,sun4i-a10-ahci" |
| 9 | "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" | 9 | - "fsl,imx53-ahci" |
| 10 | "fsl,imx6q-ahci" or "snps,dwc-ahci" | 10 | - "fsl,imx6q-ahci" |
| 11 | - "hisilicon,hisi-ahci" | ||
| 12 | - "ibm,476gtr-ahci" | ||
| 13 | - "marvell,armada-380-ahci" | ||
| 14 | - "snps,dwc-ahci" | ||
| 15 | - "snps,exynos5440-ahci" | ||
| 16 | - "snps,spear-ahci" | ||
| 11 | - interrupts : <interrupt mapping for SATA IRQ> | 17 | - interrupts : <interrupt mapping for SATA IRQ> |
| 12 | - reg : <registers mapping> | 18 | - reg : <registers mapping> |
| 13 | 19 | ||
diff --git a/Documentation/devicetree/bindings/clock/corenet-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt index 24711af48e30..5666812fc42b 100644 --- a/Documentation/devicetree/bindings/clock/corenet-clock.txt +++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt | |||
| @@ -7,6 +7,14 @@ which can then be passed to a variety of internal logic, including | |||
| 7 | cores and peripheral IP blocks. | 7 | cores and peripheral IP blocks. |
| 8 | Please refer to the Reference Manual for details. | 8 | Please refer to the Reference Manual for details. |
| 9 | 9 | ||
| 10 | All references to "1.0" and "2.0" refer to the QorIQ chassis version to | ||
| 11 | which the chip complies. | ||
| 12 | |||
| 13 | Chassis Version Example Chips | ||
| 14 | --------------- ------------- | ||
| 15 | 1.0 p4080, p5020, p5040 | ||
| 16 | 2.0 t4240, b4860, t1040 | ||
| 17 | |||
| 10 | 1. Clock Block Binding | 18 | 1. Clock Block Binding |
| 11 | 19 | ||
| 12 | Required properties: | 20 | Required properties: |
| @@ -85,7 +93,7 @@ Example for clock block and clock provider: | |||
| 85 | #clock-cells = <0>; | 93 | #clock-cells = <0>; |
| 86 | compatible = "fsl,qoriq-sysclk-1.0"; | 94 | compatible = "fsl,qoriq-sysclk-1.0"; |
| 87 | clock-output-names = "sysclk"; | 95 | clock-output-names = "sysclk"; |
| 88 | } | 96 | }; |
| 89 | 97 | ||
| 90 | pll0: pll0@800 { | 98 | pll0: pll0@800 { |
| 91 | #clock-cells = <1>; | 99 | #clock-cells = <1>; |
diff --git a/Documentation/devicetree/bindings/dma/mmp-dma.txt b/Documentation/devicetree/bindings/dma/mmp-dma.txt index a4fa4efa1d83..7a802f64e5bd 100644 --- a/Documentation/devicetree/bindings/dma/mmp-dma.txt +++ b/Documentation/devicetree/bindings/dma/mmp-dma.txt | |||
| @@ -1,17 +1,20 @@ | |||
| 1 | * MARVELL MMP DMA controller | 1 | * MARVELL MMP DMA controller |
| 2 | 2 | ||
| 3 | Marvell Peripheral DMA Controller | 3 | Marvell Peripheral DMA Controller |
| 4 | Used platfroms: pxa688, pxa910, pxa3xx, etc | 4 | Used platforms: pxa688, pxa910, pxa3xx, etc |
| 5 | 5 | ||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible: Should be "marvell,pdma-1.0" | 7 | - compatible: Should be "marvell,pdma-1.0" |
| 8 | - reg: Should contain DMA registers location and length. | 8 | - reg: Should contain DMA registers location and length. |
| 9 | - interrupts: Either contain all of the per-channel DMA interrupts | 9 | - interrupts: Either contain all of the per-channel DMA interrupts |
| 10 | or one irq for pdma device | 10 | or one irq for pdma device |
| 11 | - #dma-channels: Number of DMA channels supported by the controller. | 11 | |
| 12 | Optional properties: | ||
| 13 | - #dma-channels: Number of DMA channels supported by the controller (defaults | ||
| 14 | to 32 when not specified) | ||
| 12 | 15 | ||
| 13 | "marvell,pdma-1.0" | 16 | "marvell,pdma-1.0" |
| 14 | Used platfroms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. | 17 | Used platforms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. |
| 15 | 18 | ||
| 16 | Examples: | 19 | Examples: |
| 17 | 20 | ||
| @@ -45,7 +48,7 @@ pdma: dma-controller@d4000000 { | |||
| 45 | 48 | ||
| 46 | 49 | ||
| 47 | Marvell Two Channel DMA Controller used specifically for audio | 50 | Marvell Two Channel DMA Controller used specifically for audio |
| 48 | Used platfroms: pxa688, pxa910 | 51 | Used platforms: pxa688, pxa910 |
| 49 | 52 | ||
| 50 | Required properties: | 53 | Required properties: |
| 51 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" | 54 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" |
diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt new file mode 100644 index 000000000000..1405ed071bb4 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | Xilinx AXI VDMA engine, it does transfers between memory and video devices. | ||
| 2 | It can be configured to have one channel or two channels. If configured | ||
| 3 | as two channels, one is to transmit to the video device and another is | ||
| 4 | to receive from the video device. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: Should be "xlnx,axi-vdma-1.00.a" | ||
| 8 | - #dma-cells: Should be <1>, see "dmas" property below | ||
| 9 | - reg: Should contain VDMA registers location and length. | ||
| 10 | - xlnx,num-fstores: Should be the number of framebuffers as configured in h/w. | ||
| 11 | - dma-channel child node: Should have at least one channel and can have up to | ||
| 12 | two channels per device. This node specifies the properties of each | ||
| 13 | DMA channel (see child node properties below). | ||
| 14 | |||
| 15 | Optional properties: | ||
| 16 | - xlnx,include-sg: Tells configured for Scatter-mode in | ||
| 17 | the hardware. | ||
| 18 | - xlnx,flush-fsync: Tells which channel to Flush on Frame sync. | ||
| 19 | It takes following values: | ||
| 20 | {1}, flush both channels | ||
| 21 | {2}, flush mm2s channel | ||
| 22 | {3}, flush s2mm channel | ||
| 23 | |||
| 24 | Required child node properties: | ||
| 25 | - compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or | ||
| 26 | "xlnx,axi-vdma-s2mm-channel". | ||
| 27 | - interrupts: Should contain per channel VDMA interrupts. | ||
| 28 | - xlnx,data-width: Should contain the stream data width, take values | ||
| 29 | {32,64...1024}. | ||
| 30 | |||
| 31 | Optional child node properties: | ||
| 32 | - xlnx,include-dre: Tells hardware is configured for Data | ||
| 33 | Realignment Engine. | ||
| 34 | - xlnx,genlock-mode: Tells Genlock synchronization is | ||
| 35 | enabled/disabled in hardware. | ||
| 36 | |||
| 37 | Example: | ||
| 38 | ++++++++ | ||
| 39 | |||
| 40 | axi_vdma_0: axivdma@40030000 { | ||
| 41 | compatible = "xlnx,axi-vdma-1.00.a"; | ||
| 42 | #dma_cells = <1>; | ||
| 43 | reg = < 0x40030000 0x10000 >; | ||
| 44 | xlnx,num-fstores = <0x8>; | ||
| 45 | xlnx,flush-fsync = <0x1>; | ||
| 46 | dma-channel@40030000 { | ||
| 47 | compatible = "xlnx,axi-vdma-mm2s-channel"; | ||
| 48 | interrupts = < 0 54 4 >; | ||
| 49 | xlnx,datawidth = <0x40>; | ||
| 50 | } ; | ||
| 51 | dma-channel@40030030 { | ||
| 52 | compatible = "xlnx,axi-vdma-s2mm-channel"; | ||
| 53 | interrupts = < 0 53 4 >; | ||
| 54 | xlnx,datawidth = <0x40>; | ||
| 55 | } ; | ||
| 56 | } ; | ||
| 57 | |||
| 58 | |||
| 59 | * DMA client | ||
| 60 | |||
| 61 | Required properties: | ||
| 62 | - dmas: a list of <[Video DMA device phandle] [Channel ID]> pairs, | ||
| 63 | where Channel ID is '0' for write/tx and '1' for read/rx | ||
| 64 | channel. | ||
| 65 | - dma-names: a list of DMA channel names, one per "dmas" entry | ||
| 66 | |||
| 67 | Example: | ||
| 68 | ++++++++ | ||
| 69 | |||
| 70 | vdmatest_0: vdmatest@0 { | ||
| 71 | compatible ="xlnx,axi-vdma-test-1.00.a"; | ||
| 72 | dmas = <&axi_vdma_0 0 | ||
| 73 | &axi_vdma_0 1>; | ||
| 74 | dma-names = "vdma0", "vdma1"; | ||
| 75 | } ; | ||
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt index efa8b8451f93..b48f4ef31d93 100644 --- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
| @@ -136,6 +136,7 @@ of the following host1x client modules: | |||
| 136 | - compatible: "nvidia,tegra<chip>-hdmi" | 136 | - compatible: "nvidia,tegra<chip>-hdmi" |
| 137 | - reg: Physical base address and length of the controller's registers. | 137 | - reg: Physical base address and length of the controller's registers. |
| 138 | - interrupts: The interrupt outputs from the controller. | 138 | - interrupts: The interrupt outputs from the controller. |
| 139 | - hdmi-supply: supply for the +5V HDMI connector pin | ||
| 139 | - vdd-supply: regulator for supply voltage | 140 | - vdd-supply: regulator for supply voltage |
| 140 | - pll-supply: regulator for PLL | 141 | - pll-supply: regulator for PLL |
| 141 | - clocks: Must contain an entry for each entry in clock-names. | 142 | - clocks: Must contain an entry for each entry in clock-names. |
| @@ -180,6 +181,7 @@ of the following host1x client modules: | |||
| 180 | See ../reset/reset.txt for details. | 181 | See ../reset/reset.txt for details. |
| 181 | - reset-names: Must include the following entries: | 182 | - reset-names: Must include the following entries: |
| 182 | - dsi | 183 | - dsi |
| 184 | - avdd-dsi-supply: phandle of a supply that powers the DSI controller | ||
| 183 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying | 185 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying |
| 184 | which pads are used by this DSI output and need to be calibrated. See also | 186 | which pads are used by this DSI output and need to be calibrated. See also |
| 185 | ../mipi/nvidia,tegra114-mipi.txt. | 187 | ../mipi/nvidia,tegra114-mipi.txt. |
diff --git a/Documentation/devicetree/bindings/gpio/gpio_keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt index 5c2c02140a62..5c2c02140a62 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_keys.txt +++ b/Documentation/devicetree/bindings/input/gpio-keys.txt | |||
diff --git a/Documentation/devicetree/bindings/input/st-keyscan.txt b/Documentation/devicetree/bindings/input/st-keyscan.txt new file mode 100644 index 000000000000..51eb428e5c85 --- /dev/null +++ b/Documentation/devicetree/bindings/input/st-keyscan.txt | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | * ST Keyscan controller Device Tree bindings | ||
| 2 | |||
| 3 | The ST keyscan controller Device Tree binding is based on the | ||
| 4 | matrix-keymap. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "st,sti-keyscan" | ||
| 8 | |||
| 9 | - reg: Register base address and size of st-keyscan controller. | ||
| 10 | |||
| 11 | - interrupts: Interrupt number for the st-keyscan controller. | ||
| 12 | |||
| 13 | - clocks: Must contain one entry, for the module clock. | ||
| 14 | See ../clocks/clock-bindings.txt for details. | ||
| 15 | |||
| 16 | - pinctrl: Should specify pin control groups used for this controller. | ||
| 17 | See ../pinctrl/pinctrl-bindings.txt for details. | ||
| 18 | |||
| 19 | - linux,keymap: The keymap for keys as described in the binding document | ||
| 20 | devicetree/bindings/input/matrix-keymap.txt. | ||
| 21 | |||
| 22 | - keypad,num-rows: Number of row lines connected to the keypad controller. | ||
| 23 | |||
| 24 | - keypad,num-columns: Number of column lines connected to the keypad | ||
| 25 | controller. | ||
| 26 | |||
| 27 | Optional property: | ||
| 28 | - st,debounce_us: Debouncing interval time in microseconds | ||
| 29 | |||
| 30 | Example: | ||
| 31 | |||
| 32 | keyscan: keyscan@fe4b0000 { | ||
| 33 | compatible = "st,sti-keyscan"; | ||
| 34 | reg = <0xfe4b0000 0x2000>; | ||
| 35 | interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>; | ||
| 36 | clocks = <&CLK_SYSIN>; | ||
| 37 | pinctrl-names = "default"; | ||
| 38 | pinctrl-0 = <&pinctrl_keyscan>; | ||
| 39 | |||
| 40 | keypad,num-rows = <4>; | ||
| 41 | keypad,num-columns = <4>; | ||
| 42 | st,debounce_us = <5000>; | ||
| 43 | |||
| 44 | linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13) | ||
| 45 | MATRIX_KEY(0x00, 0x01, KEY_F9) | ||
| 46 | MATRIX_KEY(0x00, 0x02, KEY_F5) | ||
| 47 | MATRIX_KEY(0x00, 0x03, KEY_F1) | ||
| 48 | MATRIX_KEY(0x01, 0x00, KEY_F14) | ||
| 49 | MATRIX_KEY(0x01, 0x01, KEY_F10) | ||
| 50 | MATRIX_KEY(0x01, 0x02, KEY_F6) | ||
| 51 | MATRIX_KEY(0x01, 0x03, KEY_F2) | ||
| 52 | MATRIX_KEY(0x02, 0x00, KEY_F15) | ||
| 53 | MATRIX_KEY(0x02, 0x01, KEY_F11) | ||
| 54 | MATRIX_KEY(0x02, 0x02, KEY_F7) | ||
| 55 | MATRIX_KEY(0x02, 0x03, KEY_F3) | ||
| 56 | MATRIX_KEY(0x03, 0x00, KEY_F16) | ||
| 57 | MATRIX_KEY(0x03, 0x01, KEY_F12) | ||
| 58 | MATRIX_KEY(0x03, 0x02, KEY_F8) | ||
| 59 | MATRIX_KEY(0x03, 0x03, KEY_F4) >; | ||
| 60 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt new file mode 100644 index 000000000000..aef57791f40b --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | sun4i resistive touchscreen controller | ||
| 2 | -------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "allwinner,sun4i-a10-ts" | ||
| 6 | - reg: mmio address range of the chip | ||
| 7 | - interrupts: interrupt to which the chip is connected | ||
| 8 | |||
| 9 | Optional properties: | ||
| 10 | - allwinner,ts-attached: boolean indicating that an actual touchscreen is | ||
| 11 | attached to the controller | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | rtp: rtp@01c25000 { | ||
| 16 | compatible = "allwinner,sun4i-a10-ts"; | ||
| 17 | reg = <0x01c25000 0x100>; | ||
| 18 | interrupts = <29>; | ||
| 19 | allwinner,ts-attached; | ||
| 20 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt new file mode 100644 index 000000000000..d8e06163c54e --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | General Touchscreen Properties: | ||
| 2 | |||
| 3 | Optional properties for Touchscreens: | ||
| 4 | - touchscreen-size-x : horizontal resolution of touchscreen | ||
| 5 | (in pixels) | ||
| 6 | - touchscreen-size-y : vertical resolution of touchscreen | ||
| 7 | (in pixels) | ||
| 8 | - touchscreen-max-pressure : maximum reported pressure (arbitrary range | ||
| 9 | dependent on the controller) | ||
| 10 | - touchscreen-fuzz-x : horizontal noise value of the absolute input | ||
| 11 | device (in pixels) | ||
| 12 | - touchscreen-fuzz-y : vertical noise value of the absolute input | ||
| 13 | device (in pixels) | ||
| 14 | - touchscreen-fuzz-pressure : pressure noise value of the absolute input | ||
| 15 | device (arbitrary range dependent on the | ||
| 16 | controller) | ||
| 17 | - touchscreen-inverted-x : X axis is inverted (boolean) | ||
| 18 | - touchscreen-inverted-y : Y axis is inverted (boolean) | ||
| 19 | |||
| 20 | Deprecated properties for Touchscreens: | ||
| 21 | - x-size : deprecated name for touchscreen-size-x | ||
| 22 | - y-size : deprecated name for touchscreen-size-y | ||
| 23 | - moving-threshold : deprecated name for a combination of | ||
| 24 | touchscreen-fuzz-x and touchscreen-fuzz-y | ||
| 25 | - contact-threshold : deprecated name for touchscreen-fuzz-pressure | ||
| 26 | - x-invert : deprecated name for touchscreen-inverted-x | ||
| 27 | - y-invert : deprecated name for touchscreen-inverted-y | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt new file mode 100644 index 000000000000..4b641c7bf1c2 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | * Texas Instruments tsc2005 touchscreen controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "ti,tsc2005" | ||
| 5 | - reg : SPI device address | ||
| 6 | - spi-max-frequency : Maximal SPI speed | ||
| 7 | - interrupts : IRQ specifier | ||
| 8 | - reset-gpios : GPIO specifier | ||
| 9 | - vio-supply : Regulator specifier | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | - ti,x-plate-ohms : integer, resistance of the touchscreen's X plates | ||
| 13 | in ohm (defaults to 280) | ||
| 14 | - ti,esd-recovery-timeout-ms : integer, if the touchscreen does not respond after | ||
| 15 | the configured time (in milli seconds), the driver | ||
| 16 | will reset it. This is disabled by default. | ||
| 17 | - properties defined in touchscreen.txt | ||
| 18 | |||
| 19 | Example: | ||
| 20 | |||
| 21 | &mcspi1 { | ||
| 22 | tsc2005@0 { | ||
| 23 | compatible = "ti,tsc2005"; | ||
| 24 | spi-max-frequency = <6000000>; | ||
| 25 | reg = <0>; | ||
| 26 | |||
| 27 | vio-supply = <&vio>; | ||
| 28 | |||
| 29 | reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ | ||
| 30 | interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ | ||
| 31 | |||
| 32 | touchscreen-fuzz-x = <4>; | ||
| 33 | touchscreen-fuzz-y = <7>; | ||
| 34 | touchscreen-fuzz-pressure = <2>; | ||
| 35 | touchscreen-max-x = <4096>; | ||
| 36 | touchscreen-max-y = <4096>; | ||
| 37 | touchscreen-max-pressure = <2048>; | ||
| 38 | |||
| 39 | ti,x-plate-ohms = <280>; | ||
| 40 | ti,esd-recovery-timeout-ms = <8000>; | ||
| 41 | }; | ||
| 42 | } | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt index c55b8c016a9e..1b66a413fb9d 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | Binding for TI/National Semiconductor LP55xx Led Drivers | 1 | Binding for TI/National Semiconductor LP55xx Led Drivers |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501" | 4 | - compatible: one of |
| 5 | national,lp5521 | ||
| 6 | national,lp5523 | ||
| 7 | ti,lp55231 | ||
| 8 | ti,lp5562 | ||
| 9 | ti,lp8501 | ||
| 10 | |||
| 5 | - reg: I2C slave address | 11 | - reg: I2C slave address |
| 6 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) | 12 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) |
| 7 | 13 | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.txt b/Documentation/devicetree/bindings/leds/leds-pwm.txt index 7297107cf832..6c6583c35f2f 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.txt +++ b/Documentation/devicetree/bindings/leds/leds-pwm.txt | |||
| @@ -13,6 +13,8 @@ LED sub-node properties: | |||
| 13 | For the pwms and pwm-names property please refer to: | 13 | For the pwms and pwm-names property please refer to: |
| 14 | Documentation/devicetree/bindings/pwm/pwm.txt | 14 | Documentation/devicetree/bindings/pwm/pwm.txt |
| 15 | - max-brightness : Maximum brightness possible for the LED | 15 | - max-brightness : Maximum brightness possible for the LED |
| 16 | - active-low : (optional) For PWMs where the LED is wired to supply | ||
| 17 | rather than ground. | ||
| 16 | - label : (optional) | 18 | - label : (optional) |
| 17 | see Documentation/devicetree/bindings/leds/common.txt | 19 | see Documentation/devicetree/bindings/leds/common.txt |
| 18 | - linux,default-trigger : (optional) | 20 | - linux,default-trigger : (optional) |
diff --git a/Documentation/devicetree/bindings/mfd/bfticu.txt b/Documentation/devicetree/bindings/mfd/bfticu.txt new file mode 100644 index 000000000000..65c90776c620 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/bfticu.txt | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | KEYMILE bfticu Chassis Management FPGA | ||
| 2 | |||
| 3 | The bfticu is a multifunction device that manages the whole chassis. | ||
| 4 | Its main functionality is to collect IRQs from the whole chassis and signals | ||
| 5 | them to a single controller. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible: "keymile,bfticu" | ||
| 9 | - interrupt-controller: the bfticu FPGA is an interrupt controller | ||
| 10 | - interrupts: the main IRQ line to signal the collected IRQs | ||
| 11 | - #interrupt-cells : is 2 and their usage is compliant to the 2 cells variant | ||
| 12 | of Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
| 13 | - interrupt-parent: the parent IRQ ctrl the main IRQ is connected to | ||
| 14 | - reg: access on the parent local bus (chip select, offset in chip select, size) | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | chassis-mgmt@3,0 { | ||
| 19 | compatible = "keymile,bfticu"; | ||
| 20 | interrupt-controller; | ||
| 21 | #interrupt-cells = <2>; | ||
| 22 | reg = <3 0 0x100>; | ||
| 23 | interrupt-parent = <&mpic>; | ||
| 24 | interrupts = <6 1 0 0>; | ||
| 25 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/qriox.txt b/Documentation/devicetree/bindings/mfd/qriox.txt new file mode 100644 index 000000000000..f301e2d4ce76 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/qriox.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | KEYMILE qrio Board Control CPLD | ||
| 2 | |||
| 3 | The qrio is a multifunction device that controls the KEYMILE boards based on | ||
| 4 | the kmp204x design. | ||
| 5 | It is consists of a reset controller, watchdog timer, LEDs, and 2 IRQ capable | ||
| 6 | GPIO blocks. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | - compatible: "keymile,qriox" | ||
| 10 | - reg: access on the parent local bus (chip select, offset in chip select, size) | ||
| 11 | |||
| 12 | Example: | ||
| 13 | |||
| 14 | board-control@1,0 { | ||
| 15 | compatible = "keymile,qriox"; | ||
| 16 | reg = <1 0 0x80>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt index 8e15ec35ac99..b9ee7b98d3e2 100644 --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt | |||
| @@ -5,7 +5,22 @@ to control the power resources, including power scripts. For now, the | |||
| 5 | binding only supports the complete shutdown of the system after poweroff. | 5 | binding only supports the complete shutdown of the system after poweroff. |
| 6 | 6 | ||
| 7 | Required properties: | 7 | Required properties: |
| 8 | - compatible : must be "ti,twl4030-power" | 8 | - compatible : must be one of the following |
| 9 | "ti,twl4030-power" | ||
| 10 | "ti,twl4030-power-reset" | ||
| 11 | "ti,twl4030-power-idle" | ||
| 12 | "ti,twl4030-power-idle-osc-off" | ||
| 13 | |||
| 14 | The use of ti,twl4030-power-reset is recommended at least on | ||
| 15 | 3530 that needs a special configuration for warm reset to work. | ||
| 16 | |||
| 17 | When using ti,twl4030-power-idle, the TI recommended configuration | ||
| 18 | for idle modes is loaded to the tlw4030 PMIC. | ||
| 19 | |||
| 20 | When using ti,twl4030-power-idle-osc-off, the TI recommended | ||
| 21 | configuration is used with the external oscillator being shut | ||
| 22 | down during off-idle. Note that this does not work on all boards | ||
| 23 | depending on how the external oscillator is wired. | ||
| 9 | 24 | ||
| 10 | Optional properties: | 25 | Optional properties: |
| 11 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or | 26 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or |
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 9dce540771fb..3c18001dfd5d 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
| @@ -38,6 +38,8 @@ Optional properties: | |||
| 38 | - mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported | 38 | - mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported |
| 39 | - mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported | 39 | - mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported |
| 40 | - mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported | 40 | - mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported |
| 41 | - mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported | ||
| 42 | - mmc-hs400-1_2v: eMMC HS400 mode(1.2V I/O) is supported | ||
| 41 | 43 | ||
| 42 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line | 44 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line |
| 43 | polarity properties, we have to fix the meaning of the "normal" and "inverted" | 45 | polarity properties, we have to fix the meaning of the "normal" and "inverted" |
diff --git a/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt new file mode 100644 index 000000000000..b63819149f22 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | MOXA ART MMC Host Controller Interface | ||
| 2 | |||
| 3 | Inherits from mmc binding[1]. | ||
| 4 | |||
| 5 | [1] Documentation/devicetree/bindings/mmc/mmc.txt | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | |||
| 9 | - compatible : Must be "moxa,moxart-mmc" or "faraday,ftsdc010" | ||
| 10 | - reg : Should contain registers location and length | ||
| 11 | - interrupts : Should contain the interrupt number | ||
| 12 | - clocks : Should contain phandle for the clock feeding the MMC controller | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | |||
| 16 | - dmas : Should contain two DMA channels, line request number must be 5 for | ||
| 17 | both channels | ||
| 18 | - dma-names : Must be "tx", "rx" | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | mmc: mmc@98e00000 { | ||
| 23 | compatible = "moxa,moxart-mmc"; | ||
| 24 | reg = <0x98e00000 0x5C>; | ||
| 25 | interrupts = <5 0>; | ||
| 26 | clocks = <&clk_apb>; | ||
| 27 | dmas = <&dma 5>, | ||
| 28 | <&dma 5>; | ||
| 29 | dma-names = "tx", "rx"; | ||
| 30 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 8f3f13315358..2d4a7258a10d 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | |||
| @@ -69,10 +69,6 @@ Optional properties: | |||
| 69 | 69 | ||
| 70 | * supports-highspeed: Enables support for high speed cards (up to 50MHz) | 70 | * supports-highspeed: Enables support for high speed cards (up to 50MHz) |
| 71 | 71 | ||
| 72 | * caps2-mmc-hs200-1_8v: Supports mmc HS200 SDR 1.8V mode | ||
| 73 | |||
| 74 | * caps2-mmc-hs200-1_2v: Supports mmc HS200 SDR 1.2V mode | ||
| 75 | |||
| 76 | * broken-cd: as documented in mmc core bindings. | 72 | * broken-cd: as documented in mmc core bindings. |
| 77 | 73 | ||
| 78 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is | 74 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is |
| @@ -103,7 +99,6 @@ board specific portions as listed below. | |||
| 103 | clock-freq-min-max = <400000 200000000>; | 99 | clock-freq-min-max = <400000 200000000>; |
| 104 | num-slots = <1>; | 100 | num-slots = <1>; |
| 105 | supports-highspeed; | 101 | supports-highspeed; |
| 106 | caps2-mmc-hs200-1_8v; | ||
| 107 | broken-cd; | 102 | broken-cd; |
| 108 | fifo-depth = <0x80>; | 103 | fifo-depth = <0x80>; |
| 109 | card-detect-delay = <200>; | 104 | card-detect-delay = <200>; |
diff --git a/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt new file mode 100644 index 000000000000..8babdaa8623b --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | * Renesas usdhi6rol0 SD/SDIO host controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: must be | ||
| 6 | "renesas,usdhi6rol0" | ||
| 7 | - interrupts: 3 interrupts, named "card detect", "data" and "SDIO" must be | ||
| 8 | specified | ||
| 9 | - clocks: a clock binding for the IMCLK input | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | |||
| 13 | - vmmc-supply: a phandle of a regulator, supplying Vcc to the card | ||
| 14 | - vqmmc-supply: a phandle of a regulator, supplying VccQ to the card | ||
| 15 | |||
| 16 | Additionally any standard mmc bindings from mmc.txt can be used. | ||
| 17 | |||
| 18 | Example: | ||
| 19 | |||
| 20 | sd0: sd@ab000000 { | ||
| 21 | compatible = "renesas,usdhi6rol0"; | ||
| 22 | reg = <0xab000000 0x200>; | ||
| 23 | interrupts = <0 23 0x4 | ||
| 24 | 0 24 0x4 | ||
| 25 | 0 25 0x4>; | ||
| 26 | interrupt-names = "card detect", "data", "SDIO"; | ||
| 27 | bus-width = <4>; | ||
| 28 | max-frequency = <50000000>; | ||
| 29 | cap-power-off-card; | ||
| 30 | clocks = <&imclk>; | ||
| 31 | vmmc-supply = <&vcc_sd0>; | ||
| 32 | vqmmc-supply = <&vccq_sd0>; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt new file mode 100644 index 000000000000..823d13412195 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | * Freescale Quad Serial Peripheral Interface(QuadSPI) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "fsl,vf610-qspi" | ||
| 5 | - reg : the first contains the register location and length, | ||
| 6 | the second contains the memory mapping address and length | ||
| 7 | - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory" | ||
| 8 | - interrupts : Should contain the interrupt for the device | ||
| 9 | - clocks : The clocks needed by the QuadSPI controller | ||
| 10 | - clock-names : the name of the clocks | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | - fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B. | ||
| 14 | Each bus can be connected with two NOR flashes. | ||
| 15 | Most of the time, each bus only has one NOR flash | ||
| 16 | connected, this is the default case. | ||
| 17 | But if there are two NOR flashes connected to the | ||
| 18 | bus, you should enable this property. | ||
| 19 | (Please check the board's schematic.) | ||
| 20 | |||
| 21 | Example: | ||
| 22 | |||
| 23 | qspi0: quadspi@40044000 { | ||
| 24 | compatible = "fsl,vf610-qspi"; | ||
| 25 | reg = <0x40044000 0x1000>, <0x20000000 0x10000000>; | ||
| 26 | reg-names = "QuadSPI", "QuadSPI-memory"; | ||
| 27 | interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>; | ||
| 28 | clocks = <&clks VF610_CLK_QSPI0_EN>, | ||
| 29 | <&clks VF610_CLK_QSPI0>; | ||
| 30 | clock-names = "qspi_en", "qspi"; | ||
| 31 | |||
| 32 | flash0: s25fl128s@0 { | ||
| 33 | .... | ||
| 34 | }; | ||
| 35 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt index eb05255b6788..65f4f7c43136 100644 --- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt | |||
| @@ -28,6 +28,8 @@ Optional properties: | |||
| 28 | "ham1" 1-bit Hamming ecc code | 28 | "ham1" 1-bit Hamming ecc code |
| 29 | "bch4" 4-bit BCH ecc code | 29 | "bch4" 4-bit BCH ecc code |
| 30 | "bch8" 8-bit BCH ecc code | 30 | "bch8" 8-bit BCH ecc code |
| 31 | "bch16" 16-bit BCH ECC code | ||
| 32 | Refer below "How to select correct ECC scheme for your device ?" | ||
| 31 | 33 | ||
| 32 | - ti,nand-xfer-type: A string setting the data transfer type. One of: | 34 | - ti,nand-xfer-type: A string setting the data transfer type. One of: |
| 33 | 35 | ||
| @@ -90,3 +92,46 @@ Example for an AM33xx board: | |||
| 90 | }; | 92 | }; |
| 91 | }; | 93 | }; |
| 92 | 94 | ||
| 95 | How to select correct ECC scheme for your device ? | ||
| 96 | -------------------------------------------------- | ||
| 97 | Higher ECC scheme usually means better protection against bit-flips and | ||
| 98 | increased system lifetime. However, selection of ECC scheme is dependent | ||
| 99 | on various other factors also like; | ||
| 100 | |||
| 101 | (1) support of built in hardware engines. | ||
| 102 | Some legacy OMAP SoC do not have ELM harware engine, so those SoC cannot | ||
| 103 | support ecc-schemes with hardware error-correction (BCHx_HW). However | ||
| 104 | such SoC can use ecc-schemes with software library for error-correction | ||
| 105 | (BCHx_HW_DETECTION_SW). The error correction capability with software | ||
| 106 | library remains equivalent to their hardware counter-part, but there is | ||
| 107 | slight CPU penalty when too many bit-flips are detected during reads. | ||
| 108 | |||
| 109 | (2) Device parameters like OOBSIZE. | ||
| 110 | Other factor which governs the selection of ecc-scheme is oob-size. | ||
| 111 | Higher ECC schemes require more OOB/Spare area to store ECC syndrome, | ||
| 112 | so the device should have enough free bytes available its OOB/Spare | ||
| 113 | area to accomodate ECC for entire page. In general following expression | ||
| 114 | helps in determining if given device can accomodate ECC syndrome: | ||
| 115 | "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE" | ||
| 116 | where | ||
| 117 | OOBSIZE number of bytes in OOB/spare area | ||
| 118 | PAGESIZE number of bytes in main-area of device page | ||
| 119 | ECC_BYTES number of ECC bytes generated to protect | ||
| 120 | 512 bytes of data, which is: | ||
| 121 | '3' for HAM1_xx ecc schemes | ||
| 122 | '7' for BCH4_xx ecc schemes | ||
| 123 | '14' for BCH8_xx ecc schemes | ||
| 124 | '26' for BCH16_xx ecc schemes | ||
| 125 | |||
| 126 | Example(a): For a device with PAGESIZE = 2048 and OOBSIZE = 64 and | ||
| 127 | trying to use BCH16 (ECC_BYTES=26) ecc-scheme. | ||
| 128 | Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B | ||
| 129 | which is greater than capacity of NAND device (OOBSIZE=64) | ||
| 130 | Hence, BCH16 cannot be supported on given device. But it can | ||
| 131 | probably use lower ecc-schemes like BCH8. | ||
| 132 | |||
| 133 | Example(b): For a device with PAGESIZE = 2048 and OOBSIZE = 128 and | ||
| 134 | trying to use BCH16 (ECC_BYTES=26) ecc-scheme. | ||
| 135 | Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B | ||
| 136 | which can be accomodate in the OOB/Spare area of this device | ||
| 137 | (OOBSIZE=128). So this device can use BCH16 ecc-scheme. | ||
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt index 6d3d57609470..4611aa83531b 100644 --- a/Documentation/devicetree/bindings/mtd/m25p80.txt +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt | |||
| @@ -5,8 +5,8 @@ Required properties: | |||
| 5 | representing partitions. | 5 | representing partitions. |
| 6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind | 6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind |
| 7 | the DT binding is not Linux-only, but in case of Linux, see the | 7 | the DT binding is not Linux-only, but in case of Linux, see the |
| 8 | "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of | 8 | "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list |
| 9 | supported chips. | 9 | of supported chips. |
| 10 | - reg : Chip-Select number | 10 | - reg : Chip-Select number |
| 11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at | 11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at |
| 12 | 12 | ||
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt index 86e0a5601ff5..de8b517a5521 100644 --- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt +++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt | |||
| @@ -17,6 +17,14 @@ Optional properties: | |||
| 17 | - num-cs: Number of chipselect lines to usw | 17 | - num-cs: Number of chipselect lines to usw |
| 18 | - nand-on-flash-bbt: boolean to enable on flash bbt option if | 18 | - nand-on-flash-bbt: boolean to enable on flash bbt option if |
| 19 | not present false | 19 | not present false |
| 20 | - nand-ecc-strength: number of bits to correct per ECC step | ||
| 21 | - nand-ecc-step-size: number of data bytes covered by a single ECC step | ||
| 22 | |||
| 23 | The following ECC strength and step size are currently supported: | ||
| 24 | |||
| 25 | - nand-ecc-strength = <1>, nand-ecc-step-size = <512> | ||
| 26 | - nand-ecc-strength = <4>, nand-ecc-step-size = <512> | ||
| 27 | - nand-ecc-strength = <8>, nand-ecc-step-size = <512> | ||
| 20 | 28 | ||
| 21 | Example: | 29 | Example: |
| 22 | 30 | ||
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt new file mode 100644 index 000000000000..d01ed63d3ebb --- /dev/null +++ b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | * AMD 10GbE PHY driver (amd-xgbe-phy) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "amd,xgbe-phy-seattle-v1a" and | ||
| 5 | "ethernet-phy-ieee802.3-c45" | ||
| 6 | - reg: Address and length of the register sets for the device | ||
| 7 | - SerDes Rx/Tx registers | ||
| 8 | - SerDes integration registers (1/2) | ||
| 9 | - SerDes integration registers (2/2) | ||
| 10 | |||
| 11 | Example: | ||
| 12 | xgbe_phy@e1240800 { | ||
| 13 | compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45"; | ||
| 14 | reg = <0 0xe1240800 0 0x00400>, | ||
| 15 | <0 0xe1250000 0 0x00060>, | ||
| 16 | <0 0xe1250080 0 0x00004>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt new file mode 100644 index 000000000000..ea0c7908a3b8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | * AMD 10GbE driver (amd-xgbe) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "amd,xgbe-seattle-v1a" | ||
| 5 | - reg: Address and length of the register sets for the device | ||
| 6 | - MAC registers | ||
| 7 | - PCS registers | ||
| 8 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
| 9 | that services interrupts for this device | ||
| 10 | - interrupts: Should contain the amd-xgbe interrupt | ||
| 11 | - clocks: Should be the DMA clock for the amd-xgbe device (used for | ||
| 12 | calculating the correct Rx interrupt watchdog timer value on a DMA | ||
| 13 | channel for coalescing) | ||
| 14 | - clock-names: Should be the name of the DMA clock, "dma_clk" | ||
| 15 | - phy-handle: See ethernet.txt file in the same directory | ||
| 16 | - phy-mode: See ethernet.txt file in the same directory | ||
| 17 | |||
| 18 | Optional properties: | ||
| 19 | - mac-address: mac address to be assigned to the device. Can be overridden | ||
| 20 | by UEFI. | ||
| 21 | |||
| 22 | Example: | ||
| 23 | xgbe@e0700000 { | ||
| 24 | compatible = "amd,xgbe-seattle-v1a"; | ||
| 25 | reg = <0 0xe0700000 0 0x80000>, | ||
| 26 | <0 0xe0780000 0 0x80000>; | ||
| 27 | interrupt-parent = <&gic>; | ||
| 28 | interrupts = <0 325 4>; | ||
| 29 | clocks = <&xgbe_clk>; | ||
| 30 | clock-names = "dma_clk"; | ||
| 31 | phy-handle = <&phy>; | ||
| 32 | phy-mode = "xgmii"; | ||
| 33 | mac-address = [ 02 a1 a2 a3 a4 a5 ]; | ||
| 34 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt index f2febb94550e..451fef26b4df 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt +++ b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt | |||
| @@ -24,7 +24,7 @@ Optional properties: | |||
| 24 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or | 24 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or |
| 25 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is | 25 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is |
| 26 | voluntarily disabled, this property should be used to describe the "fixed link". | 26 | voluntarily disabled, this property should be used to describe the "fixed link". |
| 27 | See Documentation/devicetree/bindings/net/fsl-tsec-phy.txt for information on | 27 | See Documentation/devicetree/bindings/net/fixed-link.txt for information on |
| 28 | the property specifics | 28 | the property specifics |
| 29 | 29 | ||
| 30 | Required child nodes: | 30 | Required child nodes: |
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/broadcom-systemport.txt new file mode 100644 index 000000000000..c183ea90d9bc --- /dev/null +++ b/Documentation/devicetree/bindings/net/broadcom-systemport.txt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | * Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport" | ||
| 5 | - reg: address and length of the register set for the device. | ||
| 6 | - interrupts: interrupts for the device, first cell must be for the the rx | ||
| 7 | interrupts, and the second cell should be for the transmit queues | ||
| 8 | - local-mac-address: Ethernet MAC address (48 bits) of this adapter | ||
| 9 | - phy-mode: Should be a string describing the PHY interface to the | ||
| 10 | Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt | ||
| 11 | - fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for | ||
| 12 | the property specific details | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | - systemport,num-tier2-arb: number of tier 2 arbiters, an integer | ||
| 16 | - systemport,num-tier1-arb: number of tier 1 arbiters, an integer | ||
| 17 | - systemport,num-txq: number of HW transmit queues, an integer | ||
| 18 | - systemport,num-rxq: number of HW receive queues, an integer | ||
| 19 | |||
| 20 | Example: | ||
| 21 | ethernet@f04a0000 { | ||
| 22 | compatible = "brcm,systemport-v1.00"; | ||
| 23 | reg = <0xf04a0000 0x4650>; | ||
| 24 | local-mac-address = [ 00 11 22 33 44 55 ]; | ||
| 25 | fixed-link = <0 1 1000 0 0>; | ||
| 26 | phy-mode = "gmii"; | ||
| 27 | interrupts = <0x0 0x16 0x0>, | ||
| 28 | <0x0 0x17 0x0>; | ||
| 29 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/xilinx_can.txt b/Documentation/devicetree/bindings/net/can/xilinx_can.txt new file mode 100644 index 000000000000..fe38847d8e26 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/xilinx_can.txt | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | Xilinx Axi CAN/Zynq CANPS controller Device Tree Bindings | ||
| 2 | --------------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : Should be "xlnx,zynq-can-1.0" for Zynq CAN | ||
| 6 | controllers and "xlnx,axi-can-1.00.a" for Axi CAN | ||
| 7 | controllers. | ||
| 8 | - reg : Physical base address and size of the Axi CAN/Zynq | ||
| 9 | CANPS registers map. | ||
| 10 | - interrupts : Property with a value describing the interrupt | ||
| 11 | number. | ||
| 12 | - interrupt-parent : Must be core interrupt controller | ||
| 13 | - clock-names : List of input clock names - "can_clk", "pclk" | ||
| 14 | (For CANPS), "can_clk" , "s_axi_aclk"(For AXI CAN) | ||
| 15 | (See clock bindings for details). | ||
| 16 | - clocks : Clock phandles (see clock bindings for details). | ||
| 17 | - tx-fifo-depth : Can Tx fifo depth. | ||
| 18 | - rx-fifo-depth : Can Rx fifo depth. | ||
| 19 | |||
| 20 | |||
| 21 | Example: | ||
| 22 | |||
| 23 | For Zynq CANPS Dts file: | ||
| 24 | zynq_can_0: can@e0008000 { | ||
| 25 | compatible = "xlnx,zynq-can-1.0"; | ||
| 26 | clocks = <&clkc 19>, <&clkc 36>; | ||
| 27 | clock-names = "can_clk", "pclk"; | ||
| 28 | reg = <0xe0008000 0x1000>; | ||
| 29 | interrupts = <0 28 4>; | ||
| 30 | interrupt-parent = <&intc>; | ||
| 31 | tx-fifo-depth = <0x40>; | ||
| 32 | rx-fifo-depth = <0x40>; | ||
| 33 | }; | ||
| 34 | For Axi CAN Dts file: | ||
| 35 | axi_can_0: axi-can@40000000 { | ||
| 36 | compatible = "xlnx,axi-can-1.00.a"; | ||
| 37 | clocks = <&clkc 0>, <&clkc 1>; | ||
| 38 | clock-names = "can_clk","s_axi_aclk" ; | ||
| 39 | reg = <0x40000000 0x10000>; | ||
| 40 | interrupt-parent = <&intc>; | ||
| 41 | interrupts = <0 59 1>; | ||
| 42 | tx-fifo-depth = <0x40>; | ||
| 43 | rx-fifo-depth = <0x40>; | ||
| 44 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt index 7ff57a119f81..764c0c79b43d 100644 --- a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt +++ b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | |||
| @@ -2,7 +2,9 @@ TI CPSW Phy mode Selection Device Tree Bindings | |||
| 2 | ----------------------------------------------- | 2 | ----------------------------------------------- |
| 3 | 3 | ||
| 4 | Required properties: | 4 | Required properties: |
| 5 | - compatible : Should be "ti,am3352-cpsw-phy-sel" | 5 | - compatible : Should be "ti,am3352-cpsw-phy-sel" for am335x platform and |
| 6 | "ti,dra7xx-cpsw-phy-sel" for dra7xx platform | ||
| 7 | "ti,am43xx-cpsw-phy-sel" for am43xx platform | ||
| 6 | - reg : physical base address and size of the cpsw | 8 | - reg : physical base address and size of the cpsw |
| 7 | registers map | 9 | registers map |
| 8 | - reg-names : names of the register map given in "reg" node | 10 | - reg-names : names of the register map given in "reg" node |
diff --git a/Documentation/devicetree/bindings/net/fixed-link.txt b/Documentation/devicetree/bindings/net/fixed-link.txt new file mode 100644 index 000000000000..82bf7e0f47b6 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fixed-link.txt | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | Fixed link Device Tree binding | ||
| 2 | ------------------------------ | ||
| 3 | |||
| 4 | Some Ethernet MACs have a "fixed link", and are not connected to a | ||
| 5 | normal MDIO-managed PHY device. For those situations, a Device Tree | ||
| 6 | binding allows to describe a "fixed link". | ||
| 7 | |||
| 8 | Such a fixed link situation is described by creating a 'fixed-link' | ||
| 9 | sub-node of the Ethernet MAC device node, with the following | ||
| 10 | properties: | ||
| 11 | |||
| 12 | * 'speed' (integer, mandatory), to indicate the link speed. Accepted | ||
| 13 | values are 10, 100 and 1000 | ||
| 14 | * 'full-duplex' (boolean, optional), to indicate that full duplex is | ||
| 15 | used. When absent, half duplex is assumed. | ||
| 16 | * 'pause' (boolean, optional), to indicate that pause should be | ||
| 17 | enabled. | ||
| 18 | * 'asym-pause' (boolean, optional), to indicate that asym_pause should | ||
| 19 | be enabled. | ||
| 20 | |||
| 21 | Old, deprecated 'fixed-link' binding: | ||
| 22 | |||
| 23 | * A 'fixed-link' property in the Ethernet MAC node, with 5 cells, of the | ||
| 24 | form <a b c d e> with the following accepted values: | ||
| 25 | - a: emulated PHY ID, choose any but but unique to the all specified | ||
| 26 | fixed-links, from 0 to 31 | ||
| 27 | - b: duplex configuration: 0 for half duplex, 1 for full duplex | ||
| 28 | - c: link speed in Mbits/sec, accepted values are: 10, 100 and 1000 | ||
| 29 | - d: pause configuration: 0 for no pause, 1 for pause | ||
| 30 | - e: asymmetric pause configuration: 0 for no asymmetric pause, 1 for | ||
| 31 | asymmetric pause | ||
| 32 | |||
| 33 | Example: | ||
| 34 | |||
| 35 | ethernet@0 { | ||
| 36 | ... | ||
| 37 | fixed-link { | ||
| 38 | speed = <1000>; | ||
| 39 | full-duplex; | ||
| 40 | }; | ||
| 41 | ... | ||
| 42 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index 737cdef4f903..be6ea8960f20 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | |||
| @@ -42,10 +42,7 @@ Properties: | |||
| 42 | interrupt. For TSEC and eTSEC devices, the first interrupt is | 42 | interrupt. For TSEC and eTSEC devices, the first interrupt is |
| 43 | transmit, the second is receive, and the third is error. | 43 | transmit, the second is receive, and the third is error. |
| 44 | - phy-handle : See ethernet.txt file in the same directory. | 44 | - phy-handle : See ethernet.txt file in the same directory. |
| 45 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, | 45 | - fixed-link : See fixed-link.txt in the same directory. |
| 46 | but unique to the all specified fixed-links, b is duplex - 0 half, | ||
| 47 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no | ||
| 48 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. | ||
| 49 | - phy-connection-type : See ethernet.txt file in the same directory. | 46 | - phy-connection-type : See ethernet.txt file in the same directory. |
| 50 | This property is only really needed if the connection is of type | 47 | This property is only really needed if the connection is of type |
| 51 | "rgmii-id", as all other connection types are detected by hardware. | 48 | "rgmii-id", as all other connection types are detected by hardware. |
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt new file mode 100644 index 000000000000..75d398bb1fbb --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | Hisilicon hix5hd2 gmac controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "hisilicon,hix5hd2-gmac". | ||
| 5 | - reg: specifies base physical address(s) and size of the device registers. | ||
| 6 | The first region is the MAC register base and size. | ||
| 7 | The second region is external interface control register. | ||
| 8 | - interrupts: should contain the MAC interrupt. | ||
| 9 | - #address-cells: must be <1>. | ||
| 10 | - #size-cells: must be <0>. | ||
| 11 | - phy-mode: see ethernet.txt [1]. | ||
| 12 | - phy-handle: see ethernet.txt [1]. | ||
| 13 | - mac-address: see ethernet.txt [1]. | ||
| 14 | - clocks: clock phandle and specifier pair. | ||
| 15 | |||
| 16 | - PHY subnode: inherits from phy binding [2] | ||
| 17 | |||
| 18 | [1] Documentation/devicetree/bindings/net/ethernet.txt | ||
| 19 | [2] Documentation/devicetree/bindings/net/phy.txt | ||
| 20 | |||
| 21 | Example: | ||
| 22 | gmac0: ethernet@f9840000 { | ||
| 23 | compatible = "hisilicon,hix5hd2-gmac"; | ||
| 24 | reg = <0xf9840000 0x1000>,<0xf984300c 0x4>; | ||
| 25 | interrupts = <0 71 4>; | ||
| 26 | #address-cells = <1>; | ||
| 27 | #size-cells = <0>; | ||
| 28 | phy-mode = "mii"; | ||
| 29 | phy-handle = <&phy2>; | ||
| 30 | mac-address = [00 00 00 00 00 00]; | ||
| 31 | clocks = <&clock HIX5HD2_MAC0_CLK>; | ||
| 32 | |||
| 33 | phy2: ethernet-phy@2 { | ||
| 34 | reg = <2>; | ||
| 35 | }; | ||
| 36 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt new file mode 100644 index 000000000000..d3bbdded4cbe --- /dev/null +++ b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | * AT86RF230 IEEE 802.15.4 * | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "atmel,at86rf230", "atmel,at86rf231", | ||
| 5 | "atmel,at86rf233" or "atmel,at86rf212" | ||
| 6 | - spi-max-frequency: maximal bus speed, should be set to 7500000 depends | ||
| 7 | sync or async operation mode | ||
| 8 | - reg: the chipselect index | ||
| 9 | - interrupts: the interrupt generated by the device | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | - reset-gpio: GPIO spec for the rstn pin | ||
| 13 | - sleep-gpio: GPIO spec for the slp_tr pin | ||
| 14 | |||
| 15 | Example: | ||
| 16 | |||
| 17 | at86rf231@0 { | ||
| 18 | compatible = "atmel,at86rf231"; | ||
| 19 | spi-max-frequency = <7500000>; | ||
| 20 | reg = <0>; | ||
| 21 | interrupts = <19 1>; | ||
| 22 | interrupt-parent = <&gpio3>; | ||
| 23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ks8851.txt b/Documentation/devicetree/bindings/net/micrel-ks8851.txt index d54d0cc79487..bbdf9a7359a2 100644 --- a/Documentation/devicetree/bindings/net/micrel-ks8851.txt +++ b/Documentation/devicetree/bindings/net/micrel-ks8851.txt | |||
| @@ -1,9 +1,18 @@ | |||
| 1 | Micrel KS8851 Ethernet mac | 1 | Micrel KS8851 Ethernet mac (MLL) |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible = "micrel,ks8851-ml" of parallel interface | 4 | - compatible = "micrel,ks8851-mll" of parallel interface |
| 5 | - reg : 2 physical address and size of registers for data and command | 5 | - reg : 2 physical address and size of registers for data and command |
| 6 | - interrupts : interrupt connection | 6 | - interrupts : interrupt connection |
| 7 | 7 | ||
| 8 | Micrel KS8851 Ethernet mac (SPI) | ||
| 9 | |||
| 10 | Required properties: | ||
| 11 | - compatible = "micrel,ks8851" or the deprecated "ks8851" | ||
| 12 | - reg : chip select number | ||
| 13 | - interrupts : interrupt connection | ||
| 14 | |||
| 8 | Optional properties: | 15 | Optional properties: |
| 9 | - vdd-supply: supply for Ethernet mac | 16 | - vdd-supply: analog 3.3V supply for Ethernet mac |
| 17 | - vdd-io-supply: digital 1.8V IO supply for Ethernet mac | ||
| 18 | - reset-gpios: reset_n input pin | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt b/Documentation/devicetree/bindings/net/micrel-ksz9021.txt deleted file mode 100644 index 997a63f1aea1..000000000000 --- a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | Micrel KSZ9021 Gigabit Ethernet PHY | ||
| 2 | |||
| 3 | Some boards require special tuning values, particularly when it comes to | ||
| 4 | clock delays. You can specify clock delay values by adding | ||
| 5 | micrel-specific properties to an Ethernet OF device node. | ||
| 6 | |||
| 7 | All skew control options are specified in picoseconds. The minimum | ||
| 8 | value is 0, and the maximum value is 3000. | ||
| 9 | |||
| 10 | Optional properties: | ||
| 11 | - rxc-skew-ps : Skew control of RXC pad | ||
| 12 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 13 | - txc-skew-ps : Skew control of TXC pad | ||
| 14 | - txen-skew-ps : Skew control of TX_CTL pad | ||
| 15 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 16 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 17 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 18 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 19 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 20 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 21 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 22 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 23 | |||
| 24 | Examples: | ||
| 25 | |||
| 26 | /* Attach to an Ethernet device with autodetected PHY */ | ||
| 27 | &enet { | ||
| 28 | rxc-skew-ps = <3000>; | ||
| 29 | rxdv-skew-ps = <0>; | ||
| 30 | txc-skew-ps = <3000>; | ||
| 31 | txen-skew-ps = <0>; | ||
| 32 | status = "okay"; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* Attach to an explicitly-specified PHY */ | ||
| 36 | mdio { | ||
| 37 | phy0: ethernet-phy@0 { | ||
| 38 | rxc-skew-ps = <3000>; | ||
| 39 | rxdv-skew-ps = <0>; | ||
| 40 | txc-skew-ps = <3000>; | ||
| 41 | txen-skew-ps = <0>; | ||
| 42 | reg = <0>; | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | ethernet@70000 { | ||
| 46 | status = "okay"; | ||
| 47 | phy = <&phy0>; | ||
| 48 | phy-mode = "rgmii-id"; | ||
| 49 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt new file mode 100644 index 000000000000..692076fda0e5 --- /dev/null +++ b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | Micrel KSZ9021/KSZ9031 Gigabit Ethernet PHY | ||
| 2 | |||
| 3 | Some boards require special tuning values, particularly when it comes to | ||
| 4 | clock delays. You can specify clock delay values by adding | ||
| 5 | micrel-specific properties to an Ethernet OF device node. | ||
| 6 | |||
| 7 | Note that these settings are applied after any phy-specific fixup from | ||
| 8 | phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c), | ||
| 9 | and therefore may overwrite them. | ||
| 10 | |||
| 11 | KSZ9021: | ||
| 12 | |||
| 13 | All skew control options are specified in picoseconds. The minimum | ||
| 14 | value is 0, the maximum value is 3000, and it is incremented by 200ps | ||
| 15 | steps. | ||
| 16 | |||
| 17 | Optional properties: | ||
| 18 | |||
| 19 | - rxc-skew-ps : Skew control of RXC pad | ||
| 20 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 21 | - txc-skew-ps : Skew control of TXC pad | ||
| 22 | - txen-skew-ps : Skew control of TX CTL pad | ||
| 23 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 24 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 25 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 26 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 27 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 28 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 29 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 30 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 31 | |||
| 32 | KSZ9031: | ||
| 33 | |||
| 34 | All skew control options are specified in picoseconds. The minimum | ||
| 35 | value is 0, and the maximum is property-dependent. The increment | ||
| 36 | step is 60ps. | ||
| 37 | |||
| 38 | Optional properties: | ||
| 39 | |||
| 40 | Maximum value of 1860: | ||
| 41 | |||
| 42 | - rxc-skew-ps : Skew control of RX clock pad | ||
| 43 | - txc-skew-ps : Skew control of TX clock pad | ||
| 44 | |||
| 45 | Maximum value of 900: | ||
| 46 | |||
| 47 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 48 | - txen-skew-ps : Skew control of TX CTL pad | ||
| 49 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 50 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 51 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 52 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 53 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 54 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 55 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 56 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 57 | |||
| 58 | Examples: | ||
| 59 | |||
| 60 | /* Attach to an Ethernet device with autodetected PHY */ | ||
| 61 | &enet { | ||
| 62 | rxc-skew-ps = <3000>; | ||
| 63 | rxdv-skew-ps = <0>; | ||
| 64 | txc-skew-ps = <3000>; | ||
| 65 | txen-skew-ps = <0>; | ||
| 66 | status = "okay"; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* Attach to an explicitly-specified PHY */ | ||
| 70 | mdio { | ||
| 71 | phy0: ethernet-phy@0 { | ||
| 72 | rxc-skew-ps = <3000>; | ||
| 73 | rxdv-skew-ps = <0>; | ||
| 74 | txc-skew-ps = <3000>; | ||
| 75 | txen-skew-ps = <0>; | ||
| 76 | reg = <0>; | ||
| 77 | }; | ||
| 78 | }; | ||
| 79 | ethernet@70000 { | ||
| 80 | status = "okay"; | ||
| 81 | phy = <&phy0>; | ||
| 82 | phy-mode = "rgmii-id"; | ||
| 83 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/pn544.txt b/Documentation/devicetree/bindings/net/nfc/pn544.txt new file mode 100644 index 000000000000..dab69f36167c --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/pn544.txt | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | * NXP Semiconductors PN544 NFC Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "nxp,pn544-i2c". | ||
| 5 | - clock-frequency: I²C work frequency. | ||
| 6 | - reg: address on the bus | ||
| 7 | - interrupt-parent: phandle for the interrupt gpio controller | ||
| 8 | - interrupts: GPIO interrupt to which the chip is connected | ||
| 9 | - enable-gpios: Output GPIO pin used for enabling/disabling the PN544 | ||
| 10 | - firmware-gpios: Output GPIO pin used to enter firmware download mode | ||
| 11 | |||
| 12 | Optional SoC Specific Properties: | ||
| 13 | - pinctrl-names: Contains only one value - "default". | ||
| 14 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
| 15 | |||
| 16 | Example (for ARM-based BeagleBone with PN544 on I2C2): | ||
| 17 | |||
| 18 | &i2c2 { | ||
| 19 | |||
| 20 | status = "okay"; | ||
| 21 | |||
| 22 | pn544: pn544@28 { | ||
| 23 | |||
| 24 | compatible = "nxp,pn544-i2c"; | ||
| 25 | |||
| 26 | reg = <0x28>; | ||
| 27 | clock-frequency = <400000>; | ||
| 28 | |||
| 29 | interrupt-parent = <&gpio1>; | ||
| 30 | interrupts = <17 GPIO_ACTIVE_HIGH>; | ||
| 31 | |||
| 32 | enable-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; | ||
| 33 | firmware-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; | ||
| 34 | }; | ||
| 35 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfca.txt b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt new file mode 100644 index 000000000000..e4faa2e8dfeb --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | * STMicroelectronics SAS. ST21NFCA NFC Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "st,st21nfca_i2c". | ||
| 5 | - clock-frequency: I²C work frequency. | ||
| 6 | - reg: address on the bus | ||
| 7 | - interrupt-parent: phandle for the interrupt gpio controller | ||
| 8 | - interrupts: GPIO interrupt to which the chip is connected | ||
| 9 | - enable-gpios: Output GPIO pin used for enabling/disabling the ST21NFCA | ||
| 10 | |||
| 11 | Optional SoC Specific Properties: | ||
| 12 | - pinctrl-names: Contains only one value - "default". | ||
| 13 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
| 14 | |||
| 15 | Example (for ARM-based BeagleBoard xM with ST21NFCA on I2C2): | ||
| 16 | |||
| 17 | &i2c2 { | ||
| 18 | |||
| 19 | status = "okay"; | ||
| 20 | |||
| 21 | st21nfca: st21nfca@1 { | ||
| 22 | |||
| 23 | compatible = "st,st21nfca_i2c"; | ||
| 24 | |||
| 25 | reg = <0x01>; | ||
| 26 | clock-frequency = <400000>; | ||
| 27 | |||
| 28 | interrupt-parent = <&gpio5>; | ||
| 29 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; | ||
| 30 | |||
| 31 | enable-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; | ||
| 32 | }; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt index 8dd3ef7bc56b..1e436133685f 100644 --- a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt +++ b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt | |||
| @@ -12,6 +12,7 @@ Required properties: | |||
| 12 | Optional SoC Specific Properties: | 12 | Optional SoC Specific Properties: |
| 13 | - pinctrl-names: Contains only one value - "default". | 13 | - pinctrl-names: Contains only one value - "default". |
| 14 | - pintctrl-0: Specifies the pin control groups used for this controller. | 14 | - pintctrl-0: Specifies the pin control groups used for this controller. |
| 15 | - autosuspend-delay: Specify autosuspend delay in milliseconds. | ||
| 15 | 16 | ||
| 16 | Example (for ARM-based BeagleBone with TRF7970A on SPI1): | 17 | Example (for ARM-based BeagleBone with TRF7970A on SPI1): |
| 17 | 18 | ||
| @@ -29,6 +30,7 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1): | |||
| 29 | ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, | 30 | ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, |
| 30 | <&gpio2 5 GPIO_ACTIVE_LOW>; | 31 | <&gpio2 5 GPIO_ACTIVE_LOW>; |
| 31 | vin-supply = <&ldo3_reg>; | 32 | vin-supply = <&ldo3_reg>; |
| 33 | autosuspend-delay = <30000>; | ||
| 32 | status = "okay"; | 34 | status = "okay"; |
| 33 | }; | 35 | }; |
| 34 | }; | 36 | }; |
diff --git a/Documentation/devicetree/bindings/net/via-rhine.txt b/Documentation/devicetree/bindings/net/via-rhine.txt new file mode 100644 index 000000000000..334eca2bf937 --- /dev/null +++ b/Documentation/devicetree/bindings/net/via-rhine.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | * VIA Rhine 10/100 Network Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "via,vt8500-rhine" for integrated | ||
| 5 | Rhine controllers found in VIA VT8500, WonderMedia WM8950 | ||
| 6 | and similar. These are listed as 1106:3106 rev. 0x84 on the | ||
| 7 | virtual PCI bus under vendor-provided kernels | ||
| 8 | - reg : Address and length of the io space | ||
| 9 | - interrupts : Should contain the controller interrupt line | ||
| 10 | |||
| 11 | Examples: | ||
| 12 | |||
| 13 | ethernet@d8004000 { | ||
| 14 | compatible = "via,vt8500-rhine"; | ||
| 15 | reg = <0xd8004000 0x100>; | ||
| 16 | interrupts = <10>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt new file mode 100644 index 000000000000..7443b7c76769 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "auo,b133xtn01" | ||
| 5 | |||
| 6 | This binding is compatible with the simple-panel binding, which is specified | ||
| 7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt new file mode 100644 index 000000000000..4903d7b1d947 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | Emerging Display Technology Corp. 5.7" VGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,et057090dhu" | ||
| 5 | |||
| 6 | This binding is compatible with the simple-panel binding, which is specified | ||
| 7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt new file mode 100644 index 000000000000..20cb38e836e4 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Emerging Display Technology Corp. ET070080DH6 7.0" WVGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,et070080dh6" | ||
| 5 | |||
| 6 | This panel is the same as ETM0700G0DH6 except for the touchscreen. | ||
| 7 | ET070080DH6 is the model with resistive touch. | ||
| 8 | |||
| 9 | This binding is compatible with the simple-panel binding, which is specified | ||
| 10 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt new file mode 100644 index 000000000000..ee4b18053e40 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Emerging Display Technology Corp. ETM0700G0DH6 7.0" WVGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,etm0700g0dh6" | ||
| 5 | |||
| 6 | This panel is the same as ET070080DH6 except for the touchscreen. | ||
| 7 | ETM0700G0DH6 is the model with capacitive multitouch. | ||
| 8 | |||
| 9 | This binding is compatible with the simple-panel binding, which is specified | ||
| 10 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt index d6fae13ff062..d0d15ee42834 100644 --- a/Documentation/devicetree/bindings/pci/designware-pcie.txt +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | * Synopsys Designware PCIe interface | 1 | * Synopsys Designware PCIe interface |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible: should contain "snps,dw-pcie" to identify the | 4 | - compatible: should contain "snps,dw-pcie" to identify the core. |
| 5 | core, plus an identifier for the specific instance, such | ||
| 6 | as "samsung,exynos5440-pcie" or "fsl,imx6q-pcie". | ||
| 7 | - reg: base addresses and lengths of the pcie controller, | ||
| 8 | the phy controller, additional register for the phy controller. | ||
| 9 | - interrupts: interrupt values for level interrupt, | ||
| 10 | pulse interrupt, special interrupt. | ||
| 11 | - clocks: from common clock binding: handle to pci clock. | ||
| 12 | - clock-names: from common clock binding: should be "pcie" and "pcie_bus". | ||
| 13 | - #address-cells: set to <3> | 5 | - #address-cells: set to <3> |
| 14 | - #size-cells: set to <2> | 6 | - #size-cells: set to <2> |
| 15 | - device_type: set to "pci" | 7 | - device_type: set to "pci" |
| @@ -19,65 +11,11 @@ Required properties: | |||
| 19 | to define the mapping of the PCIe interface to interrupt | 11 | to define the mapping of the PCIe interface to interrupt |
| 20 | numbers. | 12 | numbers. |
| 21 | - num-lanes: number of lanes to use | 13 | - num-lanes: number of lanes to use |
| 14 | - clocks: Must contain an entry for each entry in clock-names. | ||
| 15 | See ../clocks/clock-bindings.txt for details. | ||
| 16 | - clock-names: Must include the following entries: | ||
| 17 | - "pcie" | ||
| 18 | - "pcie_bus" | ||
| 22 | 19 | ||
| 23 | Optional properties: | 20 | Optional properties: |
| 24 | - reset-gpio: gpio pin number of power good signal | 21 | - reset-gpio: gpio pin number of power good signal |
| 25 | |||
| 26 | Optional properties for fsl,imx6q-pcie | ||
| 27 | - power-on-gpio: gpio pin number of power-enable signal | ||
| 28 | - wake-up-gpio: gpio pin number of incoming wakeup signal | ||
| 29 | - disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal | ||
| 30 | |||
| 31 | Example: | ||
| 32 | |||
| 33 | SoC specific DT Entry: | ||
| 34 | |||
| 35 | pcie@290000 { | ||
| 36 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 37 | reg = <0x290000 0x1000 | ||
| 38 | 0x270000 0x1000 | ||
| 39 | 0x271000 0x40>; | ||
| 40 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | ||
| 41 | clocks = <&clock 28>, <&clock 27>; | ||
| 42 | clock-names = "pcie", "pcie_bus"; | ||
| 43 | #address-cells = <3>; | ||
| 44 | #size-cells = <2>; | ||
| 45 | device_type = "pci"; | ||
| 46 | ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */ | ||
| 47 | 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */ | ||
| 48 | 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 49 | #interrupt-cells = <1>; | ||
| 50 | interrupt-map-mask = <0 0 0 0>; | ||
| 51 | interrupt-map = <0x0 0 &gic 53>; | ||
| 52 | num-lanes = <4>; | ||
| 53 | }; | ||
| 54 | |||
| 55 | pcie@2a0000 { | ||
| 56 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 57 | reg = <0x2a0000 0x1000 | ||
| 58 | 0x272000 0x1000 | ||
| 59 | 0x271040 0x40>; | ||
| 60 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | ||
| 61 | clocks = <&clock 29>, <&clock 27>; | ||
| 62 | clock-names = "pcie", "pcie_bus"; | ||
| 63 | #address-cells = <3>; | ||
| 64 | #size-cells = <2>; | ||
| 65 | device_type = "pci"; | ||
| 66 | ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */ | ||
| 67 | 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */ | ||
| 68 | 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 69 | #interrupt-cells = <1>; | ||
| 70 | interrupt-map-mask = <0 0 0 0>; | ||
| 71 | interrupt-map = <0x0 0 &gic 56>; | ||
| 72 | num-lanes = <4>; | ||
| 73 | }; | ||
| 74 | |||
| 75 | Board specific DT Entry: | ||
| 76 | |||
| 77 | pcie@290000 { | ||
| 78 | reset-gpio = <&pin_ctrl 5 0>; | ||
| 79 | }; | ||
| 80 | |||
| 81 | pcie@2a0000 { | ||
| 82 | reset-gpio = <&pin_ctrl 22 0>; | ||
| 83 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt new file mode 100644 index 000000000000..9455fd0ec830 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | * Freescale i.MX6 PCIe interface | ||
| 2 | |||
| 3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | ||
| 4 | and thus inherits all the common properties defined in designware-pcie.txt. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "fsl,imx6q-pcie" | ||
| 8 | - reg: base addresse and length of the pcie controller | ||
| 9 | - interrupts: A list of interrupt outputs of the controller. Must contain an | ||
| 10 | entry for each entry in the interrupt-names property. | ||
| 11 | - interrupt-names: Must include the following entries: | ||
| 12 | - "msi": The interrupt that is asserted when an MSI is received | ||
| 13 | - clock-names: Must include the following additional entries: | ||
| 14 | - "pcie_phy" | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | pcie@0x01000000 { | ||
| 19 | compatible = "fsl,imx6q-pcie", "snps,dw-pcie"; | ||
| 20 | reg = <0x01ffc000 0x4000>; | ||
| 21 | #address-cells = <3>; | ||
| 22 | #size-cells = <2>; | ||
| 23 | device_type = "pci"; | ||
| 24 | ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 | ||
| 25 | 0x81000000 0 0 0x01f80000 0 0x00010000 | ||
| 26 | 0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; | ||
| 27 | num-lanes = <1>; | ||
| 28 | interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; | ||
| 29 | interrupt-names = "msi"; | ||
| 30 | #interrupt-cells = <1>; | ||
| 31 | interrupt-map-mask = <0 0 0 0x7>; | ||
| 32 | interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, | ||
| 33 | <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, | ||
| 34 | <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, | ||
| 35 | <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; | ||
| 36 | clocks = <&clks 144>, <&clks 206>, <&clks 189>; | ||
| 37 | clock-names = "pcie", "pcie_bus", "pcie_phy"; | ||
| 38 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt new file mode 100644 index 000000000000..4f9d23d2ed67 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | * Samsung Exynos 5440 PCIe interface | ||
| 2 | |||
| 3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | ||
| 4 | and thus inherits all the common properties defined in designware-pcie.txt. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "samsung,exynos5440-pcie" | ||
| 8 | - reg: base addresses and lengths of the pcie controller, | ||
| 9 | the phy controller, additional register for the phy controller. | ||
| 10 | - interrupts: A list of interrupt outputs for level interrupt, | ||
| 11 | pulse interrupt, special interrupt. | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | SoC specific DT Entry: | ||
| 16 | |||
| 17 | pcie@290000 { | ||
| 18 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 19 | reg = <0x290000 0x1000 | ||
| 20 | 0x270000 0x1000 | ||
| 21 | 0x271000 0x40>; | ||
| 22 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | ||
| 23 | clocks = <&clock 28>, <&clock 27>; | ||
| 24 | clock-names = "pcie", "pcie_bus"; | ||
| 25 | #address-cells = <3>; | ||
| 26 | #size-cells = <2>; | ||
| 27 | device_type = "pci"; | ||
| 28 | ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */ | ||
| 29 | 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */ | ||
| 30 | 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 31 | #interrupt-cells = <1>; | ||
| 32 | interrupt-map-mask = <0 0 0 0>; | ||
| 33 | interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; | ||
| 34 | num-lanes = <4>; | ||
| 35 | }; | ||
| 36 | |||
| 37 | pcie@2a0000 { | ||
| 38 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 39 | reg = <0x2a0000 0x1000 | ||
| 40 | 0x272000 0x1000 | ||
| 41 | 0x271040 0x40>; | ||
| 42 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | ||
| 43 | clocks = <&clock 29>, <&clock 27>; | ||
| 44 | clock-names = "pcie", "pcie_bus"; | ||
| 45 | #address-cells = <3>; | ||
| 46 | #size-cells = <2>; | ||
| 47 | device_type = "pci"; | ||
| 48 | ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */ | ||
| 49 | 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */ | ||
| 50 | 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 51 | #interrupt-cells = <1>; | ||
| 52 | interrupt-map-mask = <0 0 0 0>; | ||
| 53 | interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; | ||
| 54 | num-lanes = <4>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | Board specific DT Entry: | ||
| 58 | |||
| 59 | pcie@290000 { | ||
| 60 | reset-gpio = <&pin_ctrl 5 0>; | ||
| 61 | }; | ||
| 62 | |||
| 63 | pcie@2a0000 { | ||
| 64 | reset-gpio = <&pin_ctrl 22 0>; | ||
| 65 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt new file mode 100644 index 000000000000..db939210e29d --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | |||
| 2 | IBM Akebono board device tree | ||
| 3 | ============================= | ||
| 4 | |||
| 5 | The IBM Akebono board is a development board for the PPC476GTR SoC. | ||
| 6 | |||
| 7 | 0) The root node | ||
| 8 | |||
| 9 | Required properties: | ||
| 10 | |||
| 11 | - model : "ibm,akebono". | ||
| 12 | - compatible : "ibm,akebono" , "ibm,476gtr". | ||
| 13 | |||
| 14 | 1.a) The Secure Digital Host Controller Interface (SDHCI) node | ||
| 15 | |||
| 16 | Represent the Secure Digital Host Controller Interfaces. | ||
| 17 | |||
| 18 | Required properties: | ||
| 19 | |||
| 20 | - compatible : should be "ibm,476gtr-sdhci","generic-sdhci". | ||
| 21 | - reg : should contain the SDHCI registers location and length. | ||
| 22 | - interrupt-parent : a phandle for the interrupt controller. | ||
| 23 | - interrupts : should contain the SDHCI interrupt. | ||
| 24 | |||
| 25 | 1.b) The Advanced Host Controller Interface (AHCI) SATA node | ||
| 26 | |||
| 27 | Represents the advanced host controller SATA interface. | ||
| 28 | |||
| 29 | Required properties: | ||
| 30 | |||
| 31 | - compatible : should be "ibm,476gtr-ahci". | ||
| 32 | - reg : should contain the AHCI registers location and length. | ||
| 33 | - interrupt-parent : a phandle for the interrupt controller. | ||
| 34 | - interrupts : should contain the AHCI interrupt. | ||
| 35 | |||
| 36 | 1.c) The FPGA node | ||
| 37 | |||
| 38 | The Akebono board stores some board information such as the revision | ||
| 39 | number in an FPGA which is represented by this node. | ||
| 40 | |||
| 41 | Required properties: | ||
| 42 | |||
| 43 | - compatible : should be "ibm,akebono-fpga". | ||
| 44 | - reg : should contain the FPGA registers location and length. | ||
| 45 | |||
| 46 | 1.d) The AVR node | ||
| 47 | |||
| 48 | The Akebono board has an Atmel AVR microprocessor attached to the I2C | ||
| 49 | bus as a power controller for the board. | ||
| 50 | |||
| 51 | Required properties: | ||
| 52 | |||
| 53 | - compatible : should be "ibm,akebono-avr". | ||
| 54 | - reg : should contain the I2C bus address for the AVR. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt new file mode 100644 index 000000000000..c737c8338705 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | |||
| 2 | ppc476gtr High Speed Serial Assist (HSTA) node | ||
| 3 | ============================================== | ||
| 4 | |||
| 5 | The 476gtr SoC contains a high speed serial assist module attached | ||
| 6 | between the plb4 and plb6 system buses to provide high speed data | ||
| 7 | transfer between memory and system peripherals as well as support for | ||
| 8 | PCI message signalled interrupts. | ||
| 9 | |||
| 10 | Currently only the MSI support is used by Linux using the following | ||
| 11 | device tree entries: | ||
| 12 | |||
| 13 | Require properties: | ||
| 14 | - compatible : "ibm,476gtr-hsta-msi", "ibm,hsta-msi" | ||
| 15 | - reg : register mapping for the HSTA MSI space | ||
| 16 | - interrupt-parent : parent controller for mapping interrupts | ||
| 17 | - interrupts : ordered interrupt mapping for each MSI in the register | ||
| 18 | space. The first interrupt should be associated with a | ||
| 19 | register offset of 0x00, the second to 0x10, etc. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt index 380914e965e0..700dec4774fa 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt | |||
| @@ -67,3 +67,20 @@ Example: | |||
| 67 | gpio-controller; | 67 | gpio-controller; |
| 68 | }; | 68 | }; |
| 69 | }; | 69 | }; |
| 70 | |||
| 71 | * Freescale on-board FPGA connected on I2C bus | ||
| 72 | |||
| 73 | Some Freescale boards like BSC9132QDS have on board FPGA connected on | ||
| 74 | the i2c bus. | ||
| 75 | |||
| 76 | Required properties: | ||
| 77 | - compatible: Should be a board-specific string followed by a string | ||
| 78 | indicating the type of FPGA. Example: | ||
| 79 | "fsl,<board>-fpga", "fsl,fpga-qixis-i2c" | ||
| 80 | - reg: Should contain the address of the FPGA | ||
| 81 | |||
| 82 | Example: | ||
| 83 | fpga: fpga@66 { | ||
| 84 | compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c"; | ||
| 85 | reg = <0x66>; | ||
| 86 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt new file mode 100644 index 000000000000..454da7e08acd --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding | ||
| 2 | |||
| 3 | DESCRIPTION | ||
| 4 | |||
| 5 | The CoreNet coherency fabric is a fabric-oriented, connectivity infrastructure | ||
| 6 | that enables the implementation of coherent, multicore systems. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | |||
| 10 | - compatible: <string list> | ||
| 11 | fsl,corenet1-cf - CoreNet coherency fabric version 1. | ||
| 12 | Example chips: T4240, B4860 | ||
| 13 | |||
| 14 | fsl,corenet2-cf - CoreNet coherency fabric version 2. | ||
| 15 | Example chips: P5040, P5020, P4080, P3041, P2041 | ||
| 16 | |||
| 17 | fsl,corenet-cf - Used to represent the common registers | ||
| 18 | between CCF version 1 and CCF version 2. This compatible | ||
| 19 | is retained for compatibility reasons, as it was already | ||
| 20 | used for both CCF version 1 chips and CCF version 2 | ||
| 21 | chips. It should be specified after either | ||
| 22 | "fsl,corenet1-cf" or "fsl,corenet2-cf". | ||
| 23 | |||
| 24 | - reg: <prop-encoded-array> | ||
| 25 | A standard property. Represents the CCF registers. | ||
| 26 | |||
| 27 | - interrupts: <prop-encoded-array> | ||
| 28 | Interrupt mapping for CCF error interrupt. | ||
| 29 | |||
| 30 | - fsl,ccf-num-csdids: <u32> | ||
| 31 | Specifies the number of Coherency Subdomain ID Port Mapping | ||
| 32 | Registers that are supported by the CCF. | ||
| 33 | |||
| 34 | - fsl,ccf-num-snoopids: <u32> | ||
| 35 | Specifies the number of Snoop ID Port Mapping Registers that | ||
| 36 | are supported by CCF. | ||
| 37 | |||
| 38 | Example: | ||
| 39 | |||
| 40 | corenet-cf@18000 { | ||
| 41 | compatible = "fsl,corenet2-cf", "fsl,corenet-cf"; | ||
| 42 | reg = <0x18000 0x1000>; | ||
| 43 | interrupts = <16 2 1 31>; | ||
| 44 | fsl,ccf-num-csdids = <32>; | ||
| 45 | fsl,ccf-num-snoopids = <32>; | ||
| 46 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt index 922c30ad90d1..f8cd2397aa04 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt | |||
| @@ -20,3 +20,14 @@ PROPERTIES | |||
| 20 | a property named fsl,eref-[CAT], where [CAT] is the abbreviated category | 20 | a property named fsl,eref-[CAT], where [CAT] is the abbreviated category |
| 21 | name with all uppercase letters converted to lowercase, indicates that | 21 | name with all uppercase letters converted to lowercase, indicates that |
| 22 | the category is supported by the implementation. | 22 | the category is supported by the implementation. |
| 23 | |||
| 24 | - fsl,portid-mapping | ||
| 25 | Usage: optional | ||
| 26 | Value type: <u32> | ||
| 27 | Definition: The Coherency Subdomain ID Port Mapping Registers and | ||
| 28 | Snoop ID Port Mapping registers, which are part of the CoreNet | ||
| 29 | Coherency fabric (CCF), provide a CoreNet Coherency Subdomain | ||
| 30 | ID/CoreNet Snoop ID to cpu mapping functions. Certain bits from | ||
| 31 | these registers should be set if the coresponding CPU should be | ||
| 32 | snooped. This property defines a bitmask which selects the bit | ||
| 33 | that should be set if this cpu should be snooped. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt index 1f5e329f756c..c2b2899885f2 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt | |||
| @@ -34,6 +34,15 @@ Optional properties: | |||
| 34 | for legacy drivers. | 34 | for legacy drivers. |
| 35 | - interrupt-parent : <phandle> | 35 | - interrupt-parent : <phandle> |
| 36 | Phandle to interrupt controller | 36 | Phandle to interrupt controller |
| 37 | - fsl,portid-mapping : <u32> | ||
| 38 | The Coherency Subdomain ID Port Mapping Registers and | ||
| 39 | Snoop ID Port Mapping registers, which are part of the | ||
| 40 | CoreNet Coherency fabric (CCF), provide a CoreNet | ||
| 41 | Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping | ||
| 42 | functions. Certain bits from these registers should be | ||
| 43 | set if PAMUs should be snooped. This property defines | ||
| 44 | a bitmask which selects the bits that should be set if | ||
| 45 | PAMUs should be snooped. | ||
| 37 | 46 | ||
| 38 | Child nodes: | 47 | Child nodes: |
| 39 | 48 | ||
| @@ -88,6 +97,7 @@ Example: | |||
| 88 | compatible = "fsl,pamu-v1.0", "fsl,pamu"; | 97 | compatible = "fsl,pamu-v1.0", "fsl,pamu"; |
| 89 | reg = <0x20000 0x5000>; | 98 | reg = <0x20000 0x5000>; |
| 90 | ranges = <0 0x20000 0x5000>; | 99 | ranges = <0 0x20000 0x5000>; |
| 100 | fsl,portid-mapping = <0xf80000>; | ||
| 91 | #address-cells = <1>; | 101 | #address-cells = <1>; |
| 92 | #size-cells = <1>; | 102 | #size-cells = <1>; |
| 93 | interrupts = < | 103 | interrupts = < |
diff --git a/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt new file mode 100644 index 000000000000..8eae9fe7841c --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Broadcom Kona PWM controller device tree bindings | ||
| 2 | |||
| 3 | This controller has 6 channels. | ||
| 4 | |||
| 5 | Required Properties : | ||
| 6 | - compatible: should contain "brcm,kona-pwm" | ||
| 7 | - reg: physical base address and length of the controller's registers | ||
| 8 | - clocks: phandle + clock specifier pair for the external clock | ||
| 9 | - #pwm-cells: Should be 3. See pwm.txt in this directory for a | ||
| 10 | description of the cells format. | ||
| 11 | |||
| 12 | Refer to clocks/clock-bindings.txt for generic clock consumer properties. | ||
| 13 | |||
| 14 | Example: | ||
| 15 | |||
| 16 | pwm: pwm@3e01a000 { | ||
| 17 | compatible = "brcm,bcm11351-pwm", "brcm,kona-pwm"; | ||
| 18 | reg = <0x3e01a000 0xc4>; | ||
| 19 | clocks = <&pwm_clk>; | ||
| 20 | #pwm-cells = <3>; | ||
| 21 | }; | ||
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt index fff93d5f92de..4cf024929a3f 100644 --- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt | |||
| @@ -1,11 +1,21 @@ | |||
| 1 | * Marvell Armada 370/XP thermal management | 1 | * Marvell Armada 370/375/380/XP thermal management |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | 4 | ||
| 5 | - compatible: Should be set to one of the following: | 5 | - compatible: Should be set to one of the following: |
| 6 | marvell,armada370-thermal | 6 | marvell,armada370-thermal |
| 7 | marvell,armada375-thermal | ||
| 8 | marvell,armada375-z1-thermal | ||
| 9 | marvell,armada380-thermal | ||
| 7 | marvell,armadaxp-thermal | 10 | marvell,armadaxp-thermal |
| 8 | 11 | ||
| 12 | Note: As the name suggests, "marvell,armada375-z1-thermal" | ||
| 13 | applies for the SoC Z1 stepping only. On such stepping | ||
| 14 | some quirks need to be done and the register offset differs | ||
| 15 | from the one in the A0 stepping. | ||
| 16 | The operating system may auto-detect the SoC stepping and | ||
| 17 | update the compatible and register offsets at runtime. | ||
| 18 | |||
| 9 | - reg: Device's register space. | 19 | - reg: Device's register space. |
| 10 | Two entries are expected, see the examples below. | 20 | Two entries are expected, see the examples below. |
| 11 | The first one is required for the sensor register; | 21 | The first one is required for the sensor register; |
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt index 284f5300fd8b..c94909215c07 100644 --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt | |||
| @@ -6,16 +6,35 @@ | |||
| 6 | "samsung,exynos4412-tmu" | 6 | "samsung,exynos4412-tmu" |
| 7 | "samsung,exynos4210-tmu" | 7 | "samsung,exynos4210-tmu" |
| 8 | "samsung,exynos5250-tmu" | 8 | "samsung,exynos5250-tmu" |
| 9 | "samsung,exynos5260-tmu" | ||
| 10 | "samsung,exynos5420-tmu" for TMU channel 0, 1 on Exynos5420 | ||
| 11 | "samsung,exynos5420-tmu-ext-triminfo" for TMU channels 2, 3 and 4 | ||
| 12 | Exynos5420 (Must pass triminfo base and triminfo clock) | ||
| 9 | "samsung,exynos5440-tmu" | 13 | "samsung,exynos5440-tmu" |
| 10 | - interrupt-parent : The phandle for the interrupt controller | 14 | - interrupt-parent : The phandle for the interrupt controller |
| 11 | - reg : Address range of the thermal registers. For soc's which has multiple | 15 | - reg : Address range of the thermal registers. For soc's which has multiple |
| 12 | instances of TMU and some registers are shared across all TMU's like | 16 | instances of TMU and some registers are shared across all TMU's like |
| 13 | interrupt related then 2 set of register has to supplied. First set | 17 | interrupt related then 2 set of register has to supplied. First set |
| 14 | belongs to each instance of TMU and second set belongs to common TMU | 18 | belongs to register set of TMU instance and second set belongs to |
| 15 | registers. | 19 | registers shared with the TMU instance. |
| 20 | |||
| 21 | NOTE: On Exynos5420, the TRIMINFO register is misplaced for TMU | ||
| 22 | channels 2, 3 and 4 | ||
| 23 | Use "samsung,exynos5420-tmu-ext-triminfo" in cases, there is a misplaced | ||
| 24 | register, also provide clock to access that base. | ||
| 25 | |||
| 26 | TRIMINFO at 0x1006c000 contains data for TMU channel 3 | ||
| 27 | TRIMINFO at 0x100a0000 contains data for TMU channel 4 | ||
| 28 | TRIMINFO at 0x10068000 contains data for TMU channel 2 | ||
| 29 | |||
| 16 | - interrupts : Should contain interrupt for thermal system | 30 | - interrupts : Should contain interrupt for thermal system |
| 17 | - clocks : The main clock for TMU device | 31 | - clocks : The main clocks for TMU device |
| 32 | -- 1. operational clock for TMU channel | ||
| 33 | -- 2. optional clock to access the shared registers of TMU channel | ||
| 18 | - clock-names : Thermal system clock name | 34 | - clock-names : Thermal system clock name |
| 35 | -- "tmu_apbif" operational clock for current TMU channel | ||
| 36 | -- "tmu_triminfo_apbif" clock to access the shared triminfo register | ||
| 37 | for current TMU channel | ||
| 19 | - vtmu-supply: This entry is optional and provides the regulator node supplying | 38 | - vtmu-supply: This entry is optional and provides the regulator node supplying |
| 20 | voltage to TMU. If needed this entry can be placed inside | 39 | voltage to TMU. If needed this entry can be placed inside |
| 21 | board/platform specific dts file. | 40 | board/platform specific dts file. |
| @@ -43,6 +62,31 @@ Example 2): | |||
| 43 | clock-names = "tmu_apbif"; | 62 | clock-names = "tmu_apbif"; |
| 44 | }; | 63 | }; |
| 45 | 64 | ||
| 65 | Example 3): (In case of Exynos5420 "with misplaced TRIMINFO register") | ||
| 66 | tmu_cpu2: tmu@10068000 { | ||
| 67 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 68 | reg = <0x10068000 0x100>, <0x1006c000 0x4>; | ||
| 69 | interrupts = <0 184 0>; | ||
| 70 | clocks = <&clock 318>, <&clock 318>; | ||
| 71 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 72 | }; | ||
| 73 | |||
| 74 | tmu_cpu3: tmu@1006c000 { | ||
| 75 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 76 | reg = <0x1006c000 0x100>, <0x100a0000 0x4>; | ||
| 77 | interrupts = <0 185 0>; | ||
| 78 | clocks = <&clock 318>, <&clock 319>; | ||
| 79 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 80 | }; | ||
| 81 | |||
| 82 | tmu_gpu: tmu@100a0000 { | ||
| 83 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 84 | reg = <0x100a0000 0x100>, <0x10068000 0x4>; | ||
| 85 | interrupts = <0 215 0>; | ||
| 86 | clocks = <&clock 319>, <&clock 318>; | ||
| 87 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 88 | }; | ||
| 89 | |||
| 46 | Note: For multi-instance tmu each instance should have an alias correctly | 90 | Note: For multi-instance tmu each instance should have an alias correctly |
| 47 | numbered in "aliases" node. | 91 | numbered in "aliases" node. |
| 48 | 92 | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 5261271046ce..4d7f3758d1b4 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
| @@ -142,3 +142,4 @@ wm Wondermedia Technologies, Inc. | |||
| 142 | xes Extreme Engineering Solutions (X-ES) | 142 | xes Extreme Engineering Solutions (X-ES) |
| 143 | xlnx Xilinx | 143 | xlnx Xilinx |
| 144 | zyxel ZyXEL Communications Corp. | 144 | zyxel ZyXEL Communications Corp. |
| 145 | zarlink Zarlink Semiconductor | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index 57ccdde02c3a..53dbccfa80ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
| @@ -62,6 +62,10 @@ Optional properties for dp-controller: | |||
| 62 | -hsync-active-high: | 62 | -hsync-active-high: |
| 63 | HSYNC polarity configuration. | 63 | HSYNC polarity configuration. |
| 64 | High if defined, Low if not defined | 64 | High if defined, Low if not defined |
| 65 | -samsung,hpd-gpio: | ||
| 66 | Hotplug detect GPIO. | ||
| 67 | Indicates which GPIO should be used for hotplug | ||
| 68 | detection | ||
| 65 | 69 | ||
| 66 | Example: | 70 | Example: |
| 67 | 71 | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index f9187a259259..1fd8cf9cbfac 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt | |||
| @@ -5,6 +5,7 @@ Required properties: | |||
| 5 | 1) "samsung,exynos5-hdmi" <DEPRECATED> | 5 | 1) "samsung,exynos5-hdmi" <DEPRECATED> |
| 6 | 2) "samsung,exynos4210-hdmi" | 6 | 2) "samsung,exynos4210-hdmi" |
| 7 | 3) "samsung,exynos4212-hdmi" | 7 | 3) "samsung,exynos4212-hdmi" |
| 8 | 4) "samsung,exynos5420-hdmi" | ||
| 8 | - reg: physical base address of the hdmi and length of memory mapped | 9 | - reg: physical base address of the hdmi and length of memory mapped |
| 9 | region. | 10 | region. |
| 10 | - interrupts: interrupt number to the cpu. | 11 | - interrupts: interrupt number to the cpu. |
| @@ -27,6 +28,7 @@ Required properties: | |||
| 27 | "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". | 28 | "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". |
| 28 | - ddc: phandle to the hdmi ddc node | 29 | - ddc: phandle to the hdmi ddc node |
| 29 | - phy: phandle to the hdmi phy node | 30 | - phy: phandle to the hdmi phy node |
| 31 | - samsung,syscon-phandle: phandle for system controller node for PMU. | ||
| 30 | 32 | ||
| 31 | Example: | 33 | Example: |
| 32 | 34 | ||
| @@ -37,4 +39,5 @@ Example: | |||
| 37 | hpd-gpio = <&gpx3 7 1>; | 39 | hpd-gpio = <&gpx3 7 1>; |
| 38 | ddc = <&hdmi_ddc_node>; | 40 | ddc = <&hdmi_ddc_node>; |
| 39 | phy = <&hdmi_phy_node>; | 41 | phy = <&hdmi_phy_node>; |
| 42 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
| 40 | }; | 43 | }; |
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt index de11eb4c121f..97223fddb7bd 100644 --- a/Documentation/devicetree/bindings/watchdog/marvel.txt +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt | |||
| @@ -5,11 +5,18 @@ Required Properties: | |||
| 5 | - Compatibility : "marvell,orion-wdt" | 5 | - Compatibility : "marvell,orion-wdt" |
| 6 | "marvell,armada-370-wdt" | 6 | "marvell,armada-370-wdt" |
| 7 | "marvell,armada-xp-wdt" | 7 | "marvell,armada-xp-wdt" |
| 8 | "marvell,armada-375-wdt" | ||
| 9 | "marvell,armada-380-wdt" | ||
| 8 | 10 | ||
| 9 | - reg : Should contain two entries: first one with the | 11 | - reg : Should contain two entries: first one with the |
| 10 | timer control address, second one with the | 12 | timer control address, second one with the |
| 11 | rstout enable address. | 13 | rstout enable address. |
| 12 | 14 | ||
| 15 | For "marvell,armada-375-wdt" and "marvell,armada-380-wdt": | ||
| 16 | |||
| 17 | - reg : A third entry is mandatory and should contain the | ||
| 18 | shared mask/unmask RSTOUT address. | ||
| 19 | |||
| 13 | Optional properties: | 20 | Optional properties: |
| 14 | 21 | ||
| 15 | - interrupts : Contains the IRQ for watchdog expiration | 22 | - interrupts : Contains the IRQ for watchdog expiration |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 89472558011e..1525e30483fd 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
| @@ -318,3 +318,8 @@ GPIO | |||
| 318 | devm_gpiod_get_optional() | 318 | devm_gpiod_get_optional() |
| 319 | devm_gpiod_get_index_optional() | 319 | devm_gpiod_get_index_optional() |
| 320 | devm_gpiod_put() | 320 | devm_gpiod_put() |
| 321 | |||
| 322 | MDIO | ||
| 323 | devm_mdiobus_alloc() | ||
| 324 | devm_mdiobus_alloc_size() | ||
| 325 | devm_mdiobus_free() | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index eba790134253..b18dd1779029 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
| @@ -196,8 +196,7 @@ prototypes: | |||
| 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
| 197 | int (*releasepage) (struct page *, int); | 197 | int (*releasepage) (struct page *, int); |
| 198 | void (*freepage)(struct page *); | 198 | void (*freepage)(struct page *); |
| 199 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 199 | int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); |
| 200 | loff_t offset, unsigned long nr_segs); | ||
| 201 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, | 200 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, |
| 202 | unsigned long *); | 201 | unsigned long *); |
| 203 | int (*migratepage)(struct address_space *, struct page *, struct page *); | 202 | int (*migratepage)(struct address_space *, struct page *, struct page *); |
| @@ -431,6 +430,8 @@ prototypes: | |||
| 431 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 430 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
| 432 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 431 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 433 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 432 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 433 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | ||
| 434 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | ||
| 434 | int (*iterate) (struct file *, struct dir_context *); | 435 | int (*iterate) (struct file *, struct dir_context *); |
| 435 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 436 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
| 436 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 437 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 25311e113e75..51afba17bbae 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
| @@ -461,11 +461,11 @@ The number of blocks and buckets are determined by, | |||
| 461 | # of blocks in level #n = | | 461 | # of blocks in level #n = | |
| 462 | `- 4, Otherwise | 462 | `- 4, Otherwise |
| 463 | 463 | ||
| 464 | ,- 2^ (n + dir_level), | 464 | ,- 2^(n + dir_level), |
| 465 | | if n < MAX_DIR_HASH_DEPTH / 2, | 465 | | if n + dir_level < MAX_DIR_HASH_DEPTH / 2, |
| 466 | # of buckets in level #n = | | 466 | # of buckets in level #n = | |
| 467 | `- 2^((MAX_DIR_HASH_DEPTH / 2 + dir_level) - 1), | 467 | `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), |
| 468 | Otherwise | 468 | Otherwise |
| 469 | 469 | ||
| 470 | When F2FS finds a file name in a directory, at first a hash value of the file | 470 | When F2FS finds a file name in a directory, at first a hash value of the file |
| 471 | name is calculated. Then, F2FS scans the hash table in level #0 to find the | 471 | name is calculated. Then, F2FS scans the hash table in level #0 to find the |
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt index b930ad087780..c49cd7e796e7 100644 --- a/Documentation/filesystems/nfs/nfs41-server.txt +++ b/Documentation/filesystems/nfs/nfs41-server.txt | |||
| @@ -176,7 +176,5 @@ Nonstandard compound limitations: | |||
| 176 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may | 176 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may |
| 177 | fail to live up to the promise we made in CREATE_SESSION fore channel | 177 | fail to live up to the promise we made in CREATE_SESSION fore channel |
| 178 | negotiation. | 178 | negotiation. |
| 179 | * No more than one read-like operation allowed per compound; encoding | ||
| 180 | replies that cross page boundaries (except for read data) not handled. | ||
| 181 | 179 | ||
| 182 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. | 180 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 617f6d70c077..a1d0d7a30165 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
| @@ -589,8 +589,7 @@ struct address_space_operations { | |||
| 589 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 589 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
| 590 | int (*releasepage) (struct page *, int); | 590 | int (*releasepage) (struct page *, int); |
| 591 | void (*freepage)(struct page *); | 591 | void (*freepage)(struct page *); |
| 592 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 592 | ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); |
| 593 | loff_t offset, unsigned long nr_segs); | ||
| 594 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 593 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
| 595 | int); | 594 | int); |
| 596 | /* migrate the contents of a page to the specified target */ | 595 | /* migrate the contents of a page to the specified target */ |
| @@ -807,6 +806,8 @@ struct file_operations { | |||
| 807 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 806 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
| 808 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 807 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 809 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 808 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 809 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | ||
| 810 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | ||
| 810 | int (*iterate) (struct file *, struct dir_context *); | 811 | int (*iterate) (struct file *, struct dir_context *); |
| 811 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 812 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
| 812 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 813 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
| @@ -837,11 +838,15 @@ otherwise noted. | |||
| 837 | 838 | ||
| 838 | read: called by read(2) and related system calls | 839 | read: called by read(2) and related system calls |
| 839 | 840 | ||
| 840 | aio_read: called by io_submit(2) and other asynchronous I/O operations | 841 | aio_read: vectored, possibly asynchronous read |
| 842 | |||
| 843 | read_iter: possibly asynchronous read with iov_iter as destination | ||
| 841 | 844 | ||
| 842 | write: called by write(2) and related system calls | 845 | write: called by write(2) and related system calls |
| 843 | 846 | ||
| 844 | aio_write: called by io_submit(2) and other asynchronous I/O operations | 847 | aio_write: vectored, possibly asynchronous write |
| 848 | |||
| 849 | write_iter: possibly asynchronous write with iov_iter as source | ||
| 845 | 850 | ||
| 846 | iterate: called when the VFS needs to read the directory contents | 851 | iterate: called when the VFS needs to read the directory contents |
| 847 | 852 | ||
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1 new file mode 100644 index 000000000000..6b1e05458f0f --- /dev/null +++ b/Documentation/hwmon/shtc1 | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | Kernel driver shtc1 | ||
| 2 | =================== | ||
| 3 | |||
| 4 | Supported chips: | ||
| 5 | * Sensirion SHTC1 | ||
| 6 | Prefix: 'shtc1' | ||
| 7 | Addresses scanned: none | ||
| 8 | Datasheet: http://www.sensirion.com/file/datasheet_shtc1 | ||
| 9 | |||
| 10 | * Sensirion SHTW1 | ||
| 11 | Prefix: 'shtw1' | ||
| 12 | Addresses scanned: none | ||
| 13 | Datasheet: Not publicly available | ||
| 14 | |||
| 15 | Author: | ||
| 16 | Johannes Winkelmann <johannes.winkelmann@sensirion.com> | ||
| 17 | |||
| 18 | Description | ||
| 19 | ----------- | ||
| 20 | |||
| 21 | This driver implements support for the Sensirion SHTC1 chip, a humidity and | ||
| 22 | temperature sensor. Temperature is measured in degrees celsius, relative | ||
| 23 | humidity is expressed as a percentage. Driver can be used as well for SHTW1 | ||
| 24 | chip, which has the same electrical interface. | ||
| 25 | |||
| 26 | The device communicates with the I2C protocol. All sensors are set to I2C | ||
| 27 | address 0x70. See Documentation/i2c/instantiating-devices for methods to | ||
| 28 | instantiate the device. | ||
| 29 | |||
| 30 | There are two options configurable by means of shtc1_platform_data: | ||
| 31 | 1. blocking (pull the I2C clock line down while performing the measurement) or | ||
| 32 | non-blocking mode. Blocking mode will guarantee the fastest result but | ||
| 33 | the I2C bus will be busy during that time. By default, non-blocking mode | ||
| 34 | is used. Make sure clock-stretching works properly on your device if you | ||
| 35 | want to use blocking mode. | ||
| 36 | 2. high or low accuracy. High accuracy is used by default and using it is | ||
| 37 | strongly recommended. | ||
| 38 | |||
| 39 | sysfs-Interface | ||
| 40 | --------------- | ||
| 41 | |||
| 42 | temp1_input - temperature input | ||
| 43 | humidity1_input - humidity input | ||
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 69372fb98cf8..3fb39e0116b4 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
| @@ -470,7 +470,7 @@ build. | |||
| 470 | 470 | ||
| 471 | Sometimes, an external module uses exported symbols from | 471 | Sometimes, an external module uses exported symbols from |
| 472 | another external module. kbuild needs to have full knowledge of | 472 | another external module. kbuild needs to have full knowledge of |
| 473 | all symbols to avoid spliitting out warnings about undefined | 473 | all symbols to avoid spitting out warnings about undefined |
| 474 | symbols. Three solutions exist for this situation. | 474 | symbols. Three solutions exist for this situation. |
| 475 | 475 | ||
| 476 | NOTE: The method with a top-level kbuild file is recommended | 476 | NOTE: The method with a top-level kbuild file is recommended |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b9f67781c577..6eaa9cdb7094 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -1,27 +1,37 @@ | |||
| 1 | Kernel Parameters | 1 | Kernel Parameters |
| 2 | ~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~ |
| 3 | 3 | ||
| 4 | The following is a consolidated list of the kernel parameters as implemented | 4 | The following is a consolidated list of the kernel parameters as |
| 5 | (mostly) by the __setup() macro and sorted into English Dictionary order | 5 | implemented by the __setup(), core_param() and module_param() macros |
| 6 | (defined as ignoring all punctuation and sorting digits before letters in a | 6 | and sorted into English Dictionary order (defined as ignoring all |
| 7 | case insensitive manner), and with descriptions where known. | 7 | punctuation and sorting digits before letters in a case insensitive |
| 8 | 8 | manner), and with descriptions where known. | |
| 9 | Module parameters for loadable modules are specified only as the | 9 | |
| 10 | parameter name with optional '=' and value as appropriate, such as: | 10 | The kernel parses parameters from the kernel command line up to "--"; |
| 11 | 11 | if it doesn't recognize a parameter and it doesn't contain a '.', the | |
| 12 | modprobe usbcore blinkenlights=1 | 12 | parameter gets passed to init: parameters with '=' go into init's |
| 13 | 13 | environment, others are passed as command line arguments to init. | |
| 14 | Module parameters for modules that are built into the kernel image | 14 | Everything after "--" is passed as an argument to init. |
| 15 | are specified on the kernel command line with the module name plus | 15 | |
| 16 | '.' plus parameter name, with '=' and value if appropriate, such as: | 16 | Module parameters can be specified in two ways: via the kernel command |
| 17 | 17 | line with a module name prefix, or via modprobe, e.g.: | |
| 18 | usbcore.blinkenlights=1 | 18 | |
| 19 | (kernel command line) usbcore.blinkenlights=1 | ||
| 20 | (modprobe command line) modprobe usbcore blinkenlights=1 | ||
| 21 | |||
| 22 | Parameters for modules which are built into the kernel need to be | ||
| 23 | specified on the kernel command line. modprobe looks through the | ||
| 24 | kernel command line (/proc/cmdline) and collects module parameters | ||
| 25 | when it loads a module, so the kernel command line can be used for | ||
| 26 | loadable modules too. | ||
| 19 | 27 | ||
| 20 | Hyphens (dashes) and underscores are equivalent in parameter names, so | 28 | Hyphens (dashes) and underscores are equivalent in parameter names, so |
| 21 | log_buf_len=1M print-fatal-signals=1 | 29 | log_buf_len=1M print-fatal-signals=1 |
| 22 | can also be entered as | 30 | can also be entered as |
| 23 | log-buf-len=1M print_fatal_signals=1 | 31 | log-buf-len=1M print_fatal_signals=1 |
| 24 | 32 | ||
| 33 | Double-quotes can be used to protect spaces in values, e.g.: | ||
| 34 | param="spaces in here" | ||
| 25 | 35 | ||
| 26 | This document may not be entirely up to date and comprehensive. The command | 36 | This document may not be entirely up to date and comprehensive. The command |
| 27 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable | 37 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 0cfb00fd86ff..4bbeca8483ed 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
| @@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface | |||
| 22 | 22 | ||
| 23 | Kprobes enables you to dynamically break into any kernel routine and | 23 | Kprobes enables you to dynamically break into any kernel routine and |
| 24 | collect debugging and performance information non-disruptively. You | 24 | collect debugging and performance information non-disruptively. You |
| 25 | can trap at almost any kernel code address, specifying a handler | 25 | can trap at almost any kernel code address(*), specifying a handler |
| 26 | routine to be invoked when the breakpoint is hit. | 26 | routine to be invoked when the breakpoint is hit. |
| 27 | (*: some parts of the kernel code can not be trapped, see 1.5 Blacklist) | ||
| 27 | 28 | ||
| 28 | There are currently three types of probes: kprobes, jprobes, and | 29 | There are currently three types of probes: kprobes, jprobes, and |
| 29 | kretprobes (also called return probes). A kprobe can be inserted | 30 | kretprobes (also called return probes). A kprobe can be inserted |
| @@ -273,6 +274,19 @@ using one of the following techniques: | |||
| 273 | or | 274 | or |
| 274 | - Execute 'sysctl -w debug.kprobes_optimization=n' | 275 | - Execute 'sysctl -w debug.kprobes_optimization=n' |
| 275 | 276 | ||
| 277 | 1.5 Blacklist | ||
| 278 | |||
| 279 | Kprobes can probe most of the kernel except itself. This means | ||
| 280 | that there are some functions where kprobes cannot probe. Probing | ||
| 281 | (trapping) such functions can cause a recursive trap (e.g. double | ||
| 282 | fault) or the nested probe handler may never be called. | ||
| 283 | Kprobes manages such functions as a blacklist. | ||
| 284 | If you want to add a function into the blacklist, you just need | ||
| 285 | to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro | ||
| 286 | to specify a blacklisted function. | ||
| 287 | Kprobes checks the given probe address against the blacklist and | ||
| 288 | rejects registering it, if the given address is in the blacklist. | ||
| 289 | |||
| 276 | 2. Architectures Supported | 290 | 2. Architectures Supported |
| 277 | 291 | ||
| 278 | Kprobes, jprobes, and return probes are implemented on the following | 292 | Kprobes, jprobes, and return probes are implemented on the following |
diff --git a/Documentation/mtd/spi-nor.txt b/Documentation/mtd/spi-nor.txt new file mode 100644 index 000000000000..548d6306ebca --- /dev/null +++ b/Documentation/mtd/spi-nor.txt | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | SPI NOR framework | ||
| 2 | ============================================ | ||
| 3 | |||
| 4 | Part I - Why do we need this framework? | ||
| 5 | --------------------------------------- | ||
| 6 | |||
| 7 | SPI bus controllers (drivers/spi/) only deal with streams of bytes; the bus | ||
| 8 | controller operates agnostic of the specific device attached. However, some | ||
| 9 | controllers (such as Freescale's QuadSPI controller) cannot easily handle | ||
| 10 | arbitrary streams of bytes, but rather are designed specifically for SPI NOR. | ||
| 11 | |||
| 12 | In particular, Freescale's QuadSPI controller must know the NOR commands to | ||
| 13 | find the right LUT sequence. Unfortunately, the SPI subsystem has no notion of | ||
| 14 | opcodes, addresses, or data payloads; a SPI controller simply knows to send or | ||
| 15 | receive bytes (Tx and Rx). Therefore, we must define a new layering scheme under | ||
| 16 | which the controller driver is aware of the opcodes, addressing, and other | ||
| 17 | details of the SPI NOR protocol. | ||
| 18 | |||
| 19 | Part II - How does the framework work? | ||
| 20 | -------------------------------------- | ||
| 21 | |||
| 22 | This framework just adds a new layer between the MTD and the SPI bus driver. | ||
| 23 | With this new layer, the SPI NOR controller driver does not depend on the | ||
| 24 | m25p80 code anymore. | ||
| 25 | |||
| 26 | Before this framework, the layer is like: | ||
| 27 | |||
| 28 | MTD | ||
| 29 | ------------------------ | ||
| 30 | m25p80 | ||
| 31 | ------------------------ | ||
| 32 | SPI bus driver | ||
| 33 | ------------------------ | ||
| 34 | SPI NOR chip | ||
| 35 | |||
| 36 | After this framework, the layer is like: | ||
| 37 | MTD | ||
| 38 | ------------------------ | ||
| 39 | SPI NOR framework | ||
| 40 | ------------------------ | ||
| 41 | m25p80 | ||
| 42 | ------------------------ | ||
| 43 | SPI bus driver | ||
| 44 | ------------------------ | ||
| 45 | SPI NOR chip | ||
| 46 | |||
| 47 | With the SPI NOR controller driver (Freescale QuadSPI), it looks like: | ||
| 48 | MTD | ||
| 49 | ------------------------ | ||
| 50 | SPI NOR framework | ||
| 51 | ------------------------ | ||
| 52 | fsl-quadSPI | ||
| 53 | ------------------------ | ||
| 54 | SPI NOR chip | ||
| 55 | |||
| 56 | Part III - How can drivers use the framework? | ||
| 57 | --------------------------------------------- | ||
| 58 | |||
| 59 | The main API is spi_nor_scan(). Before you call the hook, a driver should | ||
| 60 | initialize the necessary fields for spi_nor{}. Please see | ||
| 61 | drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to fsl-quadspi.c | ||
| 62 | when you want to write a new driver for a SPI NOR controller. | ||
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt index 1dfe62c3641d..ee231ed09ec6 100644 --- a/Documentation/mutex-design.txt +++ b/Documentation/mutex-design.txt | |||
| @@ -1,139 +1,157 @@ | |||
| 1 | Generic Mutex Subsystem | 1 | Generic Mutex Subsystem |
| 2 | 2 | ||
| 3 | started by Ingo Molnar <mingo@redhat.com> | 3 | started by Ingo Molnar <mingo@redhat.com> |
| 4 | updated by Davidlohr Bueso <davidlohr@hp.com> | ||
| 4 | 5 | ||
| 5 | "Why on earth do we need a new mutex subsystem, and what's wrong | 6 | What are mutexes? |
| 6 | with semaphores?" | 7 | ----------------- |
| 7 | 8 | ||
| 8 | firstly, there's nothing wrong with semaphores. But if the simpler | 9 | In the Linux kernel, mutexes refer to a particular locking primitive |
| 9 | mutex semantics are sufficient for your code, then there are a couple | 10 | that enforces serialization on shared memory systems, and not only to |
| 10 | of advantages of mutexes: | 11 | the generic term referring to 'mutual exclusion' found in academia |
| 12 | or similar theoretical text books. Mutexes are sleeping locks which | ||
| 13 | behave similarly to binary semaphores, and were introduced in 2006[1] | ||
| 14 | as an alternative to these. This new data structure provided a number | ||
| 15 | of advantages, including simpler interfaces, and at that time smaller | ||
| 16 | code (see Disadvantages). | ||
| 11 | 17 | ||
| 12 | - 'struct mutex' is smaller on most architectures: E.g. on x86, | 18 | [1] http://lwn.net/Articles/164802/ |
| 13 | 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes. | ||
| 14 | A smaller structure size means less RAM footprint, and better | ||
| 15 | CPU-cache utilization. | ||
| 16 | 19 | ||
| 17 | - tighter code. On x86 i get the following .text sizes when | 20 | Implementation |
| 18 | switching all mutex-alike semaphores in the kernel to the mutex | 21 | -------------- |
| 19 | subsystem: | ||
| 20 | 22 | ||
| 21 | text data bss dec hex filename | 23 | Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h |
| 22 | 3280380 868188 396860 4545428 455b94 vmlinux-semaphore | 24 | and implemented in kernel/locking/mutex.c. These locks use a three |
| 23 | 3255329 865296 396732 4517357 44eded vmlinux-mutex | 25 | state atomic counter (->count) to represent the different possible |
| 26 | transitions that can occur during the lifetime of a lock: | ||
| 24 | 27 | ||
| 25 | that's 25051 bytes of code saved, or a 0.76% win - off the hottest | 28 | 1: unlocked |
| 26 | codepaths of the kernel. (The .data savings are 2892 bytes, or 0.33%) | 29 | 0: locked, no waiters |
| 27 | Smaller code means better icache footprint, which is one of the | 30 | negative: locked, with potential waiters |
| 28 | major optimization goals in the Linux kernel currently. | ||
| 29 | 31 | ||
| 30 | - the mutex subsystem is slightly faster and has better scalability for | 32 | In its most basic form it also includes a wait-queue and a spinlock |
| 31 | contended workloads. On an 8-way x86 system, running a mutex-based | 33 | that serializes access to it. CONFIG_SMP systems can also include |
| 32 | kernel and testing creat+unlink+close (of separate, per-task files) | 34 | a pointer to the lock task owner (->owner) as well as a spinner MCS |
| 33 | in /tmp with 16 parallel tasks, the average number of ops/sec is: | 35 | lock (->osq), both described below in (ii). |
| 34 | 36 | ||
| 35 | Semaphores: Mutexes: | 37 | When acquiring a mutex, there are three possible paths that can be |
| 38 | taken, depending on the state of the lock: | ||
| 36 | 39 | ||
| 37 | $ ./test-mutex V 16 10 $ ./test-mutex V 16 10 | 40 | (i) fastpath: tries to atomically acquire the lock by decrementing the |
| 38 | 8 CPUs, running 16 tasks. 8 CPUs, running 16 tasks. | 41 | counter. If it was already taken by another task it goes to the next |
| 39 | checking VFS performance. checking VFS performance. | 42 | possible path. This logic is architecture specific. On x86-64, the |
| 40 | avg loops/sec: 34713 avg loops/sec: 84153 | 43 | locking fastpath is 2 instructions: |
| 41 | CPU utilization: 63% CPU utilization: 22% | ||
| 42 | 44 | ||
| 43 | i.e. in this workload, the mutex based kernel was 2.4 times faster | 45 | 0000000000000e10 <mutex_lock>: |
| 44 | than the semaphore based kernel, _and_ it also had 2.8 times less CPU | 46 | e21: f0 ff 0b lock decl (%rbx) |
| 45 | utilization. (In terms of 'ops per CPU cycle', the semaphore kernel | 47 | e24: 79 08 jns e2e <mutex_lock+0x1e> |
| 46 | performed 551 ops/sec per 1% of CPU time used, while the mutex kernel | ||
| 47 | performed 3825 ops/sec per 1% of CPU time used - it was 6.9 times | ||
| 48 | more efficient.) | ||
| 49 | |||
| 50 | the scalability difference is visible even on a 2-way P4 HT box: | ||
| 51 | |||
| 52 | Semaphores: Mutexes: | ||
| 53 | |||
| 54 | $ ./test-mutex V 16 10 $ ./test-mutex V 16 10 | ||
| 55 | 4 CPUs, running 16 tasks. 8 CPUs, running 16 tasks. | ||
| 56 | checking VFS performance. checking VFS performance. | ||
| 57 | avg loops/sec: 127659 avg loops/sec: 181082 | ||
| 58 | CPU utilization: 100% CPU utilization: 34% | ||
| 59 | |||
| 60 | (the straight performance advantage of mutexes is 41%, the per-cycle | ||
| 61 | efficiency of mutexes is 4.1 times better.) | ||
| 62 | |||
| 63 | - there are no fastpath tradeoffs, the mutex fastpath is just as tight | ||
| 64 | as the semaphore fastpath. On x86, the locking fastpath is 2 | ||
| 65 | instructions: | ||
| 66 | |||
| 67 | c0377ccb <mutex_lock>: | ||
| 68 | c0377ccb: f0 ff 08 lock decl (%eax) | ||
| 69 | c0377cce: 78 0e js c0377cde <.text..lock.mutex> | ||
| 70 | c0377cd0: c3 ret | ||
| 71 | 48 | ||
| 72 | the unlocking fastpath is equally tight: | 49 | the unlocking fastpath is equally tight: |
| 73 | 50 | ||
| 74 | c0377cd1 <mutex_unlock>: | 51 | 0000000000000bc0 <mutex_unlock>: |
| 75 | c0377cd1: f0 ff 00 lock incl (%eax) | 52 | bc8: f0 ff 07 lock incl (%rdi) |
| 76 | c0377cd4: 7e 0f jle c0377ce5 <.text..lock.mutex+0x7> | 53 | bcb: 7f 0a jg bd7 <mutex_unlock+0x17> |
| 77 | c0377cd6: c3 ret | 54 | |
| 78 | 55 | ||
| 79 | - 'struct mutex' semantics are well-defined and are enforced if | 56 | (ii) midpath: aka optimistic spinning, tries to spin for acquisition |
| 80 | CONFIG_DEBUG_MUTEXES is turned on. Semaphores on the other hand have | 57 | while the lock owner is running and there are no other tasks ready |
| 81 | virtually no debugging code or instrumentation. The mutex subsystem | 58 | to run that have higher priority (need_resched). The rationale is |
| 82 | checks and enforces the following rules: | 59 | that if the lock owner is running, it is likely to release the lock |
| 83 | 60 | soon. The mutex spinners are queued up using MCS lock so that only | |
| 84 | * - only one task can hold the mutex at a time | 61 | one spinner can compete for the mutex. |
| 85 | * - only the owner can unlock the mutex | 62 | |
| 86 | * - multiple unlocks are not permitted | 63 | The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock |
| 87 | * - recursive locking is not permitted | 64 | with the desirable properties of being fair and with each cpu trying |
| 88 | * - a mutex object must be initialized via the API | 65 | to acquire the lock spinning on a local variable. It avoids expensive |
| 89 | * - a mutex object must not be initialized via memset or copying | 66 | cacheline bouncing that common test-and-set spinlock implementations |
| 90 | * - task may not exit with mutex held | 67 | incur. An MCS-like lock is specially tailored for optimistic spinning |
| 91 | * - memory areas where held locks reside must not be freed | 68 | for sleeping lock implementation. An important feature of the customized |
| 92 | * - held mutexes must not be reinitialized | 69 | MCS lock is that it has the extra property that spinners are able to exit |
| 93 | * - mutexes may not be used in hardware or software interrupt | 70 | the MCS spinlock queue when they need to reschedule. This further helps |
| 94 | * contexts such as tasklets and timers | 71 | avoid situations where MCS spinners that need to reschedule would continue |
| 95 | 72 | waiting to spin on mutex owner, only to go directly to slowpath upon | |
| 96 | furthermore, there are also convenience features in the debugging | 73 | obtaining the MCS lock. |
| 97 | code: | 74 | |
| 98 | 75 | ||
| 99 | * - uses symbolic names of mutexes, whenever they are printed in debug output | 76 | (iii) slowpath: last resort, if the lock is still unable to be acquired, |
| 100 | * - point-of-acquire tracking, symbolic lookup of function names | 77 | the task is added to the wait-queue and sleeps until woken up by the |
| 101 | * - list of all locks held in the system, printout of them | 78 | unlock path. Under normal circumstances it blocks as TASK_UNINTERRUPTIBLE. |
| 102 | * - owner tracking | 79 | |
| 103 | * - detects self-recursing locks and prints out all relevant info | 80 | While formally kernel mutexes are sleepable locks, it is path (ii) that |
| 104 | * - detects multi-task circular deadlocks and prints out all affected | 81 | makes them more practically a hybrid type. By simply not interrupting a |
| 105 | * locks and tasks (and only those tasks) | 82 | task and busy-waiting for a few cycles instead of immediately sleeping, |
| 83 | the performance of this lock has been seen to significantly improve a | ||
| 84 | number of workloads. Note that this technique is also used for rw-semaphores. | ||
| 85 | |||
| 86 | Semantics | ||
| 87 | --------- | ||
| 88 | |||
| 89 | The mutex subsystem checks and enforces the following rules: | ||
| 90 | |||
| 91 | - Only one task can hold the mutex at a time. | ||
| 92 | - Only the owner can unlock the mutex. | ||
| 93 | - Multiple unlocks are not permitted. | ||
| 94 | - Recursive locking/unlocking is not permitted. | ||
| 95 | - A mutex must only be initialized via the API (see below). | ||
| 96 | - A task may not exit with a mutex held. | ||
| 97 | - Memory areas where held locks reside must not be freed. | ||
| 98 | - Held mutexes must not be reinitialized. | ||
| 99 | - Mutexes may not be used in hardware or software interrupt | ||
| 100 | contexts such as tasklets and timers. | ||
| 101 | |||
| 102 | These semantics are fully enforced when CONFIG DEBUG_MUTEXES is enabled. | ||
| 103 | In addition, the mutex debugging code also implements a number of other | ||
| 104 | features that make lock debugging easier and faster: | ||
| 105 | |||
| 106 | - Uses symbolic names of mutexes, whenever they are printed | ||
| 107 | in debug output. | ||
| 108 | - Point-of-acquire tracking, symbolic lookup of function names, | ||
| 109 | list of all locks held in the system, printout of them. | ||
| 110 | - Owner tracking. | ||
| 111 | - Detects self-recursing locks and prints out all relevant info. | ||
| 112 | - Detects multi-task circular deadlocks and prints out all affected | ||
| 113 | locks and tasks (and only those tasks). | ||
| 114 | |||
| 115 | |||
| 116 | Interfaces | ||
| 117 | ---------- | ||
| 118 | Statically define the mutex: | ||
| 119 | DEFINE_MUTEX(name); | ||
| 120 | |||
| 121 | Dynamically initialize the mutex: | ||
| 122 | mutex_init(mutex); | ||
| 123 | |||
| 124 | Acquire the mutex, uninterruptible: | ||
| 125 | void mutex_lock(struct mutex *lock); | ||
| 126 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | ||
| 127 | int mutex_trylock(struct mutex *lock); | ||
| 128 | |||
| 129 | Acquire the mutex, interruptible: | ||
| 130 | int mutex_lock_interruptible_nested(struct mutex *lock, | ||
| 131 | unsigned int subclass); | ||
| 132 | int mutex_lock_interruptible(struct mutex *lock); | ||
| 133 | |||
| 134 | Acquire the mutex, interruptible, if dec to 0: | ||
| 135 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | ||
| 136 | |||
| 137 | Unlock the mutex: | ||
| 138 | void mutex_unlock(struct mutex *lock); | ||
| 139 | |||
| 140 | Test if the mutex is taken: | ||
| 141 | int mutex_is_locked(struct mutex *lock); | ||
| 106 | 142 | ||
| 107 | Disadvantages | 143 | Disadvantages |
| 108 | ------------- | 144 | ------------- |
| 109 | 145 | ||
| 110 | The stricter mutex API means you cannot use mutexes the same way you | 146 | Unlike its original design and purpose, 'struct mutex' is larger than |
| 111 | can use semaphores: e.g. they cannot be used from an interrupt context, | 147 | most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice |
| 112 | nor can they be unlocked from a different context that which acquired | 148 | as large as 'struct semaphore' (24 bytes) and 8 bytes shy of the |
| 113 | it. [ I'm not aware of any other (e.g. performance) disadvantages from | 149 | 'struct rw_semaphore' variant. Larger structure sizes mean more CPU |
| 114 | using mutexes at the moment, please let me know if you find any. ] | 150 | cache and memory footprint. |
| 115 | |||
| 116 | Implementation of mutexes | ||
| 117 | ------------------------- | ||
| 118 | |||
| 119 | 'struct mutex' is the new mutex type, defined in include/linux/mutex.h and | ||
| 120 | implemented in kernel/locking/mutex.c. It is a counter-based mutex with a | ||
| 121 | spinlock and a wait-list. The counter has 3 states: 1 for "unlocked", 0 for | ||
| 122 | "locked" and negative numbers (usually -1) for "locked, potential waiters | ||
| 123 | queued". | ||
| 124 | |||
| 125 | the APIs of 'struct mutex' have been streamlined: | ||
| 126 | |||
| 127 | DEFINE_MUTEX(name); | ||
| 128 | 151 | ||
| 129 | mutex_init(mutex); | 152 | When to use mutexes |
| 153 | ------------------- | ||
| 130 | 154 | ||
| 131 | void mutex_lock(struct mutex *lock); | 155 | Unless the strict semantics of mutexes are unsuitable and/or the critical |
| 132 | int mutex_lock_interruptible(struct mutex *lock); | 156 | region prevents the lock from being shared, always prefer them to any other |
| 133 | int mutex_trylock(struct mutex *lock); | 157 | locking primitive. |
| 134 | void mutex_unlock(struct mutex *lock); | ||
| 135 | int mutex_is_locked(struct mutex *lock); | ||
| 136 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | ||
| 137 | int mutex_lock_interruptible_nested(struct mutex *lock, | ||
| 138 | unsigned int subclass); | ||
| 139 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | ||
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index a383c00392d0..9c723ecd0025 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
| @@ -585,13 +585,19 @@ mode | |||
| 585 | balance-tlb or 5 | 585 | balance-tlb or 5 |
| 586 | 586 | ||
| 587 | Adaptive transmit load balancing: channel bonding that | 587 | Adaptive transmit load balancing: channel bonding that |
| 588 | does not require any special switch support. The | 588 | does not require any special switch support. |
| 589 | outgoing traffic is distributed according to the | 589 | |
| 590 | current load (computed relative to the speed) on each | 590 | In tlb_dynamic_lb=1 mode; the outgoing traffic is |
| 591 | slave. Incoming traffic is received by the current | 591 | distributed according to the current load (computed |
| 592 | slave. If the receiving slave fails, another slave | 592 | relative to the speed) on each slave. |
| 593 | takes over the MAC address of the failed receiving | 593 | |
| 594 | slave. | 594 | In tlb_dynamic_lb=0 mode; the load balancing based on |
| 595 | current load is disabled and the load is distributed | ||
| 596 | only using the hash distribution. | ||
| 597 | |||
| 598 | Incoming traffic is received by the current slave. | ||
| 599 | If the receiving slave fails, another slave takes over | ||
| 600 | the MAC address of the failed receiving slave. | ||
| 595 | 601 | ||
| 596 | Prerequisite: | 602 | Prerequisite: |
| 597 | 603 | ||
| @@ -736,6 +742,28 @@ primary_reselect | |||
| 736 | 742 | ||
| 737 | This option was added for bonding version 3.6.0. | 743 | This option was added for bonding version 3.6.0. |
| 738 | 744 | ||
| 745 | tlb_dynamic_lb | ||
| 746 | |||
| 747 | Specifies if dynamic shuffling of flows is enabled in tlb | ||
| 748 | mode. The value has no effect on any other modes. | ||
| 749 | |||
| 750 | The default behavior of tlb mode is to shuffle active flows across | ||
| 751 | slaves based on the load in that interval. This gives nice lb | ||
| 752 | characteristics but can cause packet reordering. If re-ordering is | ||
| 753 | a concern use this variable to disable flow shuffling and rely on | ||
| 754 | load balancing provided solely by the hash distribution. | ||
| 755 | xmit-hash-policy can be used to select the appropriate hashing for | ||
| 756 | the setup. | ||
| 757 | |||
| 758 | The sysfs entry can be used to change the setting per bond device | ||
| 759 | and the initial value is derived from the module parameter. The | ||
| 760 | sysfs entry is allowed to be changed only if the bond device is | ||
| 761 | down. | ||
| 762 | |||
| 763 | The default value is "1" that enables flow shuffling while value "0" | ||
| 764 | disables it. This option was added in bonding driver 3.7.1 | ||
| 765 | |||
| 766 | |||
| 739 | updelay | 767 | updelay |
| 740 | 768 | ||
| 741 | Specifies the time, in milliseconds, to wait before enabling a | 769 | Specifies the time, in milliseconds, to wait before enabling a |
| @@ -769,7 +797,7 @@ use_carrier | |||
| 769 | xmit_hash_policy | 797 | xmit_hash_policy |
| 770 | 798 | ||
| 771 | Selects the transmit hash policy to use for slave selection in | 799 | Selects the transmit hash policy to use for slave selection in |
| 772 | balance-xor and 802.3ad modes. Possible values are: | 800 | balance-xor, 802.3ad, and tlb modes. Possible values are: |
| 773 | 801 | ||
| 774 | layer2 | 802 | layer2 |
| 775 | 803 | ||
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 4f7ae5261364..2236d6dcb7da 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
| @@ -469,6 +469,41 @@ solution for a couple of reasons: | |||
| 469 | having this 'send only' use-case we may remove the receive list in the | 469 | having this 'send only' use-case we may remove the receive list in the |
| 470 | Kernel to save a little (really a very little!) CPU usage. | 470 | Kernel to save a little (really a very little!) CPU usage. |
| 471 | 471 | ||
| 472 | 4.1.1.1 CAN filter usage optimisation | ||
| 473 | |||
| 474 | The CAN filters are processed in per-device filter lists at CAN frame | ||
| 475 | reception time. To reduce the number of checks that need to be performed | ||
| 476 | while walking through the filter lists the CAN core provides an optimized | ||
| 477 | filter handling when the filter subscription focusses on a single CAN ID. | ||
| 478 | |||
| 479 | For the possible 2048 SFF CAN identifiers the identifier is used as an index | ||
| 480 | to access the corresponding subscription list without any further checks. | ||
| 481 | For the 2^29 possible EFF CAN identifiers a 10 bit XOR folding is used as | ||
| 482 | hash function to retrieve the EFF table index. | ||
| 483 | |||
| 484 | To benefit from the optimized filters for single CAN identifiers the | ||
| 485 | CAN_SFF_MASK or CAN_EFF_MASK have to be set into can_filter.mask together | ||
| 486 | with set CAN_EFF_FLAG and CAN_RTR_FLAG bits. A set CAN_EFF_FLAG bit in the | ||
| 487 | can_filter.mask makes clear that it matters whether a SFF or EFF CAN ID is | ||
| 488 | subscribed. E.g. in the example from above | ||
| 489 | |||
| 490 | rfilter[0].can_id = 0x123; | ||
| 491 | rfilter[0].can_mask = CAN_SFF_MASK; | ||
| 492 | |||
| 493 | both SFF frames with CAN ID 0x123 and EFF frames with 0xXXXXX123 can pass. | ||
| 494 | |||
| 495 | To filter for only 0x123 (SFF) and 0x12345678 (EFF) CAN identifiers the | ||
| 496 | filter has to be defined in this way to benefit from the optimized filters: | ||
| 497 | |||
| 498 | struct can_filter rfilter[2]; | ||
| 499 | |||
| 500 | rfilter[0].can_id = 0x123; | ||
| 501 | rfilter[0].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_SFF_MASK); | ||
| 502 | rfilter[1].can_id = 0x12345678 | CAN_EFF_FLAG; | ||
| 503 | rfilter[1].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_EFF_MASK); | ||
| 504 | |||
| 505 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter)); | ||
| 506 | |||
| 472 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 507 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
| 473 | 508 | ||
| 474 | As described in chapter 3.4 the CAN interface driver can generate so | 509 | As described in chapter 3.4 the CAN interface driver can generate so |
diff --git a/Documentation/networking/cdc_mbim.txt b/Documentation/networking/cdc_mbim.txt new file mode 100644 index 000000000000..a15ea602aa52 --- /dev/null +++ b/Documentation/networking/cdc_mbim.txt | |||
| @@ -0,0 +1,339 @@ | |||
| 1 | cdc_mbim - Driver for CDC MBIM Mobile Broadband modems | ||
| 2 | ======================================================== | ||
| 3 | |||
| 4 | The cdc_mbim driver supports USB devices conforming to the "Universal | ||
| 5 | Serial Bus Communications Class Subclass Specification for Mobile | ||
| 6 | Broadband Interface Model" [1], which is a further development of | ||
| 7 | "Universal Serial Bus Communications Class Subclass Specifications for | ||
| 8 | Network Control Model Devices" [2] optimized for Mobile Broadband | ||
| 9 | devices, aka "3G/LTE modems". | ||
| 10 | |||
| 11 | |||
| 12 | Command Line Parameters | ||
| 13 | ======================= | ||
| 14 | |||
| 15 | The cdc_mbim driver has no parameters of its own. But the probing | ||
| 16 | behaviour for NCM 1.0 backwards compatible MBIM functions (an | ||
| 17 | "NCM/MBIM function" as defined in section 3.2 of [1]) is affected | ||
| 18 | by a cdc_ncm driver parameter: | ||
| 19 | |||
| 20 | prefer_mbim | ||
| 21 | ----------- | ||
| 22 | Type: Boolean | ||
| 23 | Valid Range: N/Y (0-1) | ||
| 24 | Default Value: Y (MBIM is preferred) | ||
| 25 | |||
| 26 | This parameter sets the system policy for NCM/MBIM functions. Such | ||
| 27 | functions will be handled by either the cdc_ncm driver or the cdc_mbim | ||
| 28 | driver depending on the prefer_mbim setting. Setting prefer_mbim=N | ||
| 29 | makes the cdc_mbim driver ignore these functions and lets the cdc_ncm | ||
| 30 | driver handle them instead. | ||
| 31 | |||
| 32 | The parameter is writable, and can be changed at any time. A manual | ||
| 33 | unbind/bind is required to make the change effective for NCM/MBIM | ||
| 34 | functions bound to the "wrong" driver | ||
| 35 | |||
| 36 | |||
| 37 | Basic usage | ||
| 38 | =========== | ||
| 39 | |||
| 40 | MBIM functions are inactive when unmanaged. The cdc_mbim driver only | ||
| 41 | provides an userspace interface to the MBIM control channel, and will | ||
| 42 | not participate in the management of the function. This implies that a | ||
| 43 | userspace MBIM management application always is required to enable a | ||
| 44 | MBIM function. | ||
| 45 | |||
| 46 | Such userspace applications includes, but are not limited to: | ||
| 47 | - mbimcli (included with the libmbim [3] library), and | ||
| 48 | - ModemManager [4] | ||
| 49 | |||
| 50 | Establishing a MBIM IP session reequires at least these actions by the | ||
| 51 | management application: | ||
| 52 | - open the control channel | ||
| 53 | - configure network connection settings | ||
| 54 | - connect to network | ||
| 55 | - configure IP interface | ||
| 56 | |||
| 57 | Management application development | ||
| 58 | ---------------------------------- | ||
| 59 | The driver <-> userspace interfaces are described below. The MBIM | ||
| 60 | control channel protocol is described in [1]. | ||
| 61 | |||
| 62 | |||
| 63 | MBIM control channel userspace ABI | ||
| 64 | ================================== | ||
| 65 | |||
| 66 | /dev/cdc-wdmX character device | ||
| 67 | ------------------------------ | ||
| 68 | The driver creates a two-way pipe to the MBIM function control channel | ||
| 69 | using the cdc-wdm driver as a subdriver. The userspace end of the | ||
| 70 | control channel pipe is a /dev/cdc-wdmX character device. | ||
| 71 | |||
| 72 | The cdc_mbim driver does not process or police messages on the control | ||
| 73 | channel. The channel is fully delegated to the userspace management | ||
| 74 | application. It is therefore up to this application to ensure that it | ||
| 75 | complies with all the control channel requirements in [1]. | ||
| 76 | |||
| 77 | The cdc-wdmX device is created as a child of the MBIM control | ||
| 78 | interface USB device. The character device associated with a specific | ||
| 79 | MBIM function can be looked up using sysfs. For example: | ||
| 80 | |||
| 81 | bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc | ||
| 82 | cdc-wdm0 | ||
| 83 | |||
| 84 | bjorn@nemi:~$ grep . /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc/cdc-wdm0/dev | ||
| 85 | 180:0 | ||
| 86 | |||
| 87 | |||
| 88 | USB configuration descriptors | ||
| 89 | ----------------------------- | ||
| 90 | The wMaxControlMessage field of the CDC MBIM functional descriptor | ||
| 91 | limits the maximum control message size. The managament application is | ||
| 92 | responsible for negotiating a control message size complying with the | ||
| 93 | requirements in section 9.3.1 of [1], taking this descriptor field | ||
| 94 | into consideration. | ||
| 95 | |||
| 96 | The userspace application can access the CDC MBIM functional | ||
| 97 | descriptor of a MBIM function using either of the two USB | ||
| 98 | configuration descriptor kernel interfaces described in [6] or [7]. | ||
| 99 | |||
| 100 | See also the ioctl documentation below. | ||
| 101 | |||
| 102 | |||
| 103 | Fragmentation | ||
| 104 | ------------- | ||
| 105 | The userspace application is responsible for all control message | ||
| 106 | fragmentation and defragmentaion, as described in section 9.5 of [1]. | ||
| 107 | |||
| 108 | |||
| 109 | /dev/cdc-wdmX write() | ||
| 110 | --------------------- | ||
| 111 | The MBIM control messages from the management application *must not* | ||
| 112 | exceed the negotiated control message size. | ||
| 113 | |||
| 114 | |||
| 115 | /dev/cdc-wdmX read() | ||
| 116 | -------------------- | ||
| 117 | The management application *must* accept control messages of up the | ||
| 118 | negotiated control message size. | ||
| 119 | |||
| 120 | |||
| 121 | /dev/cdc-wdmX ioctl() | ||
| 122 | -------------------- | ||
| 123 | IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size | ||
| 124 | This ioctl returns the wMaxControlMessage field of the CDC MBIM | ||
| 125 | functional descriptor for MBIM devices. This is intended as a | ||
| 126 | convenience, eliminating the need to parse the USB descriptors from | ||
| 127 | userspace. | ||
| 128 | |||
| 129 | #include <stdio.h> | ||
| 130 | #include <fcntl.h> | ||
| 131 | #include <sys/ioctl.h> | ||
| 132 | #include <linux/types.h> | ||
| 133 | #include <linux/usb/cdc-wdm.h> | ||
| 134 | int main() | ||
| 135 | { | ||
| 136 | __u16 max; | ||
| 137 | int fd = open("/dev/cdc-wdm0", O_RDWR); | ||
| 138 | if (!ioctl(fd, IOCTL_WDM_MAX_COMMAND, &max)) | ||
| 139 | printf("wMaxControlMessage is %d\n", max); | ||
| 140 | } | ||
| 141 | |||
| 142 | |||
| 143 | Custom device services | ||
| 144 | ---------------------- | ||
| 145 | The MBIM specification allows vendors to freely define additional | ||
| 146 | services. This is fully supported by the cdc_mbim driver. | ||
| 147 | |||
| 148 | Support for new MBIM services, including vendor specified services, is | ||
| 149 | implemented entirely in userspace, like the rest of the MBIM control | ||
| 150 | protocol | ||
| 151 | |||
| 152 | New services should be registered in the MBIM Registry [5]. | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | MBIM data channel userspace ABI | ||
| 157 | =============================== | ||
| 158 | |||
| 159 | wwanY network device | ||
| 160 | -------------------- | ||
| 161 | The cdc_mbim driver represents the MBIM data channel as a single | ||
| 162 | network device of the "wwan" type. This network device is initially | ||
| 163 | mapped to MBIM IP session 0. | ||
| 164 | |||
| 165 | |||
| 166 | Multiplexed IP sessions (IPS) | ||
| 167 | ----------------------------- | ||
| 168 | MBIM allows multiplexing up to 256 IP sessions over a single USB data | ||
| 169 | channel. The cdc_mbim driver models such IP sessions as 802.1q VLAN | ||
| 170 | subdevices of the master wwanY device, mapping MBIM IP session Z to | ||
| 171 | VLAN ID Z for all values of Z greater than 0. | ||
| 172 | |||
| 173 | The device maximum Z is given in the MBIM_DEVICE_CAPS_INFO structure | ||
| 174 | described in section 10.5.1 of [1]. | ||
| 175 | |||
| 176 | The userspace management application is responsible for adding new | ||
| 177 | VLAN links prior to establishing MBIM IP sessions where the SessionId | ||
| 178 | is greater than 0. These links can be added by using the normal VLAN | ||
| 179 | kernel interfaces, either ioctl or netlink. | ||
| 180 | |||
| 181 | For example, adding a link for a MBIM IP session with SessionId 3: | ||
| 182 | |||
| 183 | ip link add link wwan0 name wwan0.3 type vlan id 3 | ||
| 184 | |||
| 185 | The driver will automatically map the "wwan0.3" network device to MBIM | ||
| 186 | IP session 3. | ||
| 187 | |||
| 188 | |||
| 189 | Device Service Streams (DSS) | ||
| 190 | ---------------------------- | ||
| 191 | MBIM also allows up to 256 non-IP data streams to be multiplexed over | ||
| 192 | the same shared USB data channel. The cdc_mbim driver models these | ||
| 193 | sessions as another set of 802.1q VLAN subdevices of the master wwanY | ||
| 194 | device, mapping MBIM DSS session A to VLAN ID (256 + A) for all values | ||
| 195 | of A. | ||
| 196 | |||
| 197 | The device maximum A is given in the MBIM_DEVICE_SERVICES_INFO | ||
| 198 | structure described in section 10.5.29 of [1]. | ||
| 199 | |||
| 200 | The DSS VLAN subdevices are used as a practical interface between the | ||
| 201 | shared MBIM data channel and a MBIM DSS aware userspace application. | ||
| 202 | It is not intended to be presented as-is to an end user. The | ||
| 203 | assumption is that an userspace application initiating a DSS session | ||
| 204 | also takes care of the necessary framing of the DSS data, presenting | ||
| 205 | the stream to the end user in an appropriate way for the stream type. | ||
| 206 | |||
| 207 | The network device ABI requires a dummy ethernet header for every DSS | ||
| 208 | data frame being transported. The contents of this header is | ||
| 209 | arbitrary, with the following exceptions: | ||
| 210 | - TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped | ||
| 211 | - RX frames will have the protocol field set to ETH_P_802_3 (but will | ||
| 212 | not be properly formatted 802.3 frames) | ||
| 213 | - RX frames will have the destination address set to the hardware | ||
| 214 | address of the master device | ||
| 215 | |||
| 216 | The DSS supporting userspace management application is responsible for | ||
| 217 | adding the dummy ethernet header on TX and stripping it on RX. | ||
| 218 | |||
| 219 | This is a simple example using tools commonly available, exporting | ||
| 220 | DssSessionId 5 as a pty character device pointed to by a /dev/nmea | ||
| 221 | symlink: | ||
| 222 | |||
| 223 | ip link add link wwan0 name wwan0.dss5 type vlan id 261 | ||
| 224 | ip link set dev wwan0.dss5 up | ||
| 225 | socat INTERFACE:wwan0.dss5,type=2 PTY:,echo=0,link=/dev/nmea | ||
| 226 | |||
| 227 | This is only an example, most suitable for testing out a DSS | ||
| 228 | service. Userspace applications supporting specific MBIM DSS services | ||
| 229 | are expected to use the tools and programming interfaces required by | ||
| 230 | that service. | ||
| 231 | |||
| 232 | Note that adding VLAN links for DSS sessions is entirely optional. A | ||
| 233 | management application may instead choose to bind a packet socket | ||
| 234 | directly to the master network device, using the received VLAN tags to | ||
| 235 | map frames to the correct DSS session and adding 18 byte VLAN ethernet | ||
| 236 | headers with the appropriate tag on TX. In this case using a socket | ||
| 237 | filter is recommended, matching only the DSS VLAN subset. This avoid | ||
| 238 | unnecessary copying of unrelated IP session data to userspace. For | ||
| 239 | example: | ||
| 240 | |||
| 241 | static struct sock_filter dssfilter[] = { | ||
| 242 | /* use special negative offsets to get VLAN tag */ | ||
| 243 | BPF_STMT(BPF_LD|BPF_B|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT), | ||
| 244 | BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, 1, 0, 6), /* true */ | ||
| 245 | |||
| 246 | /* verify DSS VLAN range */ | ||
| 247 | BPF_STMT(BPF_LD|BPF_H|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG), | ||
| 248 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 0, 4), /* 256 is first DSS VLAN */ | ||
| 249 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 512, 3, 0), /* 511 is last DSS VLAN */ | ||
| 250 | |||
| 251 | /* verify ethertype */ | ||
| 252 | BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN), | ||
| 253 | BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, ETH_P_802_3, 0, 1), | ||
| 254 | |||
| 255 | BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */ | ||
| 256 | BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */ | ||
| 257 | }; | ||
| 258 | |||
| 259 | |||
| 260 | |||
| 261 | Tagged IP session 0 VLAN | ||
| 262 | ------------------------ | ||
| 263 | As described above, MBIM IP session 0 is treated as special by the | ||
| 264 | driver. It is initially mapped to untagged frames on the wwanY | ||
| 265 | network device. | ||
| 266 | |||
| 267 | This mapping implies a few restrictions on multiplexed IPS and DSS | ||
| 268 | sessions, which may not always be practical: | ||
| 269 | - no IPS or DSS session can use a frame size greater than the MTU on | ||
| 270 | IP session 0 | ||
| 271 | - no IPS or DSS session can be in the up state unless the network | ||
| 272 | device representing IP session 0 also is up | ||
| 273 | |||
| 274 | These problems can be avoided by optionally making the driver map IP | ||
| 275 | session 0 to a VLAN subdevice, similar to all other IP sessions. This | ||
| 276 | behaviour is triggered by adding a VLAN link for the magic VLAN ID | ||
| 277 | 4094. The driver will then immediately start mapping MBIM IP session | ||
| 278 | 0 to this VLAN, and will drop untagged frames on the master wwanY | ||
| 279 | device. | ||
| 280 | |||
| 281 | Tip: It might be less confusing to the end user to name this VLAN | ||
| 282 | subdevice after the MBIM SessionID instead of the VLAN ID. For | ||
| 283 | example: | ||
| 284 | |||
| 285 | ip link add link wwan0 name wwan0.0 type vlan id 4094 | ||
| 286 | |||
| 287 | |||
| 288 | VLAN mapping | ||
| 289 | ------------ | ||
| 290 | |||
| 291 | Summarizing the cdc_mbim driver mapping described above, we have this | ||
| 292 | relationship between VLAN tags on the wwanY network device and MBIM | ||
| 293 | sessions on the shared USB data channel: | ||
| 294 | |||
| 295 | VLAN ID MBIM type MBIM SessionID Notes | ||
| 296 | --------------------------------------------------------- | ||
| 297 | untagged IPS 0 a) | ||
| 298 | 1 - 255 IPS 1 - 255 <VLANID> | ||
| 299 | 256 - 511 DSS 0 - 255 <VLANID - 256> | ||
| 300 | 512 - 4093 b) | ||
| 301 | 4094 IPS 0 c) | ||
| 302 | |||
| 303 | a) if no VLAN ID 4094 link exists, else dropped | ||
| 304 | b) unsupported VLAN range, unconditionally dropped | ||
| 305 | c) if a VLAN ID 4094 link exists, else dropped | ||
| 306 | |||
| 307 | |||
| 308 | |||
| 309 | |||
| 310 | References | ||
| 311 | ========== | ||
| 312 | |||
| 313 | [1] USB Implementers Forum, Inc. - "Universal Serial Bus | ||
| 314 | Communications Class Subclass Specification for Mobile Broadband | ||
| 315 | Interface Model", Revision 1.0 (Errata 1), May 1, 2013 | ||
| 316 | - http://www.usb.org/developers/docs/devclass_docs/ | ||
| 317 | |||
| 318 | [2] USB Implementers Forum, Inc. - "Universal Serial Bus | ||
| 319 | Communications Class Subclass Specifications for Network Control | ||
| 320 | Model Devices", Revision 1.0 (Errata 1), November 24, 2010 | ||
| 321 | - http://www.usb.org/developers/docs/devclass_docs/ | ||
| 322 | |||
| 323 | [3] libmbim - "a glib-based library for talking to WWAN modems and | ||
| 324 | devices which speak the Mobile Interface Broadband Model (MBIM) | ||
| 325 | protocol" | ||
| 326 | - http://www.freedesktop.org/wiki/Software/libmbim/ | ||
| 327 | |||
| 328 | [4] ModemManager - "a DBus-activated daemon which controls mobile | ||
| 329 | broadband (2G/3G/4G) devices and connections" | ||
| 330 | - http://www.freedesktop.org/wiki/Software/ModemManager/ | ||
| 331 | |||
| 332 | [5] "MBIM (Mobile Broadband Interface Model) Registry" | ||
| 333 | - http://compliance.usb.org/mbim/ | ||
| 334 | |||
| 335 | [6] "/proc/bus/usb filesystem output" | ||
| 336 | - Documentation/usb/proc_usb_info.txt | ||
| 337 | |||
| 338 | [7] "/sys/bus/usb/devices/.../descriptors" | ||
| 339 | - Documentation/ABI/stable/sysfs-bus-usb | ||
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index e3ba753cb714..ee78eba78a9d 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
| @@ -281,6 +281,7 @@ Possible BPF extensions are shown in the following table: | |||
| 281 | cpu raw_smp_processor_id() | 281 | cpu raw_smp_processor_id() |
| 282 | vlan_tci vlan_tx_tag_get(skb) | 282 | vlan_tci vlan_tx_tag_get(skb) |
| 283 | vlan_pr vlan_tx_tag_present(skb) | 283 | vlan_pr vlan_tx_tag_present(skb) |
| 284 | rand prandom_u32() | ||
| 284 | 285 | ||
| 285 | These extensions can also be prefixed with '#'. | 286 | These extensions can also be prefixed with '#'. |
| 286 | Examples for low-level BPF: | 287 | Examples for low-level BPF: |
| @@ -308,6 +309,18 @@ Examples for low-level BPF: | |||
| 308 | ret #-1 | 309 | ret #-1 |
| 309 | drop: ret #0 | 310 | drop: ret #0 |
| 310 | 311 | ||
| 312 | ** icmp random packet sampling, 1 in 4 | ||
| 313 | ldh [12] | ||
| 314 | jne #0x800, drop | ||
| 315 | ldb [23] | ||
| 316 | jneq #1, drop | ||
| 317 | # get a random uint32 number | ||
| 318 | ld rand | ||
| 319 | mod #4 | ||
| 320 | jneq #1, drop | ||
| 321 | ret #-1 | ||
| 322 | drop: ret #0 | ||
| 323 | |||
| 311 | ** SECCOMP filter example: | 324 | ** SECCOMP filter example: |
| 312 | 325 | ||
| 313 | ld [4] /* offsetof(struct seccomp_data, arch) */ | 326 | ld [4] /* offsetof(struct seccomp_data, arch) */ |
| @@ -548,42 +561,43 @@ toolchain for developing and testing the kernel's JIT compiler. | |||
| 548 | 561 | ||
| 549 | BPF kernel internals | 562 | BPF kernel internals |
| 550 | -------------------- | 563 | -------------------- |
| 551 | Internally, for the kernel interpreter, a different BPF instruction set | 564 | Internally, for the kernel interpreter, a different instruction set |
| 552 | format with similar underlying principles from BPF described in previous | 565 | format with similar underlying principles from BPF described in previous |
| 553 | paragraphs is being used. However, the instruction set format is modelled | 566 | paragraphs is being used. However, the instruction set format is modelled |
| 554 | closer to the underlying architecture to mimic native instruction sets, so | 567 | closer to the underlying architecture to mimic native instruction sets, so |
| 555 | that a better performance can be achieved (more details later). | 568 | that a better performance can be achieved (more details later). This new |
| 569 | ISA is called 'eBPF' or 'internal BPF' interchangeably. (Note: eBPF which | ||
| 570 | originates from [e]xtended BPF is not the same as BPF extensions! While | ||
| 571 | eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading' | ||
| 572 | of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.) | ||
| 556 | 573 | ||
| 557 | It is designed to be JITed with one to one mapping, which can also open up | 574 | It is designed to be JITed with one to one mapping, which can also open up |
| 558 | the possibility for GCC/LLVM compilers to generate optimized BPF code through | 575 | the possibility for GCC/LLVM compilers to generate optimized eBPF code through |
| 559 | a BPF backend that performs almost as fast as natively compiled code. | 576 | an eBPF backend that performs almost as fast as natively compiled code. |
| 560 | 577 | ||
| 561 | The new instruction set was originally designed with the possible goal in | 578 | The new instruction set was originally designed with the possible goal in |
| 562 | mind to write programs in "restricted C" and compile into BPF with a optional | 579 | mind to write programs in "restricted C" and compile into eBPF with a optional |
| 563 | GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with | 580 | GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with |
| 564 | minimal performance overhead over two steps, that is, C -> BPF -> native code. | 581 | minimal performance overhead over two steps, that is, C -> eBPF -> native code. |
| 565 | 582 | ||
| 566 | Currently, the new format is being used for running user BPF programs, which | 583 | Currently, the new format is being used for running user BPF programs, which |
| 567 | includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, | 584 | includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, |
| 568 | team driver's classifier for its load-balancing mode, netfilter's xt_bpf | 585 | team driver's classifier for its load-balancing mode, netfilter's xt_bpf |
| 569 | extension, PTP dissector/classifier, and much more. They are all internally | 586 | extension, PTP dissector/classifier, and much more. They are all internally |
| 570 | converted by the kernel into the new instruction set representation and run | 587 | converted by the kernel into the new instruction set representation and run |
| 571 | in the extended interpreter. For in-kernel handlers, this all works | 588 | in the eBPF interpreter. For in-kernel handlers, this all works transparently |
| 572 | transparently by using sk_unattached_filter_create() for setting up the | 589 | by using sk_unattached_filter_create() for setting up the filter, resp. |
| 573 | filter, resp. sk_unattached_filter_destroy() for destroying it. The macro | 590 | sk_unattached_filter_destroy() for destroying it. The macro |
| 574 | SK_RUN_FILTER(filter, ctx) transparently invokes the right BPF function to | 591 | SK_RUN_FILTER(filter, ctx) transparently invokes eBPF interpreter or JITed |
| 575 | run the filter. 'filter' is a pointer to struct sk_filter that we got from | 592 | code to run the filter. 'filter' is a pointer to struct sk_filter that we |
| 576 | sk_unattached_filter_create(), and 'ctx' the given context (e.g. skb pointer). | 593 | got from sk_unattached_filter_create(), and 'ctx' the given context (e.g. |
| 577 | All constraints and restrictions from sk_chk_filter() apply before a | 594 | skb pointer). All constraints and restrictions from sk_chk_filter() apply |
| 578 | conversion to the new layout is being done behind the scenes! | 595 | before a conversion to the new layout is being done behind the scenes! |
| 579 | 596 | ||
| 580 | Currently, for JITing, the user BPF format is being used and current BPF JIT | 597 | Currently, the classic BPF format is being used for JITing on most of the |
| 581 | compilers reused whenever possible. In other words, we do not (yet!) perform | 598 | architectures. Only x86-64 performs JIT compilation from eBPF instruction set, |
| 582 | a JIT compilation in the new layout, however, future work will successively | 599 | however, future work will migrate other JIT compilers as well, so that they |
| 583 | migrate traditional JIT compilers into the new instruction format as well, so | 600 | will profit from the very same benefits. |
| 584 | that they will profit from the very same benefits. Thus, when speaking about | ||
| 585 | JIT in the following, a JIT compiler (TBD) for the new instruction format is | ||
| 586 | meant in this context. | ||
| 587 | 601 | ||
| 588 | Some core changes of the new internal format: | 602 | Some core changes of the new internal format: |
| 589 | 603 | ||
| @@ -592,35 +606,35 @@ Some core changes of the new internal format: | |||
| 592 | The old format had two registers A and X, and a hidden frame pointer. The | 606 | The old format had two registers A and X, and a hidden frame pointer. The |
| 593 | new layout extends this to be 10 internal registers and a read-only frame | 607 | new layout extends this to be 10 internal registers and a read-only frame |
| 594 | pointer. Since 64-bit CPUs are passing arguments to functions via registers | 608 | pointer. Since 64-bit CPUs are passing arguments to functions via registers |
| 595 | the number of args from BPF program to in-kernel function is restricted | 609 | the number of args from eBPF program to in-kernel function is restricted |
| 596 | to 5 and one register is used to accept return value from an in-kernel | 610 | to 5 and one register is used to accept return value from an in-kernel |
| 597 | function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ | 611 | function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ |
| 598 | sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved | 612 | sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved |
| 599 | registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. | 613 | registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. |
| 600 | 614 | ||
| 601 | Therefore, BPF calling convention is defined as: | 615 | Therefore, eBPF calling convention is defined as: |
| 602 | 616 | ||
| 603 | * R0 - return value from in-kernel function | 617 | * R0 - return value from in-kernel function, and exit value for eBPF program |
| 604 | * R1 - R5 - arguments from BPF program to in-kernel function | 618 | * R1 - R5 - arguments from eBPF program to in-kernel function |
| 605 | * R6 - R9 - callee saved registers that in-kernel function will preserve | 619 | * R6 - R9 - callee saved registers that in-kernel function will preserve |
| 606 | * R10 - read-only frame pointer to access stack | 620 | * R10 - read-only frame pointer to access stack |
| 607 | 621 | ||
| 608 | Thus, all BPF registers map one to one to HW registers on x86_64, aarch64, | 622 | Thus, all eBPF registers map one to one to HW registers on x86_64, aarch64, |
| 609 | etc, and BPF calling convention maps directly to ABIs used by the kernel on | 623 | etc, and eBPF calling convention maps directly to ABIs used by the kernel on |
| 610 | 64-bit architectures. | 624 | 64-bit architectures. |
| 611 | 625 | ||
| 612 | On 32-bit architectures JIT may map programs that use only 32-bit arithmetic | 626 | On 32-bit architectures JIT may map programs that use only 32-bit arithmetic |
| 613 | and may let more complex programs to be interpreted. | 627 | and may let more complex programs to be interpreted. |
| 614 | 628 | ||
| 615 | R0 - R5 are scratch registers and BPF program needs spill/fill them if | 629 | R0 - R5 are scratch registers and eBPF program needs spill/fill them if |
| 616 | necessary across calls. Note that there is only one BPF program (== one BPF | 630 | necessary across calls. Note that there is only one eBPF program (== one |
| 617 | main routine) and it cannot call other BPF functions, it can only call | 631 | eBPF main routine) and it cannot call other eBPF functions, it can only |
| 618 | predefined in-kernel functions, though. | 632 | call predefined in-kernel functions, though. |
| 619 | 633 | ||
| 620 | - Register width increases from 32-bit to 64-bit: | 634 | - Register width increases from 32-bit to 64-bit: |
| 621 | 635 | ||
| 622 | Still, the semantics of the original 32-bit ALU operations are preserved | 636 | Still, the semantics of the original 32-bit ALU operations are preserved |
| 623 | via 32-bit subregisters. All BPF registers are 64-bit with 32-bit lower | 637 | via 32-bit subregisters. All eBPF registers are 64-bit with 32-bit lower |
| 624 | subregisters that zero-extend into 64-bit if they are being written to. | 638 | subregisters that zero-extend into 64-bit if they are being written to. |
| 625 | That behavior maps directly to x86_64 and arm64 subregister definition, but | 639 | That behavior maps directly to x86_64 and arm64 subregister definition, but |
| 626 | makes other JITs more difficult. | 640 | makes other JITs more difficult. |
| @@ -631,8 +645,8 @@ Some core changes of the new internal format: | |||
| 631 | 645 | ||
| 632 | Operation is 64-bit, because on 64-bit architectures, pointers are also | 646 | Operation is 64-bit, because on 64-bit architectures, pointers are also |
| 633 | 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, | 647 | 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, |
| 634 | so 32-bit BPF registers would otherwise require to define register-pair | 648 | so 32-bit eBPF registers would otherwise require to define register-pair |
| 635 | ABI, thus, there won't be able to use a direct BPF register to HW register | 649 | ABI, thus, there won't be able to use a direct eBPF register to HW register |
| 636 | mapping and JIT would need to do combine/split/move operations for every | 650 | mapping and JIT would need to do combine/split/move operations for every |
| 637 | register in and out of the function, which is complex, bug prone and slow. | 651 | register in and out of the function, which is complex, bug prone and slow. |
| 638 | Another reason is the use of atomic 64-bit counters. | 652 | Another reason is the use of atomic 64-bit counters. |
| @@ -646,14 +660,145 @@ Some core changes of the new internal format: | |||
| 646 | - Introduces bpf_call insn and register passing convention for zero overhead | 660 | - Introduces bpf_call insn and register passing convention for zero overhead |
| 647 | calls from/to other kernel functions: | 661 | calls from/to other kernel functions: |
| 648 | 662 | ||
| 649 | After a kernel function call, R1 - R5 are reset to unreadable and R0 has a | 663 | Before an in-kernel function call, the internal BPF program needs to |
| 650 | return type of the function. Since R6 - R9 are callee saved, their state is | 664 | place function arguments into R1 to R5 registers to satisfy calling |
| 651 | preserved across the call. | 665 | convention, then the interpreter will take them from registers and pass |
| 652 | 666 | to in-kernel function. If R1 - R5 registers are mapped to CPU registers | |
| 653 | Also in the new design, BPF is limited to 4096 insns, which means that any | 667 | that are used for argument passing on given architecture, the JIT compiler |
| 668 | doesn't need to emit extra moves. Function arguments will be in the correct | ||
| 669 | registers and BPF_CALL instruction will be JITed as single 'call' HW | ||
| 670 | instruction. This calling convention was picked to cover common call | ||
| 671 | situations without performance penalty. | ||
| 672 | |||
| 673 | After an in-kernel function call, R1 - R5 are reset to unreadable and R0 has | ||
| 674 | a return value of the function. Since R6 - R9 are callee saved, their state | ||
| 675 | is preserved across the call. | ||
| 676 | |||
| 677 | For example, consider three C functions: | ||
| 678 | |||
| 679 | u64 f1() { return (*_f2)(1); } | ||
| 680 | u64 f2(u64 a) { return f3(a + 1, a); } | ||
| 681 | u64 f3(u64 a, u64 b) { return a - b; } | ||
| 682 | |||
| 683 | GCC can compile f1, f3 into x86_64: | ||
| 684 | |||
| 685 | f1: | ||
| 686 | movl $1, %edi | ||
| 687 | movq _f2(%rip), %rax | ||
| 688 | jmp *%rax | ||
| 689 | f3: | ||
| 690 | movq %rdi, %rax | ||
| 691 | subq %rsi, %rax | ||
| 692 | ret | ||
| 693 | |||
| 694 | Function f2 in eBPF may look like: | ||
| 695 | |||
| 696 | f2: | ||
| 697 | bpf_mov R2, R1 | ||
| 698 | bpf_add R1, 1 | ||
| 699 | bpf_call f3 | ||
| 700 | bpf_exit | ||
| 701 | |||
| 702 | If f2 is JITed and the pointer stored to '_f2'. The calls f1 -> f2 -> f3 and | ||
| 703 | returns will be seamless. Without JIT, __sk_run_filter() interpreter needs to | ||
| 704 | be used to call into f2. | ||
| 705 | |||
| 706 | For practical reasons all eBPF programs have only one argument 'ctx' which is | ||
| 707 | already placed into R1 (e.g. on __sk_run_filter() startup) and the programs | ||
| 708 | can call kernel functions with up to 5 arguments. Calls with 6 or more arguments | ||
| 709 | are currently not supported, but these restrictions can be lifted if necessary | ||
| 710 | in the future. | ||
| 711 | |||
| 712 | On 64-bit architectures all register map to HW registers one to one. For | ||
| 713 | example, x86_64 JIT compiler can map them as ... | ||
| 714 | |||
| 715 | R0 - rax | ||
| 716 | R1 - rdi | ||
| 717 | R2 - rsi | ||
| 718 | R3 - rdx | ||
| 719 | R4 - rcx | ||
| 720 | R5 - r8 | ||
| 721 | R6 - rbx | ||
| 722 | R7 - r13 | ||
| 723 | R8 - r14 | ||
| 724 | R9 - r15 | ||
| 725 | R10 - rbp | ||
| 726 | |||
| 727 | ... since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing | ||
| 728 | and rbx, r12 - r15 are callee saved. | ||
| 729 | |||
| 730 | Then the following internal BPF pseudo-program: | ||
| 731 | |||
| 732 | bpf_mov R6, R1 /* save ctx */ | ||
| 733 | bpf_mov R2, 2 | ||
| 734 | bpf_mov R3, 3 | ||
| 735 | bpf_mov R4, 4 | ||
| 736 | bpf_mov R5, 5 | ||
| 737 | bpf_call foo | ||
| 738 | bpf_mov R7, R0 /* save foo() return value */ | ||
| 739 | bpf_mov R1, R6 /* restore ctx for next call */ | ||
| 740 | bpf_mov R2, 6 | ||
| 741 | bpf_mov R3, 7 | ||
| 742 | bpf_mov R4, 8 | ||
| 743 | bpf_mov R5, 9 | ||
| 744 | bpf_call bar | ||
| 745 | bpf_add R0, R7 | ||
| 746 | bpf_exit | ||
| 747 | |||
| 748 | After JIT to x86_64 may look like: | ||
| 749 | |||
| 750 | push %rbp | ||
| 751 | mov %rsp,%rbp | ||
| 752 | sub $0x228,%rsp | ||
| 753 | mov %rbx,-0x228(%rbp) | ||
| 754 | mov %r13,-0x220(%rbp) | ||
| 755 | mov %rdi,%rbx | ||
| 756 | mov $0x2,%esi | ||
| 757 | mov $0x3,%edx | ||
| 758 | mov $0x4,%ecx | ||
| 759 | mov $0x5,%r8d | ||
| 760 | callq foo | ||
| 761 | mov %rax,%r13 | ||
| 762 | mov %rbx,%rdi | ||
| 763 | mov $0x2,%esi | ||
| 764 | mov $0x3,%edx | ||
| 765 | mov $0x4,%ecx | ||
| 766 | mov $0x5,%r8d | ||
| 767 | callq bar | ||
| 768 | add %r13,%rax | ||
| 769 | mov -0x228(%rbp),%rbx | ||
| 770 | mov -0x220(%rbp),%r13 | ||
| 771 | leaveq | ||
| 772 | retq | ||
| 773 | |||
| 774 | Which is in this example equivalent in C to: | ||
| 775 | |||
| 776 | u64 bpf_filter(u64 ctx) | ||
| 777 | { | ||
| 778 | return foo(ctx, 2, 3, 4, 5) + bar(ctx, 6, 7, 8, 9); | ||
| 779 | } | ||
| 780 | |||
| 781 | In-kernel functions foo() and bar() with prototype: u64 (*)(u64 arg1, u64 | ||
| 782 | arg2, u64 arg3, u64 arg4, u64 arg5); will receive arguments in proper | ||
| 783 | registers and place their return value into '%rax' which is R0 in eBPF. | ||
| 784 | Prologue and epilogue are emitted by JIT and are implicit in the | ||
| 785 | interpreter. R0-R5 are scratch registers, so eBPF program needs to preserve | ||
| 786 | them across the calls as defined by calling convention. | ||
| 787 | |||
| 788 | For example the following program is invalid: | ||
| 789 | |||
| 790 | bpf_mov R1, 1 | ||
| 791 | bpf_call foo | ||
| 792 | bpf_mov R0, R1 | ||
| 793 | bpf_exit | ||
| 794 | |||
| 795 | After the call the registers R1-R5 contain junk values and cannot be read. | ||
| 796 | In the future an eBPF verifier can be used to validate internal BPF programs. | ||
| 797 | |||
| 798 | Also in the new design, eBPF is limited to 4096 insns, which means that any | ||
| 654 | program will terminate quickly and will only call a fixed number of kernel | 799 | program will terminate quickly and will only call a fixed number of kernel |
| 655 | functions. Original BPF and the new format are two operand instructions, | 800 | functions. Original BPF and the new format are two operand instructions, |
| 656 | which helps to do one-to-one mapping between BPF insn and x86 insn during JIT. | 801 | which helps to do one-to-one mapping between eBPF insn and x86 insn during JIT. |
| 657 | 802 | ||
| 658 | The input context pointer for invoking the interpreter function is generic, | 803 | The input context pointer for invoking the interpreter function is generic, |
| 659 | its content is defined by a specific use case. For seccomp register R1 points | 804 | its content is defined by a specific use case. For seccomp register R1 points |
| @@ -661,7 +806,26 @@ to seccomp_data, for converted BPF filters R1 points to a skb. | |||
| 661 | 806 | ||
| 662 | A program, that is translated internally consists of the following elements: | 807 | A program, that is translated internally consists of the following elements: |
| 663 | 808 | ||
| 664 | op:16, jt:8, jf:8, k:32 ==> op:8, a_reg:4, x_reg:4, off:16, imm:32 | 809 | op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32 |
| 810 | |||
| 811 | So far 87 internal BPF instructions were implemented. 8-bit 'op' opcode field | ||
| 812 | has room for new instructions. Some of them may use 16/24/32 byte encoding. New | ||
| 813 | instructions must be multiple of 8 bytes to preserve backward compatibility. | ||
| 814 | |||
| 815 | Internal BPF is a general purpose RISC instruction set. Not every register and | ||
| 816 | every instruction are used during translation from original BPF to new format. | ||
| 817 | For example, socket filters are not using 'exclusive add' instruction, but | ||
| 818 | tracing filters may do to maintain counters of events, for example. Register R9 | ||
| 819 | is not used by socket filters either, but more complex filters may be running | ||
| 820 | out of registers and would have to resort to spill/fill to stack. | ||
| 821 | |||
| 822 | Internal BPF can used as generic assembler for last step performance | ||
| 823 | optimizations, socket filters and seccomp are using it as assembler. Tracing | ||
| 824 | filters may use it as assembler to generate code from kernel. In kernel usage | ||
| 825 | may not be bounded by security considerations, since generated internal BPF code | ||
| 826 | may be optimizing internal code path and not being exposed to the user space. | ||
| 827 | Safety of internal BPF can come from a verifier (TBD). In such use cases as | ||
| 828 | described, it may be used as safe instruction set. | ||
| 665 | 829 | ||
| 666 | Just like the original BPF, the new format runs within a controlled environment, | 830 | Just like the original BPF, the new format runs within a controlled environment, |
| 667 | is deterministic and the kernel can easily prove that. The safety of the program | 831 | is deterministic and the kernel can easily prove that. The safety of the program |
| @@ -670,6 +834,181 @@ loops and other CFG validation; second step starts from the first insn and | |||
| 670 | descends all possible paths. It simulates execution of every insn and observes | 834 | descends all possible paths. It simulates execution of every insn and observes |
| 671 | the state change of registers and stack. | 835 | the state change of registers and stack. |
| 672 | 836 | ||
| 837 | eBPF opcode encoding | ||
| 838 | -------------------- | ||
| 839 | |||
| 840 | eBPF is reusing most of the opcode encoding from classic to simplify conversion | ||
| 841 | of classic BPF to eBPF. For arithmetic and jump instructions the 8-bit 'code' | ||
| 842 | field is divided into three parts: | ||
| 843 | |||
| 844 | +----------------+--------+--------------------+ | ||
| 845 | | 4 bits | 1 bit | 3 bits | | ||
| 846 | | operation code | source | instruction class | | ||
| 847 | +----------------+--------+--------------------+ | ||
| 848 | (MSB) (LSB) | ||
| 849 | |||
| 850 | Three LSB bits store instruction class which is one of: | ||
| 851 | |||
| 852 | Classic BPF classes: eBPF classes: | ||
| 853 | |||
| 854 | BPF_LD 0x00 BPF_LD 0x00 | ||
| 855 | BPF_LDX 0x01 BPF_LDX 0x01 | ||
| 856 | BPF_ST 0x02 BPF_ST 0x02 | ||
| 857 | BPF_STX 0x03 BPF_STX 0x03 | ||
| 858 | BPF_ALU 0x04 BPF_ALU 0x04 | ||
| 859 | BPF_JMP 0x05 BPF_JMP 0x05 | ||
| 860 | BPF_RET 0x06 [ class 6 unused, for future if needed ] | ||
| 861 | BPF_MISC 0x07 BPF_ALU64 0x07 | ||
| 862 | |||
| 863 | When BPF_CLASS(code) == BPF_ALU or BPF_JMP, 4th bit encodes source operand ... | ||
| 864 | |||
| 865 | BPF_K 0x00 | ||
| 866 | BPF_X 0x08 | ||
| 867 | |||
| 868 | * in classic BPF, this means: | ||
| 869 | |||
| 870 | BPF_SRC(code) == BPF_X - use register X as source operand | ||
| 871 | BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand | ||
| 872 | |||
| 873 | * in eBPF, this means: | ||
| 874 | |||
| 875 | BPF_SRC(code) == BPF_X - use 'src_reg' register as source operand | ||
| 876 | BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand | ||
| 877 | |||
| 878 | ... and four MSB bits store operation code. | ||
| 879 | |||
| 880 | If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of: | ||
| 881 | |||
| 882 | BPF_ADD 0x00 | ||
| 883 | BPF_SUB 0x10 | ||
| 884 | BPF_MUL 0x20 | ||
| 885 | BPF_DIV 0x30 | ||
| 886 | BPF_OR 0x40 | ||
| 887 | BPF_AND 0x50 | ||
| 888 | BPF_LSH 0x60 | ||
| 889 | BPF_RSH 0x70 | ||
| 890 | BPF_NEG 0x80 | ||
| 891 | BPF_MOD 0x90 | ||
| 892 | BPF_XOR 0xa0 | ||
| 893 | BPF_MOV 0xb0 /* eBPF only: mov reg to reg */ | ||
| 894 | BPF_ARSH 0xc0 /* eBPF only: sign extending shift right */ | ||
| 895 | BPF_END 0xd0 /* eBPF only: endianness conversion */ | ||
| 896 | |||
| 897 | If BPF_CLASS(code) == BPF_JMP, BPF_OP(code) is one of: | ||
| 898 | |||
| 899 | BPF_JA 0x00 | ||
| 900 | BPF_JEQ 0x10 | ||
| 901 | BPF_JGT 0x20 | ||
| 902 | BPF_JGE 0x30 | ||
| 903 | BPF_JSET 0x40 | ||
| 904 | BPF_JNE 0x50 /* eBPF only: jump != */ | ||
| 905 | BPF_JSGT 0x60 /* eBPF only: signed '>' */ | ||
| 906 | BPF_JSGE 0x70 /* eBPF only: signed '>=' */ | ||
| 907 | BPF_CALL 0x80 /* eBPF only: function call */ | ||
| 908 | BPF_EXIT 0x90 /* eBPF only: function return */ | ||
| 909 | |||
| 910 | So BPF_ADD | BPF_X | BPF_ALU means 32-bit addition in both classic BPF | ||
| 911 | and eBPF. There are only two registers in classic BPF, so it means A += X. | ||
| 912 | In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly, | ||
| 913 | BPF_XOR | BPF_K | BPF_ALU means A ^= imm32 in classic BPF and analogous | ||
| 914 | src_reg = (u32) src_reg ^ (u32) imm32 in eBPF. | ||
| 915 | |||
| 916 | Classic BPF is using BPF_MISC class to represent A = X and X = A moves. | ||
| 917 | eBPF is using BPF_MOV | BPF_X | BPF_ALU code instead. Since there are no | ||
| 918 | BPF_MISC operations in eBPF, the class 7 is used as BPF_ALU64 to mean | ||
| 919 | exactly the same operations as BPF_ALU, but with 64-bit wide operands | ||
| 920 | instead. So BPF_ADD | BPF_X | BPF_ALU64 means 64-bit addition, i.e.: | ||
| 921 | dst_reg = dst_reg + src_reg | ||
| 922 | |||
| 923 | Classic BPF wastes the whole BPF_RET class to represent a single 'ret' | ||
| 924 | operation. Classic BPF_RET | BPF_K means copy imm32 into return register | ||
| 925 | and perform function exit. eBPF is modeled to match CPU, so BPF_JMP | BPF_EXIT | ||
| 926 | in eBPF means function exit only. The eBPF program needs to store return | ||
| 927 | value into register R0 before doing a BPF_EXIT. Class 6 in eBPF is currently | ||
| 928 | unused and reserved for future use. | ||
| 929 | |||
| 930 | For load and store instructions the 8-bit 'code' field is divided as: | ||
| 931 | |||
| 932 | +--------+--------+-------------------+ | ||
| 933 | | 3 bits | 2 bits | 3 bits | | ||
| 934 | | mode | size | instruction class | | ||
| 935 | +--------+--------+-------------------+ | ||
| 936 | (MSB) (LSB) | ||
| 937 | |||
| 938 | Size modifier is one of ... | ||
| 939 | |||
| 940 | BPF_W 0x00 /* word */ | ||
| 941 | BPF_H 0x08 /* half word */ | ||
| 942 | BPF_B 0x10 /* byte */ | ||
| 943 | BPF_DW 0x18 /* eBPF only, double word */ | ||
| 944 | |||
| 945 | ... which encodes size of load/store operation: | ||
| 946 | |||
| 947 | B - 1 byte | ||
| 948 | H - 2 byte | ||
| 949 | W - 4 byte | ||
| 950 | DW - 8 byte (eBPF only) | ||
| 951 | |||
| 952 | Mode modifier is one of: | ||
| 953 | |||
| 954 | BPF_IMM 0x00 /* classic BPF only, reserved in eBPF */ | ||
| 955 | BPF_ABS 0x20 | ||
| 956 | BPF_IND 0x40 | ||
| 957 | BPF_MEM 0x60 | ||
| 958 | BPF_LEN 0x80 /* classic BPF only, reserved in eBPF */ | ||
| 959 | BPF_MSH 0xa0 /* classic BPF only, reserved in eBPF */ | ||
| 960 | BPF_XADD 0xc0 /* eBPF only, exclusive add */ | ||
| 961 | |||
| 962 | eBPF has two non-generic instructions: (BPF_ABS | <size> | BPF_LD) and | ||
| 963 | (BPF_IND | <size> | BPF_LD) which are used to access packet data. | ||
| 964 | |||
| 965 | They had to be carried over from classic to have strong performance of | ||
| 966 | socket filters running in eBPF interpreter. These instructions can only | ||
| 967 | be used when interpreter context is a pointer to 'struct sk_buff' and | ||
| 968 | have seven implicit operands. Register R6 is an implicit input that must | ||
| 969 | contain pointer to sk_buff. Register R0 is an implicit output which contains | ||
| 970 | the data fetched from the packet. Registers R1-R5 are scratch registers | ||
| 971 | and must not be used to store the data across BPF_ABS | BPF_LD or | ||
| 972 | BPF_IND | BPF_LD instructions. | ||
| 973 | |||
| 974 | These instructions have implicit program exit condition as well. When | ||
| 975 | eBPF program is trying to access the data beyond the packet boundary, | ||
| 976 | the interpreter will abort the execution of the program. JIT compilers | ||
| 977 | therefore must preserve this property. src_reg and imm32 fields are | ||
| 978 | explicit inputs to these instructions. | ||
| 979 | |||
| 980 | For example: | ||
| 981 | |||
| 982 | BPF_IND | BPF_W | BPF_LD means: | ||
| 983 | |||
| 984 | R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + src_reg + imm32)) | ||
| 985 | and R1 - R5 were scratched. | ||
| 986 | |||
| 987 | Unlike classic BPF instruction set, eBPF has generic load/store operations: | ||
| 988 | |||
| 989 | BPF_MEM | <size> | BPF_STX: *(size *) (dst_reg + off) = src_reg | ||
| 990 | BPF_MEM | <size> | BPF_ST: *(size *) (dst_reg + off) = imm32 | ||
| 991 | BPF_MEM | <size> | BPF_LDX: dst_reg = *(size *) (src_reg + off) | ||
| 992 | BPF_XADD | BPF_W | BPF_STX: lock xadd *(u32 *)(dst_reg + off16) += src_reg | ||
| 993 | BPF_XADD | BPF_DW | BPF_STX: lock xadd *(u64 *)(dst_reg + off16) += src_reg | ||
| 994 | |||
| 995 | Where size is one of: BPF_B or BPF_H or BPF_W or BPF_DW. Note that 1 and | ||
| 996 | 2 byte atomic increments are not supported. | ||
| 997 | |||
| 998 | Testing | ||
| 999 | ------- | ||
| 1000 | |||
| 1001 | Next to the BPF toolchain, the kernel also ships a test module that contains | ||
| 1002 | various test cases for classic and internal BPF that can be executed against | ||
| 1003 | the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and | ||
| 1004 | enabled via Kconfig: | ||
| 1005 | |||
| 1006 | CONFIG_TEST_BPF=m | ||
| 1007 | |||
| 1008 | After the module has been built and installed, the test suite can be executed | ||
| 1009 | via insmod or modprobe against 'test_bpf' module. Results of the test cases | ||
| 1010 | including timings in nsec can be found in the kernel log (dmesg). | ||
| 1011 | |||
| 673 | Misc | 1012 | Misc |
| 674 | ---- | 1013 | ---- |
| 675 | 1014 | ||
diff --git a/Documentation/platform/x86-laptop-drivers.txt b/Documentation/platform/x86-laptop-drivers.txt new file mode 100644 index 000000000000..01facd2590bb --- /dev/null +++ b/Documentation/platform/x86-laptop-drivers.txt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | compal-laptop | ||
| 2 | ============= | ||
| 3 | List of supported hardware: | ||
| 4 | |||
| 5 | by Compal: | ||
| 6 | Compal FL90/IFL90 | ||
| 7 | Compal FL91/IFL91 | ||
| 8 | Compal FL92/JFL92 | ||
| 9 | Compal FT00/IFT00 | ||
| 10 | |||
| 11 | by Dell: | ||
| 12 | Dell Vostro 1200 | ||
| 13 | Dell Mini 9 (Inspiron 910) | ||
| 14 | Dell Mini 10 (Inspiron 1010) | ||
| 15 | Dell Mini 10v (Inspiron 1011) | ||
| 16 | Dell Mini 1012 (Inspiron 1012) | ||
| 17 | Dell Inspiron 11z (Inspiron 1110) | ||
| 18 | Dell Mini 12 (Inspiron 1210) | ||
diff --git a/Documentation/power/suspend-and-cpuhotplug.txt b/Documentation/power/suspend-and-cpuhotplug.txt index e13dafc8e8f1..2850df3bf957 100644 --- a/Documentation/power/suspend-and-cpuhotplug.txt +++ b/Documentation/power/suspend-and-cpuhotplug.txt | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | Interaction of Suspend code (S3) with the CPU hotplug infrastructure | 1 | Interaction of Suspend code (S3) with the CPU hotplug infrastructure |
| 2 | 2 | ||
| 3 | (C) 2011 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 3 | (C) 2011 - 2014 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM | 6 | I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM |
diff --git a/Documentation/powerpc/cpu_families.txt b/Documentation/powerpc/cpu_families.txt new file mode 100644 index 000000000000..fc08e22feb1a --- /dev/null +++ b/Documentation/powerpc/cpu_families.txt | |||
| @@ -0,0 +1,221 @@ | |||
| 1 | CPU Families | ||
| 2 | ============ | ||
| 3 | |||
| 4 | This document tries to summarise some of the different cpu families that exist | ||
| 5 | and are supported by arch/powerpc. | ||
| 6 | |||
| 7 | |||
| 8 | Book3S (aka sPAPR) | ||
| 9 | ------------------ | ||
| 10 | |||
| 11 | - Hash MMU | ||
| 12 | - Mix of 32 & 64 bit | ||
| 13 | |||
| 14 | +--------------+ +----------------+ | ||
| 15 | | Old POWER | --------------> | RS64 (threads) | | ||
| 16 | +--------------+ +----------------+ | ||
| 17 | | | ||
| 18 | | | ||
| 19 | v | ||
| 20 | +--------------+ +----------------+ +------+ | ||
| 21 | | 601 | --------------> | 603 | ---> | e300 | | ||
| 22 | +--------------+ +----------------+ +------+ | ||
| 23 | | | | ||
| 24 | | | | ||
| 25 | v v | ||
| 26 | +--------------+ +----------------+ +-------+ | ||
| 27 | | 604 | | 750 (G3) | ---> | 750CX | | ||
| 28 | +--------------+ +----------------+ +-------+ | ||
| 29 | | | | | ||
| 30 | | | | | ||
| 31 | v v v | ||
| 32 | +--------------+ +----------------+ +-------+ | ||
| 33 | | 620 (64 bit) | | 7400 | | 750CL | | ||
| 34 | +--------------+ +----------------+ +-------+ | ||
| 35 | | | | | ||
| 36 | | | | | ||
| 37 | v v v | ||
| 38 | +--------------+ +----------------+ +-------+ | ||
| 39 | | POWER3/630 | | 7410 | | 750FX | | ||
| 40 | +--------------+ +----------------+ +-------+ | ||
| 41 | | | | ||
| 42 | | | | ||
| 43 | v v | ||
| 44 | +--------------+ +----------------+ | ||
| 45 | | POWER3+ | | 7450 | | ||
| 46 | +--------------+ +----------------+ | ||
| 47 | | | | ||
| 48 | | | | ||
| 49 | v v | ||
| 50 | +--------------+ +----------------+ | ||
| 51 | | POWER4 | | 7455 | | ||
| 52 | +--------------+ +----------------+ | ||
| 53 | | | | ||
| 54 | | | | ||
| 55 | v v | ||
| 56 | +--------------+ +-------+ +----------------+ | ||
| 57 | | POWER4+ | --> | 970 | | 7447 | | ||
| 58 | +--------------+ +-------+ +----------------+ | ||
| 59 | | | | | ||
| 60 | | | | | ||
| 61 | v v v | ||
| 62 | +--------------+ +-------+ +----------------+ | ||
| 63 | | POWER5 | | 970FX | | 7448 | | ||
| 64 | +--------------+ +-------+ +----------------+ | ||
| 65 | | | | | ||
| 66 | | | | | ||
| 67 | v v v | ||
| 68 | +--------------+ +-------+ +----------------+ | ||
| 69 | | POWER5+ | | 970MP | | e600 | | ||
| 70 | +--------------+ +-------+ +----------------+ | ||
| 71 | | | ||
| 72 | | | ||
| 73 | v | ||
| 74 | +--------------+ | ||
| 75 | | POWER5++ | | ||
| 76 | +--------------+ | ||
| 77 | | | ||
| 78 | | | ||
| 79 | v | ||
| 80 | +--------------+ +-------+ | ||
| 81 | | POWER6 | <-?-> | Cell | | ||
| 82 | +--------------+ +-------+ | ||
| 83 | | | ||
| 84 | | | ||
| 85 | v | ||
| 86 | +--------------+ | ||
| 87 | | POWER7 | | ||
| 88 | +--------------+ | ||
| 89 | | | ||
| 90 | | | ||
| 91 | v | ||
| 92 | +--------------+ | ||
| 93 | | POWER7+ | | ||
| 94 | +--------------+ | ||
| 95 | | | ||
| 96 | | | ||
| 97 | v | ||
| 98 | +--------------+ | ||
| 99 | | POWER8 | | ||
| 100 | +--------------+ | ||
| 101 | |||
| 102 | |||
| 103 | +---------------+ | ||
| 104 | | PA6T (64 bit) | | ||
| 105 | +---------------+ | ||
| 106 | |||
| 107 | |||
| 108 | IBM BookE | ||
| 109 | --------- | ||
| 110 | |||
| 111 | - Software loaded TLB. | ||
| 112 | - All 32 bit | ||
| 113 | |||
| 114 | +--------------+ | ||
| 115 | | 401 | | ||
| 116 | +--------------+ | ||
| 117 | | | ||
| 118 | | | ||
| 119 | v | ||
| 120 | +--------------+ | ||
| 121 | | 403 | | ||
| 122 | +--------------+ | ||
| 123 | | | ||
| 124 | | | ||
| 125 | v | ||
| 126 | +--------------+ | ||
| 127 | | 405 | | ||
| 128 | +--------------+ | ||
| 129 | | | ||
| 130 | | | ||
| 131 | v | ||
| 132 | +--------------+ | ||
| 133 | | 440 | | ||
| 134 | +--------------+ | ||
| 135 | | | ||
| 136 | | | ||
| 137 | v | ||
| 138 | +--------------+ +----------------+ | ||
| 139 | | 450 | --> | BG/P | | ||
| 140 | +--------------+ +----------------+ | ||
| 141 | | | ||
| 142 | | | ||
| 143 | v | ||
| 144 | +--------------+ | ||
| 145 | | 460 | | ||
| 146 | +--------------+ | ||
| 147 | | | ||
| 148 | | | ||
| 149 | v | ||
| 150 | +--------------+ | ||
| 151 | | 476 | | ||
| 152 | +--------------+ | ||
| 153 | |||
| 154 | |||
| 155 | Motorola/Freescale 8xx | ||
| 156 | ---------------------- | ||
| 157 | |||
| 158 | - Software loaded with hardware assist. | ||
| 159 | - All 32 bit | ||
| 160 | |||
| 161 | +-------------+ | ||
| 162 | | MPC8xx Core | | ||
| 163 | +-------------+ | ||
| 164 | |||
| 165 | |||
| 166 | Freescale BookE | ||
| 167 | --------------- | ||
| 168 | |||
| 169 | - Software loaded TLB. | ||
| 170 | - e6500 adds HW loaded indirect TLB entries. | ||
| 171 | - Mix of 32 & 64 bit | ||
| 172 | |||
| 173 | +--------------+ | ||
| 174 | | e200 | | ||
| 175 | +--------------+ | ||
| 176 | |||
| 177 | |||
| 178 | +--------------------------------+ | ||
| 179 | | e500 | | ||
| 180 | +--------------------------------+ | ||
| 181 | | | ||
| 182 | | | ||
| 183 | v | ||
| 184 | +--------------------------------+ | ||
| 185 | | e500v2 | | ||
| 186 | +--------------------------------+ | ||
| 187 | | | ||
| 188 | | | ||
| 189 | v | ||
| 190 | +--------------------------------+ | ||
| 191 | | e500mc (Book3e) | | ||
| 192 | +--------------------------------+ | ||
| 193 | | | ||
| 194 | | | ||
| 195 | v | ||
| 196 | +--------------------------------+ | ||
| 197 | | e5500 (64 bit) | | ||
| 198 | +--------------------------------+ | ||
| 199 | | | ||
| 200 | | | ||
| 201 | v | ||
| 202 | +--------------------------------+ | ||
| 203 | | e6500 (HW TLB) (Multithreaded) | | ||
| 204 | +--------------------------------+ | ||
| 205 | |||
| 206 | |||
| 207 | IBM A2 core | ||
| 208 | ----------- | ||
| 209 | |||
| 210 | - Book3E, software loaded TLB + HW loaded indirect TLB entries. | ||
| 211 | - 64 bit | ||
| 212 | |||
| 213 | +--------------+ +----------------+ | ||
| 214 | | A2 core | --> | WSP | | ||
| 215 | +--------------+ +----------------+ | ||
| 216 | | | ||
| 217 | | | ||
| 218 | v | ||
| 219 | +--------------+ | ||
| 220 | | BG/Q | | ||
| 221 | +--------------+ | ||
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 93cb97974986..ca895fd211e4 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt | |||
| @@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM | |||
| 19 | consumers to providers, as given in the following example: | 19 | consumers to providers, as given in the following example: |
| 20 | 20 | ||
| 21 | static struct pwm_lookup board_pwm_lookup[] = { | 21 | static struct pwm_lookup board_pwm_lookup[] = { |
| 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), | 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, |
| 23 | 50000, PWM_POLARITY_NORMAL), | ||
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | static void __init board_init(void) | 26 | static void __init board_init(void) |
| @@ -97,6 +98,13 @@ pwm_chip as argument which provides a description of the PWM chip, the | |||
| 97 | number of PWM devices provided by the chip and the chip-specific | 98 | number of PWM devices provided by the chip and the chip-specific |
| 98 | implementation of the supported PWM operations to the framework. | 99 | implementation of the supported PWM operations to the framework. |
| 99 | 100 | ||
| 101 | When implementing polarity support in a PWM driver, make sure to respect the | ||
| 102 | signal conventions in the PWM framework. By definition, normal polarity | ||
| 103 | characterizes a signal starts high for the duration of the duty cycle and | ||
| 104 | goes low for the remainder of the period. Conversely, a signal with inversed | ||
| 105 | polarity starts low for the duration of the duty cycle and goes high for the | ||
| 106 | remainder of the period. | ||
| 107 | |||
| 100 | Locking | 108 | Locking |
| 101 | ------- | 109 | ------- |
| 102 | 110 | ||
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx index 5020b7b5a244..52f0b4359234 100644 --- a/Documentation/scsi/LICENSE.qla2xxx +++ b/Documentation/scsi/LICENSE.qla2xxx | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | Copyright (c) 2003-2013 QLogic Corporation | 1 | Copyright (c) 2003-2014 QLogic Corporation |
| 2 | QLogic Linux FC-FCoE Driver | 2 | QLogic Linux FC-FCoE Driver |
| 3 | 3 | ||
| 4 | This program includes a device driver for Linux 3.x. | 4 | This program includes a device driver for Linux 3.x. |
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index 5ea996f21d6c..b6ef7e9dba30 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
| @@ -204,6 +204,16 @@ onlycap | |||
| 204 | these capabilities are effective at for processes with any | 204 | these capabilities are effective at for processes with any |
| 205 | label. The value is set by writing the desired label to the | 205 | label. The value is set by writing the desired label to the |
| 206 | file or cleared by writing "-" to the file. | 206 | file or cleared by writing "-" to the file. |
| 207 | ptrace | ||
| 208 | This is used to define the current ptrace policy | ||
| 209 | 0 - default: this is the policy that relies on smack access rules. | ||
| 210 | For the PTRACE_READ a subject needs to have a read access on | ||
| 211 | object. For the PTRACE_ATTACH a read-write access is required. | ||
| 212 | 1 - exact: this is the policy that limits PTRACE_ATTACH. Attach is | ||
| 213 | only allowed when subject's and object's labels are equal. | ||
| 214 | PTRACE_READ is not affected. Can be overriden with CAP_SYS_PTRACE. | ||
| 215 | 2 - draconian: this policy behaves like the 'exact' above with an | ||
| 216 | exception that it can't be overriden with CAP_SYS_PTRACE. | ||
| 207 | revoke-subject | 217 | revoke-subject |
| 208 | Writing a Smack label here sets the access to '-' for all access | 218 | Writing a Smack label here sets the access to '-' for all access |
| 209 | rules with that subject label. | 219 | rules with that subject label. |
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index bd365988e8d8..2479b2a0c77c 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
| @@ -2003,6 +2003,32 @@ want, depending on your needs. | |||
| 2003 | 360.774530 | 1) 0.594 us | __phys_addr(); | 2003 | 360.774530 | 1) 0.594 us | __phys_addr(); |
| 2004 | 2004 | ||
| 2005 | 2005 | ||
| 2006 | The function name is always displayed after the closing bracket | ||
| 2007 | for a function if the start of that function is not in the | ||
| 2008 | trace buffer. | ||
| 2009 | |||
| 2010 | Display of the function name after the closing bracket may be | ||
| 2011 | enabled for functions whose start is in the trace buffer, | ||
| 2012 | allowing easier searching with grep for function durations. | ||
| 2013 | It is default disabled. | ||
| 2014 | |||
| 2015 | hide: echo nofuncgraph-tail > trace_options | ||
| 2016 | show: echo funcgraph-tail > trace_options | ||
| 2017 | |||
| 2018 | Example with nofuncgraph-tail (default): | ||
| 2019 | 0) | putname() { | ||
| 2020 | 0) | kmem_cache_free() { | ||
| 2021 | 0) 0.518 us | __phys_addr(); | ||
| 2022 | 0) 1.757 us | } | ||
| 2023 | 0) 2.861 us | } | ||
| 2024 | |||
| 2025 | Example with funcgraph-tail: | ||
| 2026 | 0) | putname() { | ||
| 2027 | 0) | kmem_cache_free() { | ||
| 2028 | 0) 0.518 us | __phys_addr(); | ||
| 2029 | 0) 1.757 us | } /* kmem_cache_free() */ | ||
| 2030 | 0) 2.861 us | } /* putname() */ | ||
| 2031 | |||
| 2006 | You can put some comments on specific functions by using | 2032 | You can put some comments on specific functions by using |
| 2007 | trace_printk() For example, if you want to put a comment inside | 2033 | trace_printk() For example, if you want to put a comment inside |
| 2008 | the __might_sleep() function, you just have to include | 2034 | the __might_sleep() function, you just have to include |
diff --git a/Documentation/trace/tracepoints.txt b/Documentation/trace/tracepoints.txt index 6b018b53177a..a3efac621c5a 100644 --- a/Documentation/trace/tracepoints.txt +++ b/Documentation/trace/tracepoints.txt | |||
| @@ -115,6 +115,30 @@ If the tracepoint has to be used in kernel modules, an | |||
| 115 | EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be | 115 | EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be |
| 116 | used to export the defined tracepoints. | 116 | used to export the defined tracepoints. |
| 117 | 117 | ||
| 118 | If you need to do a bit of work for a tracepoint parameter, and | ||
| 119 | that work is only used for the tracepoint, that work can be encapsulated | ||
| 120 | within an if statement with the following: | ||
| 121 | |||
| 122 | if (trace_foo_bar_enabled()) { | ||
| 123 | int i; | ||
| 124 | int tot = 0; | ||
| 125 | |||
| 126 | for (i = 0; i < count; i++) | ||
| 127 | tot += calculate_nuggets(); | ||
| 128 | |||
| 129 | trace_foo_bar(tot); | ||
| 130 | } | ||
| 131 | |||
| 132 | All trace_<tracepoint>() calls have a matching trace_<tracepoint>_enabled() | ||
| 133 | function defined that returns true if the tracepoint is enabled and | ||
| 134 | false otherwise. The trace_<tracepoint>() should always be within the | ||
| 135 | block of the if (trace_<tracepoint>_enabled()) to prevent races between | ||
| 136 | the tracepoint being enabled and the check being seen. | ||
| 137 | |||
| 138 | The advantage of using the trace_<tracepoint>_enabled() is that it uses | ||
| 139 | the static_key of the tracepoint to allow the if statement to be implemented | ||
| 140 | with jump labels and avoid conditional branches. | ||
| 141 | |||
| 118 | Note: The convenience macro TRACE_EVENT provides an alternative way to | 142 | Note: The convenience macro TRACE_EVENT provides an alternative way to |
| 119 | define tracepoints. Check http://lwn.net/Articles/379903, | 143 | define tracepoints. Check http://lwn.net/Articles/379903, |
| 120 | http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 | 144 | http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 |
diff --git a/Documentation/vDSO/parse_vdso.c b/Documentation/vDSO/parse_vdso.c index 85870208edcf..1dbb4b87268f 100644 --- a/Documentation/vDSO/parse_vdso.c +++ b/Documentation/vDSO/parse_vdso.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * parse_vdso.c: Linux reference vDSO parser | 2 | * parse_vdso.c: Linux reference vDSO parser |
| 3 | * Written by Andrew Lutomirski, 2011. | 3 | * Written by Andrew Lutomirski, 2011-2014. |
| 4 | * | 4 | * |
| 5 | * This code is meant to be linked in to various programs that run on Linux. | 5 | * This code is meant to be linked in to various programs that run on Linux. |
| 6 | * As such, it is available with as few restrictions as possible. This file | 6 | * As such, it is available with as few restrictions as possible. This file |
| @@ -11,13 +11,14 @@ | |||
| 11 | * it starts a program. It works equally well in statically and dynamically | 11 | * it starts a program. It works equally well in statically and dynamically |
| 12 | * linked binaries. | 12 | * linked binaries. |
| 13 | * | 13 | * |
| 14 | * This code is tested on x86_64. In principle it should work on any 64-bit | 14 | * This code is tested on x86. In principle it should work on any |
| 15 | * architecture that has a vDSO. | 15 | * architecture that has a vDSO. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <stdbool.h> | 18 | #include <stdbool.h> |
| 19 | #include <stdint.h> | 19 | #include <stdint.h> |
| 20 | #include <string.h> | 20 | #include <string.h> |
| 21 | #include <limits.h> | ||
| 21 | #include <elf.h> | 22 | #include <elf.h> |
| 22 | 23 | ||
| 23 | /* | 24 | /* |
| @@ -45,11 +46,18 @@ extern void *vdso_sym(const char *version, const char *name); | |||
| 45 | 46 | ||
| 46 | 47 | ||
| 47 | /* And here's the code. */ | 48 | /* And here's the code. */ |
| 48 | 49 | #ifndef ELF_BITS | |
| 49 | #ifndef __x86_64__ | 50 | # if ULONG_MAX > 0xffffffffUL |
| 50 | # error Not yet ported to non-x86_64 architectures | 51 | # define ELF_BITS 64 |
| 52 | # else | ||
| 53 | # define ELF_BITS 32 | ||
| 54 | # endif | ||
| 51 | #endif | 55 | #endif |
| 52 | 56 | ||
| 57 | #define ELF_BITS_XFORM2(bits, x) Elf##bits##_##x | ||
| 58 | #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x) | ||
| 59 | #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x) | ||
| 60 | |||
| 53 | static struct vdso_info | 61 | static struct vdso_info |
| 54 | { | 62 | { |
| 55 | bool valid; | 63 | bool valid; |
| @@ -59,14 +67,14 @@ static struct vdso_info | |||
| 59 | uintptr_t load_offset; /* load_addr - recorded vaddr */ | 67 | uintptr_t load_offset; /* load_addr - recorded vaddr */ |
| 60 | 68 | ||
| 61 | /* Symbol table */ | 69 | /* Symbol table */ |
| 62 | Elf64_Sym *symtab; | 70 | ELF(Sym) *symtab; |
| 63 | const char *symstrings; | 71 | const char *symstrings; |
| 64 | Elf64_Word *bucket, *chain; | 72 | ELF(Word) *bucket, *chain; |
| 65 | Elf64_Word nbucket, nchain; | 73 | ELF(Word) nbucket, nchain; |
| 66 | 74 | ||
| 67 | /* Version table */ | 75 | /* Version table */ |
| 68 | Elf64_Versym *versym; | 76 | ELF(Versym) *versym; |
| 69 | Elf64_Verdef *verdef; | 77 | ELF(Verdef) *verdef; |
| 70 | } vdso_info; | 78 | } vdso_info; |
| 71 | 79 | ||
| 72 | /* Straight from the ELF specification. */ | 80 | /* Straight from the ELF specification. */ |
| @@ -92,9 +100,14 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 92 | 100 | ||
| 93 | vdso_info.load_addr = base; | 101 | vdso_info.load_addr = base; |
| 94 | 102 | ||
| 95 | Elf64_Ehdr *hdr = (Elf64_Ehdr*)base; | 103 | ELF(Ehdr) *hdr = (ELF(Ehdr)*)base; |
| 96 | Elf64_Phdr *pt = (Elf64_Phdr*)(vdso_info.load_addr + hdr->e_phoff); | 104 | if (hdr->e_ident[EI_CLASS] != |
| 97 | Elf64_Dyn *dyn = 0; | 105 | (ELF_BITS == 32 ? ELFCLASS32 : ELFCLASS64)) { |
| 106 | return; /* Wrong ELF class -- check ELF_BITS */ | ||
| 107 | } | ||
| 108 | |||
| 109 | ELF(Phdr) *pt = (ELF(Phdr)*)(vdso_info.load_addr + hdr->e_phoff); | ||
| 110 | ELF(Dyn) *dyn = 0; | ||
| 98 | 111 | ||
| 99 | /* | 112 | /* |
| 100 | * We need two things from the segment table: the load offset | 113 | * We need two things from the segment table: the load offset |
| @@ -108,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 108 | + (uintptr_t)pt[i].p_offset | 121 | + (uintptr_t)pt[i].p_offset |
| 109 | - (uintptr_t)pt[i].p_vaddr; | 122 | - (uintptr_t)pt[i].p_vaddr; |
| 110 | } else if (pt[i].p_type == PT_DYNAMIC) { | 123 | } else if (pt[i].p_type == PT_DYNAMIC) { |
| 111 | dyn = (Elf64_Dyn*)(base + pt[i].p_offset); | 124 | dyn = (ELF(Dyn)*)(base + pt[i].p_offset); |
| 112 | } | 125 | } |
| 113 | } | 126 | } |
| 114 | 127 | ||
| @@ -118,7 +131,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 118 | /* | 131 | /* |
| 119 | * Fish out the useful bits of the dynamic table. | 132 | * Fish out the useful bits of the dynamic table. |
| 120 | */ | 133 | */ |
| 121 | Elf64_Word *hash = 0; | 134 | ELF(Word) *hash = 0; |
| 122 | vdso_info.symstrings = 0; | 135 | vdso_info.symstrings = 0; |
| 123 | vdso_info.symtab = 0; | 136 | vdso_info.symtab = 0; |
| 124 | vdso_info.versym = 0; | 137 | vdso_info.versym = 0; |
| @@ -131,22 +144,22 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 131 | + vdso_info.load_offset); | 144 | + vdso_info.load_offset); |
| 132 | break; | 145 | break; |
| 133 | case DT_SYMTAB: | 146 | case DT_SYMTAB: |
| 134 | vdso_info.symtab = (Elf64_Sym *) | 147 | vdso_info.symtab = (ELF(Sym) *) |
| 135 | ((uintptr_t)dyn[i].d_un.d_ptr | 148 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 136 | + vdso_info.load_offset); | 149 | + vdso_info.load_offset); |
| 137 | break; | 150 | break; |
| 138 | case DT_HASH: | 151 | case DT_HASH: |
| 139 | hash = (Elf64_Word *) | 152 | hash = (ELF(Word) *) |
| 140 | ((uintptr_t)dyn[i].d_un.d_ptr | 153 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 141 | + vdso_info.load_offset); | 154 | + vdso_info.load_offset); |
| 142 | break; | 155 | break; |
| 143 | case DT_VERSYM: | 156 | case DT_VERSYM: |
| 144 | vdso_info.versym = (Elf64_Versym *) | 157 | vdso_info.versym = (ELF(Versym) *) |
| 145 | ((uintptr_t)dyn[i].d_un.d_ptr | 158 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 146 | + vdso_info.load_offset); | 159 | + vdso_info.load_offset); |
| 147 | break; | 160 | break; |
| 148 | case DT_VERDEF: | 161 | case DT_VERDEF: |
| 149 | vdso_info.verdef = (Elf64_Verdef *) | 162 | vdso_info.verdef = (ELF(Verdef) *) |
| 150 | ((uintptr_t)dyn[i].d_un.d_ptr | 163 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 151 | + vdso_info.load_offset); | 164 | + vdso_info.load_offset); |
| 152 | break; | 165 | break; |
| @@ -168,8 +181,8 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 168 | vdso_info.valid = true; | 181 | vdso_info.valid = true; |
| 169 | } | 182 | } |
| 170 | 183 | ||
| 171 | static bool vdso_match_version(Elf64_Versym ver, | 184 | static bool vdso_match_version(ELF(Versym) ver, |
| 172 | const char *name, Elf64_Word hash) | 185 | const char *name, ELF(Word) hash) |
| 173 | { | 186 | { |
| 174 | /* | 187 | /* |
| 175 | * This is a helper function to check if the version indexed by | 188 | * This is a helper function to check if the version indexed by |
| @@ -188,7 +201,7 @@ static bool vdso_match_version(Elf64_Versym ver, | |||
| 188 | 201 | ||
| 189 | /* First step: find the version definition */ | 202 | /* First step: find the version definition */ |
| 190 | ver &= 0x7fff; /* Apparently bit 15 means "hidden" */ | 203 | ver &= 0x7fff; /* Apparently bit 15 means "hidden" */ |
| 191 | Elf64_Verdef *def = vdso_info.verdef; | 204 | ELF(Verdef) *def = vdso_info.verdef; |
| 192 | while(true) { | 205 | while(true) { |
| 193 | if ((def->vd_flags & VER_FLG_BASE) == 0 | 206 | if ((def->vd_flags & VER_FLG_BASE) == 0 |
| 194 | && (def->vd_ndx & 0x7fff) == ver) | 207 | && (def->vd_ndx & 0x7fff) == ver) |
| @@ -197,11 +210,11 @@ static bool vdso_match_version(Elf64_Versym ver, | |||
| 197 | if (def->vd_next == 0) | 210 | if (def->vd_next == 0) |
| 198 | return false; /* No definition. */ | 211 | return false; /* No definition. */ |
| 199 | 212 | ||
| 200 | def = (Elf64_Verdef *)((char *)def + def->vd_next); | 213 | def = (ELF(Verdef) *)((char *)def + def->vd_next); |
| 201 | } | 214 | } |
| 202 | 215 | ||
| 203 | /* Now figure out whether it matches. */ | 216 | /* Now figure out whether it matches. */ |
| 204 | Elf64_Verdaux *aux = (Elf64_Verdaux*)((char *)def + def->vd_aux); | 217 | ELF(Verdaux) *aux = (ELF(Verdaux)*)((char *)def + def->vd_aux); |
| 205 | return def->vd_hash == hash | 218 | return def->vd_hash == hash |
| 206 | && !strcmp(name, vdso_info.symstrings + aux->vda_name); | 219 | && !strcmp(name, vdso_info.symstrings + aux->vda_name); |
| 207 | } | 220 | } |
| @@ -213,10 +226,10 @@ void *vdso_sym(const char *version, const char *name) | |||
| 213 | return 0; | 226 | return 0; |
| 214 | 227 | ||
| 215 | ver_hash = elf_hash(version); | 228 | ver_hash = elf_hash(version); |
| 216 | Elf64_Word chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; | 229 | ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; |
| 217 | 230 | ||
| 218 | for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) { | 231 | for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) { |
| 219 | Elf64_Sym *sym = &vdso_info.symtab[chain]; | 232 | ELF(Sym) *sym = &vdso_info.symtab[chain]; |
| 220 | 233 | ||
| 221 | /* Check for a defined global or weak function w/ right name. */ | 234 | /* Check for a defined global or weak function w/ right name. */ |
| 222 | if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) | 235 | if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) |
| @@ -243,7 +256,7 @@ void *vdso_sym(const char *version, const char *name) | |||
| 243 | 256 | ||
| 244 | void vdso_init_from_auxv(void *auxv) | 257 | void vdso_init_from_auxv(void *auxv) |
| 245 | { | 258 | { |
| 246 | Elf64_auxv_t *elf_auxv = auxv; | 259 | ELF(auxv_t) *elf_auxv = auxv; |
| 247 | for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++) | 260 | for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++) |
| 248 | { | 261 | { |
| 249 | if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) { | 262 | if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) { |
diff --git a/Documentation/vDSO/vdso_standalone_test_x86.c b/Documentation/vDSO/vdso_standalone_test_x86.c new file mode 100644 index 000000000000..d46240265c50 --- /dev/null +++ b/Documentation/vDSO/vdso_standalone_test_x86.c | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* | ||
| 2 | * vdso_test.c: Sample code to test parse_vdso.c on x86 | ||
| 3 | * Copyright (c) 2011-2014 Andy Lutomirski | ||
| 4 | * Subject to the GNU General Public License, version 2 | ||
| 5 | * | ||
| 6 | * You can amuse yourself by compiling with: | ||
| 7 | * gcc -std=gnu99 -nostdlib | ||
| 8 | * -Os -fno-asynchronous-unwind-tables -flto -lgcc_s | ||
| 9 | * vdso_standalone_test_x86.c parse_vdso.c | ||
| 10 | * to generate a small binary. On x86_64, you can omit -lgcc_s | ||
| 11 | * if you want the binary to be completely standalone. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <sys/syscall.h> | ||
| 15 | #include <sys/time.h> | ||
| 16 | #include <unistd.h> | ||
| 17 | #include <stdint.h> | ||
| 18 | |||
| 19 | extern void *vdso_sym(const char *version, const char *name); | ||
| 20 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); | ||
| 21 | extern void vdso_init_from_auxv(void *auxv); | ||
| 22 | |||
| 23 | /* We need a libc functions... */ | ||
| 24 | int strcmp(const char *a, const char *b) | ||
| 25 | { | ||
| 26 | /* This implementation is buggy: it never returns -1. */ | ||
| 27 | while (*a || *b) { | ||
| 28 | if (*a != *b) | ||
| 29 | return 1; | ||
| 30 | if (*a == 0 || *b == 0) | ||
| 31 | return 1; | ||
| 32 | a++; | ||
| 33 | b++; | ||
| 34 | } | ||
| 35 | |||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | /* ...and two syscalls. This is x86-specific. */ | ||
| 40 | static inline long x86_syscall3(long nr, long a0, long a1, long a2) | ||
| 41 | { | ||
| 42 | long ret; | ||
| 43 | #ifdef __x86_64__ | ||
| 44 | asm volatile ("syscall" : "=a" (ret) : "a" (nr), | ||
| 45 | "D" (a0), "S" (a1), "d" (a2) : | ||
| 46 | "cc", "memory", "rcx", | ||
| 47 | "r8", "r9", "r10", "r11" ); | ||
| 48 | #else | ||
| 49 | asm volatile ("int $0x80" : "=a" (ret) : "a" (nr), | ||
| 50 | "b" (a0), "c" (a1), "d" (a2) : | ||
| 51 | "cc", "memory" ); | ||
| 52 | #endif | ||
| 53 | return ret; | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline long linux_write(int fd, const void *data, size_t len) | ||
| 57 | { | ||
| 58 | return x86_syscall3(__NR_write, fd, (long)data, (long)len); | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline void linux_exit(int code) | ||
| 62 | { | ||
| 63 | x86_syscall3(__NR_exit, code, 0, 0); | ||
| 64 | } | ||
| 65 | |||
| 66 | void to_base10(char *lastdig, uint64_t n) | ||
| 67 | { | ||
| 68 | while (n) { | ||
| 69 | *lastdig = (n % 10) + '0'; | ||
| 70 | n /= 10; | ||
| 71 | lastdig--; | ||
| 72 | } | ||
| 73 | } | ||
| 74 | |||
| 75 | __attribute__((externally_visible)) void c_main(void **stack) | ||
| 76 | { | ||
| 77 | /* Parse the stack */ | ||
| 78 | long argc = (long)*stack; | ||
| 79 | stack += argc + 2; | ||
| 80 | |||
| 81 | /* Now we're pointing at the environment. Skip it. */ | ||
| 82 | while(*stack) | ||
| 83 | stack++; | ||
| 84 | stack++; | ||
| 85 | |||
| 86 | /* Now we're pointing at auxv. Initialize the vDSO parser. */ | ||
| 87 | vdso_init_from_auxv((void *)stack); | ||
| 88 | |||
| 89 | /* Find gettimeofday. */ | ||
| 90 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); | ||
| 91 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); | ||
| 92 | |||
| 93 | if (!gtod) | ||
| 94 | linux_exit(1); | ||
| 95 | |||
| 96 | struct timeval tv; | ||
| 97 | long ret = gtod(&tv, 0); | ||
| 98 | |||
| 99 | if (ret == 0) { | ||
| 100 | char buf[] = "The time is .000000\n"; | ||
| 101 | to_base10(buf + 31, tv.tv_sec); | ||
| 102 | to_base10(buf + 38, tv.tv_usec); | ||
| 103 | linux_write(1, buf, sizeof(buf) - 1); | ||
| 104 | } else { | ||
| 105 | linux_exit(ret); | ||
| 106 | } | ||
| 107 | |||
| 108 | linux_exit(0); | ||
| 109 | } | ||
| 110 | |||
| 111 | /* | ||
| 112 | * This is the real entry point. It passes the initial stack into | ||
| 113 | * the C entry point. | ||
| 114 | */ | ||
| 115 | asm ( | ||
| 116 | ".text\n" | ||
| 117 | ".global _start\n" | ||
| 118 | ".type _start,@function\n" | ||
| 119 | "_start:\n\t" | ||
| 120 | #ifdef __x86_64__ | ||
| 121 | "mov %rsp,%rdi\n\t" | ||
| 122 | "jmp c_main" | ||
| 123 | #else | ||
| 124 | "push %esp\n\t" | ||
| 125 | "call c_main\n\t" | ||
| 126 | "int $3" | ||
| 127 | #endif | ||
| 128 | ); | ||
diff --git a/Documentation/vDSO/vdso_test.c b/Documentation/vDSO/vdso_test.c index fff633432dff..8daeb7d7032c 100644 --- a/Documentation/vDSO/vdso_test.c +++ b/Documentation/vDSO/vdso_test.c | |||
| @@ -1,111 +1,52 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * vdso_test.c: Sample code to test parse_vdso.c on x86_64 | 2 | * vdso_test.c: Sample code to test parse_vdso.c |
| 3 | * Copyright (c) 2011 Andy Lutomirski | 3 | * Copyright (c) 2014 Andy Lutomirski |
| 4 | * Subject to the GNU General Public License, version 2 | 4 | * Subject to the GNU General Public License, version 2 |
| 5 | * | 5 | * |
| 6 | * You can amuse yourself by compiling with: | 6 | * Compile with: |
| 7 | * gcc -std=gnu99 -nostdlib | 7 | * gcc -std=gnu99 vdso_test.c parse_vdso.c |
| 8 | * -Os -fno-asynchronous-unwind-tables -flto | 8 | * |
| 9 | * vdso_test.c parse_vdso.c -o vdso_test | 9 | * Tested on x86, 32-bit and 64-bit. It may work on other architectures, too. |
| 10 | * to generate a small binary with no dependencies at all. | ||
| 11 | */ | 10 | */ |
| 12 | 11 | ||
| 13 | #include <sys/syscall.h> | ||
| 14 | #include <sys/time.h> | ||
| 15 | #include <unistd.h> | ||
| 16 | #include <stdint.h> | 12 | #include <stdint.h> |
| 13 | #include <elf.h> | ||
| 14 | #include <stdio.h> | ||
| 15 | #include <sys/auxv.h> | ||
| 16 | #include <sys/time.h> | ||
| 17 | 17 | ||
| 18 | extern void *vdso_sym(const char *version, const char *name); | 18 | extern void *vdso_sym(const char *version, const char *name); |
| 19 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); | 19 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); |
| 20 | extern void vdso_init_from_auxv(void *auxv); | 20 | extern void vdso_init_from_auxv(void *auxv); |
| 21 | 21 | ||
| 22 | /* We need a libc functions... */ | 22 | int main(int argc, char **argv) |
| 23 | int strcmp(const char *a, const char *b) | ||
| 24 | { | 23 | { |
| 25 | /* This implementation is buggy: it never returns -1. */ | 24 | unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR); |
| 26 | while (*a || *b) { | 25 | if (!sysinfo_ehdr) { |
| 27 | if (*a != *b) | 26 | printf("AT_SYSINFO_EHDR is not present!\n"); |
| 28 | return 1; | 27 | return 0; |
| 29 | if (*a == 0 || *b == 0) | ||
| 30 | return 1; | ||
| 31 | a++; | ||
| 32 | b++; | ||
| 33 | } | 28 | } |
| 34 | 29 | ||
| 35 | return 0; | 30 | vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR)); |
| 36 | } | ||
| 37 | |||
| 38 | /* ...and two syscalls. This is x86_64-specific. */ | ||
| 39 | static inline long linux_write(int fd, const void *data, size_t len) | ||
| 40 | { | ||
| 41 | |||
| 42 | long ret; | ||
| 43 | asm volatile ("syscall" : "=a" (ret) : "a" (__NR_write), | ||
| 44 | "D" (fd), "S" (data), "d" (len) : | ||
| 45 | "cc", "memory", "rcx", | ||
| 46 | "r8", "r9", "r10", "r11" ); | ||
| 47 | return ret; | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline void linux_exit(int code) | ||
| 51 | { | ||
| 52 | asm volatile ("syscall" : : "a" (__NR_exit), "D" (code)); | ||
| 53 | } | ||
| 54 | |||
| 55 | void to_base10(char *lastdig, uint64_t n) | ||
| 56 | { | ||
| 57 | while (n) { | ||
| 58 | *lastdig = (n % 10) + '0'; | ||
| 59 | n /= 10; | ||
| 60 | lastdig--; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | __attribute__((externally_visible)) void c_main(void **stack) | ||
| 65 | { | ||
| 66 | /* Parse the stack */ | ||
| 67 | long argc = (long)*stack; | ||
| 68 | stack += argc + 2; | ||
| 69 | |||
| 70 | /* Now we're pointing at the environment. Skip it. */ | ||
| 71 | while(*stack) | ||
| 72 | stack++; | ||
| 73 | stack++; | ||
| 74 | |||
| 75 | /* Now we're pointing at auxv. Initialize the vDSO parser. */ | ||
| 76 | vdso_init_from_auxv((void *)stack); | ||
| 77 | 31 | ||
| 78 | /* Find gettimeofday. */ | 32 | /* Find gettimeofday. */ |
| 79 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); | 33 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); |
| 80 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); | 34 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); |
| 81 | 35 | ||
| 82 | if (!gtod) | 36 | if (!gtod) { |
| 83 | linux_exit(1); | 37 | printf("Could not find __vdso_gettimeofday\n"); |
| 38 | return 1; | ||
| 39 | } | ||
| 84 | 40 | ||
| 85 | struct timeval tv; | 41 | struct timeval tv; |
| 86 | long ret = gtod(&tv, 0); | 42 | long ret = gtod(&tv, 0); |
| 87 | 43 | ||
| 88 | if (ret == 0) { | 44 | if (ret == 0) { |
| 89 | char buf[] = "The time is .000000\n"; | 45 | printf("The time is %lld.%06lld\n", |
| 90 | to_base10(buf + 31, tv.tv_sec); | 46 | (long long)tv.tv_sec, (long long)tv.tv_usec); |
| 91 | to_base10(buf + 38, tv.tv_usec); | ||
| 92 | linux_write(1, buf, sizeof(buf) - 1); | ||
| 93 | } else { | 47 | } else { |
| 94 | linux_exit(ret); | 48 | printf("__vdso_gettimeofday failed\n"); |
| 95 | } | 49 | } |
| 96 | 50 | ||
| 97 | linux_exit(0); | 51 | return 0; |
| 98 | } | 52 | } |
| 99 | |||
| 100 | /* | ||
| 101 | * This is the real entry point. It passes the initial stack into | ||
| 102 | * the C entry point. | ||
| 103 | */ | ||
| 104 | asm ( | ||
| 105 | ".text\n" | ||
| 106 | ".global _start\n" | ||
| 107 | ".type _start,@function\n" | ||
| 108 | "_start:\n\t" | ||
| 109 | "mov %rsp,%rdi\n\t" | ||
| 110 | "jmp c_main" | ||
| 111 | ); | ||
