summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl29
-rw-r--r--Documentation/devicetree/bindings/clock/qca,ath79-pll.txt6
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt12
-rw-r--r--Documentation/filesystems/cramfs.txt2
-rw-r--r--Documentation/filesystems/tmpfs.txt2
-rw-r--r--Documentation/filesystems/vfs.txt4
-rw-r--r--Documentation/networking/switchdev.txt2
-rw-r--r--Documentation/power/runtime_pm.txt4
-rw-r--r--Documentation/x86/topology.txt208
9 files changed, 238 insertions, 31 deletions
diff --git a/Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl b/Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl
index 7ac7d7262bb7..3c3514815cd5 100644
--- a/Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl
+++ b/Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl
@@ -1,23 +1,18 @@
1What: /sys/devices/platform/<i2c-demux-name>/cur_master 1What: /sys/devices/platform/<i2c-demux-name>/available_masters
2Date: January 2016 2Date: January 2016
3KernelVersion: 4.6 3KernelVersion: 4.6
4Contact: Wolfram Sang <wsa@the-dreams.de> 4Contact: Wolfram Sang <wsa@the-dreams.de>
5Description: 5Description:
6 Reading the file will give you a list of masters which can be
7 selected for a demultiplexed bus. The format is
8 "<index>:<name>". Example from a Renesas Lager board:
6 9
7This file selects the active I2C master for a demultiplexed bus. 10 0:/i2c@e6500000 1:/i2c@e6508000
8 11
9Write 0 there for the first master, 1 for the second etc. Reading the file will 12What: /sys/devices/platform/<i2c-demux-name>/current_master
10give you a list with the active master marked. Example from a Renesas Lager 13Date: January 2016
11board: 14KernelVersion: 4.6
12 15Contact: Wolfram Sang <wsa@the-dreams.de>
13root@Lager:~# cat /sys/devices/platform/i2c@8/cur_master 16Description:
14* 0 - /i2c@9 17 This file selects/shows the active I2C master for a demultiplexed
15 1 - /i2c@e6520000 18 bus. It uses the <index> value from the file 'available_masters'.
16 2 - /i2c@e6530000
17
18root@Lager:~# echo 2 > /sys/devices/platform/i2c@8/cur_master
19
20root@Lager:~# cat /sys/devices/platform/i2c@8/cur_master
21 0 - /i2c@9
22 1 - /i2c@e6520000
23* 2 - /i2c@e6530000
diff --git a/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt
index e0fc2c11dd00..241fb0545b9e 100644
--- a/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt
+++ b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt
@@ -3,7 +3,7 @@ Binding for Qualcomm Atheros AR7xxx/AR9XXX PLL controller
3The PPL controller provides the 3 main clocks of the SoC: CPU, DDR and AHB. 3The PPL controller provides the 3 main clocks of the SoC: CPU, DDR and AHB.
4 4
5Required Properties: 5Required Properties:
6- compatible: has to be "qca,<soctype>-cpu-intc" and one of the following 6- compatible: has to be "qca,<soctype>-pll" and one of the following
7 fallbacks: 7 fallbacks:
8 - "qca,ar7100-pll" 8 - "qca,ar7100-pll"
9 - "qca,ar7240-pll" 9 - "qca,ar7240-pll"
@@ -21,8 +21,8 @@ Optional properties:
21 21
22Example: 22Example:
23 23
24 memory-controller@18050000 { 24 pll-controller@18050000 {
25 compatible = "qca,ar9132-ppl", "qca,ar9130-pll"; 25 compatible = "qca,ar9132-pll", "qca,ar9130-pll";
26 reg = <0x18050000 0x20>; 26 reg = <0x18050000 0x20>;
27 27
28 clock-names = "ref"; 28 clock-names = "ref";
diff --git a/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt
index 08a4a32c8eb0..0326154c7925 100644
--- a/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt
@@ -134,12 +134,12 @@ mfio80 ddr_debug, mips_trace_data, mips_debug
134mfio81 dreq0, mips_trace_data, eth_debug 134mfio81 dreq0, mips_trace_data, eth_debug
135mfio82 dreq1, mips_trace_data, eth_debug 135mfio82 dreq1, mips_trace_data, eth_debug
136mfio83 mips_pll_lock, mips_trace_data, usb_debug 136mfio83 mips_pll_lock, mips_trace_data, usb_debug
137mfio84 sys_pll_lock, mips_trace_data, usb_debug 137mfio84 audio_pll_lock, mips_trace_data, usb_debug
138mfio85 wifi_pll_lock, mips_trace_data, sdhost_debug 138mfio85 rpu_v_pll_lock, mips_trace_data, sdhost_debug
139mfio86 bt_pll_lock, mips_trace_data, sdhost_debug 139mfio86 rpu_l_pll_lock, mips_trace_data, sdhost_debug
140mfio87 rpu_v_pll_lock, dreq2, socif_debug 140mfio87 sys_pll_lock, dreq2, socif_debug
141mfio88 rpu_l_pll_lock, dreq3, socif_debug 141mfio88 wifi_pll_lock, dreq3, socif_debug
142mfio89 audio_pll_lock, dreq4, dreq5 142mfio89 bt_pll_lock, dreq4, dreq5
143tck 143tck
144trstn 144trstn
145tdi 145tdi
diff --git a/Documentation/filesystems/cramfs.txt b/Documentation/filesystems/cramfs.txt
index 31f53f0ab957..4006298f6707 100644
--- a/Documentation/filesystems/cramfs.txt
+++ b/Documentation/filesystems/cramfs.txt
@@ -38,7 +38,7 @@ the update lasts only as long as the inode is cached in memory, after
38which the timestamp reverts to 1970, i.e. moves backwards in time. 38which the timestamp reverts to 1970, i.e. moves backwards in time.
39 39
40Currently, cramfs must be written and read with architectures of the 40Currently, cramfs must be written and read with architectures of the
41same endianness, and can be read only by kernels with PAGE_CACHE_SIZE 41same endianness, and can be read only by kernels with PAGE_SIZE
42== 4096. At least the latter of these is a bug, but it hasn't been 42== 4096. At least the latter of these is a bug, but it hasn't been
43decided what the best fix is. For the moment if you have larger pages 43decided what the best fix is. For the moment if you have larger pages
44you can just change the #define in mkcramfs.c, so long as you don't 44you can just change the #define in mkcramfs.c, so long as you don't
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt
index d392e1505f17..d9c11d25bf02 100644
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -60,7 +60,7 @@ size: The limit of allocated bytes for this tmpfs instance. The
60 default is half of your physical RAM without swap. If you 60 default is half of your physical RAM without swap. If you
61 oversize your tmpfs instances the machine will deadlock 61 oversize your tmpfs instances the machine will deadlock
62 since the OOM handler will not be able to free that memory. 62 since the OOM handler will not be able to free that memory.
63nr_blocks: The same as size, but in blocks of PAGE_CACHE_SIZE. 63nr_blocks: The same as size, but in blocks of PAGE_SIZE.
64nr_inodes: The maximum number of inodes for this instance. The default 64nr_inodes: The maximum number of inodes for this instance. The default
65 is half of the number of your physical RAM pages, or (on a 65 is half of the number of your physical RAM pages, or (on a
66 machine with highmem) the number of lowmem RAM pages, 66 machine with highmem) the number of lowmem RAM pages,
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index b02a7d598258..4164bd6397a2 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -708,9 +708,9 @@ struct address_space_operations {
708 from the address space. This generally corresponds to either a 708 from the address space. This generally corresponds to either a
709 truncation, punch hole or a complete invalidation of the address 709 truncation, punch hole or a complete invalidation of the address
710 space (in the latter case 'offset' will always be 0 and 'length' 710 space (in the latter case 'offset' will always be 0 and 'length'
711 will be PAGE_CACHE_SIZE). Any private data associated with the page 711 will be PAGE_SIZE). Any private data associated with the page
712 should be updated to reflect this truncation. If offset is 0 and 712 should be updated to reflect this truncation. If offset is 0 and
713 length is PAGE_CACHE_SIZE, then the private data should be released, 713 length is PAGE_SIZE, then the private data should be released,
714 because the page must be able to be completely discarded. This may 714 because the page must be able to be completely discarded. This may
715 be done by calling the ->releasepage function, but in this case the 715 be done by calling the ->releasepage function, but in this case the
716 release MUST succeed. 716 release MUST succeed.
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index fad63136ee3e..2f659129694b 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -386,7 +386,7 @@ used. First phase is to "prepare" anything needed, including various checks,
386memory allocation, etc. The goal is to handle the stuff that is not unlikely 386memory allocation, etc. The goal is to handle the stuff that is not unlikely
387to fail here. The second phase is to "commit" the actual changes. 387to fail here. The second phase is to "commit" the actual changes.
388 388
389Switchdev provides an inftrastructure for sharing items (for example memory 389Switchdev provides an infrastructure for sharing items (for example memory
390allocations) between the two phases. 390allocations) between the two phases.
391 391
392The object created by a driver in "prepare" phase and it is queued up by: 392The object created by a driver in "prepare" phase and it is queued up by:
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 7328cf85236c..1fd1fbe9ce95 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -586,6 +586,10 @@ drivers to make their ->remove() callbacks avoid races with runtime PM directly,
586but also it allows of more flexibility in the handling of devices during the 586but also it allows of more flexibility in the handling of devices during the
587removal of their drivers. 587removal of their drivers.
588 588
589Drivers in ->remove() callback should undo the runtime PM changes done
590in ->probe(). Usually this means calling pm_runtime_disable(),
591pm_runtime_dont_use_autosuspend() etc.
592
589The user space can effectively disallow the driver of the device to power manage 593The user space can effectively disallow the driver of the device to power manage
590it at run time by changing the value of its /sys/devices/.../power/control 594it at run time by changing the value of its /sys/devices/.../power/control
591attribute to "on", which causes pm_runtime_forbid() to be called. In principle, 595attribute to "on", which causes pm_runtime_forbid() to be called. In principle,
diff --git a/Documentation/x86/topology.txt b/Documentation/x86/topology.txt
new file mode 100644
index 000000000000..06afac252f5b
--- /dev/null
+++ b/Documentation/x86/topology.txt
@@ -0,0 +1,208 @@
1x86 Topology
2============
3
4This documents and clarifies the main aspects of x86 topology modelling and
5representation in the kernel. Update/change when doing changes to the
6respective code.
7
8The architecture-agnostic topology definitions are in
9Documentation/cputopology.txt. This file holds x86-specific
10differences/specialities which must not necessarily apply to the generic
11definitions. Thus, the way to read up on Linux topology on x86 is to start
12with the generic one and look at this one in parallel for the x86 specifics.
13
14Needless to say, code should use the generic functions - this file is *only*
15here to *document* the inner workings of x86 topology.
16
17Started by Thomas Gleixner <tglx@linutronix.de> and Borislav Petkov <bp@alien8.de>.
18
19The main aim of the topology facilities is to present adequate interfaces to
20code which needs to know/query/use the structure of the running system wrt
21threads, cores, packages, etc.
22
23The kernel does not care about the concept of physical sockets because a
24socket has no relevance to software. It's an electromechanical component. In
25the past a socket always contained a single package (see below), but with the
26advent of Multi Chip Modules (MCM) a socket can hold more than one package. So
27there might be still references to sockets in the code, but they are of
28historical nature and should be cleaned up.
29
30The topology of a system is described in the units of:
31
32 - packages
33 - cores
34 - threads
35
36* Package:
37
38 Packages contain a number of cores plus shared resources, e.g. DRAM
39 controller, shared caches etc.
40
41 AMD nomenclature for package is 'Node'.
42
43 Package-related topology information in the kernel:
44
45 - cpuinfo_x86.x86_max_cores:
46
47 The number of cores in a package. This information is retrieved via CPUID.
48
49 - cpuinfo_x86.phys_proc_id:
50
51 The physical ID of the package. This information is retrieved via CPUID
52 and deduced from the APIC IDs of the cores in the package.
53
54 - cpuinfo_x86.logical_id:
55
56 The logical ID of the package. As we do not trust BIOSes to enumerate the
57 packages in a consistent way, we introduced the concept of logical package
58 ID so we can sanely calculate the number of maximum possible packages in
59 the system and have the packages enumerated linearly.
60
61 - topology_max_packages():
62
63 The maximum possible number of packages in the system. Helpful for per
64 package facilities to preallocate per package information.
65
66
67* Cores:
68
69 A core consists of 1 or more threads. It does not matter whether the threads
70 are SMT- or CMT-type threads.
71
72 AMDs nomenclature for a CMT core is "Compute Unit". The kernel always uses
73 "core".
74
75 Core-related topology information in the kernel:
76
77 - smp_num_siblings:
78
79 The number of threads in a core. The number of threads in a package can be
80 calculated by:
81
82 threads_per_package = cpuinfo_x86.x86_max_cores * smp_num_siblings
83
84
85* Threads:
86
87 A thread is a single scheduling unit. It's the equivalent to a logical Linux
88 CPU.
89
90 AMDs nomenclature for CMT threads is "Compute Unit Core". The kernel always
91 uses "thread".
92
93 Thread-related topology information in the kernel:
94
95 - topology_core_cpumask():
96
97 The cpumask contains all online threads in the package to which a thread
98 belongs.
99
100 The number of online threads is also printed in /proc/cpuinfo "siblings."
101
102 - topology_sibling_mask():
103
104 The cpumask contains all online threads in the core to which a thread
105 belongs.
106
107 - topology_logical_package_id():
108
109 The logical package ID to which a thread belongs.
110
111 - topology_physical_package_id():
112
113 The physical package ID to which a thread belongs.
114
115 - topology_core_id();
116
117 The ID of the core to which a thread belongs. It is also printed in /proc/cpuinfo
118 "core_id."
119
120
121
122System topology examples
123
124Note:
125
126The alternative Linux CPU enumeration depends on how the BIOS enumerates the
127threads. Many BIOSes enumerate all threads 0 first and then all threads 1.
128That has the "advantage" that the logical Linux CPU numbers of threads 0 stay
129the same whether threads are enabled or not. That's merely an implementation
130detail and has no practical impact.
131
1321) Single Package, Single Core
133
134 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
135
1362) Single Package, Dual Core
137
138 a) One thread per core
139
140 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
141 -> [core 1] -> [thread 0] -> Linux CPU 1
142
143 b) Two threads per core
144
145 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
146 -> [thread 1] -> Linux CPU 1
147 -> [core 1] -> [thread 0] -> Linux CPU 2
148 -> [thread 1] -> Linux CPU 3
149
150 Alternative enumeration:
151
152 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
153 -> [thread 1] -> Linux CPU 2
154 -> [core 1] -> [thread 0] -> Linux CPU 1
155 -> [thread 1] -> Linux CPU 3
156
157 AMD nomenclature for CMT systems:
158
159 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
160 -> [Compute Unit Core 1] -> Linux CPU 1
161 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
162 -> [Compute Unit Core 1] -> Linux CPU 3
163
1644) Dual Package, Dual Core
165
166 a) One thread per core
167
168 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
169 -> [core 1] -> [thread 0] -> Linux CPU 1
170
171 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
172 -> [core 1] -> [thread 0] -> Linux CPU 3
173
174 b) Two threads per core
175
176 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
177 -> [thread 1] -> Linux CPU 1
178 -> [core 1] -> [thread 0] -> Linux CPU 2
179 -> [thread 1] -> Linux CPU 3
180
181 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 4
182 -> [thread 1] -> Linux CPU 5
183 -> [core 1] -> [thread 0] -> Linux CPU 6
184 -> [thread 1] -> Linux CPU 7
185
186 Alternative enumeration:
187
188 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
189 -> [thread 1] -> Linux CPU 4
190 -> [core 1] -> [thread 0] -> Linux CPU 1
191 -> [thread 1] -> Linux CPU 5
192
193 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
194 -> [thread 1] -> Linux CPU 6
195 -> [core 1] -> [thread 0] -> Linux CPU 3
196 -> [thread 1] -> Linux CPU 7
197
198 AMD nomenclature for CMT systems:
199
200 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
201 -> [Compute Unit Core 1] -> Linux CPU 1
202 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
203 -> [Compute Unit Core 1] -> Linux CPU 3
204
205 [node 1] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 4
206 -> [Compute Unit Core 1] -> Linux CPU 5
207 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 6
208 -> [Compute Unit Core 1] -> Linux CPU 7