diff options
Diffstat (limited to 'Documentation')
15 files changed, 419 insertions, 39 deletions
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index 44afa0e5057d..4ff65047bb9a 100644 --- a/Documentation/devicetree/bindings/net/macb.txt +++ b/Documentation/devicetree/bindings/net/macb.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" | 4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" |
5 | Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs. | 5 | Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs. |
6 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". | 6 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". |
7 | Use "cnds,pc302-gem" for Picochip picoXcell pc302 and later devices based on | 7 | Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on |
8 | the Cadence GEM, or the generic form: "cdns,gem". | 8 | the Cadence GEM, or the generic form: "cdns,gem". |
9 | - reg: Address and length of the register set for the device | 9 | - reg: Address and length of the register set for the device |
10 | - interrupts: Should contain macb interrupt | 10 | - interrupts: Should contain macb interrupt |
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee37394..589edee37394 100644 --- a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt index fa166d945809..fa166d945809 100644 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt index 858f4f9b902f..858f4f9b902f 100644 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | |||
diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea0343566..9b2ea0343566 100644 --- a/Documentation/devicetree/bindings/drm/exynos/mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt | |||
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt new file mode 100644 index 000000000000..3ea460583111 --- /dev/null +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Simple Framebuffer | ||
2 | |||
3 | A simple frame-buffer describes a raw memory region that may be rendered to, | ||
4 | with the assumption that the display hardware has already been set up to scan | ||
5 | out from that buffer. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "simple-framebuffer" | ||
9 | - reg: Should contain the location and size of the framebuffer memory. | ||
10 | - width: The width of the framebuffer in pixels. | ||
11 | - height: The height of the framebuffer in pixels. | ||
12 | - stride: The number of bytes in each line of the framebuffer. | ||
13 | - format: The format of the framebuffer surface. Valid values are: | ||
14 | - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). | ||
15 | |||
16 | Example: | ||
17 | |||
18 | framebuffer { | ||
19 | compatible = "simple-framebuffer"; | ||
20 | reg = <0x1d385000 (1600 * 1200 * 2)>; | ||
21 | width = <1600>; | ||
22 | height = <1200>; | ||
23 | stride = <(1600 * 2)>; | ||
24 | format = "r5g6b5"; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt index ef9d06c9f8fd..0efedaad5165 100644 --- a/Documentation/devicetree/usage-model.txt +++ b/Documentation/devicetree/usage-model.txt | |||
@@ -191,9 +191,11 @@ Linux it will look something like this: | |||
191 | }; | 191 | }; |
192 | 192 | ||
193 | The bootargs property contains the kernel arguments, and the initrd-* | 193 | The bootargs property contains the kernel arguments, and the initrd-* |
194 | properties define the address and size of an initrd blob. The | 194 | properties define the address and size of an initrd blob. Note that |
195 | chosen node may also optionally contain an arbitrary number of | 195 | initrd-end is the first address after the initrd image, so this doesn't |
196 | additional properties for platform-specific configuration data. | 196 | match the usual semantic of struct resource. The chosen node may also |
197 | optionally contain an arbitrary number of additional properties for | ||
198 | platform-specific configuration data. | ||
197 | 199 | ||
198 | During early boot, the architecture setup code calls of_scan_flat_dt() | 200 | During early boot, the architecture setup code calls of_scan_flat_dt() |
199 | several times with different helper callbacks to parse device tree | 201 | several times with different helper callbacks to parse device tree |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c3bfacb92910..6e3b18a8afc6 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -3005,6 +3005,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3005 | Force threading of all interrupt handlers except those | 3005 | Force threading of all interrupt handlers except those |
3006 | marked explicitly IRQF_NO_THREAD. | 3006 | marked explicitly IRQF_NO_THREAD. |
3007 | 3007 | ||
3008 | tmem [KNL,XEN] | ||
3009 | Enable the Transcendent memory driver if built-in. | ||
3010 | |||
3011 | tmem.cleancache=0|1 [KNL, XEN] | ||
3012 | Default is on (1). Disable the usage of the cleancache | ||
3013 | API to send anonymous pages to the hypervisor. | ||
3014 | |||
3015 | tmem.frontswap=0|1 [KNL, XEN] | ||
3016 | Default is on (1). Disable the usage of the frontswap | ||
3017 | API to send swap pages to the hypervisor. If disabled | ||
3018 | the selfballooning and selfshrinking are force disabled. | ||
3019 | |||
3020 | tmem.selfballooning=0|1 [KNL, XEN] | ||
3021 | Default is on (1). Disable the driving of swap pages | ||
3022 | to the hypervisor. | ||
3023 | |||
3024 | tmem.selfshrinking=0|1 [KNL, XEN] | ||
3025 | Default is on (1). Partial swapoff that immediately | ||
3026 | transfers pages from Xen hypervisor back to the | ||
3027 | kernel based on different criteria. | ||
3028 | |||
3008 | topology= [S390] | 3029 | topology= [S390] |
3009 | Format: {off | on} | 3030 | Format: {off | on} |
3010 | Specify if the kernel should make use of the cpu | 3031 | Specify if the kernel should make use of the cpu |
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt new file mode 100644 index 000000000000..cbf7ae412da4 --- /dev/null +++ b/Documentation/kernel-per-CPU-kthreads.txt | |||
@@ -0,0 +1,202 @@ | |||
1 | REDUCING OS JITTER DUE TO PER-CPU KTHREADS | ||
2 | |||
3 | This document lists per-CPU kthreads in the Linux kernel and presents | ||
4 | options to control their OS jitter. Note that non-per-CPU kthreads are | ||
5 | not listed here. To reduce OS jitter from non-per-CPU kthreads, bind | ||
6 | them to a "housekeeping" CPU dedicated to such work. | ||
7 | |||
8 | |||
9 | REFERENCES | ||
10 | |||
11 | o Documentation/IRQ-affinity.txt: Binding interrupts to sets of CPUs. | ||
12 | |||
13 | o Documentation/cgroups: Using cgroups to bind tasks to sets of CPUs. | ||
14 | |||
15 | o man taskset: Using the taskset command to bind tasks to sets | ||
16 | of CPUs. | ||
17 | |||
18 | o man sched_setaffinity: Using the sched_setaffinity() system | ||
19 | call to bind tasks to sets of CPUs. | ||
20 | |||
21 | o /sys/devices/system/cpu/cpuN/online: Control CPU N's hotplug state, | ||
22 | writing "0" to offline and "1" to online. | ||
23 | |||
24 | o In order to locate kernel-generated OS jitter on CPU N: | ||
25 | |||
26 | cd /sys/kernel/debug/tracing | ||
27 | echo 1 > max_graph_depth # Increase the "1" for more detail | ||
28 | echo function_graph > current_tracer | ||
29 | # run workload | ||
30 | cat per_cpu/cpuN/trace | ||
31 | |||
32 | |||
33 | KTHREADS | ||
34 | |||
35 | Name: ehca_comp/%u | ||
36 | Purpose: Periodically process Infiniband-related work. | ||
37 | To reduce its OS jitter, do any of the following: | ||
38 | 1. Don't use eHCA Infiniband hardware, instead choosing hardware | ||
39 | that does not require per-CPU kthreads. This will prevent these | ||
40 | kthreads from being created in the first place. (This will | ||
41 | work for most people, as this hardware, though important, is | ||
42 | relatively old and is produced in relatively low unit volumes.) | ||
43 | 2. Do all eHCA-Infiniband-related work on other CPUs, including | ||
44 | interrupts. | ||
45 | 3. Rework the eHCA driver so that its per-CPU kthreads are | ||
46 | provisioned only on selected CPUs. | ||
47 | |||
48 | |||
49 | Name: irq/%d-%s | ||
50 | Purpose: Handle threaded interrupts. | ||
51 | To reduce its OS jitter, do the following: | ||
52 | 1. Use irq affinity to force the irq threads to execute on | ||
53 | some other CPU. | ||
54 | |||
55 | Name: kcmtpd_ctr_%d | ||
56 | Purpose: Handle Bluetooth work. | ||
57 | To reduce its OS jitter, do one of the following: | ||
58 | 1. Don't use Bluetooth, in which case these kthreads won't be | ||
59 | created in the first place. | ||
60 | 2. Use irq affinity to force Bluetooth-related interrupts to | ||
61 | occur on some other CPU and furthermore initiate all | ||
62 | Bluetooth activity on some other CPU. | ||
63 | |||
64 | Name: ksoftirqd/%u | ||
65 | Purpose: Execute softirq handlers when threaded or when under heavy load. | ||
66 | To reduce its OS jitter, each softirq vector must be handled | ||
67 | separately as follows: | ||
68 | TIMER_SOFTIRQ: Do all of the following: | ||
69 | 1. To the extent possible, keep the CPU out of the kernel when it | ||
70 | is non-idle, for example, by avoiding system calls and by forcing | ||
71 | both kernel threads and interrupts to execute elsewhere. | ||
72 | 2. Build with CONFIG_HOTPLUG_CPU=y. After boot completes, force | ||
73 | the CPU offline, then bring it back online. This forces | ||
74 | recurring timers to migrate elsewhere. If you are concerned | ||
75 | with multiple CPUs, force them all offline before bringing the | ||
76 | first one back online. Once you have onlined the CPUs in question, | ||
77 | do not offline any other CPUs, because doing so could force the | ||
78 | timer back onto one of the CPUs in question. | ||
79 | NET_TX_SOFTIRQ and NET_RX_SOFTIRQ: Do all of the following: | ||
80 | 1. Force networking interrupts onto other CPUs. | ||
81 | 2. Initiate any network I/O on other CPUs. | ||
82 | 3. Once your application has started, prevent CPU-hotplug operations | ||
83 | from being initiated from tasks that might run on the CPU to | ||
84 | be de-jittered. (It is OK to force this CPU offline and then | ||
85 | bring it back online before you start your application.) | ||
86 | BLOCK_SOFTIRQ: Do all of the following: | ||
87 | 1. Force block-device interrupts onto some other CPU. | ||
88 | 2. Initiate any block I/O on other CPUs. | ||
89 | 3. Once your application has started, prevent CPU-hotplug operations | ||
90 | from being initiated from tasks that might run on the CPU to | ||
91 | be de-jittered. (It is OK to force this CPU offline and then | ||
92 | bring it back online before you start your application.) | ||
93 | BLOCK_IOPOLL_SOFTIRQ: Do all of the following: | ||
94 | 1. Force block-device interrupts onto some other CPU. | ||
95 | 2. Initiate any block I/O and block-I/O polling on other CPUs. | ||
96 | 3. Once your application has started, prevent CPU-hotplug operations | ||
97 | from being initiated from tasks that might run on the CPU to | ||
98 | be de-jittered. (It is OK to force this CPU offline and then | ||
99 | bring it back online before you start your application.) | ||
100 | TASKLET_SOFTIRQ: Do one or more of the following: | ||
101 | 1. Avoid use of drivers that use tasklets. (Such drivers will contain | ||
102 | calls to things like tasklet_schedule().) | ||
103 | 2. Convert all drivers that you must use from tasklets to workqueues. | ||
104 | 3. Force interrupts for drivers using tasklets onto other CPUs, | ||
105 | and also do I/O involving these drivers on other CPUs. | ||
106 | SCHED_SOFTIRQ: Do all of the following: | ||
107 | 1. Avoid sending scheduler IPIs to the CPU to be de-jittered, | ||
108 | for example, ensure that at most one runnable kthread is present | ||
109 | on that CPU. If a thread that expects to run on the de-jittered | ||
110 | CPU awakens, the scheduler will send an IPI that can result in | ||
111 | a subsequent SCHED_SOFTIRQ. | ||
112 | 2. Build with CONFIG_RCU_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_ALL=y, | ||
113 | CONFIG_NO_HZ_FULL=y, and, in addition, ensure that the CPU | ||
114 | to be de-jittered is marked as an adaptive-ticks CPU using the | ||
115 | "nohz_full=" boot parameter. This reduces the number of | ||
116 | scheduler-clock interrupts that the de-jittered CPU receives, | ||
117 | minimizing its chances of being selected to do the load balancing | ||
118 | work that runs in SCHED_SOFTIRQ context. | ||
119 | 3. To the extent possible, keep the CPU out of the kernel when it | ||
120 | is non-idle, for example, by avoiding system calls and by | ||
121 | forcing both kernel threads and interrupts to execute elsewhere. | ||
122 | This further reduces the number of scheduler-clock interrupts | ||
123 | received by the de-jittered CPU. | ||
124 | HRTIMER_SOFTIRQ: Do all of the following: | ||
125 | 1. To the extent possible, keep the CPU out of the kernel when it | ||
126 | is non-idle. For example, avoid system calls and force both | ||
127 | kernel threads and interrupts to execute elsewhere. | ||
128 | 2. Build with CONFIG_HOTPLUG_CPU=y. Once boot completes, force the | ||
129 | CPU offline, then bring it back online. This forces recurring | ||
130 | timers to migrate elsewhere. If you are concerned with multiple | ||
131 | CPUs, force them all offline before bringing the first one | ||
132 | back online. Once you have onlined the CPUs in question, do not | ||
133 | offline any other CPUs, because doing so could force the timer | ||
134 | back onto one of the CPUs in question. | ||
135 | RCU_SOFTIRQ: Do at least one of the following: | ||
136 | 1. Offload callbacks and keep the CPU in either dyntick-idle or | ||
137 | adaptive-ticks state by doing all of the following: | ||
138 | a. Build with CONFIG_RCU_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_ALL=y, | ||
139 | CONFIG_NO_HZ_FULL=y, and, in addition ensure that the CPU | ||
140 | to be de-jittered is marked as an adaptive-ticks CPU using | ||
141 | the "nohz_full=" boot parameter. Bind the rcuo kthreads | ||
142 | to housekeeping CPUs, which can tolerate OS jitter. | ||
143 | b. To the extent possible, keep the CPU out of the kernel | ||
144 | when it is non-idle, for example, by avoiding system | ||
145 | calls and by forcing both kernel threads and interrupts | ||
146 | to execute elsewhere. | ||
147 | 2. Enable RCU to do its processing remotely via dyntick-idle by | ||
148 | doing all of the following: | ||
149 | a. Build with CONFIG_NO_HZ=y and CONFIG_RCU_FAST_NO_HZ=y. | ||
150 | b. Ensure that the CPU goes idle frequently, allowing other | ||
151 | CPUs to detect that it has passed through an RCU quiescent | ||
152 | state. If the kernel is built with CONFIG_NO_HZ_FULL=y, | ||
153 | userspace execution also allows other CPUs to detect that | ||
154 | the CPU in question has passed through a quiescent state. | ||
155 | c. To the extent possible, keep the CPU out of the kernel | ||
156 | when it is non-idle, for example, by avoiding system | ||
157 | calls and by forcing both kernel threads and interrupts | ||
158 | to execute elsewhere. | ||
159 | |||
160 | Name: rcuc/%u | ||
161 | Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. | ||
162 | To reduce its OS jitter, do at least one of the following: | ||
163 | 1. Build the kernel with CONFIG_PREEMPT=n. This prevents these | ||
164 | kthreads from being created in the first place, and also obviates | ||
165 | the need for RCU priority boosting. This approach is feasible | ||
166 | for workloads that do not require high degrees of responsiveness. | ||
167 | 2. Build the kernel with CONFIG_RCU_BOOST=n. This prevents these | ||
168 | kthreads from being created in the first place. This approach | ||
169 | is feasible only if your workload never requires RCU priority | ||
170 | boosting, for example, if you ensure frequent idle time on all | ||
171 | CPUs that might execute within the kernel. | ||
172 | 3. Build with CONFIG_RCU_NOCB_CPU=y and CONFIG_RCU_NOCB_CPU_ALL=y, | ||
173 | which offloads all RCU callbacks to kthreads that can be moved | ||
174 | off of CPUs susceptible to OS jitter. This approach prevents the | ||
175 | rcuc/%u kthreads from having any work to do, so that they are | ||
176 | never awakened. | ||
177 | 4. Ensure that the CPU never enters the kernel, and, in particular, | ||
178 | avoid initiating any CPU hotplug operations on this CPU. This is | ||
179 | another way of preventing any callbacks from being queued on the | ||
180 | CPU, again preventing the rcuc/%u kthreads from having any work | ||
181 | to do. | ||
182 | |||
183 | Name: rcuob/%d, rcuop/%d, and rcuos/%d | ||
184 | Purpose: Offload RCU callbacks from the corresponding CPU. | ||
185 | To reduce its OS jitter, do at least one of the following: | ||
186 | 1. Use affinity, cgroups, or other mechanism to force these kthreads | ||
187 | to execute on some other CPU. | ||
188 | 2. Build with CONFIG_RCU_NOCB_CPUS=n, which will prevent these | ||
189 | kthreads from being created in the first place. However, please | ||
190 | note that this will not eliminate OS jitter, but will instead | ||
191 | shift it to RCU_SOFTIRQ. | ||
192 | |||
193 | Name: watchdog/%u | ||
194 | Purpose: Detect software lockups on each CPU. | ||
195 | To reduce its OS jitter, do at least one of the following: | ||
196 | 1. Build with CONFIG_LOCKUP_DETECTOR=n, which will prevent these | ||
197 | kthreads from being created in the first place. | ||
198 | 2. Echo a zero to /proc/sys/kernel/watchdog to disable the | ||
199 | watchdog timer. | ||
200 | 3. Echo a large number of /proc/sys/kernel/watchdog_thresh in | ||
201 | order to reduce the frequency of OS jitter due to the watchdog | ||
202 | timer down to a level that is acceptable for your workload. | ||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 504dfe4d52eb..a66c9821b5ce 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -268,7 +268,7 @@ situations. | |||
268 | System Power Management Phases | 268 | System Power Management Phases |
269 | ------------------------------ | 269 | ------------------------------ |
270 | Suspending or resuming the system is done in several phases. Different phases | 270 | Suspending or resuming the system is done in several phases. Different phases |
271 | are used for standby or memory sleep states ("suspend-to-RAM") and the | 271 | are used for freeze, standby, and memory sleep states ("suspend-to-RAM") and the |
272 | hibernation state ("suspend-to-disk"). Each phase involves executing callbacks | 272 | hibernation state ("suspend-to-disk"). Each phase involves executing callbacks |
273 | for every device before the next phase begins. Not all busses or classes | 273 | for every device before the next phase begins. Not all busses or classes |
274 | support all these callbacks and not all drivers use all the callbacks. The | 274 | support all these callbacks and not all drivers use all the callbacks. The |
@@ -309,7 +309,8 @@ execute the corresponding method from dev->driver->pm instead if there is one. | |||
309 | 309 | ||
310 | Entering System Suspend | 310 | Entering System Suspend |
311 | ----------------------- | 311 | ----------------------- |
312 | When the system goes into the standby or memory sleep state, the phases are: | 312 | When the system goes into the freeze, standby or memory sleep state, |
313 | the phases are: | ||
313 | 314 | ||
314 | prepare, suspend, suspend_late, suspend_noirq. | 315 | prepare, suspend, suspend_late, suspend_noirq. |
315 | 316 | ||
@@ -368,7 +369,7 @@ the devices that were suspended. | |||
368 | 369 | ||
369 | Leaving System Suspend | 370 | Leaving System Suspend |
370 | ---------------------- | 371 | ---------------------- |
371 | When resuming from standby or memory sleep, the phases are: | 372 | When resuming from freeze, standby or memory sleep, the phases are: |
372 | 373 | ||
373 | resume_noirq, resume_early, resume, complete. | 374 | resume_noirq, resume_early, resume, complete. |
374 | 375 | ||
@@ -433,8 +434,8 @@ the system log. | |||
433 | 434 | ||
434 | Entering Hibernation | 435 | Entering Hibernation |
435 | -------------------- | 436 | -------------------- |
436 | Hibernating the system is more complicated than putting it into the standby or | 437 | Hibernating the system is more complicated than putting it into the other |
437 | memory sleep state, because it involves creating and saving a system image. | 438 | sleep states, because it involves creating and saving a system image. |
438 | Therefore there are more phases for hibernation, with a different set of | 439 | Therefore there are more phases for hibernation, with a different set of |
439 | callbacks. These phases always run after tasks have been frozen and memory has | 440 | callbacks. These phases always run after tasks have been frozen and memory has |
440 | been freed. | 441 | been freed. |
@@ -485,8 +486,8 @@ image forms an atomic snapshot of the system state. | |||
485 | 486 | ||
486 | At this point the system image is saved, and the devices then need to be | 487 | At this point the system image is saved, and the devices then need to be |
487 | prepared for the upcoming system shutdown. This is much like suspending them | 488 | prepared for the upcoming system shutdown. This is much like suspending them |
488 | before putting the system into the standby or memory sleep state, and the phases | 489 | before putting the system into the freeze, standby or memory sleep state, |
489 | are similar. | 490 | and the phases are similar. |
490 | 491 | ||
491 | 9. The prepare phase is discussed above. | 492 | 9. The prepare phase is discussed above. |
492 | 493 | ||
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt index c537834af005..f1f0f59a7c47 100644 --- a/Documentation/power/interface.txt +++ b/Documentation/power/interface.txt | |||
@@ -7,8 +7,8 @@ running. The interface exists in /sys/power/ directory (assuming sysfs | |||
7 | is mounted at /sys). | 7 | is mounted at /sys). |
8 | 8 | ||
9 | /sys/power/state controls system power state. Reading from this file | 9 | /sys/power/state controls system power state. Reading from this file |
10 | returns what states are supported, which is hard-coded to 'standby' | 10 | returns what states are supported, which is hard-coded to 'freeze', |
11 | (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' | 11 | 'standby' (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' |
12 | (Suspend-to-Disk). | 12 | (Suspend-to-Disk). |
13 | 13 | ||
14 | Writing to this file one of those strings causes the system to | 14 | Writing to this file one of those strings causes the system to |
diff --git a/Documentation/power/notifiers.txt b/Documentation/power/notifiers.txt index c2a4a346c0d9..a81fa254303d 100644 --- a/Documentation/power/notifiers.txt +++ b/Documentation/power/notifiers.txt | |||
@@ -15,8 +15,10 @@ A suspend/hibernation notifier may be used for this purpose. | |||
15 | The subsystems or drivers having such needs can register suspend notifiers that | 15 | The subsystems or drivers having such needs can register suspend notifiers that |
16 | will be called upon the following events by the PM core: | 16 | will be called upon the following events by the PM core: |
17 | 17 | ||
18 | PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will | 18 | PM_HIBERNATION_PREPARE The system is going to hibernate, tasks will be frozen |
19 | be frozen immediately. | 19 | immediately. This is different from PM_SUSPEND_PREPARE |
20 | below because here we do additional work between notifiers | ||
21 | and drivers freezing. | ||
20 | 22 | ||
21 | PM_POST_HIBERNATION The system memory state has been restored from a | 23 | PM_POST_HIBERNATION The system memory state has been restored from a |
22 | hibernation image or an error occurred during | 24 | hibernation image or an error occurred during |
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt index 4416b28630df..442d43df9b25 100644 --- a/Documentation/power/states.txt +++ b/Documentation/power/states.txt | |||
@@ -2,12 +2,26 @@ | |||
2 | System Power Management States | 2 | System Power Management States |
3 | 3 | ||
4 | 4 | ||
5 | The kernel supports three power management states generically, though | 5 | The kernel supports four power management states generically, though |
6 | each is dependent on platform support code to implement the low-level | 6 | one is generic and the other three are dependent on platform support |
7 | details for each state. This file describes each state, what they are | 7 | code to implement the low-level details for each state. |
8 | This file describes each state, what they are | ||
8 | commonly called, what ACPI state they map to, and what string to write | 9 | commonly called, what ACPI state they map to, and what string to write |
9 | to /sys/power/state to enter that state | 10 | to /sys/power/state to enter that state |
10 | 11 | ||
12 | state: Freeze / Low-Power Idle | ||
13 | ACPI state: S0 | ||
14 | String: "freeze" | ||
15 | |||
16 | This state is a generic, pure software, light-weight, low-power state. | ||
17 | It allows more energy to be saved relative to idle by freezing user | ||
18 | space and putting all I/O devices into low-power states (possibly | ||
19 | lower-power than available at run time), such that the processors can | ||
20 | spend more time in their idle states. | ||
21 | This state can be used for platforms without Standby/Suspend-to-RAM | ||
22 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) | ||
23 | to provide reduced resume latency. | ||
24 | |||
11 | 25 | ||
12 | State: Standby / Power-On Suspend | 26 | State: Standby / Power-On Suspend |
13 | ACPI State: S1 | 27 | ACPI State: S1 |
@@ -22,9 +36,6 @@ We try to put devices in a low-power state equivalent to D1, which | |||
22 | also offers low power savings, but low resume latency. Not all devices | 36 | also offers low power savings, but low resume latency. Not all devices |
23 | support D1, and those that don't are left on. | 37 | support D1, and those that don't are left on. |
24 | 38 | ||
25 | A transition from Standby to the On state should take about 1-2 | ||
26 | seconds. | ||
27 | |||
28 | 39 | ||
29 | State: Suspend-to-RAM | 40 | State: Suspend-to-RAM |
30 | ACPI State: S3 | 41 | ACPI State: S3 |
@@ -42,9 +53,6 @@ transition back to the On state. | |||
42 | For at least ACPI, STR requires some minimal boot-strapping code to | 53 | For at least ACPI, STR requires some minimal boot-strapping code to |
43 | resume the system from STR. This may be true on other platforms. | 54 | resume the system from STR. This may be true on other platforms. |
44 | 55 | ||
45 | A transition from Suspend-to-RAM to the On state should take about | ||
46 | 3-5 seconds. | ||
47 | |||
48 | 56 | ||
49 | State: Suspend-to-disk | 57 | State: Suspend-to-disk |
50 | ACPI State: S4 | 58 | ACPI State: S4 |
@@ -74,7 +82,3 @@ low-power state (like ACPI S4), or it may simply power down. Powering | |||
74 | down offers greater savings, and allows this mechanism to work on any | 82 | down offers greater savings, and allows this mechanism to work on any |
75 | system. However, entering a real low-power state allows the user to | 83 | system. However, entering a real low-power state allows the user to |
76 | trigger wake up events (e.g. pressing a key or opening a laptop lid). | 84 | trigger wake up events (e.g. pressing a key or opening a laptop lid). |
77 | |||
78 | A transition from Suspend-to-Disk to the On state should take about 30 | ||
79 | seconds, though it's typically a bit more with the current | ||
80 | implementation. | ||
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt index c75694b35d08..a9c16c979da2 100644 --- a/Documentation/rapidio/rapidio.txt +++ b/Documentation/rapidio/rapidio.txt | |||
@@ -79,20 +79,63 @@ master port that is used to communicate with devices within the network. | |||
79 | In order to initialize the RapidIO subsystem, a platform must initialize and | 79 | In order to initialize the RapidIO subsystem, a platform must initialize and |
80 | register at least one master port within the RapidIO network. To register mport | 80 | register at least one master port within the RapidIO network. To register mport |
81 | within the subsystem controller driver initialization code calls function | 81 | within the subsystem controller driver initialization code calls function |
82 | rio_register_mport() for each available master port. After all active master | 82 | rio_register_mport() for each available master port. |
83 | ports are registered with a RapidIO subsystem, the rio_init_mports() routine | ||
84 | is called to perform enumeration and discovery. | ||
85 | 83 | ||
86 | In the current PowerPC-based implementation a subsys_initcall() is specified to | 84 | RapidIO subsystem uses subsys_initcall() or device_initcall() to perform |
87 | perform controller initialization and mport registration. At the end it directly | 85 | controller initialization (depending on controller device type). |
88 | calls rio_init_mports() to execute RapidIO enumeration and discovery. | 86 | |
87 | After all active master ports are registered with a RapidIO subsystem, | ||
88 | an enumeration and/or discovery routine may be called automatically or | ||
89 | by user-space command. | ||
89 | 90 | ||
90 | 4. Enumeration and Discovery | 91 | 4. Enumeration and Discovery |
91 | ---------------------------- | 92 | ---------------------------- |
92 | 93 | ||
93 | When rio_init_mports() is called it scans a list of registered master ports and | 94 | 4.1 Overview |
94 | calls an enumeration or discovery routine depending on the configured role of a | 95 | ------------ |
95 | master port: host or agent. | 96 | |
97 | RapidIO subsystem configuration options allow users to specify enumeration and | ||
98 | discovery methods as statically linked components or loadable modules. | ||
99 | An enumeration/discovery method implementation and available input parameters | ||
100 | define how any given method can be attached to available RapidIO mports: | ||
101 | simply to all available mports OR individually to the specified mport device. | ||
102 | |||
103 | Depending on selected enumeration/discovery build configuration, there are | ||
104 | several methods to initiate an enumeration and/or discovery process: | ||
105 | |||
106 | (a) Statically linked enumeration and discovery process can be started | ||
107 | automatically during kernel initialization time using corresponding module | ||
108 | parameters. This was the original method used since introduction of RapidIO | ||
109 | subsystem. Now this method relies on enumerator module parameter which is | ||
110 | 'rio-scan.scan' for existing basic enumeration/discovery method. | ||
111 | When automatic start of enumeration/discovery is used a user has to ensure | ||
112 | that all discovering endpoints are started before the enumerating endpoint | ||
113 | and are waiting for enumeration to be completed. | ||
114 | Configuration option CONFIG_RAPIDIO_DISC_TIMEOUT defines time that discovering | ||
115 | endpoint waits for enumeration to be completed. If the specified timeout | ||
116 | expires the discovery process is terminated without obtaining RapidIO network | ||
117 | information. NOTE: a timed out discovery process may be restarted later using | ||
118 | a user-space command as it is described later if the given endpoint was | ||
119 | enumerated successfully. | ||
120 | |||
121 | (b) Statically linked enumeration and discovery process can be started by | ||
122 | a command from user space. This initiation method provides more flexibility | ||
123 | for a system startup compared to the option (a) above. After all participating | ||
124 | endpoints have been successfully booted, an enumeration process shall be | ||
125 | started first by issuing a user-space command, after an enumeration is | ||
126 | completed a discovery process can be started on all remaining endpoints. | ||
127 | |||
128 | (c) Modular enumeration and discovery process can be started by a command from | ||
129 | user space. After an enumeration/discovery module is loaded, a network scan | ||
130 | process can be started by issuing a user-space command. | ||
131 | Similar to the option (b) above, an enumerator has to be started first. | ||
132 | |||
133 | (d) Modular enumeration and discovery process can be started by a module | ||
134 | initialization routine. In this case an enumerating module shall be loaded | ||
135 | first. | ||
136 | |||
137 | When a network scan process is started it calls an enumeration or discovery | ||
138 | routine depending on the configured role of a master port: host or agent. | ||
96 | 139 | ||
97 | Enumeration is performed by a master port if it is configured as a host port by | 140 | Enumeration is performed by a master port if it is configured as a host port by |
98 | assigning a host device ID greater than or equal to zero. A host device ID is | 141 | assigning a host device ID greater than or equal to zero. A host device ID is |
@@ -104,8 +147,58 @@ for it. | |||
104 | The enumeration and discovery routines use RapidIO maintenance transactions | 147 | The enumeration and discovery routines use RapidIO maintenance transactions |
105 | to access the configuration space of devices. | 148 | to access the configuration space of devices. |
106 | 149 | ||
107 | The enumeration process is implemented according to the enumeration algorithm | 150 | 4.2 Automatic Start of Enumeration and Discovery |
108 | outlined in the RapidIO Interconnect Specification: Annex I [1]. | 151 | ------------------------------------------------ |
152 | |||
153 | Automatic enumeration/discovery start method is applicable only to built-in | ||
154 | enumeration/discovery RapidIO configuration selection. To enable automatic | ||
155 | enumeration/discovery start by existing basic enumerator method set use boot | ||
156 | command line parameter "rio-scan.scan=1". | ||
157 | |||
158 | This configuration requires synchronized start of all RapidIO endpoints that | ||
159 | form a network which will be enumerated/discovered. Discovering endpoints have | ||
160 | to be started before an enumeration starts to ensure that all RapidIO | ||
161 | controllers have been initialized and are ready to be discovered. Configuration | ||
162 | parameter CONFIG_RAPIDIO_DISC_TIMEOUT defines time (in seconds) which | ||
163 | a discovering endpoint will wait for enumeration to be completed. | ||
164 | |||
165 | When automatic enumeration/discovery start is selected, basic method's | ||
166 | initialization routine calls rio_init_mports() to perform enumeration or | ||
167 | discovery for all known mport devices. | ||
168 | |||
169 | Depending on RapidIO network size and configuration this automatic | ||
170 | enumeration/discovery start method may be difficult to use due to the | ||
171 | requirement for synchronized start of all endpoints. | ||
172 | |||
173 | 4.3 User-space Start of Enumeration and Discovery | ||
174 | ------------------------------------------------- | ||
175 | |||
176 | User-space start of enumeration and discovery can be used with built-in and | ||
177 | modular build configurations. For user-space controlled start RapidIO subsystem | ||
178 | creates the sysfs write-only attribute file '/sys/bus/rapidio/scan'. To initiate | ||
179 | an enumeration or discovery process on specific mport device, a user needs to | ||
180 | write mport_ID (not RapidIO destination ID) into that file. The mport_ID is a | ||
181 | sequential number (0 ... RIO_MAX_MPORTS) assigned during mport device | ||
182 | registration. For example for machine with single RapidIO controller, mport_ID | ||
183 | for that controller always will be 0. | ||
184 | |||
185 | To initiate RapidIO enumeration/discovery on all available mports a user may | ||
186 | write '-1' (or RIO_MPORT_ANY) into the scan attribute file. | ||
187 | |||
188 | 4.4 Basic Enumeration Method | ||
189 | ---------------------------- | ||
190 | |||
191 | This is an original enumeration/discovery method which is available since | ||
192 | first release of RapidIO subsystem code. The enumeration process is | ||
193 | implemented according to the enumeration algorithm outlined in the RapidIO | ||
194 | Interconnect Specification: Annex I [1]. | ||
195 | |||
196 | This method can be configured as statically linked or loadable module. | ||
197 | The method's single parameter "scan" allows to trigger the enumeration/discovery | ||
198 | process from module initialization routine. | ||
199 | |||
200 | This enumeration/discovery method can be started only once and does not support | ||
201 | unloading if it is built as a module. | ||
109 | 202 | ||
110 | The enumeration process traverses the network using a recursive depth-first | 203 | The enumeration process traverses the network using a recursive depth-first |
111 | algorithm. When a new device is found, the enumerator takes ownership of that | 204 | algorithm. When a new device is found, the enumerator takes ownership of that |
@@ -160,6 +253,19 @@ time period. If this wait time period expires before enumeration is completed, | |||
160 | an agent skips RapidIO discovery and continues with remaining kernel | 253 | an agent skips RapidIO discovery and continues with remaining kernel |
161 | initialization. | 254 | initialization. |
162 | 255 | ||
256 | 4.5 Adding New Enumeration/Discovery Method | ||
257 | ------------------------------------------- | ||
258 | |||
259 | RapidIO subsystem code organization allows addition of new enumeration/discovery | ||
260 | methods as new configuration options without significant impact to to the core | ||
261 | RapidIO code. | ||
262 | |||
263 | A new enumeration/discovery method has to be attached to one or more mport | ||
264 | devices before an enumeration/discovery process can be started. Normally, | ||
265 | method's module initialization routine calls rio_register_scan() to attach | ||
266 | an enumerator to a specified mport device (or devices). The basic enumerator | ||
267 | implementation demonstrates this process. | ||
268 | |||
163 | 5. References | 269 | 5. References |
164 | ------------- | 270 | ------------- |
165 | 271 | ||
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt index 97f71ce575d6..19878179da4c 100644 --- a/Documentation/rapidio/sysfs.txt +++ b/Documentation/rapidio/sysfs.txt | |||
@@ -88,3 +88,20 @@ that exports additional attributes. | |||
88 | 88 | ||
89 | IDT_GEN2: | 89 | IDT_GEN2: |
90 | errlog - reads contents of device error log until it is empty. | 90 | errlog - reads contents of device error log until it is empty. |
91 | |||
92 | |||
93 | 5. RapidIO Bus Attributes | ||
94 | ------------------------- | ||
95 | |||
96 | RapidIO bus subdirectory /sys/bus/rapidio implements the following bus-specific | ||
97 | attribute: | ||
98 | |||
99 | scan - allows to trigger enumeration discovery process from user space. This | ||
100 | is a write-only attribute. To initiate an enumeration or discovery | ||
101 | process on specific mport device, a user needs to write mport_ID (not | ||
102 | RapidIO destination ID) into this file. The mport_ID is a sequential | ||
103 | number (0 ... RIO_MAX_MPORTS) assigned to the mport device. | ||
104 | For example, for a machine with a single RapidIO controller, mport_ID | ||
105 | for that controller always will be 0. | ||
106 | To initiate RapidIO enumeration/discovery on all available mports | ||
107 | a user must write '-1' (or RIO_MPORT_ANY) into this attribute file. | ||