~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/driver-api/interconnect.rst

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GPL-2.0
  2 
  3 =====================================
  4 Generic System Interconnect Subsystem
  5 =====================================
  6 
  7 Introduction
  8 ------------
  9 
 10 This framework is designed to provide a standard kernel interface to control
 11 the settings of the interconnects on an SoC. These settings can be throughput,
 12 latency and priority between multiple interconnected devices or functional
 13 blocks. This can be controlled dynamically in order to save power or provide
 14 maximum performance.
 15 
 16 The interconnect bus is hardware with configurable parameters, which can be
 17 set on a data path according to the requests received from various drivers.
 18 An example of interconnect buses are the interconnects between various
 19 components or functional blocks in chipsets. There can be multiple interconnects
 20 on an SoC that can be multi-tiered.
 21 
 22 Below is a simplified diagram of a real-world SoC interconnect bus topology.
 23 
 24 ::
 25 
 26  +----------------+    +----------------+
 27  | HW Accelerator |--->|      M NoC     |<---------------+
 28  +----------------+    +----------------+                |
 29                          |      |                    +------------+
 30   +-----+  +-------------+      V       +------+     |            |
 31   | DDR |  |                +--------+  | PCIe |     |            |
 32   +-----+  |                | Slaves |  +------+     |            |
 33     ^ ^    |                +--------+     |         |   C NoC    |
 34     | |    V                               V         |            |
 35  +------------------+   +------------------------+   |            |   +-----+
 36  |                  |-->|                        |-->|            |-->| CPU |
 37  |                  |-->|                        |<--|            |   +-----+
 38  |     Mem NoC      |   |         S NoC          |   +------------+
 39  |                  |<--|                        |---------+    |
 40  |                  |<--|                        |<------+ |    |   +--------+
 41  +------------------+   +------------------------+       | |    +-->| Slaves |
 42    ^  ^    ^    ^          ^                             | |        +--------+
 43    |  |    |    |          |                             | V
 44  +------+  |  +-----+   +-----+  +---------+   +----------------+   +--------+
 45  | CPUs |  |  | GPU |   | DSP |  | Masters |-->|       P NoC    |-->| Slaves |
 46  +------+  |  +-----+   +-----+  +---------+   +----------------+   +--------+
 47            |
 48        +-------+
 49        | Modem |
 50        +-------+
 51 
 52 Terminology
 53 -----------
 54 
 55 Interconnect provider is the software definition of the interconnect hardware.
 56 The interconnect providers on the above diagram are M NoC, S NoC, C NoC, P NoC
 57 and Mem NoC.
 58 
 59 Interconnect node is the software definition of the interconnect hardware
 60 port. Each interconnect provider consists of multiple interconnect nodes,
 61 which are connected to other SoC components including other interconnect
 62 providers. The point on the diagram where the CPUs connect to the memory is
 63 called an interconnect node, which belongs to the Mem NoC interconnect provider.
 64 
 65 Interconnect endpoints are the first or the last element of the path. Every
 66 endpoint is a node, but not every node is an endpoint.
 67 
 68 Interconnect path is everything between two endpoints including all the nodes
 69 that have to be traversed to reach from a source to destination node. It may
 70 include multiple master-slave pairs across several interconnect providers.
 71 
 72 Interconnect consumers are the entities which make use of the data paths exposed
 73 by the providers. The consumers send requests to providers requesting various
 74 throughput, latency and priority. Usually the consumers are device drivers, that
 75 send request based on their needs. An example for a consumer is a video decoder
 76 that supports various formats and image sizes.
 77 
 78 Interconnect providers
 79 ----------------------
 80 
 81 Interconnect provider is an entity that implements methods to initialize and
 82 configure interconnect bus hardware. The interconnect provider drivers should
 83 be registered with the interconnect provider core.
 84 
 85 .. kernel-doc:: include/linux/interconnect-provider.h
 86 
 87 Interconnect consumers
 88 ----------------------
 89 
 90 Interconnect consumers are the clients which use the interconnect APIs to
 91 get paths between endpoints and set their bandwidth/latency/QoS requirements
 92 for these interconnect paths.  These interfaces are not currently
 93 documented.
 94 
 95 Interconnect debugfs interfaces
 96 -------------------------------
 97 
 98 Like several other subsystems interconnect will create some files for debugging
 99 and introspection. Files in debugfs are not considered ABI so application
100 software shouldn't rely on format details change between kernel versions.
101 
102 ``/sys/kernel/debug/interconnect/interconnect_summary``:
103 
104 Show all interconnect nodes in the system with their aggregated bandwidth
105 request. Indented under each node show bandwidth requests from each device.
106 
107 ``/sys/kernel/debug/interconnect/interconnect_graph``:
108 
109 Show the interconnect graph in the graphviz dot format. It shows all
110 interconnect nodes and links in the system and groups together nodes from the
111 same provider as subgraphs. The format is human-readable and can also be piped
112 through dot to generate diagrams in many graphical formats::
113 
114         $ cat /sys/kernel/debug/interconnect/interconnect_graph | \
115                 dot -Tsvg > interconnect_graph.svg
116 
117 The ``test-client`` directory provides interfaces for issuing BW requests to
118 any arbitrary path. Note that for safety reasons, this feature is disabled by
119 default without a Kconfig to enable it. Enabling it requires code changes to
120 ``#define INTERCONNECT_ALLOW_WRITE_DEBUGFS``. Example usage::
121 
122         cd /sys/kernel/debug/interconnect/test-client/
123 
124         # Configure node endpoints for the path from CPU to DDR on
125         # qcom/sm8550.
126         echo chm_apps > src_node
127         echo ebi > dst_node
128 
129         # Get path between src_node and dst_node. This is only
130         # necessary after updating the node endpoints.
131         echo 1 > get
132 
133         # Set desired BW to 1GBps avg and 2GBps peak.
134         echo 1000000 > avg_bw
135         echo 2000000 > peak_bw
136 
137         # Vote for avg_bw and peak_bw on the latest path from "get".
138         # Voting for multiple paths is possible by repeating this
139         # process for different nodes endpoints.
140         echo 1 > commit

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php