diff options
Diffstat (limited to 'Documentation')
58 files changed, 1754 insertions, 142 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 new file mode 100644 index 000000000000..1b62230b33b9 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 | |||
@@ -0,0 +1,15 @@ | |||
1 | What: /sys/bus/i2c/devices/.../output_hvled[n] | ||
2 | Date: April 2012 | ||
3 | KernelVersion: 3.5 | ||
4 | Contact: Johan Hovold <jhovold@gmail.com> | ||
5 | Description: | ||
6 | Set the controlling backlight device for high-voltage current | ||
7 | sink HVLED[n] (n = 1, 2) (0, 1). | ||
8 | |||
9 | What: /sys/bus/i2c/devices/.../output_lvled[n] | ||
10 | Date: April 2012 | ||
11 | KernelVersion: 3.5 | ||
12 | Contact: Johan Hovold <jhovold@gmail.com> | ||
13 | Description: | ||
14 | Set the controlling led device for low-voltage current sink | ||
15 | LVLED[n] (n = 1..5) (0..3). | ||
diff --git a/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 new file mode 100644 index 000000000000..77cf7ac949af --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 | |||
@@ -0,0 +1,48 @@ | |||
1 | What: /sys/class/backlight/<backlight>/als_channel | ||
2 | Date: May 2012 | ||
3 | KernelVersion: 3.5 | ||
4 | Contact: Johan Hovold <jhovold@gmail.com> | ||
5 | Description: | ||
6 | Get the ALS output channel used as input in | ||
7 | ALS-current-control mode (0, 1), where | ||
8 | |||
9 | 0 - out_current0 (backlight 0) | ||
10 | 1 - out_current1 (backlight 1) | ||
11 | |||
12 | What: /sys/class/backlight/<backlight>/als_en | ||
13 | Date: May 2012 | ||
14 | KernelVersion: 3.5 | ||
15 | Contact: Johan Hovold <jhovold@gmail.com> | ||
16 | Description: | ||
17 | Enable ALS-current-control mode (0, 1). | ||
18 | |||
19 | What: /sys/class/backlight/<backlight>/id | ||
20 | Date: April 2012 | ||
21 | KernelVersion: 3.5 | ||
22 | Contact: Johan Hovold <jhovold@gmail.com> | ||
23 | Description: | ||
24 | Get the id of this backlight (0, 1). | ||
25 | |||
26 | What: /sys/class/backlight/<backlight>/linear | ||
27 | Date: April 2012 | ||
28 | KernelVersion: 3.5 | ||
29 | Contact: Johan Hovold <jhovold@gmail.com> | ||
30 | Description: | ||
31 | Set the brightness-mapping mode (0, 1), where | ||
32 | |||
33 | 0 - exponential mode | ||
34 | 1 - linear mode | ||
35 | |||
36 | What: /sys/class/backlight/<backlight>/pwm | ||
37 | Date: April 2012 | ||
38 | KernelVersion: 3.5 | ||
39 | Contact: Johan Hovold <jhovold@gmail.com> | ||
40 | Description: | ||
41 | Set the PWM-input control mask (5 bits), where | ||
42 | |||
43 | bit 5 - PWM-input enabled in Zone 4 | ||
44 | bit 4 - PWM-input enabled in Zone 3 | ||
45 | bit 3 - PWM-input enabled in Zone 2 | ||
46 | bit 2 - PWM-input enabled in Zone 1 | ||
47 | bit 1 - PWM-input enabled in Zone 0 | ||
48 | bit 0 - PWM-input enabled | ||
diff --git a/Documentation/ABI/testing/sysfs-class-led-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533 new file mode 100644 index 000000000000..620ebb3b9baa --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-led-driver-lm3533 | |||
@@ -0,0 +1,65 @@ | |||
1 | What: /sys/class/leds/<led>/als_channel | ||
2 | Date: May 2012 | ||
3 | KernelVersion: 3.5 | ||
4 | Contact: Johan Hovold <jhovold@gmail.com> | ||
5 | Description: | ||
6 | Set the ALS output channel to use as input in | ||
7 | ALS-current-control mode (1, 2), where | ||
8 | |||
9 | 1 - out_current1 | ||
10 | 2 - out_current2 | ||
11 | |||
12 | What: /sys/class/leds/<led>/als_en | ||
13 | Date: May 2012 | ||
14 | KernelVersion: 3.5 | ||
15 | Contact: Johan Hovold <jhovold@gmail.com> | ||
16 | Description: | ||
17 | Enable ALS-current-control mode (0, 1). | ||
18 | |||
19 | What: /sys/class/leds/<led>/falltime | ||
20 | What: /sys/class/leds/<led>/risetime | ||
21 | Date: April 2012 | ||
22 | KernelVersion: 3.5 | ||
23 | Contact: Johan Hovold <jhovold@gmail.com> | ||
24 | Description: | ||
25 | Set the pattern generator fall and rise times (0..7), where | ||
26 | |||
27 | 0 - 2048 us | ||
28 | 1 - 262 ms | ||
29 | 2 - 524 ms | ||
30 | 3 - 1.049 s | ||
31 | 4 - 2.097 s | ||
32 | 5 - 4.194 s | ||
33 | 6 - 8.389 s | ||
34 | 7 - 16.78 s | ||
35 | |||
36 | What: /sys/class/leds/<led>/id | ||
37 | Date: April 2012 | ||
38 | KernelVersion: 3.5 | ||
39 | Contact: Johan Hovold <jhovold@gmail.com> | ||
40 | Description: | ||
41 | Get the id of this led (0..3). | ||
42 | |||
43 | What: /sys/class/leds/<led>/linear | ||
44 | Date: April 2012 | ||
45 | KernelVersion: 3.5 | ||
46 | Contact: Johan Hovold <jhovold@gmail.com> | ||
47 | Description: | ||
48 | Set the brightness-mapping mode (0, 1), where | ||
49 | |||
50 | 0 - exponential mode | ||
51 | 1 - linear mode | ||
52 | |||
53 | What: /sys/class/leds/<led>/pwm | ||
54 | Date: April 2012 | ||
55 | KernelVersion: 3.5 | ||
56 | Contact: Johan Hovold <jhovold@gmail.com> | ||
57 | Description: | ||
58 | Set the PWM-input control mask (5 bits), where | ||
59 | |||
60 | bit 5 - PWM-input enabled in Zone 4 | ||
61 | bit 4 - PWM-input enabled in Zone 3 | ||
62 | bit 3 - PWM-input enabled in Zone 2 | ||
63 | bit 2 - PWM-input enabled in Zone 1 | ||
64 | bit 1 - PWM-input enabled in Zone 0 | ||
65 | bit 0 - PWM-input enabled | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 4468ce24427c..c379a2a6949f 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -150,7 +150,8 @@ be able to justify all violations that remain in your patch. | |||
150 | 150 | ||
151 | Look through the MAINTAINERS file and the source code, and determine | 151 | Look through the MAINTAINERS file and the source code, and determine |
152 | if your change applies to a specific subsystem of the kernel, with | 152 | if your change applies to a specific subsystem of the kernel, with |
153 | an assigned maintainer. If so, e-mail that person. | 153 | an assigned maintainer. If so, e-mail that person. The script |
154 | scripts/get_maintainer.pl can be very useful at this step. | ||
154 | 155 | ||
155 | If no maintainer is listed, or the maintainer does not respond, send | 156 | If no maintainer is listed, or the maintainer does not respond, send |
156 | your patch to the primary Linux kernel developer's mailing list, | 157 | your patch to the primary Linux kernel developer's mailing list, |
diff --git a/Documentation/arm/SPEAr/overview.txt b/Documentation/arm/SPEAr/overview.txt index 28a9af953b9d..57aae7765c74 100644 --- a/Documentation/arm/SPEAr/overview.txt +++ b/Documentation/arm/SPEAr/overview.txt | |||
@@ -8,9 +8,8 @@ Introduction | |||
8 | weblink : http://www.st.com/spear | 8 | weblink : http://www.st.com/spear |
9 | 9 | ||
10 | The ST Microelectronics SPEAr range of ARM9/CortexA9 System-on-Chip CPUs are | 10 | The ST Microelectronics SPEAr range of ARM9/CortexA9 System-on-Chip CPUs are |
11 | supported by the 'spear' platform of ARM Linux. Currently SPEAr300, | 11 | supported by the 'spear' platform of ARM Linux. Currently SPEAr1310, |
12 | SPEAr310, SPEAr320 and SPEAr600 SOCs are supported. Support for the SPEAr13XX | 12 | SPEAr1340, SPEAr300, SPEAr310, SPEAr320 and SPEAr600 SOCs are supported. |
13 | series is in progress. | ||
14 | 13 | ||
15 | Hierarchy in SPEAr is as follows: | 14 | Hierarchy in SPEAr is as follows: |
16 | 15 | ||
@@ -26,33 +25,36 @@ Introduction | |||
26 | - SPEAr600 (SOC) | 25 | - SPEAr600 (SOC) |
27 | - SPEAr600 Evaluation Board | 26 | - SPEAr600 Evaluation Board |
28 | - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) | 27 | - SPEAr13XX (13XX SOC series, based on ARM CORTEXA9) |
29 | - SPEAr1300 (SOC) | 28 | - SPEAr1310 (SOC) |
29 | - SPEAr1310 Evaluation Board | ||
30 | - SPEAr1340 (SOC) | ||
31 | - SPEAr1340 Evaluation Board | ||
30 | 32 | ||
31 | Configuration | 33 | Configuration |
32 | ------------- | 34 | ------------- |
33 | 35 | ||
34 | A generic configuration is provided for each machine, and can be used as the | 36 | A generic configuration is provided for each machine, and can be used as the |
35 | default by | 37 | default by |
36 | make spear600_defconfig | 38 | make spear13xx_defconfig |
37 | make spear300_defconfig | 39 | make spear3xx_defconfig |
38 | make spear310_defconfig | 40 | make spear6xx_defconfig |
39 | make spear320_defconfig | ||
40 | 41 | ||
41 | Layout | 42 | Layout |
42 | ------ | 43 | ------ |
43 | 44 | ||
44 | The common files for multiple machine families (SPEAr3XX, SPEAr6XX and | 45 | The common files for multiple machine families (SPEAr3xx, SPEAr6xx and |
45 | SPEAr13XX) are located in the platform code contained in arch/arm/plat-spear | 46 | SPEAr13xx) are located in the platform code contained in arch/arm/plat-spear |
46 | with headers in plat/. | 47 | with headers in plat/. |
47 | 48 | ||
48 | Each machine series have a directory with name arch/arm/mach-spear followed by | 49 | Each machine series have a directory with name arch/arm/mach-spear followed by |
49 | series name. Like mach-spear3xx, mach-spear6xx and mach-spear13xx. | 50 | series name. Like mach-spear3xx, mach-spear6xx and mach-spear13xx. |
50 | 51 | ||
51 | Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c and for | 52 | Common file for machines of spear3xx family is mach-spear3xx/spear3xx.c, for |
52 | spear6xx is mach-spear6xx/spear6xx.c. mach-spear* also contain soc/machine | 53 | spear6xx is mach-spear6xx/spear6xx.c and for spear13xx family is |
53 | specific files, like spear300.c, spear310.c, spear320.c and spear600.c. | 54 | mach-spear13xx/spear13xx.c. mach-spear* also contain soc/machine specific |
54 | mach-spear* doesn't contains board specific files as they fully support | 55 | files, like spear1310.c, spear1340.c spear300.c, spear310.c, spear320.c and |
55 | Flattened Device Tree. | 56 | spear600.c. mach-spear* doesn't contains board specific files as they fully |
57 | support Flattened Device Tree. | ||
56 | 58 | ||
57 | 59 | ||
58 | Document Author | 60 | Document Author |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 9b1067afb224..dd88540bb995 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared | |||
184 | page will eventually get charged for it (once it is uncharged from | 184 | page will eventually get charged for it (once it is uncharged from |
185 | the cgroup that brought it in -- this will happen on memory pressure). | 185 | the cgroup that brought it in -- this will happen on memory pressure). |
186 | 186 | ||
187 | But see section 8.2: when moving a task to another cgroup, its pages may | ||
188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. | ||
189 | |||
187 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. | 190 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. |
188 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to | 191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to |
189 | be backed into memory in force, charges for pages are accounted against the | 192 | be backed into memory in force, charges for pages are accounted against the |
190 | caller of swapoff rather than the users of shmem. | 193 | caller of swapoff rather than the users of shmem. |
191 | 194 | ||
192 | |||
193 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) | 195 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) |
194 | 196 | ||
195 | Swap Extension allows you to record charge for swap. A swapped-in page is | 197 | Swap Extension allows you to record charge for swap. A swapped-in page is |
@@ -374,14 +376,15 @@ cgroup might have some charge associated with it, even though all | |||
374 | tasks have migrated away from it. (because we charge against pages, not | 376 | tasks have migrated away from it. (because we charge against pages, not |
375 | against tasks.) | 377 | against tasks.) |
376 | 378 | ||
377 | Such charges are freed or moved to their parent. At moving, both of RSS | 379 | We move the stats to root (if use_hierarchy==0) or parent (if |
378 | and CACHES are moved to parent. | 380 | use_hierarchy==1), and no change on the charge except uncharging |
379 | rmdir() may return -EBUSY if freeing/moving fails. See 5.1 also. | 381 | from the child. |
380 | 382 | ||
381 | Charges recorded in swap information is not updated at removal of cgroup. | 383 | Charges recorded in swap information is not updated at removal of cgroup. |
382 | Recorded information is discarded and a cgroup which uses swap (swapcache) | 384 | Recorded information is discarded and a cgroup which uses swap (swapcache) |
383 | will be charged as a new owner of it. | 385 | will be charged as a new owner of it. |
384 | 386 | ||
387 | About use_hierarchy, see Section 6. | ||
385 | 388 | ||
386 | 5. Misc. interfaces. | 389 | 5. Misc. interfaces. |
387 | 390 | ||
@@ -394,13 +397,15 @@ will be charged as a new owner of it. | |||
394 | 397 | ||
395 | Almost all pages tracked by this memory cgroup will be unmapped and freed. | 398 | Almost all pages tracked by this memory cgroup will be unmapped and freed. |
396 | Some pages cannot be freed because they are locked or in-use. Such pages are | 399 | Some pages cannot be freed because they are locked or in-use. Such pages are |
397 | moved to parent and this cgroup will be empty. This may return -EBUSY if | 400 | moved to parent(if use_hierarchy==1) or root (if use_hierarchy==0) and this |
398 | VM is too busy to free/move all pages immediately. | 401 | cgroup will be empty. |
399 | 402 | ||
400 | Typical use case of this interface is that calling this before rmdir(). | 403 | Typical use case of this interface is that calling this before rmdir(). |
401 | Because rmdir() moves all pages to parent, some out-of-use page caches can be | 404 | Because rmdir() moves all pages to parent, some out-of-use page caches can be |
402 | moved to the parent. If you want to avoid that, force_empty will be useful. | 405 | moved to the parent. If you want to avoid that, force_empty will be useful. |
403 | 406 | ||
407 | About use_hierarchy, see Section 6. | ||
408 | |||
404 | 5.2 stat file | 409 | 5.2 stat file |
405 | 410 | ||
406 | memory.stat file includes following statistics | 411 | memory.stat file includes following statistics |
@@ -430,17 +435,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy | |||
430 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to | 435 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to |
431 | hierarchy under which memory cgroup is. | 436 | hierarchy under which memory cgroup is. |
432 | 437 | ||
433 | total_cache - sum of all children's "cache" | 438 | total_<counter> - # hierarchical version of <counter>, which in |
434 | total_rss - sum of all children's "rss" | 439 | addition to the cgroup's own value includes the |
435 | total_mapped_file - sum of all children's "cache" | 440 | sum of all hierarchical children's values of |
436 | total_pgpgin - sum of all children's "pgpgin" | 441 | <counter>, i.e. total_cache |
437 | total_pgpgout - sum of all children's "pgpgout" | ||
438 | total_swap - sum of all children's "swap" | ||
439 | total_inactive_anon - sum of all children's "inactive_anon" | ||
440 | total_active_anon - sum of all children's "active_anon" | ||
441 | total_inactive_file - sum of all children's "inactive_file" | ||
442 | total_active_file - sum of all children's "active_file" | ||
443 | total_unevictable - sum of all children's "unevictable" | ||
444 | 442 | ||
445 | # The following additional stats are dependent on CONFIG_DEBUG_VM. | 443 | # The following additional stats are dependent on CONFIG_DEBUG_VM. |
446 | 444 | ||
@@ -622,8 +620,7 @@ memory cgroup. | |||
622 | bit | what type of charges would be moved ? | 620 | bit | what type of charges would be moved ? |
623 | -----+------------------------------------------------------------------------ | 621 | -----+------------------------------------------------------------------------ |
624 | 0 | A charge of an anonymous page(or swap of it) used by the target task. | 622 | 0 | A charge of an anonymous page(or swap of it) used by the target task. |
625 | | Those pages and swaps must be used only by the target task. You must | 623 | | You must enable Swap Extension(see 2.4) to enable move of swap charges. |
626 | | enable Swap Extension(see 2.4) to enable move of swap charges. | ||
627 | -----+------------------------------------------------------------------------ | 624 | -----+------------------------------------------------------------------------ |
628 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) | 625 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) |
629 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of | 626 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of |
@@ -636,8 +633,6 @@ memory cgroup. | |||
636 | 633 | ||
637 | 8.3 TODO | 634 | 8.3 TODO |
638 | 635 | ||
639 | - Implement madvise(2) to let users decide the vma to be moved or not to be | ||
640 | moved. | ||
641 | - All of moving charge operations are done under cgroup_mutex. It's not good | 636 | - All of moving charge operations are done under cgroup_mutex. It's not good |
642 | behavior to hold the mutex too long, so we may need some trick. | 637 | behavior to hold the mutex too long, so we may need some trick. |
643 | 638 | ||
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt index f3c4ec3626a2..0c4a344e78fa 100644 --- a/Documentation/cgroups/resource_counter.txt +++ b/Documentation/cgroups/resource_counter.txt | |||
@@ -92,6 +92,14 @@ to work with it. | |||
92 | 92 | ||
93 | The _locked routines imply that the res_counter->lock is taken. | 93 | The _locked routines imply that the res_counter->lock is taken. |
94 | 94 | ||
95 | f. void res_counter_uncharge_until | ||
96 | (struct res_counter *rc, struct res_counter *top, | ||
97 | unsinged long val) | ||
98 | |||
99 | Almost same as res_cunter_uncharge() but propagation of uncharge | ||
100 | stops when rc == top. This is useful when kill a res_coutner in | ||
101 | child cgroup. | ||
102 | |||
95 | 2.1 Other accounting routines | 103 | 2.1 Other accounting routines |
96 | 104 | ||
97 | There are more routines that may help you with common needs, like | 105 | There are more routines that may help you with common needs, like |
diff --git a/Documentation/cris/README b/Documentation/cris/README index d9b086869a60..8dbdb1a44429 100644 --- a/Documentation/cris/README +++ b/Documentation/cris/README | |||
@@ -1,38 +1,34 @@ | |||
1 | Linux 2.4 on the CRIS architecture | 1 | Linux on the CRIS architecture |
2 | ================================== | 2 | ============================== |
3 | $Id: README,v 1.7 2001/04/19 12:38:32 bjornw Exp $ | ||
4 | 3 | ||
5 | This is a port of Linux 2.4 to Axis Communications ETRAX 100LX embedded | 4 | This is a port of Linux to Axis Communications ETRAX 100LX, |
6 | network CPU. For more information about CRIS and ETRAX please see further | 5 | ETRAX FS and ARTPEC-3 embedded network CPUs. |
7 | below. | 6 | |
7 | For more information about CRIS and ETRAX please see further below. | ||
8 | 8 | ||
9 | In order to compile this you need a version of gcc with support for the | 9 | In order to compile this you need a version of gcc with support for the |
10 | ETRAX chip family. Please see this link for more information on how to | 10 | ETRAX chip family. Please see this link for more information on how to |
11 | download the compiler and other tools useful when building and booting | 11 | download the compiler and other tools useful when building and booting |
12 | software for the ETRAX platform: | 12 | software for the ETRAX platform: |
13 | 13 | ||
14 | http://developer.axis.com/doc/software/devboard_lx/install-howto.html | 14 | http://developer.axis.com/wiki/doku.php?id=axis:install-howto-2_20 |
15 | |||
16 | <more specific information should come in this document later> | ||
17 | 15 | ||
18 | What is CRIS ? | 16 | What is CRIS ? |
19 | -------------- | 17 | -------------- |
20 | 18 | ||
21 | CRIS is an acronym for 'Code Reduced Instruction Set'. It is the CPU | 19 | CRIS is an acronym for 'Code Reduced Instruction Set'. It is the CPU |
22 | architecture in Axis Communication AB's range of embedded network CPU's, | 20 | architecture in Axis Communication AB's range of embedded network CPU's, |
23 | called ETRAX. The latest CPU is called ETRAX 100LX, where LX stands for | 21 | called ETRAX. |
24 | 'Linux' because the chip was designed to be a good host for the Linux | ||
25 | operating system. | ||
26 | 22 | ||
27 | The ETRAX 100LX chip | 23 | The ETRAX 100LX chip |
28 | -------------------- | 24 | -------------------- |
29 | 25 | ||
30 | For reference, please see the press-release: | 26 | For reference, please see the following link: |
31 | 27 | ||
32 | http://www.axis.com/news/us/001101_etrax.htm | 28 | http://www.axis.com/products/dev_etrax_100lx/index.htm |
33 | 29 | ||
34 | The ETRAX 100LX is a 100 MIPS processor with 8kB cache, MMU, and a very broad | 30 | The ETRAX 100LX is a 100 MIPS processor with 8kB cache, MMU, and a very broad |
35 | range of built-in interfaces, all with modern scatter/gather DMA. | 31 | range of built-in interfaces, all with modern scatter/gather DMA. |
36 | 32 | ||
37 | Memory interfaces: | 33 | Memory interfaces: |
38 | 34 | ||
@@ -51,20 +47,28 @@ I/O interfaces: | |||
51 | * SCSI | 47 | * SCSI |
52 | * two parallel-ports | 48 | * two parallel-ports |
53 | * two generic 8-bit ports | 49 | * two generic 8-bit ports |
54 | 50 | ||
55 | (not all interfaces are available at the same time due to chip pin | 51 | (not all interfaces are available at the same time due to chip pin |
56 | multiplexing) | 52 | multiplexing) |
57 | 53 | ||
58 | The previous version of the ETRAX, the ETRAX 100, sits in almost all of | 54 | ETRAX 100LX is CRISv10 architecture. |
59 | Axis shipping thin-servers like the Axis 2100 web camera or the ETRAX 100 | 55 | |
60 | developer-board. It lacks an MMU so the Linux we run on that is a version | 56 | |
61 | of uClinux (Linux 2.0 without MM-support) ported to the CRIS architecture. | 57 | The ETRAX FS and ARTPEC-3 chips |
62 | The new Linux 2.4 port has full MM and needs a CPU with an MMU, so it will | 58 | ------------------------------- |
63 | not run on the ETRAX 100. | ||
64 | 59 | ||
65 | A version of the Axis developer-board with ETRAX 100LX (running Linux | 60 | The ETRAX FS is a 200MHz 32-bit RISC processor with on-chip 16kB |
66 | 2.4) is now available. For more information please see developer.axis.com. | 61 | I-cache and 16kB D-cache and with a wide range of device interfaces |
62 | including multiple high speed serial ports and an integrated USB 1.1 PHY. | ||
67 | 63 | ||
64 | The ARTPEC-3 is a variant of the ETRAX FS with additional IO-units | ||
65 | used by the Axis Communications network cameras. | ||
66 | |||
67 | See below link for more information: | ||
68 | |||
69 | http://www.axis.com/products/dev_etrax_fs/index.htm | ||
70 | |||
71 | ETRAX FS and ARTPEC-3 are both CRISv32 architectures. | ||
68 | 72 | ||
69 | Bootlog | 73 | Bootlog |
70 | ------- | 74 | ------- |
@@ -182,10 +186,6 @@ SwapFree: 0 kB | |||
182 | -rwxr-xr-x 1 342 100 16252 Jan 01 00:00 telnetd | 186 | -rwxr-xr-x 1 342 100 16252 Jan 01 00:00 telnetd |
183 | 187 | ||
184 | 188 | ||
185 | (All programs are statically linked to the libc at this point - we have not ported the | ||
186 | shared libraries yet) | ||
187 | |||
188 | |||
189 | 189 | ||
190 | 190 | ||
191 | 191 | ||
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt index bfbc771a65f8..ac9e7516756e 100644 --- a/Documentation/devicetree/bindings/arm/fsl.txt +++ b/Documentation/devicetree/bindings/arm/fsl.txt | |||
@@ -1,6 +1,14 @@ | |||
1 | Freescale i.MX Platforms Device Tree Bindings | 1 | Freescale i.MX Platforms Device Tree Bindings |
2 | ----------------------------------------------- | 2 | ----------------------------------------------- |
3 | 3 | ||
4 | i.MX23 Evaluation Kit | ||
5 | Required root node properties: | ||
6 | - compatible = "fsl,imx23-evk", "fsl,imx23"; | ||
7 | |||
8 | i.MX28 Evaluation Kit | ||
9 | Required root node properties: | ||
10 | - compatible = "fsl,imx28-evk", "fsl,imx28"; | ||
11 | |||
4 | i.MX51 Babbage Board | 12 | i.MX51 Babbage Board |
5 | Required root node properties: | 13 | Required root node properties: |
6 | - compatible = "fsl,imx51-babbage", "fsl,imx51"; | 14 | - compatible = "fsl,imx51-babbage", "fsl,imx51"; |
@@ -29,6 +37,10 @@ i.MX6 Quad SABRE Lite Board | |||
29 | Required root node properties: | 37 | Required root node properties: |
30 | - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; | 38 | - compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; |
31 | 39 | ||
40 | i.MX6 Quad SABRE Smart Device Board | ||
41 | Required root node properties: | ||
42 | - compatible = "fsl,imx6q-sabresd", "fsl,imx6q"; | ||
43 | |||
32 | Generic i.MX boards | 44 | Generic i.MX boards |
33 | ------------------- | 45 | ------------------- |
34 | 46 | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt new file mode 100644 index 000000000000..f2f2171e530e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | * Samsung Exynos Interrupt Combiner Controller | ||
2 | |||
3 | Samsung's Exynos4 architecture includes a interrupt combiner controller which | ||
4 | can combine interrupt sources as a group and provide a single interrupt request | ||
5 | for the group. The interrupt request from each group are connected to a parent | ||
6 | interrupt controller, such as GIC in case of Exynos4210. | ||
7 | |||
8 | The interrupt combiner controller consists of multiple combiners. Upto eight | ||
9 | interrupt sources can be connected to a combiner. The combiner outputs one | ||
10 | combined interrupt for its eight interrupt sources. The combined interrupt | ||
11 | is usually connected to a parent interrupt controller. | ||
12 | |||
13 | A single node in the device tree is used to describe the interrupt combiner | ||
14 | controller module (which includes multiple combiners). A combiner in the | ||
15 | interrupt controller module shares config/control registers with other | ||
16 | combiners. For example, a 32-bit interrupt enable/disable config register | ||
17 | can accommodate upto 4 interrupt combiners (with each combiner supporting | ||
18 | upto 8 interrupt sources). | ||
19 | |||
20 | Required properties: | ||
21 | - compatible: should be "samsung,exynos4210-combiner". | ||
22 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
23 | - #interrupt-cells: should be <2>. The meaning of the cells are | ||
24 | * First Cell: Combiner Group Number. | ||
25 | * Second Cell: Interrupt number within the group. | ||
26 | - reg: Base address and size of interrupt combiner registers. | ||
27 | - interrupts: The list of interrupts generated by the combiners which are then | ||
28 | connected to a parent interrupt controller. The format of the interrupt | ||
29 | specifier depends in the interrupt parent controller. | ||
30 | |||
31 | Optional properties: | ||
32 | - samsung,combiner-nr: The number of interrupt combiners supported. If this | ||
33 | property is not specified, the default number of combiners is assumed | ||
34 | to be 16. | ||
35 | - interrupt-parent: pHandle of the parent interrupt controller, if not | ||
36 | inherited from the parent node. | ||
37 | |||
38 | |||
39 | Example: | ||
40 | |||
41 | The following is a an example from the Exynos4210 SoC dtsi file. | ||
42 | |||
43 | combiner:interrupt-controller@10440000 { | ||
44 | compatible = "samsung,exynos4210-combiner"; | ||
45 | interrupt-controller; | ||
46 | #interrupt-cells = <2>; | ||
47 | reg = <0x10440000 0x1000>; | ||
48 | interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, | ||
49 | <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, | ||
50 | <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, | ||
51 | <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>; | ||
52 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/spear-timer.txt b/Documentation/devicetree/bindings/arm/spear-timer.txt new file mode 100644 index 000000000000..c0017221cf55 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/spear-timer.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * SPEAr ARM Timer | ||
2 | |||
3 | ** Timer node required properties: | ||
4 | |||
5 | - compatible : Should be: | ||
6 | "st,spear-timer" | ||
7 | - reg: Address range of the timer registers | ||
8 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
9 | that services interrupts for this device | ||
10 | - interrupt: Should contain the timer interrupt number | ||
11 | |||
12 | Example: | ||
13 | |||
14 | timer@f0000000 { | ||
15 | compatible = "st,spear-timer"; | ||
16 | reg = <0xf0000000 0x400>; | ||
17 | interrupts = <2>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/spear.txt b/Documentation/devicetree/bindings/arm/spear.txt index aa5f355cc947..0d42949df6c2 100644 --- a/Documentation/devicetree/bindings/arm/spear.txt +++ b/Documentation/devicetree/bindings/arm/spear.txt | |||
@@ -2,25 +2,25 @@ ST SPEAr Platforms Device Tree Bindings | |||
2 | --------------------------------------- | 2 | --------------------------------------- |
3 | 3 | ||
4 | Boards with the ST SPEAr600 SoC shall have the following properties: | 4 | Boards with the ST SPEAr600 SoC shall have the following properties: |
5 | |||
6 | Required root node property: | 5 | Required root node property: |
7 | |||
8 | compatible = "st,spear600"; | 6 | compatible = "st,spear600"; |
9 | 7 | ||
10 | Boards with the ST SPEAr300 SoC shall have the following properties: | 8 | Boards with the ST SPEAr300 SoC shall have the following properties: |
11 | |||
12 | Required root node property: | 9 | Required root node property: |
13 | |||
14 | compatible = "st,spear300"; | 10 | compatible = "st,spear300"; |
15 | 11 | ||
16 | Boards with the ST SPEAr310 SoC shall have the following properties: | 12 | Boards with the ST SPEAr310 SoC shall have the following properties: |
17 | |||
18 | Required root node property: | 13 | Required root node property: |
19 | |||
20 | compatible = "st,spear310"; | 14 | compatible = "st,spear310"; |
21 | 15 | ||
22 | Boards with the ST SPEAr320 SoC shall have the following properties: | 16 | Boards with the ST SPEAr320 SoC shall have the following properties: |
17 | Required root node property: | ||
18 | compatible = "st,spear320"; | ||
23 | 19 | ||
20 | Boards with the ST SPEAr1310 SoC shall have the following properties: | ||
24 | Required root node property: | 21 | Required root node property: |
22 | compatible = "st,spear1310"; | ||
25 | 23 | ||
26 | compatible = "st,spear320"; | 24 | Boards with the ST SPEAr1340 SoC shall have the following properties: |
25 | Required root node property: | ||
26 | compatible = "st,spear1340"; | ||
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt new file mode 100644 index 000000000000..234406d41c12 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-ahb.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | NVIDIA Tegra AHB | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "nvidia,tegra20-ahb" or "nvidia,tegra30-ahb" | ||
5 | - reg : Should contain 1 register ranges(address and length) | ||
6 | |||
7 | Example: | ||
8 | ahb: ahb@6000c004 { | ||
9 | compatible = "nvidia,tegra20-ahb"; | ||
10 | reg = <0x6000c004 0x10c>; /* AHB Arbitration + Gizmo Controller */ | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt new file mode 100644 index 000000000000..ded0398d3bdc --- /dev/null +++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * Freescale MXS DMA | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "fsl,<chip>-dma-apbh" or "fsl,<chip>-dma-apbx" | ||
5 | - reg : Should contain registers location and length | ||
6 | |||
7 | Supported chips: | ||
8 | imx23, imx28. | ||
9 | |||
10 | Examples: | ||
11 | dma-apbh@80004000 { | ||
12 | compatible = "fsl,imx28-dma-apbh"; | ||
13 | reg = <0x80004000 2000>; | ||
14 | }; | ||
15 | |||
16 | dma-apbx@80024000 { | ||
17 | compatible = "fsl,imx28-dma-apbx"; | ||
18 | reg = <0x80024000 2000>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt new file mode 100644 index 000000000000..c0d85dbcada5 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * Synopsys Designware DMA Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "snps,dma-spear1340" | ||
5 | - reg: Address range of the DMAC registers | ||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
7 | that services interrupts for this device | ||
8 | - interrupt: Should contain the DMAC interrupt number | ||
9 | |||
10 | Example: | ||
11 | |||
12 | dma@fc000000 { | ||
13 | compatible = "snps,dma-spear1340"; | ||
14 | reg = <0xfc000000 0x1000>; | ||
15 | interrupt-parent = <&vic1>; | ||
16 | interrupts = <12>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt new file mode 100644 index 000000000000..f93d51478d5a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-mm-lantiq.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Lantiq SoC External Bus memory mapped GPIO controller | ||
2 | |||
3 | By attaching hardware latches to the EBU it is possible to create output | ||
4 | only gpios. This driver configures a special memory address, which when | ||
5 | written to outputs 16 bit to the latches. | ||
6 | |||
7 | The node describing the memory mapped GPIOs needs to be a child of the node | ||
8 | describing the "lantiq,localbus". | ||
9 | |||
10 | Required properties: | ||
11 | - compatible : Should be "lantiq,gpio-mm-lantiq" | ||
12 | - reg : Address and length of the register set for the device | ||
13 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
14 | the second cell is used to specify optional parameters (currently | ||
15 | unused). | ||
16 | - gpio-controller : Marks the device node as a gpio controller. | ||
17 | |||
18 | Optional properties: | ||
19 | - lantiq,shadow : The default value that we shall assume as already set on the | ||
20 | shift register cascade. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | localbus@0 { | ||
25 | #address-cells = <2>; | ||
26 | #size-cells = <1>; | ||
27 | ranges = <0 0 0x0 0x3ffffff /* addrsel0 */ | ||
28 | 1 0 0x4000000 0x4000010>; /* addsel1 */ | ||
29 | compatible = "lantiq,localbus", "simple-bus"; | ||
30 | |||
31 | gpio_mm0: gpio@4000000 { | ||
32 | compatible = "lantiq,gpio-mm"; | ||
33 | reg = <1 0x0 0x10>; | ||
34 | gpio-controller; | ||
35 | #gpio-cells = <2>; | ||
36 | lantiq,shadow = <0x77f> | ||
37 | }; | ||
38 | } | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt new file mode 100644 index 000000000000..0c35673f7a3e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt | |||
@@ -0,0 +1,87 @@ | |||
1 | * Freescale MXS GPIO controller | ||
2 | |||
3 | The Freescale MXS GPIO controller is part of MXS PIN controller. The | ||
4 | GPIOs are organized in port/bank. Each port consists of 32 GPIOs. | ||
5 | |||
6 | As the GPIO controller is embedded in the PIN controller and all the | ||
7 | GPIO ports share the same IO space with PIN controller, the GPIO node | ||
8 | will be represented as sub-nodes of MXS pinctrl node. | ||
9 | |||
10 | Required properties for GPIO node: | ||
11 | - compatible : Should be "fsl,<soc>-gpio". The supported SoCs include | ||
12 | imx23 and imx28. | ||
13 | - interrupts : Should be the port interrupt shared by all 32 pins. | ||
14 | - gpio-controller : Marks the device node as a gpio controller. | ||
15 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
16 | the second cell is used to specify optional parameters (currently | ||
17 | unused). | ||
18 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
19 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
20 | The second cell bits[3:0] is used to specify trigger type and level flags: | ||
21 | 1 = low-to-high edge triggered. | ||
22 | 2 = high-to-low edge triggered. | ||
23 | 4 = active high level-sensitive. | ||
24 | 8 = active low level-sensitive. | ||
25 | |||
26 | Note: Each GPIO port should have an alias correctly numbered in "aliases" | ||
27 | node. | ||
28 | |||
29 | Examples: | ||
30 | |||
31 | aliases { | ||
32 | gpio0 = &gpio0; | ||
33 | gpio1 = &gpio1; | ||
34 | gpio2 = &gpio2; | ||
35 | gpio3 = &gpio3; | ||
36 | gpio4 = &gpio4; | ||
37 | }; | ||
38 | |||
39 | pinctrl@80018000 { | ||
40 | compatible = "fsl,imx28-pinctrl", "simple-bus"; | ||
41 | reg = <0x80018000 2000>; | ||
42 | |||
43 | gpio0: gpio@0 { | ||
44 | compatible = "fsl,imx28-gpio"; | ||
45 | interrupts = <127>; | ||
46 | gpio-controller; | ||
47 | #gpio-cells = <2>; | ||
48 | interrupt-controller; | ||
49 | #interrupt-cells = <2>; | ||
50 | }; | ||
51 | |||
52 | gpio1: gpio@1 { | ||
53 | compatible = "fsl,imx28-gpio"; | ||
54 | interrupts = <126>; | ||
55 | gpio-controller; | ||
56 | #gpio-cells = <2>; | ||
57 | interrupt-controller; | ||
58 | #interrupt-cells = <2>; | ||
59 | }; | ||
60 | |||
61 | gpio2: gpio@2 { | ||
62 | compatible = "fsl,imx28-gpio"; | ||
63 | interrupts = <125>; | ||
64 | gpio-controller; | ||
65 | #gpio-cells = <2>; | ||
66 | interrupt-controller; | ||
67 | #interrupt-cells = <2>; | ||
68 | }; | ||
69 | |||
70 | gpio3: gpio@3 { | ||
71 | compatible = "fsl,imx28-gpio"; | ||
72 | interrupts = <124>; | ||
73 | gpio-controller; | ||
74 | #gpio-cells = <2>; | ||
75 | interrupt-controller; | ||
76 | #interrupt-cells = <2>; | ||
77 | }; | ||
78 | |||
79 | gpio4: gpio@4 { | ||
80 | compatible = "fsl,imx28-gpio"; | ||
81 | interrupts = <123>; | ||
82 | gpio-controller; | ||
83 | #gpio-cells = <2>; | ||
84 | interrupt-controller; | ||
85 | #interrupt-cells = <2>; | ||
86 | }; | ||
87 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt new file mode 100644 index 000000000000..854de130a971 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-stp-xway.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | Lantiq SoC Serial To Parallel (STP) GPIO controller | ||
2 | |||
3 | The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a | ||
4 | peripheral controller used to drive external shift register cascades. At most | ||
5 | 3 groups of 8 bits can be driven. The hardware is able to allow the DSL modem | ||
6 | to drive the 2 LSBs of the cascade automatically. | ||
7 | |||
8 | |||
9 | Required properties: | ||
10 | - compatible : Should be "lantiq,gpio-stp-xway" | ||
11 | - reg : Address and length of the register set for the device | ||
12 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
13 | the second cell is used to specify optional parameters (currently | ||
14 | unused). | ||
15 | - gpio-controller : Marks the device node as a gpio controller. | ||
16 | |||
17 | Optional properties: | ||
18 | - lantiq,shadow : The default value that we shall assume as already set on the | ||
19 | shift register cascade. | ||
20 | - lantiq,groups : Set the 3 bit mask to select which of the 3 groups are enabled | ||
21 | in the shift register cascade. | ||
22 | - lantiq,dsl : The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit | ||
23 | property can enable this feature. | ||
24 | - lantiq,phy1 : The gphy1 core can control 3 bits of the gpio cascade. | ||
25 | - lantiq,phy2 : The gphy2 core can control 3 bits of the gpio cascade. | ||
26 | - lantiq,rising : use rising instead of falling edge for the shift register | ||
27 | |||
28 | Example: | ||
29 | |||
30 | gpio1: stp@E100BB0 { | ||
31 | compatible = "lantiq,gpio-stp-xway"; | ||
32 | reg = <0xE100BB0 0x40>; | ||
33 | #gpio-cells = <2>; | ||
34 | gpio-controller; | ||
35 | |||
36 | lantiq,shadow = <0xffff>; | ||
37 | lantiq,groups = <0x7>; | ||
38 | lantiq,dsl = <0x3>; | ||
39 | lantiq,phy1 = <0x7>; | ||
40 | lantiq,phy2 = <0x7>; | ||
41 | /* lantiq,rising; */ | ||
42 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt new file mode 100644 index 000000000000..1bfc02de1b0c --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Freescale MXS Inter IC (I2C) Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,<chip>-i2c" | ||
5 | - reg: Should contain registers location and length | ||
6 | - interrupts: Should contain ERROR and DMA interrupts | ||
7 | |||
8 | Examples: | ||
9 | |||
10 | i2c0: i2c@80058000 { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | compatible = "fsl,imx28-i2c"; | ||
14 | reg = <0x80058000 2000>; | ||
15 | interrupts = <111 68>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/mux.txt b/Documentation/devicetree/bindings/i2c/mux.txt new file mode 100644 index 000000000000..af84cce5cd7b --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/mux.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | Common i2c bus multiplexer/switch properties. | ||
2 | |||
3 | An i2c bus multiplexer/switch will have several child busses that are | ||
4 | numbered uniquely in a device dependent manner. The nodes for an i2c bus | ||
5 | multiplexer/switch will have one child node for each child | ||
6 | bus. | ||
7 | |||
8 | Required properties: | ||
9 | - #address-cells = <1>; | ||
10 | - #size-cells = <0>; | ||
11 | |||
12 | Required properties for child nodes: | ||
13 | - #address-cells = <1>; | ||
14 | - #size-cells = <0>; | ||
15 | - reg : The sub-bus number. | ||
16 | |||
17 | Optional properties for child nodes: | ||
18 | - Other properties specific to the multiplexer/switch hardware. | ||
19 | - Child nodes conforming to i2c bus binding | ||
20 | |||
21 | |||
22 | Example : | ||
23 | |||
24 | /* | ||
25 | An NXP pca9548 8 channel I2C multiplexer at address 0x70 | ||
26 | with two NXP pca8574 GPIO expanders attached, one each to | ||
27 | ports 3 and 4. | ||
28 | */ | ||
29 | |||
30 | mux@70 { | ||
31 | compatible = "nxp,pca9548"; | ||
32 | reg = <0x70>; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | |||
36 | i2c@3 { | ||
37 | #address-cells = <1>; | ||
38 | #size-cells = <0>; | ||
39 | reg = <3>; | ||
40 | |||
41 | gpio1: gpio@38 { | ||
42 | compatible = "nxp,pca8574"; | ||
43 | reg = <0x38>; | ||
44 | #gpio-cells = <2>; | ||
45 | gpio-controller; | ||
46 | }; | ||
47 | }; | ||
48 | i2c@4 { | ||
49 | #address-cells = <1>; | ||
50 | #size-cells = <0>; | ||
51 | reg = <4>; | ||
52 | |||
53 | gpio2: gpio@38 { | ||
54 | compatible = "nxp,pca8574"; | ||
55 | reg = <0x38>; | ||
56 | #gpio-cells = <2>; | ||
57 | gpio-controller; | ||
58 | }; | ||
59 | }; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt index 38832c712919..b6cb5a12c672 100644 --- a/Documentation/devicetree/bindings/i2c/samsung-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/samsung-i2c.txt | |||
@@ -6,14 +6,18 @@ Required properties: | |||
6 | - compatible: value should be either of the following. | 6 | - compatible: value should be either of the following. |
7 | (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c. | 7 | (a) "samsung, s3c2410-i2c", for i2c compatible with s3c2410 i2c. |
8 | (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c. | 8 | (b) "samsung, s3c2440-i2c", for i2c compatible with s3c2440 i2c. |
9 | (c) "samsung, s3c2440-hdmiphy-i2c", for s3c2440-like i2c used | ||
10 | inside HDMIPHY block found on several samsung SoCs | ||
9 | - reg: physical base address of the controller and length of memory mapped | 11 | - reg: physical base address of the controller and length of memory mapped |
10 | region. | 12 | region. |
11 | - interrupts: interrupt number to the cpu. | 13 | - interrupts: interrupt number to the cpu. |
12 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. | 14 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. |
13 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
14 | The gpio specifier depends on the gpio controller. | ||
15 | 15 | ||
16 | Optional properties: | 16 | Optional properties: |
17 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
18 | The gpio specifier depends on the gpio controller. Required in all | ||
19 | cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output | ||
20 | lines are permanently wired to the respective client | ||
17 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not | 21 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not |
18 | specified, default value is 0. | 22 | specified, default value is 0. |
19 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not | 23 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not |
diff --git a/Documentation/devicetree/bindings/i2c/xiic.txt b/Documentation/devicetree/bindings/i2c/xiic.txt new file mode 100644 index 000000000000..ceabbe91ae44 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/xiic.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Xilinx IIC controller: | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "xlnx,xps-iic-2.00.a" | ||
5 | - reg : IIC register location and length | ||
6 | - interrupts : IIC controller unterrupt | ||
7 | - #address-cells = <1> | ||
8 | - #size-cells = <0> | ||
9 | |||
10 | Optional properties: | ||
11 | - Child nodes conforming to i2c bus binding | ||
12 | |||
13 | Example: | ||
14 | |||
15 | axi_iic_0: i2c@40800000 { | ||
16 | compatible = "xlnx,xps-iic-2.00.a"; | ||
17 | interrupts = < 1 2 >; | ||
18 | reg = < 0x40800000 0x10000 >; | ||
19 | |||
20 | #size-cells = <0>; | ||
21 | #address-cells = <1>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt new file mode 100644 index 000000000000..1857f4a6b9a9 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | * Dialog DA9052/53 Power Management Integrated Circuit (PMIC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "dlg,da9052", "dlg,da9053-aa", | ||
5 | "dlg,da9053-ab", or "dlg,da9053-bb" | ||
6 | |||
7 | Sub-nodes: | ||
8 | - regulators : Contain the regulator nodes. The DA9052/53 regulators are | ||
9 | bound using their names as listed below: | ||
10 | |||
11 | buck0 : regulator BUCK0 | ||
12 | buck1 : regulator BUCK1 | ||
13 | buck2 : regulator BUCK2 | ||
14 | buck3 : regulator BUCK3 | ||
15 | ldo4 : regulator LDO4 | ||
16 | ldo5 : regulator LDO5 | ||
17 | ldo6 : regulator LDO6 | ||
18 | ldo7 : regulator LDO7 | ||
19 | ldo8 : regulator LDO8 | ||
20 | ldo9 : regulator LDO9 | ||
21 | ldo10 : regulator LDO10 | ||
22 | ldo11 : regulator LDO11 | ||
23 | ldo12 : regulator LDO12 | ||
24 | ldo13 : regulator LDO13 | ||
25 | |||
26 | The bindings details of individual regulator device can be found in: | ||
27 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
28 | |||
29 | Examples: | ||
30 | |||
31 | i2c@63fc8000 { /* I2C1 */ | ||
32 | status = "okay"; | ||
33 | |||
34 | pmic: dialog@48 { | ||
35 | compatible = "dlg,da9053-aa"; | ||
36 | reg = <0x48>; | ||
37 | |||
38 | regulators { | ||
39 | buck0 { | ||
40 | regulator-min-microvolt = <500000>; | ||
41 | regulator-max-microvolt = <2075000>; | ||
42 | }; | ||
43 | |||
44 | buck1 { | ||
45 | regulator-min-microvolt = <500000>; | ||
46 | regulator-max-microvolt = <2075000>; | ||
47 | }; | ||
48 | |||
49 | buck2 { | ||
50 | regulator-min-microvolt = <925000>; | ||
51 | regulator-max-microvolt = <2500000>; | ||
52 | }; | ||
53 | |||
54 | buck3 { | ||
55 | regulator-min-microvolt = <925000>; | ||
56 | regulator-max-microvolt = <2500000>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt new file mode 100644 index 000000000000..645f5eaadb3f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt | |||
@@ -0,0 +1,133 @@ | |||
1 | TPS65910 Power Management Integrated Circuit | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,tps65910" or "ti,tps65911" | ||
5 | - reg: I2C slave address | ||
6 | - interrupts: the interrupt outputs of the controller | ||
7 | - #gpio-cells: number of cells to describe a GPIO, this should be 2. | ||
8 | The first cell is the GPIO number. | ||
9 | The second cell is used to specify additional options <unused>. | ||
10 | - gpio-controller: mark the device as a GPIO controller | ||
11 | - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. | ||
12 | The first cell is the IRQ number. | ||
13 | The second cell is the flags, encoded as the trigger masks from | ||
14 | Documentation/devicetree/bindings/interrupts.txt | ||
15 | - regulators: This is the list of child nodes that specify the regulator | ||
16 | initialization data for defined regulators. Not all regulators for the given | ||
17 | device need to be present. The definition for each of these nodes is defined | ||
18 | using the standard binding for regulators found at | ||
19 | Documentation/devicetree/bindings/regulator/regulator.txt. | ||
20 | |||
21 | The valid names for regulators are: | ||
22 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, | ||
23 | vaux2, vaux33, vmmc | ||
24 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, | ||
25 | ldo6, ldo7, ldo8 | ||
26 | |||
27 | Optional properties: | ||
28 | - ti,vmbch-threshold: (tps65911) main battery charged threshold | ||
29 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | ||
30 | - ti,vmbch2-threshold: (tps65911) main battery discharged threshold | ||
31 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | ||
32 | - ti,en-gpio-sleep: enable sleep control for gpios | ||
33 | There should be 9 entries here, one for each gpio. | ||
34 | |||
35 | Regulator Optional properties: | ||
36 | - ti,regulator-ext-sleep-control: enable external sleep | ||
37 | control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)] | ||
38 | If this property is not defined, it defaults to 0 (not enabled). | ||
39 | |||
40 | Example: | ||
41 | |||
42 | pmu: tps65910@d2 { | ||
43 | compatible = "ti,tps65910"; | ||
44 | reg = <0xd2>; | ||
45 | interrupt-parent = <&intc>; | ||
46 | interrupts = < 0 118 0x04 >; | ||
47 | |||
48 | #gpio-cells = <2>; | ||
49 | gpio-controller; | ||
50 | |||
51 | #interrupt-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | |||
54 | ti,vmbch-threshold = 0; | ||
55 | ti,vmbch2-threshold = 0; | ||
56 | |||
57 | ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>; | ||
58 | |||
59 | regulators { | ||
60 | vdd1_reg: vdd1 { | ||
61 | regulator-min-microvolt = < 600000>; | ||
62 | regulator-max-microvolt = <1500000>; | ||
63 | regulator-always-on; | ||
64 | regulator-boot-on; | ||
65 | ti,regulator-ext-sleep-control = <0>; | ||
66 | }; | ||
67 | vdd2_reg: vdd2 { | ||
68 | regulator-min-microvolt = < 600000>; | ||
69 | regulator-max-microvolt = <1500000>; | ||
70 | regulator-always-on; | ||
71 | regulator-boot-on; | ||
72 | ti,regulator-ext-sleep-control = <4>; | ||
73 | }; | ||
74 | vddctrl_reg: vddctrl { | ||
75 | regulator-min-microvolt = < 600000>; | ||
76 | regulator-max-microvolt = <1400000>; | ||
77 | regulator-always-on; | ||
78 | regulator-boot-on; | ||
79 | ti,regulator-ext-sleep-control = <0>; | ||
80 | }; | ||
81 | vio_reg: vio { | ||
82 | regulator-min-microvolt = <1500000>; | ||
83 | regulator-max-microvolt = <1800000>; | ||
84 | regulator-always-on; | ||
85 | regulator-boot-on; | ||
86 | ti,regulator-ext-sleep-control = <1>; | ||
87 | }; | ||
88 | ldo1_reg: ldo1 { | ||
89 | regulator-min-microvolt = <1000000>; | ||
90 | regulator-max-microvolt = <3300000>; | ||
91 | ti,regulator-ext-sleep-control = <0>; | ||
92 | }; | ||
93 | ldo2_reg: ldo2 { | ||
94 | regulator-min-microvolt = <1050000>; | ||
95 | regulator-max-microvolt = <1050000>; | ||
96 | ti,regulator-ext-sleep-control = <0>; | ||
97 | }; | ||
98 | ldo3_reg: ldo3 { | ||
99 | regulator-min-microvolt = <1000000>; | ||
100 | regulator-max-microvolt = <3300000>; | ||
101 | ti,regulator-ext-sleep-control = <0>; | ||
102 | }; | ||
103 | ldo4_reg: ldo4 { | ||
104 | regulator-min-microvolt = <1000000>; | ||
105 | regulator-max-microvolt = <3300000>; | ||
106 | regulator-always-on; | ||
107 | ti,regulator-ext-sleep-control = <0>; | ||
108 | }; | ||
109 | ldo5_reg: ldo5 { | ||
110 | regulator-min-microvolt = <1000000>; | ||
111 | regulator-max-microvolt = <3300000>; | ||
112 | ti,regulator-ext-sleep-control = <0>; | ||
113 | }; | ||
114 | ldo6_reg: ldo6 { | ||
115 | regulator-min-microvolt = <1200000>; | ||
116 | regulator-max-microvolt = <1200000>; | ||
117 | ti,regulator-ext-sleep-control = <0>; | ||
118 | }; | ||
119 | ldo7_reg: ldo7 { | ||
120 | regulator-min-microvolt = <1200000>; | ||
121 | regulator-max-microvolt = <1200000>; | ||
122 | regulator-always-on; | ||
123 | regulator-boot-on; | ||
124 | ti,regulator-ext-sleep-control = <1>; | ||
125 | }; | ||
126 | ldo8_reg: ldo8 { | ||
127 | regulator-min-microvolt = <1000000>; | ||
128 | regulator-max-microvolt = <3300000>; | ||
129 | regulator-always-on; | ||
130 | ti,regulator-ext-sleep-control = <1>; | ||
131 | }; | ||
132 | }; | ||
133 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt new file mode 100644 index 000000000000..bc67c6f424aa --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/twl6040.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | Texas Instruments TWL6040 family | ||
2 | |||
3 | The TWL6040s are 8-channel high quality low-power audio codecs providing audio | ||
4 | and vibra functionality on OMAP4+ platforms. | ||
5 | They are connected ot the host processor via i2c for commands, McPDM for audio | ||
6 | data and commands. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Must be "ti,twl6040"; | ||
10 | - reg: must be 0x4b for i2c address | ||
11 | - interrupts: twl6040 has one interrupt line connecteded to the main SoC | ||
12 | - interrupt-parent: The parent interrupt controller | ||
13 | - twl6040,audpwron-gpio: Power on GPIO line for the twl6040 | ||
14 | |||
15 | - vio-supply: Regulator for the twl6040 VIO supply | ||
16 | - v2v1-supply: Regulator for the twl6040 V2V1 supply | ||
17 | |||
18 | Optional properties, nodes: | ||
19 | - enable-active-high: To power on the twl6040 during boot. | ||
20 | |||
21 | Vibra functionality | ||
22 | Required properties: | ||
23 | - vddvibl-supply: Regulator for the left vibra motor | ||
24 | - vddvibr-supply: Regulator for the right vibra motor | ||
25 | - vibra { }: Configuration section for vibra parameters containing the following | ||
26 | properties: | ||
27 | - ti,vibldrv-res: Resistance parameter for left driver | ||
28 | - ti,vibrdrv-res: Resistance parameter for right driver | ||
29 | - ti,viblmotor-res: Resistance parameter for left motor | ||
30 | - ti,viblmotor-res: Resistance parameter for right motor | ||
31 | |||
32 | Optional properties within vibra { } section: | ||
33 | - vddvibl_uV: If the vddvibl default voltage need to be changed | ||
34 | - vddvibr_uV: If the vddvibr default voltage need to be changed | ||
35 | |||
36 | Example: | ||
37 | &i2c1 { | ||
38 | twl6040: twl@4b { | ||
39 | compatible = "ti,twl6040"; | ||
40 | reg = <0x4b>; | ||
41 | |||
42 | interrupts = <0 119 4>; | ||
43 | interrupt-parent = <&gic>; | ||
44 | twl6040,audpwron-gpio = <&gpio4 31 0>; | ||
45 | |||
46 | vio-supply = <&v1v8>; | ||
47 | v2v1-supply = <&v2v1>; | ||
48 | enable-active-high; | ||
49 | |||
50 | /* regulators for vibra motor */ | ||
51 | vddvibl-supply = <&vbat>; | ||
52 | vddvibr-supply = <&vbat>; | ||
53 | |||
54 | vibra { | ||
55 | /* Vibra driver, motor resistance parameters */ | ||
56 | ti,vibldrv-res = <8>; | ||
57 | ti,vibrdrv-res = <3>; | ||
58 | ti,viblmotor-res = <10>; | ||
59 | ti,vibrmotor-res = <10>; | ||
60 | }; | ||
61 | }; | ||
62 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt index 64bcb8be973c..0d93b4b0e0e3 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | |||
@@ -11,9 +11,11 @@ Required properties: | |||
11 | - interrupt-parent : interrupt source phandle. | 11 | - interrupt-parent : interrupt source phandle. |
12 | - clock-frequency : specifies eSDHC base clock frequency. | 12 | - clock-frequency : specifies eSDHC base clock frequency. |
13 | - sdhci,wp-inverted : (optional) specifies that eSDHC controller | 13 | - sdhci,wp-inverted : (optional) specifies that eSDHC controller |
14 | reports inverted write-protect state; | 14 | reports inverted write-protect state; New devices should use |
15 | the generic "wp-inverted" property. | ||
15 | - sdhci,1-bit-only : (optional) specifies that a controller can | 16 | - sdhci,1-bit-only : (optional) specifies that a controller can |
16 | only handle 1-bit data transfers. | 17 | only handle 1-bit data transfers. New devices should use the |
18 | generic "bus-width = <1>" property. | ||
17 | - sdhci,auto-cmd12: (optional) specifies that a controller can | 19 | - sdhci,auto-cmd12: (optional) specifies that a controller can |
18 | only handle auto CMD12. | 20 | only handle auto CMD12. |
19 | 21 | ||
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt index ab22fe6e73ab..c7e404b3ef05 100644 --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | |||
@@ -9,7 +9,7 @@ Required properties: | |||
9 | - interrupts : Should contain eSDHC interrupt | 9 | - interrupts : Should contain eSDHC interrupt |
10 | 10 | ||
11 | Optional properties: | 11 | Optional properties: |
12 | - fsl,card-wired : Indicate the card is wired to host permanently | 12 | - non-removable : Indicate the card is wired to host permanently |
13 | - fsl,cd-internal : Indicate to use controller internal card detection | 13 | - fsl,cd-internal : Indicate to use controller internal card detection |
14 | - fsl,wp-internal : Indicate to use controller internal write protection | 14 | - fsl,wp-internal : Indicate to use controller internal write protection |
15 | - cd-gpios : Specify GPIOs for card detection | 15 | - cd-gpios : Specify GPIOs for card detection |
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt index 89a0084df2f7..d64aea5a4203 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt +++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt | |||
@@ -10,7 +10,8 @@ Required properties: | |||
10 | 10 | ||
11 | Optional properties: | 11 | Optional properties: |
12 | - gpios : may specify GPIOs in this order: Card-Detect GPIO, | 12 | - gpios : may specify GPIOs in this order: Card-Detect GPIO, |
13 | Write-Protect GPIO. | 13 | Write-Protect GPIO. Note that this does not follow the |
14 | binding from mmc.txt, for historic reasons. | ||
14 | - interrupts : the interrupt of a card detect interrupt. | 15 | - interrupts : the interrupt of a card detect interrupt. |
15 | - interrupt-parent : the phandle for the interrupt controller that | 16 | - interrupt-parent : the phandle for the interrupt controller that |
16 | services interrupts for this device. | 17 | services interrupts for this device. |
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt new file mode 100644 index 000000000000..6e70dcde0a71 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | These properties are common to multiple MMC host controllers. Any host | ||
2 | that requires the respective functionality should implement them using | ||
3 | these definitions. | ||
4 | |||
5 | Required properties: | ||
6 | - bus-width: Number of data lines, can be <1>, <4>, or <8> | ||
7 | |||
8 | Optional properties: | ||
9 | - cd-gpios : Specify GPIOs for card detection, see gpio binding | ||
10 | - wp-gpios : Specify GPIOs for write protection, see gpio binding | ||
11 | - cd-inverted: when present, polarity on the wp gpio line is inverted | ||
12 | - wp-inverted: when present, polarity on the wp gpio line is inverted | ||
13 | - non-removable: non-removable slot (like eMMC) | ||
14 | - max-frequency: maximum operating clock frequency | ||
15 | |||
16 | Example: | ||
17 | |||
18 | sdhci@ab000000 { | ||
19 | compatible = "sdhci"; | ||
20 | reg = <0xab000000 0x200>; | ||
21 | interrupts = <23>; | ||
22 | bus-width = <4>; | ||
23 | cd-gpios = <&gpio 69 0>; | ||
24 | cd-inverted; | ||
25 | wp-gpios = <&gpio 70 0>; | ||
26 | max-frequency = <50000000>; | ||
27 | } | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt new file mode 100644 index 000000000000..14a81d526118 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mmci.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * ARM PrimeCell MultiMedia Card Interface (MMCI) PL180/1 | ||
2 | |||
3 | The ARM PrimeCell MMCI PL180 and PL181 provides and interface for | ||
4 | reading and writing to MultiMedia and SD cards alike. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : contains "arm,pl18x", "arm,primecell". | ||
8 | - reg : contains pl18x registers and length. | ||
9 | - interrupts : contains the device IRQ(s). | ||
10 | - arm,primecell-periphid : contains the PrimeCell Peripheral ID. | ||
11 | |||
12 | Optional properties: | ||
13 | - wp-gpios : contains any write protect (ro) gpios | ||
14 | - cd-gpios : contains any card detection gpios | ||
15 | - cd-inverted : indicates whether the cd gpio is inverted | ||
16 | - max-frequency : contains the maximum operating frequency | ||
17 | - bus-width : number of data lines, can be <1>, <4>, or <8> | ||
18 | - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable | ||
19 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable | ||
diff --git a/Documentation/devicetree/bindings/mmc/mxs-mmc.txt b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt new file mode 100644 index 000000000000..14d870a9e3db --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mxs-mmc.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Freescale MXS MMC controller | ||
2 | |||
3 | The Freescale MXS Synchronous Serial Ports (SSP) can act as a MMC controller | ||
4 | to support MMC, SD, and SDIO types of memory cards. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: Should be "fsl,<chip>-mmc". The supported chips include | ||
8 | imx23 and imx28. | ||
9 | - reg: Should contain registers location and length | ||
10 | - interrupts: Should contain ERROR and DMA interrupts | ||
11 | - fsl,ssp-dma-channel: APBH DMA channel for the SSP | ||
12 | - bus-width: Number of data lines, can be <1>, <4>, or <8> | ||
13 | |||
14 | Optional properties: | ||
15 | - wp-gpios: Specify GPIOs for write protection | ||
16 | |||
17 | Examples: | ||
18 | |||
19 | ssp0: ssp@80010000 { | ||
20 | compatible = "fsl,imx28-mmc"; | ||
21 | reg = <0x80010000 2000>; | ||
22 | interrupts = <96 82>; | ||
23 | fsl,ssp-dma-channel = <0>; | ||
24 | bus-width = <8>; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt index 7e51154679a6..f77c3031607f 100644 --- a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt | |||
@@ -7,12 +7,12 @@ Required properties: | |||
7 | - compatible : Should be "nvidia,<chip>-sdhci" | 7 | - compatible : Should be "nvidia,<chip>-sdhci" |
8 | - reg : Should contain SD/MMC registers location and length | 8 | - reg : Should contain SD/MMC registers location and length |
9 | - interrupts : Should contain SD/MMC interrupt | 9 | - interrupts : Should contain SD/MMC interrupt |
10 | - bus-width : Number of data lines, can be <1>, <4>, or <8> | ||
10 | 11 | ||
11 | Optional properties: | 12 | Optional properties: |
12 | - cd-gpios : Specify GPIOs for card detection | 13 | - cd-gpios : Specify GPIOs for card detection |
13 | - wp-gpios : Specify GPIOs for write protection | 14 | - wp-gpios : Specify GPIOs for write protection |
14 | - power-gpios : Specify GPIOs for power control | 15 | - power-gpios : Specify GPIOs for power control |
15 | - support-8bit : Boolean, indicates if 8-bit mode should be used. | ||
16 | 16 | ||
17 | Example: | 17 | Example: |
18 | 18 | ||
@@ -23,5 +23,5 @@ sdhci@c8000200 { | |||
23 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 23 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
24 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 24 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
25 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | 25 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
26 | support-8bit; | 26 | bus-width = <8>; |
27 | }; | 27 | }; |
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt index dbd4368ab8cc..8a53958c9a9f 100644 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | |||
@@ -15,7 +15,7 @@ Optional properties: | |||
15 | ti,dual-volt: boolean, supports dual voltage cards | 15 | ti,dual-volt: boolean, supports dual voltage cards |
16 | <supply-name>-supply: phandle to the regulator device tree node | 16 | <supply-name>-supply: phandle to the regulator device tree node |
17 | "supply-name" examples are "vmmc", "vmmc_aux" etc | 17 | "supply-name" examples are "vmmc", "vmmc_aux" etc |
18 | ti,bus-width: Number of data lines, default assumed is 1 if the property is missing. | 18 | bus-width: Number of data lines, default assumed is 1 if the property is missing. |
19 | cd-gpios: GPIOs for card detection | 19 | cd-gpios: GPIOs for card detection |
20 | wp-gpios: GPIOs for write protection | 20 | wp-gpios: GPIOs for write protection |
21 | ti,non-removable: non-removable slot (like eMMC) | 21 | ti,non-removable: non-removable slot (like eMMC) |
@@ -27,7 +27,7 @@ Example: | |||
27 | reg = <0x4809c000 0x400>; | 27 | reg = <0x4809c000 0x400>; |
28 | ti,hwmods = "mmc1"; | 28 | ti,hwmods = "mmc1"; |
29 | ti,dual-volt; | 29 | ti,dual-volt; |
30 | ti,bus-width = <4>; | 30 | bus-width = <4>; |
31 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ | 31 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ |
32 | ti,non-removable; | 32 | ti,non-removable; |
33 | }; | 33 | }; |
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt index de439517dff0..7ab9e1a2d8be 100644 --- a/Documentation/devicetree/bindings/net/fsl-fec.txt +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt | |||
@@ -14,7 +14,7 @@ Optional properties: | |||
14 | 14 | ||
15 | Example: | 15 | Example: |
16 | 16 | ||
17 | fec@83fec000 { | 17 | ethernet@83fec000 { |
18 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; | 18 | compatible = "fsl,imx51-fec", "fsl,imx27-fec"; |
19 | reg = <0x83fec000 0x4000>; | 19 | reg = <0x83fec000 0x4000>; |
20 | interrupts = <87>; | 20 | interrupts = <87>; |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt index 3664d37e6799..b4480d5c3aca 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl_spear.txt | |||
@@ -4,6 +4,8 @@ Required properties: | |||
4 | - compatible : "st,spear300-pinmux" | 4 | - compatible : "st,spear300-pinmux" |
5 | : "st,spear310-pinmux" | 5 | : "st,spear310-pinmux" |
6 | : "st,spear320-pinmux" | 6 | : "st,spear320-pinmux" |
7 | : "st,spear1310-pinmux" | ||
8 | : "st,spear1340-pinmux" | ||
7 | - reg : Address range of the pinctrl registers | 9 | - reg : Address range of the pinctrl registers |
8 | - st,pinmux-mode: Mandatory for SPEAr300 and SPEAr320 and invalid for others. | 10 | - st,pinmux-mode: Mandatory for SPEAr300 and SPEAr320 and invalid for others. |
9 | - Its values for SPEAr300: | 11 | - Its values for SPEAr300: |
@@ -89,6 +91,37 @@ For SPEAr320 machines: | |||
89 | "rmii0_1_grp", "i2c1_8_9_grp", "i2c1_98_99_grp", "i2c2_0_1_grp", | 91 | "rmii0_1_grp", "i2c1_8_9_grp", "i2c1_98_99_grp", "i2c2_0_1_grp", |
90 | "i2c2_2_3_grp", "i2c2_19_20_grp", "i2c2_75_76_grp", "i2c2_96_97_grp" | 92 | "i2c2_2_3_grp", "i2c2_19_20_grp", "i2c2_75_76_grp", "i2c2_96_97_grp" |
91 | 93 | ||
94 | For SPEAr1310 machines: | ||
95 | "i2c0_grp", "ssp0_grp", "ssp0_cs0_grp", "ssp0_cs1_2_grp", "i2s0_grp", | ||
96 | "i2s1_grp", "clcd_grp", "clcd_high_res_grp", "arm_gpio_grp", | ||
97 | "smi_2_chips_grp", "smi_4_chips_grp", "gmii_grp", "rgmii_grp", | ||
98 | "smii_0_1_2_grp", "ras_mii_txclk_grp", "nand_8bit_grp", | ||
99 | "nand_16bit_grp", "nand_4_chips_grp", "keyboard_6x6_grp", | ||
100 | "keyboard_rowcol6_8_grp", "uart0_grp", "uart0_modem_grp", | ||
101 | "gpt0_tmr0_grp", "gpt0_tmr1_grp", "gpt1_tmr0_grp", "gpt1_tmr1_grp", | ||
102 | "sdhci_grp", "cf_grp", "xd_grp", "touch_xy_grp", | ||
103 | "uart1_disable_i2c_grp", "uart1_disable_sd_grp", "uart2_3_grp", | ||
104 | "uart4_grp", "uart5_grp", "rs485_0_1_tdm_0_1_grp", "i2c_1_2_grp", | ||
105 | "i2c3_dis_smi_clcd_grp", "i2c3_dis_sd_i2s0_grp", "i2c_4_5_dis_smi_grp", | ||
106 | "i2c4_dis_sd_grp", "i2c5_dis_sd_grp", "i2c_6_7_dis_kbd_grp", | ||
107 | "i2c6_dis_sd_grp", "i2c7_dis_sd_grp", "can0_dis_nor_grp", | ||
108 | "can0_dis_sd_grp", "can1_dis_sd_grp", "can1_dis_kbd_grp", "pcie0_grp", | ||
109 | "pcie1_grp", "pcie2_grp", "sata0_grp", "sata1_grp", "sata2_grp", | ||
110 | "ssp1_dis_kbd_grp", "ssp1_dis_sd_grp", "gpt64_grp" | ||
111 | |||
112 | For SPEAr1340 machines: | ||
113 | "pads_as_gpio_grp", "fsmc_8bit_grp", "fsmc_16bit_grp", "fsmc_pnor_grp", | ||
114 | "keyboard_row_col_grp", "keyboard_col5_grp", "spdif_in_grp", | ||
115 | "spdif_out_grp", "gpt_0_1_grp", "pwm0_grp", "pwm1_grp", "pwm2_grp", | ||
116 | "pwm3_grp", "vip_mux_grp", "vip_mux_cam0_grp", "vip_mux_cam1_grp", | ||
117 | "vip_mux_cam2_grp", "vip_mux_cam3_grp", "cam0_grp", "cam1_grp", | ||
118 | "cam2_grp", "cam3_grp", "smi_grp", "ssp0_grp", "ssp0_cs1_grp", | ||
119 | "ssp0_cs2_grp", "ssp0_cs3_grp", "uart0_grp", "uart0_enh_grp", | ||
120 | "uart1_grp", "i2s_in_grp", "i2s_out_grp", "gmii_grp", "rgmii_grp", | ||
121 | "rmii_grp", "sgmii_grp", "i2c0_grp", "i2c1_grp", "cec0_grp", "cec1_grp", | ||
122 | "sdhci_grp", "cf_grp", "xd_grp", "clcd_grp", "arm_trace_grp", | ||
123 | "miphy_dbg_grp", "pcie_grp", "sata_grp" | ||
124 | |||
92 | Valid values for function names are: | 125 | Valid values for function names are: |
93 | For All SPEAr3xx machines: | 126 | For All SPEAr3xx machines: |
94 | "firda", "i2c0", "ssp_cs", "ssp0", "mii0", "gpio0", "uart0_ext", | 127 | "firda", "i2c0", "ssp_cs", "ssp0", "mii0", "gpio0", "uart0_ext", |
@@ -106,3 +139,17 @@ For SPEAr320 machines: | |||
106 | "uart2", "uart3", "uart4", "uart5", "uart6", "rs485", "touchscreen", | 139 | "uart2", "uart3", "uart4", "uart5", "uart6", "rs485", "touchscreen", |
107 | "can0", "can1", "pwm0_1", "pwm2", "pwm3", "ssp1", "ssp2", "mii2", | 140 | "can0", "can1", "pwm0_1", "pwm2", "pwm3", "ssp1", "ssp2", "mii2", |
108 | "mii0_1", "i2c1", "i2c2" | 141 | "mii0_1", "i2c1", "i2c2" |
142 | |||
143 | |||
144 | For SPEAr1310 machines: | ||
145 | "i2c0", "ssp0", "i2s0", "i2s1", "clcd", "arm_gpio", "smi", "gmii", | ||
146 | "rgmii", "smii_0_1_2", "ras_mii_txclk", "nand", "keyboard", "uart0", | ||
147 | "gpt0", "gpt1", "sdhci", "cf", "xd", "touchscreen", "uart1", "uart2_3", | ||
148 | "uart4", "uart5", "rs485_0_1_tdm_0_1", "i2c_1_2", "i2c3_i2s1", | ||
149 | "i2c_4_5", "i2c_6_7", "can0", "can1", "pci", "sata", "ssp1", "gpt64" | ||
150 | |||
151 | For SPEAr1340 machines: | ||
152 | "pads_as_gpio", "fsmc", "keyboard", "spdif_in", "spdif_out", "gpt_0_1", | ||
153 | "pwm", "vip", "cam0", "cam1", "cam2", "cam3", "smi", "ssp0", "uart0", | ||
154 | "uart1", "i2s", "gmac", "i2c0", "i2c1", "cec0", "cec1", "sdhci", "cf", | ||
155 | "xd", "clcd", "arm_trace", "miphy_dbg", "pcie", "sata" | ||
diff --git a/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt new file mode 100644 index 000000000000..a87a1e9bc060 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * NXP LPC32xx SoC Real Time Clock controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "nxp,lpc3220-rtc" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: The RTC interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | rtc@40024000 { | ||
12 | compatible = "nxp,lpc3220-rtc"; | ||
13 | reg = <0x40024000 0x1000>; | ||
14 | interrupts = <52 0>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/spear-rtc.txt b/Documentation/devicetree/bindings/rtc/spear-rtc.txt new file mode 100644 index 000000000000..ca67ac62108e --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/spear-rtc.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * SPEAr RTC | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,spear600-rtc" | ||
5 | - reg : Address range of the rtc registers | ||
6 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
7 | that services interrupts for this device | ||
8 | - interrupt: Should contain the rtc interrupt number | ||
9 | |||
10 | Example: | ||
11 | |||
12 | rtc@fc000000 { | ||
13 | compatible = "st,spear600-rtc"; | ||
14 | reg = <0xfc000000 0x1000>; | ||
15 | interrupt-parent = <&vic1>; | ||
16 | interrupts = <12>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/omap-dmic.txt b/Documentation/devicetree/bindings/sound/omap-dmic.txt new file mode 100644 index 000000000000..fd8105f18978 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/omap-dmic.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Texas Instruments OMAP4+ Digital Microphone Module | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,omap4-dmic" | ||
5 | - reg: Register location and size as an array: | ||
6 | <MPU access base address, size>, | ||
7 | <L3 interconnect address, size>; | ||
8 | - interrupts: Interrupt number for DMIC | ||
9 | - interrupt-parent: The parent interrupt controller | ||
10 | - ti,hwmods: Name of the hwmod associated with OMAP dmic IP | ||
11 | |||
12 | Example: | ||
13 | |||
14 | dmic: dmic@4012e000 { | ||
15 | compatible = "ti,omap4-dmic"; | ||
16 | reg = <0x4012e000 0x7f>, /* MPU private access */ | ||
17 | <0x4902e000 0x7f>; /* L3 Interconnect */ | ||
18 | interrupts = <0 114 0x4>; | ||
19 | interrupt-parent = <&gic>; | ||
20 | ti,hwmods = "dmic"; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt new file mode 100644 index 000000000000..0741dff048dd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Texas Instruments OMAP4+ McPDM | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,omap4-mcpdm" | ||
5 | - reg: Register location and size as an array: | ||
6 | <MPU access base address, size>, | ||
7 | <L3 interconnect address, size>; | ||
8 | - interrupts: Interrupt number for McPDM | ||
9 | - interrupt-parent: The parent interrupt controller | ||
10 | - ti,hwmods: Name of the hwmod associated to the McPDM | ||
11 | |||
12 | Example: | ||
13 | |||
14 | mcpdm: mcpdm@40132000 { | ||
15 | compatible = "ti,omap4-mcpdm"; | ||
16 | reg = <0x40132000 0x7f>, /* MPU private access */ | ||
17 | <0x49032000 0x7f>; /* L3 Interconnect */ | ||
18 | interrupts = <0 112 0x4>; | ||
19 | interrupt-parent = <&gic>; | ||
20 | ti,hwmods = "mcpdm"; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt index a9c0406280e8..b462d0c54823 100644 --- a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt +++ b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt | |||
@@ -11,7 +11,7 @@ Optional properties: | |||
11 | 11 | ||
12 | Example: | 12 | Example: |
13 | 13 | ||
14 | uart@73fbc000 { | 14 | serial@73fbc000 { |
15 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; | 15 | compatible = "fsl,imx51-uart", "fsl,imx21-uart"; |
16 | reg = <0x73fbc000 0x4000>; | 16 | reg = <0x73fbc000 0x4000>; |
17 | interrupts = <31>; | 17 | interrupts = <31>; |
diff --git a/Documentation/devicetree/bindings/usb/tegra-usb.txt b/Documentation/devicetree/bindings/usb/tegra-usb.txt index 007005ddbe12..e9b005dc7625 100644 --- a/Documentation/devicetree/bindings/usb/tegra-usb.txt +++ b/Documentation/devicetree/bindings/usb/tegra-usb.txt | |||
@@ -12,6 +12,9 @@ Required properties : | |||
12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be | 12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be |
13 | activated for the bus to be powered. | 13 | activated for the bus to be powered. |
14 | 14 | ||
15 | Required properties for phy_type == ulpi: | ||
16 | - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. | ||
17 | |||
15 | Optional properties: | 18 | Optional properties: |
16 | - dr_mode : dual role mode. Indicates the working mode for | 19 | - dr_mode : dual role mode. Indicates the working mode for |
17 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", | 20 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", |
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 3bbd5c51605a..ad86fb86c9a0 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt | |||
@@ -29,13 +29,6 @@ The buffer-user | |||
29 | in memory, mapped into its own address space, so it can access the same area | 29 | in memory, mapped into its own address space, so it can access the same area |
30 | of memory. | 30 | of memory. |
31 | 31 | ||
32 | *IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] | ||
33 | For this first version, A buffer shared using the dma_buf sharing API: | ||
34 | - *may* be exported to user space using "mmap" *ONLY* by exporter, outside of | ||
35 | this framework. | ||
36 | - with this new iteration of the dma-buf api cpu access from the kernel has been | ||
37 | enable, see below for the details. | ||
38 | |||
39 | dma-buf operations for device dma only | 32 | dma-buf operations for device dma only |
40 | -------------------------------------- | 33 | -------------------------------------- |
41 | 34 | ||
@@ -300,6 +293,17 @@ Access to a dma_buf from the kernel context involves three steps: | |||
300 | Note that these calls need to always succeed. The exporter needs to complete | 293 | Note that these calls need to always succeed. The exporter needs to complete |
301 | any preparations that might fail in begin_cpu_access. | 294 | any preparations that might fail in begin_cpu_access. |
302 | 295 | ||
296 | For some cases the overhead of kmap can be too high, a vmap interface | ||
297 | is introduced. This interface should be used very carefully, as vmalloc | ||
298 | space is a limited resources on many architectures. | ||
299 | |||
300 | Interfaces: | ||
301 | void *dma_buf_vmap(struct dma_buf *dmabuf) | ||
302 | void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) | ||
303 | |||
304 | The vmap call can fail if there is no vmap support in the exporter, or if it | ||
305 | runs out of vmalloc space. Fallback to kmap should be implemented. | ||
306 | |||
303 | 3. Finish access | 307 | 3. Finish access |
304 | 308 | ||
305 | When the importer is done accessing the range specified in begin_cpu_access, | 309 | When the importer is done accessing the range specified in begin_cpu_access, |
@@ -313,6 +317,83 @@ Access to a dma_buf from the kernel context involves three steps: | |||
313 | enum dma_data_direction dir); | 317 | enum dma_data_direction dir); |
314 | 318 | ||
315 | 319 | ||
320 | Direct Userspace Access/mmap Support | ||
321 | ------------------------------------ | ||
322 | |||
323 | Being able to mmap an export dma-buf buffer object has 2 main use-cases: | ||
324 | - CPU fallback processing in a pipeline and | ||
325 | - supporting existing mmap interfaces in importers. | ||
326 | |||
327 | 1. CPU fallback processing in a pipeline | ||
328 | |||
329 | In many processing pipelines it is sometimes required that the cpu can access | ||
330 | the data in a dma-buf (e.g. for thumbnail creation, snapshots, ...). To avoid | ||
331 | the need to handle this specially in userspace frameworks for buffer sharing | ||
332 | it's ideal if the dma_buf fd itself can be used to access the backing storage | ||
333 | from userspace using mmap. | ||
334 | |||
335 | Furthermore Android's ION framework already supports this (and is otherwise | ||
336 | rather similar to dma-buf from a userspace consumer side with using fds as | ||
337 | handles, too). So it's beneficial to support this in a similar fashion on | ||
338 | dma-buf to have a good transition path for existing Android userspace. | ||
339 | |||
340 | No special interfaces, userspace simply calls mmap on the dma-buf fd. | ||
341 | |||
342 | 2. Supporting existing mmap interfaces in exporters | ||
343 | |||
344 | Similar to the motivation for kernel cpu access it is again important that | ||
345 | the userspace code of a given importing subsystem can use the same interfaces | ||
346 | with a imported dma-buf buffer object as with a native buffer object. This is | ||
347 | especially important for drm where the userspace part of contemporary OpenGL, | ||
348 | X, and other drivers is huge, and reworking them to use a different way to | ||
349 | mmap a buffer rather invasive. | ||
350 | |||
351 | The assumption in the current dma-buf interfaces is that redirecting the | ||
352 | initial mmap is all that's needed. A survey of some of the existing | ||
353 | subsystems shows that no driver seems to do any nefarious thing like syncing | ||
354 | up with outstanding asynchronous processing on the device or allocating | ||
355 | special resources at fault time. So hopefully this is good enough, since | ||
356 | adding interfaces to intercept pagefaults and allow pte shootdowns would | ||
357 | increase the complexity quite a bit. | ||
358 | |||
359 | Interface: | ||
360 | int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | ||
361 | unsigned long); | ||
362 | |||
363 | If the importing subsystem simply provides a special-purpose mmap call to set | ||
364 | up a mapping in userspace, calling do_mmap with dma_buf->file will equally | ||
365 | achieve that for a dma-buf object. | ||
366 | |||
367 | 3. Implementation notes for exporters | ||
368 | |||
369 | Because dma-buf buffers have invariant size over their lifetime, the dma-buf | ||
370 | core checks whether a vma is too large and rejects such mappings. The | ||
371 | exporter hence does not need to duplicate this check. | ||
372 | |||
373 | Because existing importing subsystems might presume coherent mappings for | ||
374 | userspace, the exporter needs to set up a coherent mapping. If that's not | ||
375 | possible, it needs to fake coherency by manually shooting down ptes when | ||
376 | leaving the cpu domain and flushing caches at fault time. Note that all the | ||
377 | dma_buf files share the same anon inode, hence the exporter needs to replace | ||
378 | the dma_buf file stored in vma->vm_file with it's own if pte shootdown is | ||
379 | requred. This is because the kernel uses the underlying inode's address_space | ||
380 | for vma tracking (and hence pte tracking at shootdown time with | ||
381 | unmap_mapping_range). | ||
382 | |||
383 | If the above shootdown dance turns out to be too expensive in certain | ||
384 | scenarios, we can extend dma-buf with a more explicit cache tracking scheme | ||
385 | for userspace mappings. But the current assumption is that using mmap is | ||
386 | always a slower path, so some inefficiencies should be acceptable. | ||
387 | |||
388 | Exporters that shoot down mappings (for any reasons) shall not do any | ||
389 | synchronization at fault time with outstanding device operations. | ||
390 | Synchronization is an orthogonal issue to sharing the backing storage of a | ||
391 | buffer and hence should not be handled by dma-buf itself. This is explictly | ||
392 | mentioned here because many people seem to want something like this, but if | ||
393 | different exporters handle this differently, buffer sharing can fail in | ||
394 | interesting ways depending upong the exporter (if userspace starts depending | ||
395 | upon this implicit synchronization). | ||
396 | |||
316 | Miscellaneous notes | 397 | Miscellaneous notes |
317 | ------------------- | 398 | ------------------- |
318 | 399 | ||
@@ -336,6 +417,20 @@ Miscellaneous notes | |||
336 | the exporting driver to create a dmabuf fd must provide a way to let | 417 | the exporting driver to create a dmabuf fd must provide a way to let |
337 | userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). | 418 | userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). |
338 | 419 | ||
420 | - If an exporter needs to manually flush caches and hence needs to fake | ||
421 | coherency for mmap support, it needs to be able to zap all the ptes pointing | ||
422 | at the backing storage. Now linux mm needs a struct address_space associated | ||
423 | with the struct file stored in vma->vm_file to do that with the function | ||
424 | unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd | ||
425 | with the anon_file struct file, i.e. all dma_bufs share the same file. | ||
426 | |||
427 | Hence exporters need to setup their own file (and address_space) association | ||
428 | by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap | ||
429 | callback. In the specific case of a gem driver the exporter could use the | ||
430 | shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then | ||
431 | zap ptes by unmapping the corresponding range of the struct address_space | ||
432 | associated with their own file. | ||
433 | |||
339 | References: | 434 | References: |
340 | [1] struct dma_buf_ops in include/linux/dma-buf.h | 435 | [1] struct dma_buf_ops in include/linux/dma-buf.h |
341 | [2] All interfaces mentioned above defined in include/linux/dma-buf.h | 436 | [2] All interfaces mentioned above defined in include/linux/dma-buf.h |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 50d82ae09e2a..ebaffe208ccb 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -588,3 +588,21 @@ Why: Remount currently allows changing bound subsystems and | |||
588 | replaced with conventional fsnotify. | 588 | replaced with conventional fsnotify. |
589 | 589 | ||
590 | ---------------------------- | 590 | ---------------------------- |
591 | |||
592 | What: KVM debugfs statistics | ||
593 | When: 2013 | ||
594 | Why: KVM tracepoints provide mostly equivalent information in a much more | ||
595 | flexible fashion. | ||
596 | |||
597 | ---------------------------- | ||
598 | |||
599 | What: at91-mci driver ("CONFIG_MMC_AT91") | ||
600 | When: 3.7 | ||
601 | Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support | ||
602 | was added to atmel-mci as a first step to support more chips. | ||
603 | Then at91-mci was kept only for old IP versions (on at91rm9200 and | ||
604 | at91sam9261). The support of these IP versions has just been added | ||
605 | to atmel-mci, so atmel-mci can be used for all chips. | ||
606 | Who: Ludovic Desroches <ludovic.desroches@atmel.com> | ||
607 | |||
608 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 4fca82e5276e..d449e632e6a0 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -60,7 +60,6 @@ ata *); | |||
60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
62 | int (*removexattr) (struct dentry *, const char *); | 62 | int (*removexattr) (struct dentry *, const char *); |
63 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
64 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | 63 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); |
65 | 64 | ||
66 | locking rules: | 65 | locking rules: |
@@ -87,7 +86,6 @@ setxattr: yes | |||
87 | getxattr: no | 86 | getxattr: no |
88 | listxattr: no | 87 | listxattr: no |
89 | removexattr: yes | 88 | removexattr: yes |
90 | truncate_range: yes | ||
91 | fiemap: no | 89 | fiemap: no |
92 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 90 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
93 | victim. | 91 | victim. |
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt index b100adc38adb..293855e95000 100644 --- a/Documentation/filesystems/ext3.txt +++ b/Documentation/filesystems/ext3.txt | |||
@@ -59,9 +59,9 @@ commit=nrsec (*) Ext3 can be told to sync all its data and metadata | |||
59 | Setting it to very large values will improve | 59 | Setting it to very large values will improve |
60 | performance. | 60 | performance. |
61 | 61 | ||
62 | barrier=<0(*)|1> This enables/disables the use of write barriers in | 62 | barrier=<0|1(*)> This enables/disables the use of write barriers in |
63 | barrier the jbd code. barrier=0 disables, barrier=1 enables. | 63 | barrier (*) the jbd code. barrier=0 disables, barrier=1 enables. |
64 | nobarrier (*) This also requires an IO stack which can support | 64 | nobarrier This also requires an IO stack which can support |
65 | barriers, and if jbd gets an error on a barrier | 65 | barriers, and if jbd gets an error on a barrier |
66 | write, it will disable again with a warning. | 66 | write, it will disable again with a warning. |
67 | Write barriers enforce proper on-disk ordering | 67 | Write barriers enforce proper on-disk ordering |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 74acd9618819..8c91d1057d9a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -297,7 +297,8 @@ in the beginning of ->setattr unconditionally. | |||
297 | be used instead. It gets called whenever the inode is evicted, whether it has | 297 | be used instead. It gets called whenever the inode is evicted, whether it has |
298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated | 298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated |
299 | metadata buffers; getting rid of those is responsibility of method, as it had | 299 | metadata buffers; getting rid of those is responsibility of method, as it had |
300 | been for ->delete_inode(). | 300 | been for ->delete_inode(). Caller makes sure async writeback cannot be running |
301 | for the inode while (or after) ->evict_inode() is called. | ||
301 | 302 | ||
302 | ->drop_inode() returns int now; it's called on final iput() with | 303 | ->drop_inode() returns int now; it's called on final iput() with |
303 | inode->i_lock held and it returns true if filesystems wants the inode to be | 304 | inode->i_lock held and it returns true if filesystems wants the inode to be |
@@ -306,14 +307,11 @@ updated appropriately. generic_delete_inode() is also alive and it consists | |||
306 | simply of return 1. Note that all actual eviction work is done by caller after | 307 | simply of return 1. Note that all actual eviction work is done by caller after |
307 | ->drop_inode() returns. | 308 | ->drop_inode() returns. |
308 | 309 | ||
309 | clear_inode() is gone; use end_writeback() instead. As before, it must | 310 | As before, clear_inode() must be called exactly once on each call of |
310 | be called exactly once on each call of ->evict_inode() (as it used to be for | 311 | ->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike |
311 | each call of ->delete_inode()). Unlike before, if you are using inode-associated | 312 | before, if you are using inode-associated metadata buffers (i.e. |
312 | metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to | 313 | mark_buffer_dirty_inode()), it's your responsibility to call |
313 | call invalidate_inode_buffers() before end_writeback(). | 314 | invalidate_inode_buffers() before clear_inode(). |
314 | No async writeback (and thus no calls of ->write_inode()) will happen | ||
315 | after end_writeback() returns, so actions that should not overlap with ->write_inode() | ||
316 | (e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call. | ||
317 | 315 | ||
318 | NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out | 316 | NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out |
319 | if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() | 317 | if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index ef088e55ab2e..912af6ce5626 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -743,6 +743,7 @@ Committed_AS: 100056 kB | |||
743 | VmallocTotal: 112216 kB | 743 | VmallocTotal: 112216 kB |
744 | VmallocUsed: 428 kB | 744 | VmallocUsed: 428 kB |
745 | VmallocChunk: 111088 kB | 745 | VmallocChunk: 111088 kB |
746 | AnonHugePages: 49152 kB | ||
746 | 747 | ||
747 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved | 748 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved |
748 | bits and the kernel binary code) | 749 | bits and the kernel binary code) |
@@ -776,6 +777,7 @@ VmallocChunk: 111088 kB | |||
776 | Dirty: Memory which is waiting to get written back to the disk | 777 | Dirty: Memory which is waiting to get written back to the disk |
777 | Writeback: Memory which is actively being written back to the disk | 778 | Writeback: Memory which is actively being written back to the disk |
778 | AnonPages: Non-file backed pages mapped into userspace page tables | 779 | AnonPages: Non-file backed pages mapped into userspace page tables |
780 | AnonHugePages: Non-file backed huge pages mapped into userspace page tables | ||
779 | Mapped: files which have been mmaped, such as libraries | 781 | Mapped: files which have been mmaped, such as libraries |
780 | Slab: in-kernel data structures cache | 782 | Slab: in-kernel data structures cache |
781 | SReclaimable: Part of Slab, that might be reclaimed, such as caches | 783 | SReclaimable: Part of Slab, that might be reclaimed, such as caches |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 0d0492028082..ef19f91a0f12 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -363,7 +363,6 @@ struct inode_operations { | |||
363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
365 | int (*removexattr) (struct dentry *, const char *); | 365 | int (*removexattr) (struct dentry *, const char *); |
366 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
367 | }; | 366 | }; |
368 | 367 | ||
369 | Again, all methods are called without any locks being held, unless | 368 | Again, all methods are called without any locks being held, unless |
@@ -472,9 +471,6 @@ otherwise noted. | |||
472 | removexattr: called by the VFS to remove an extended attribute from | 471 | removexattr: called by the VFS to remove an extended attribute from |
473 | a file. This method is called by removexattr(2) system call. | 472 | a file. This method is called by removexattr(2) system call. |
474 | 473 | ||
475 | truncate_range: a method provided by the underlying filesystem to truncate a | ||
476 | range of blocks , i.e. punch a hole somewhere in a file. | ||
477 | |||
478 | 474 | ||
479 | The Address Space Object | 475 | The Address Space Object |
480 | ======================== | 476 | ======================== |
@@ -760,7 +756,7 @@ struct file_operations | |||
760 | ---------------------- | 756 | ---------------------- |
761 | 757 | ||
762 | This describes how the VFS can manipulate an open file. As of kernel | 758 | This describes how the VFS can manipulate an open file. As of kernel |
763 | 2.6.22, the following members are defined: | 759 | 3.5, the following members are defined: |
764 | 760 | ||
765 | struct file_operations { | 761 | struct file_operations { |
766 | struct module *owner; | 762 | struct module *owner; |
@@ -790,6 +786,8 @@ struct file_operations { | |||
790 | int (*flock) (struct file *, int, struct file_lock *); | 786 | int (*flock) (struct file *, int, struct file_lock *); |
791 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | 787 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); |
792 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | 788 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); |
789 | int (*setlease)(struct file *, long arg, struct file_lock **); | ||
790 | long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); | ||
793 | }; | 791 | }; |
794 | 792 | ||
795 | Again, all methods are called without any locks being held, unless | 793 | Again, all methods are called without any locks being held, unless |
@@ -858,6 +856,11 @@ otherwise noted. | |||
858 | splice_read: called by the VFS to splice data from file to a pipe. This | 856 | splice_read: called by the VFS to splice data from file to a pipe. This |
859 | method is used by the splice(2) system call | 857 | method is used by the splice(2) system call |
860 | 858 | ||
859 | setlease: called by the VFS to set or release a file lock lease. | ||
860 | setlease has the file_lock_lock held and must not sleep. | ||
861 | |||
862 | fallocate: called by the VFS to preallocate blocks or punch a hole. | ||
863 | |||
861 | Note that the file operations are implemented by the specific | 864 | Note that the file operations are implemented by the specific |
862 | filesystem in which the inode resides. When opening a device node | 865 | filesystem in which the inode resides. When opening a device node |
863 | (character or block special) most filesystems will call special | 866 | (character or block special) most filesystems will call special |
diff --git a/Documentation/i2c/muxes/gpio-i2cmux b/Documentation/i2c/muxes/i2c-mux-gpio index 811cd78d4cdc..bd9b2299b739 100644 --- a/Documentation/i2c/muxes/gpio-i2cmux +++ b/Documentation/i2c/muxes/i2c-mux-gpio | |||
@@ -1,11 +1,11 @@ | |||
1 | Kernel driver gpio-i2cmux | 1 | Kernel driver i2c-gpio-mux |
2 | 2 | ||
3 | Author: Peter Korsgaard <peter.korsgaard@barco.com> | 3 | Author: Peter Korsgaard <peter.korsgaard@barco.com> |
4 | 4 | ||
5 | Description | 5 | Description |
6 | ----------- | 6 | ----------- |
7 | 7 | ||
8 | gpio-i2cmux is an i2c mux driver providing access to I2C bus segments | 8 | i2c-gpio-mux is an i2c mux driver providing access to I2C bus segments |
9 | from a master I2C bus and a hardware MUX controlled through GPIO pins. | 9 | from a master I2C bus and a hardware MUX controlled through GPIO pins. |
10 | 10 | ||
11 | E.G.: | 11 | E.G.: |
@@ -26,16 +26,16 @@ according to the settings of the GPIO pins 1..N. | |||
26 | Usage | 26 | Usage |
27 | ----- | 27 | ----- |
28 | 28 | ||
29 | gpio-i2cmux uses the platform bus, so you need to provide a struct | 29 | i2c-gpio-mux uses the platform bus, so you need to provide a struct |
30 | platform_device with the platform_data pointing to a struct | 30 | platform_device with the platform_data pointing to a struct |
31 | gpio_i2cmux_platform_data with the I2C adapter number of the master | 31 | gpio_i2cmux_platform_data with the I2C adapter number of the master |
32 | bus, the number of bus segments to create and the GPIO pins used | 32 | bus, the number of bus segments to create and the GPIO pins used |
33 | to control it. See include/linux/gpio-i2cmux.h for details. | 33 | to control it. See include/linux/i2c-gpio-mux.h for details. |
34 | 34 | ||
35 | E.G. something like this for a MUX providing 4 bus segments | 35 | E.G. something like this for a MUX providing 4 bus segments |
36 | controlled through 3 GPIO pins: | 36 | controlled through 3 GPIO pins: |
37 | 37 | ||
38 | #include <linux/gpio-i2cmux.h> | 38 | #include <linux/i2c-gpio-mux.h> |
39 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
40 | 40 | ||
41 | static const unsigned myboard_gpiomux_gpios[] = { | 41 | static const unsigned myboard_gpiomux_gpios[] = { |
@@ -57,7 +57,7 @@ static struct gpio_i2cmux_platform_data myboard_i2cmux_data = { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | static struct platform_device myboard_i2cmux = { | 59 | static struct platform_device myboard_i2cmux = { |
60 | .name = "gpio-i2cmux", | 60 | .name = "i2c-gpio-mux", |
61 | .id = 0, | 61 | .id = 0, |
62 | .dev = { | 62 | .dev = { |
63 | .platform_data = &myboard_i2cmux_data, | 63 | .platform_data = &myboard_i2cmux_data, |
diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt index 1ba84f3584e3..4e1839ccb555 100644 --- a/Documentation/initrd.txt +++ b/Documentation/initrd.txt | |||
@@ -362,5 +362,5 @@ Resources | |||
362 | http://www.almesberger.net/cv/papers/ols2k-9.ps.gz | 362 | http://www.almesberger.net/cv/papers/ols2k-9.ps.gz |
363 | [2] newlib package (experimental), with initrd example | 363 | [2] newlib package (experimental), with initrd example |
364 | http://sources.redhat.com/newlib/ | 364 | http://sources.redhat.com/newlib/ |
365 | [3] Brouwer, Andries; "util-linux: Miscellaneous utilities for Linux" | 365 | [3] util-linux: Miscellaneous utilities for Linux |
366 | ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/ | 366 | http://www.kernel.org/pub/linux/utils/util-linux/ |
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 68e32bb6bd80..6466704d47b5 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -50,6 +50,10 @@ LDFLAGS_MODULE | |||
50 | -------------------------------------------------- | 50 | -------------------------------------------------- |
51 | Additional options used for $(LD) when linking modules. | 51 | Additional options used for $(LD) when linking modules. |
52 | 52 | ||
53 | LDFLAGS_vmlinux | ||
54 | -------------------------------------------------- | ||
55 | Additional options passed to final link of vmlinux. | ||
56 | |||
53 | KBUILD_VERBOSE | 57 | KBUILD_VERBOSE |
54 | -------------------------------------------------- | 58 | -------------------------------------------------- |
55 | Set the kbuild verbosity. Can be assigned same values as "V=...". | 59 | Set the kbuild verbosity. Can be assigned same values as "V=...". |
@@ -214,3 +218,18 @@ KBUILD_BUILD_USER, KBUILD_BUILD_HOST | |||
214 | These two variables allow to override the user@host string displayed during | 218 | These two variables allow to override the user@host string displayed during |
215 | boot and in /proc/version. The default value is the output of the commands | 219 | boot and in /proc/version. The default value is the output of the commands |
216 | whoami and host, respectively. | 220 | whoami and host, respectively. |
221 | |||
222 | KBUILD_LDS | ||
223 | -------------------------------------------------- | ||
224 | The linker script with full path. Assigned by the top-level Makefile. | ||
225 | |||
226 | KBUILD_VMLINUX_INIT | ||
227 | -------------------------------------------------- | ||
228 | All object files for the init (first) part of vmlinux. | ||
229 | Files specified with KBUILD_VMLINUX_INIT are linked first. | ||
230 | |||
231 | KBUILD_VMLINUX_MAIN | ||
232 | -------------------------------------------------- | ||
233 | All object files for the main part of vmlinux. | ||
234 | KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN together specify | ||
235 | all the object files used to link vmlinux. | ||
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 9d5f2a90dca9..a09f1a6a830c 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -53,15 +53,15 @@ KCONFIG_ALLCONFIG | |||
53 | -------------------------------------------------- | 53 | -------------------------------------------------- |
54 | (partially based on lkml email from/by Rob Landley, re: miniconfig) | 54 | (partially based on lkml email from/by Rob Landley, re: miniconfig) |
55 | -------------------------------------------------- | 55 | -------------------------------------------------- |
56 | The allyesconfig/allmodconfig/allnoconfig/randconfig variants can | 56 | The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also |
57 | also use the environment variable KCONFIG_ALLCONFIG as a flag or a | 57 | use the environment variable KCONFIG_ALLCONFIG as a flag or a filename |
58 | filename that contains config symbols that the user requires to be | 58 | that contains config symbols that the user requires to be set to a |
59 | set to a specific value. If KCONFIG_ALLCONFIG is used without a | 59 | specific value. If KCONFIG_ALLCONFIG is used without a filename where |
60 | filename, "make *config" checks for a file named | 60 | KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config" |
61 | "all{yes/mod/no/def/random}.config" (corresponding to the *config command | 61 | checks for a file named "all{yes/mod/no/def/random}.config" |
62 | that was used) for symbol values that are to be forced. If this file | 62 | (corresponding to the *config command that was used) for symbol values |
63 | is not found, it checks for a file named "all.config" to contain forced | 63 | that are to be forced. If this file is not found, it checks for a |
64 | values. | 64 | file named "all.config" to contain forced values. |
65 | 65 | ||
66 | This enables you to create "miniature" config (miniconfig) or custom | 66 | This enables you to create "miniature" config (miniconfig) or custom |
67 | config files containing just the config symbols that you are interested | 67 | config files containing just the config symbols that you are interested |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b69cfdc12112..b40b413db88e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -397,8 +397,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
397 | atkbd.softrepeat= [HW] | 397 | atkbd.softrepeat= [HW] |
398 | Use software keyboard repeat | 398 | Use software keyboard repeat |
399 | 399 | ||
400 | autotest [IA-64] | ||
401 | |||
402 | baycom_epp= [HW,AX25] | 400 | baycom_epp= [HW,AX25] |
403 | Format: <io>,<mode> | 401 | Format: <io>,<mode> |
404 | 402 | ||
@@ -508,6 +506,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
508 | Also note the kernel might malfunction if you disable | 506 | Also note the kernel might malfunction if you disable |
509 | some critical bits. | 507 | some critical bits. |
510 | 508 | ||
509 | cma=nn[MG] [ARM,KNL] | ||
510 | Sets the size of kernel global memory area for contiguous | ||
511 | memory allocations. For more information, see | ||
512 | include/linux/dma-contiguous.h | ||
513 | |||
511 | cmo_free_hint= [PPC] Format: { yes | no } | 514 | cmo_free_hint= [PPC] Format: { yes | no } |
512 | Specify whether pages are marked as being inactive | 515 | Specify whether pages are marked as being inactive |
513 | when they are freed. This is used in CMO environments | 516 | when they are freed. This is used in CMO environments |
@@ -515,6 +518,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
515 | a hypervisor. | 518 | a hypervisor. |
516 | Default: yes | 519 | Default: yes |
517 | 520 | ||
521 | coherent_pool=nn[KMG] [ARM,KNL] | ||
522 | Sets the size of memory pool for coherent, atomic dma | ||
523 | allocations if Contiguous Memory Allocator (CMA) is used. | ||
524 | |||
518 | code_bytes [X86] How many bytes of object code to print | 525 | code_bytes [X86] How many bytes of object code to print |
519 | in an oops report. | 526 | in an oops report. |
520 | Range: 0 - 8192 | 527 | Range: 0 - 8192 |
@@ -1444,8 +1451,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1444 | devices can be requested on-demand with the | 1451 | devices can be requested on-demand with the |
1445 | /dev/loop-control interface. | 1452 | /dev/loop-control interface. |
1446 | 1453 | ||
1447 | mcatest= [IA-64] | ||
1448 | |||
1449 | mce [X86-32] Machine Check Exception | 1454 | mce [X86-32] Machine Check Exception |
1450 | 1455 | ||
1451 | mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt | 1456 | mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt |
diff --git a/Documentation/leds/ledtrig-transient.txt b/Documentation/leds/ledtrig-transient.txt new file mode 100644 index 000000000000..3bd38b487df1 --- /dev/null +++ b/Documentation/leds/ledtrig-transient.txt | |||
@@ -0,0 +1,152 @@ | |||
1 | LED Transient Trigger | ||
2 | ===================== | ||
3 | |||
4 | The leds timer trigger does not currently have an interface to activate | ||
5 | a one shot timer. The current support allows for setting two timers, one for | ||
6 | specifying how long a state to be on, and the second for how long the state | ||
7 | to be off. The delay_on value specifies the time period an LED should stay | ||
8 | in on state, followed by a delay_off value that specifies how long the LED | ||
9 | should stay in off state. The on and off cycle repeats until the trigger | ||
10 | gets deactivated. There is no provision for one time activation to implement | ||
11 | features that require an on or off state to be held just once and then stay in | ||
12 | the original state forever. | ||
13 | |||
14 | Without one shot timer interface, user space can still use timer trigger to | ||
15 | set a timer to hold a state, however when user space application crashes or | ||
16 | goes away without deactivating the timer, the hardware will be left in that | ||
17 | state permanently. | ||
18 | |||
19 | As a specific example of this use-case, let's look at vibrate feature on | ||
20 | phones. Vibrate function on phones is implemented using PWM pins on SoC or | ||
21 | PMIC. There is a need to activate one shot timer to control the vibrate | ||
22 | feature, to prevent user space crashes leaving the phone in vibrate mode | ||
23 | permanently causing the battery to drain. | ||
24 | |||
25 | Transient trigger addresses the need for one shot timer activation. The | ||
26 | transient trigger can be enabled and disabled just like the other leds | ||
27 | triggers. | ||
28 | |||
29 | When an led class device driver registers itself, it can specify all leds | ||
30 | triggers it supports and a default trigger. During registration, activation | ||
31 | routine for the default trigger gets called. During registration of an led | ||
32 | class device, the LED state does not change. | ||
33 | |||
34 | When the driver unregisters, deactivation routine for the currently active | ||
35 | trigger will be called, and LED state is changed to LED_OFF. | ||
36 | |||
37 | Driver suspend changes the LED state to LED_OFF and resume doesn't change | ||
38 | the state. Please note that there is no explicit interaction between the | ||
39 | suspend and resume actions and the currently enabled trigger. LED state | ||
40 | changes are suspended while the driver is in suspend state. Any timers | ||
41 | that are active at the time driver gets suspended, continue to run, without | ||
42 | being able to actually change the LED state. Once driver is resumed, triggers | ||
43 | start functioning again. | ||
44 | |||
45 | LED state changes are controlled using brightness which is a common led | ||
46 | class device property. When brightness is set to 0 from user space via | ||
47 | echo 0 > brightness, it will result in deactivating the current trigger. | ||
48 | |||
49 | Transient trigger uses standard register and unregister interfaces. During | ||
50 | trigger registration, for each led class device that specifies this trigger | ||
51 | as its default trigger, trigger activation routine will get called. During | ||
52 | registration, the LED state does not change, unless there is another trigger | ||
53 | active, in which case LED state changes to LED_OFF. | ||
54 | |||
55 | During trigger unregistration, LED state gets changed to LED_OFF. | ||
56 | |||
57 | Transient trigger activation routine doesn't change the LED state. It | ||
58 | creates its properties and does its initialization. Transient trigger | ||
59 | deactivation routine, will cancel any timer that is active before it cleans | ||
60 | up and removes the properties it created. It will restore the LED state to | ||
61 | non-transient state. When driver gets suspended, irrespective of the transient | ||
62 | state, the LED state changes to LED_OFF. | ||
63 | |||
64 | Transient trigger can be enabled and disabled from user space on led class | ||
65 | devices, that support this trigger as shown below: | ||
66 | |||
67 | echo transient > trigger | ||
68 | echo none > trigger | ||
69 | |||
70 | NOTE: Add a new property trigger state to control the state. | ||
71 | |||
72 | This trigger exports three properties, activate, state, and duration. When | ||
73 | transient trigger is activated these properties are set to default values. | ||
74 | |||
75 | - duration allows setting timer value in msecs. The initial value is 0. | ||
76 | - activate allows activating and deactivating the timer specified by | ||
77 | duration as needed. The initial and default value is 0. This will allow | ||
78 | duration to be set after trigger activation. | ||
79 | - state allows user to specify a transient state to be held for the specified | ||
80 | duration. | ||
81 | |||
82 | activate - one shot timer activate mechanism. | ||
83 | 1 when activated, 0 when deactivated. | ||
84 | default value is zero when transient trigger is enabled, | ||
85 | to allow duration to be set. | ||
86 | |||
87 | activate state indicates a timer with a value of specified | ||
88 | duration running. | ||
89 | deactivated state indicates that there is no active timer | ||
90 | running. | ||
91 | |||
92 | duration - one shot timer value. When activate is set, duration value | ||
93 | is used to start a timer that runs once. This value doesn't | ||
94 | get changed by the trigger unless user does a set via | ||
95 | echo new_value > duration | ||
96 | |||
97 | state - transient state to be held. It has two values 0 or 1. 0 maps | ||
98 | to LED_OFF and 1 maps to LED_FULL. The specified state is | ||
99 | held for the duration of the one shot timer and then the | ||
100 | state gets changed to the non-transient state which is the | ||
101 | inverse of transient state. | ||
102 | If state = LED_FULL, when the timer runs out the state will | ||
103 | go back to LED_OFF. | ||
104 | If state = LED_OFF, when the timer runs out the state will | ||
105 | go back to LED_FULL. | ||
106 | Please note that current LED state is not checked prior to | ||
107 | changing the state to the specified state. | ||
108 | Driver could map these values to inverted depending on the | ||
109 | default states it defines for the LED in its brightness_set() | ||
110 | interface which is called from the led brightness_set() | ||
111 | interfaces to control the LED state. | ||
112 | |||
113 | When timer expires activate goes back to deactivated state, duration is left | ||
114 | at the set value to be used when activate is set at a future time. This will | ||
115 | allow user app to set the time once and activate it to run it once for the | ||
116 | specified value as needed. When timer expires, state is restored to the | ||
117 | non-transient state which is the inverse of the transient state. | ||
118 | |||
119 | echo 1 > activate - starts timer = duration when duration is not 0. | ||
120 | echo 0 > activate - cancels currently running timer. | ||
121 | echo n > duration - stores timer value to be used upon next | ||
122 | activate. Currently active timer if | ||
123 | any, continues to run for the specified time. | ||
124 | echo 0 > duration - stores timer value to be used upon next | ||
125 | activate. Currently active timer if any, | ||
126 | continues to run for the specified time. | ||
127 | echo 1 > state - stores desired transient state LED_FULL to be | ||
128 | held for the specified duration. | ||
129 | echo 0 > state - stores desired transient state LED_OFF to be | ||
130 | held for the specified duration. | ||
131 | |||
132 | What is not supported: | ||
133 | ====================== | ||
134 | - Timer activation is one shot and extending and/or shortening the timer | ||
135 | is not supported. | ||
136 | |||
137 | Example use-case 1: | ||
138 | echo transient > trigger | ||
139 | echo n > duration | ||
140 | echo 1 > state | ||
141 | repeat the following step as needed: | ||
142 | echo 1 > activate - start timer = duration to run once | ||
143 | echo 1 > activate - start timer = duration to run once | ||
144 | echo none > trigger | ||
145 | |||
146 | This trigger is intended to be used for for the following example use cases: | ||
147 | - Control of vibrate (phones, tablets etc.) hardware by user space app. | ||
148 | - Use of LED by user space app as activity indicator. | ||
149 | - Use of LED by user space app as a kind of watchdog indicator -- as | ||
150 | long as the app is alive, it can keep the LED illuminated, if it dies | ||
151 | the LED will be extinguished automatically. | ||
152 | - Use by any user space app that needs a transient GPIO output. | ||
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 6386f8c0482e..930126698a0f 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -2,6 +2,7 @@ The Definitive KVM (Kernel-based Virtual Machine) API Documentation | |||
2 | =================================================================== | 2 | =================================================================== |
3 | 3 | ||
4 | 1. General description | 4 | 1. General description |
5 | ---------------------- | ||
5 | 6 | ||
6 | The kvm API is a set of ioctls that are issued to control various aspects | 7 | The kvm API is a set of ioctls that are issued to control various aspects |
7 | of a virtual machine. The ioctls belong to three classes | 8 | of a virtual machine. The ioctls belong to three classes |
@@ -23,7 +24,9 @@ of a virtual machine. The ioctls belong to three classes | |||
23 | Only run vcpu ioctls from the same thread that was used to create the | 24 | Only run vcpu ioctls from the same thread that was used to create the |
24 | vcpu. | 25 | vcpu. |
25 | 26 | ||
27 | |||
26 | 2. File descriptors | 28 | 2. File descriptors |
29 | ------------------- | ||
27 | 30 | ||
28 | The kvm API is centered around file descriptors. An initial | 31 | The kvm API is centered around file descriptors. An initial |
29 | open("/dev/kvm") obtains a handle to the kvm subsystem; this handle | 32 | open("/dev/kvm") obtains a handle to the kvm subsystem; this handle |
@@ -41,7 +44,9 @@ not cause harm to the host, their actual behavior is not guaranteed by | |||
41 | the API. The only supported use is one virtual machine per process, | 44 | the API. The only supported use is one virtual machine per process, |
42 | and one vcpu per thread. | 45 | and one vcpu per thread. |
43 | 46 | ||
47 | |||
44 | 3. Extensions | 48 | 3. Extensions |
49 | ------------- | ||
45 | 50 | ||
46 | As of Linux 2.6.22, the KVM ABI has been stabilized: no backward | 51 | As of Linux 2.6.22, the KVM ABI has been stabilized: no backward |
47 | incompatible change are allowed. However, there is an extension | 52 | incompatible change are allowed. However, there is an extension |
@@ -53,7 +58,9 @@ Instead, kvm defines extension identifiers and a facility to query | |||
53 | whether a particular extension identifier is available. If it is, a | 58 | whether a particular extension identifier is available. If it is, a |
54 | set of ioctls is available for application use. | 59 | set of ioctls is available for application use. |
55 | 60 | ||
61 | |||
56 | 4. API description | 62 | 4. API description |
63 | ------------------ | ||
57 | 64 | ||
58 | This section describes ioctls that can be used to control kvm guests. | 65 | This section describes ioctls that can be used to control kvm guests. |
59 | For each ioctl, the following information is provided along with a | 66 | For each ioctl, the following information is provided along with a |
@@ -75,6 +82,7 @@ description: | |||
75 | Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) | 82 | Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) |
76 | are not detailed, but errors with specific meanings are. | 83 | are not detailed, but errors with specific meanings are. |
77 | 84 | ||
85 | |||
78 | 4.1 KVM_GET_API_VERSION | 86 | 4.1 KVM_GET_API_VERSION |
79 | 87 | ||
80 | Capability: basic | 88 | Capability: basic |
@@ -90,6 +98,7 @@ supported. Applications should refuse to run if KVM_GET_API_VERSION | |||
90 | returns a value other than 12. If this check passes, all ioctls | 98 | returns a value other than 12. If this check passes, all ioctls |
91 | described as 'basic' will be available. | 99 | described as 'basic' will be available. |
92 | 100 | ||
101 | |||
93 | 4.2 KVM_CREATE_VM | 102 | 4.2 KVM_CREATE_VM |
94 | 103 | ||
95 | Capability: basic | 104 | Capability: basic |
@@ -109,6 +118,7 @@ In order to create user controlled virtual machines on S390, check | |||
109 | KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as | 118 | KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as |
110 | privileged user (CAP_SYS_ADMIN). | 119 | privileged user (CAP_SYS_ADMIN). |
111 | 120 | ||
121 | |||
112 | 4.3 KVM_GET_MSR_INDEX_LIST | 122 | 4.3 KVM_GET_MSR_INDEX_LIST |
113 | 123 | ||
114 | Capability: basic | 124 | Capability: basic |
@@ -135,6 +145,7 @@ Note: if kvm indicates supports MCE (KVM_CAP_MCE), then the MCE bank MSRs are | |||
135 | not returned in the MSR list, as different vcpus can have a different number | 145 | not returned in the MSR list, as different vcpus can have a different number |
136 | of banks, as set via the KVM_X86_SETUP_MCE ioctl. | 146 | of banks, as set via the KVM_X86_SETUP_MCE ioctl. |
137 | 147 | ||
148 | |||
138 | 4.4 KVM_CHECK_EXTENSION | 149 | 4.4 KVM_CHECK_EXTENSION |
139 | 150 | ||
140 | Capability: basic | 151 | Capability: basic |
@@ -149,6 +160,7 @@ receives an integer that describes the extension availability. | |||
149 | Generally 0 means no and 1 means yes, but some extensions may report | 160 | Generally 0 means no and 1 means yes, but some extensions may report |
150 | additional information in the integer return value. | 161 | additional information in the integer return value. |
151 | 162 | ||
163 | |||
152 | 4.5 KVM_GET_VCPU_MMAP_SIZE | 164 | 4.5 KVM_GET_VCPU_MMAP_SIZE |
153 | 165 | ||
154 | Capability: basic | 166 | Capability: basic |
@@ -161,6 +173,7 @@ The KVM_RUN ioctl (cf.) communicates with userspace via a shared | |||
161 | memory region. This ioctl returns the size of that region. See the | 173 | memory region. This ioctl returns the size of that region. See the |
162 | KVM_RUN documentation for details. | 174 | KVM_RUN documentation for details. |
163 | 175 | ||
176 | |||
164 | 4.6 KVM_SET_MEMORY_REGION | 177 | 4.6 KVM_SET_MEMORY_REGION |
165 | 178 | ||
166 | Capability: basic | 179 | Capability: basic |
@@ -171,6 +184,7 @@ Returns: 0 on success, -1 on error | |||
171 | 184 | ||
172 | This ioctl is obsolete and has been removed. | 185 | This ioctl is obsolete and has been removed. |
173 | 186 | ||
187 | |||
174 | 4.7 KVM_CREATE_VCPU | 188 | 4.7 KVM_CREATE_VCPU |
175 | 189 | ||
176 | Capability: basic | 190 | Capability: basic |
@@ -223,6 +237,7 @@ machines, the resulting vcpu fd can be memory mapped at page offset | |||
223 | KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual | 237 | KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual |
224 | cpu's hardware control block. | 238 | cpu's hardware control block. |
225 | 239 | ||
240 | |||
226 | 4.8 KVM_GET_DIRTY_LOG (vm ioctl) | 241 | 4.8 KVM_GET_DIRTY_LOG (vm ioctl) |
227 | 242 | ||
228 | Capability: basic | 243 | Capability: basic |
@@ -246,6 +261,7 @@ since the last call to this ioctl. Bit 0 is the first page in the | |||
246 | memory slot. Ensure the entire structure is cleared to avoid padding | 261 | memory slot. Ensure the entire structure is cleared to avoid padding |
247 | issues. | 262 | issues. |
248 | 263 | ||
264 | |||
249 | 4.9 KVM_SET_MEMORY_ALIAS | 265 | 4.9 KVM_SET_MEMORY_ALIAS |
250 | 266 | ||
251 | Capability: basic | 267 | Capability: basic |
@@ -256,6 +272,7 @@ Returns: 0 (success), -1 (error) | |||
256 | 272 | ||
257 | This ioctl is obsolete and has been removed. | 273 | This ioctl is obsolete and has been removed. |
258 | 274 | ||
275 | |||
259 | 4.10 KVM_RUN | 276 | 4.10 KVM_RUN |
260 | 277 | ||
261 | Capability: basic | 278 | Capability: basic |
@@ -272,6 +289,7 @@ obtained by mmap()ing the vcpu fd at offset 0, with the size given by | |||
272 | KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct | 289 | KVM_GET_VCPU_MMAP_SIZE. The parameter block is formatted as a 'struct |
273 | kvm_run' (see below). | 290 | kvm_run' (see below). |
274 | 291 | ||
292 | |||
275 | 4.11 KVM_GET_REGS | 293 | 4.11 KVM_GET_REGS |
276 | 294 | ||
277 | Capability: basic | 295 | Capability: basic |
@@ -292,6 +310,7 @@ struct kvm_regs { | |||
292 | __u64 rip, rflags; | 310 | __u64 rip, rflags; |
293 | }; | 311 | }; |
294 | 312 | ||
313 | |||
295 | 4.12 KVM_SET_REGS | 314 | 4.12 KVM_SET_REGS |
296 | 315 | ||
297 | Capability: basic | 316 | Capability: basic |
@@ -304,6 +323,7 @@ Writes the general purpose registers into the vcpu. | |||
304 | 323 | ||
305 | See KVM_GET_REGS for the data structure. | 324 | See KVM_GET_REGS for the data structure. |
306 | 325 | ||
326 | |||
307 | 4.13 KVM_GET_SREGS | 327 | 4.13 KVM_GET_SREGS |
308 | 328 | ||
309 | Capability: basic | 329 | Capability: basic |
@@ -331,6 +351,7 @@ interrupt_bitmap is a bitmap of pending external interrupts. At most | |||
331 | one bit may be set. This interrupt has been acknowledged by the APIC | 351 | one bit may be set. This interrupt has been acknowledged by the APIC |
332 | but not yet injected into the cpu core. | 352 | but not yet injected into the cpu core. |
333 | 353 | ||
354 | |||
334 | 4.14 KVM_SET_SREGS | 355 | 4.14 KVM_SET_SREGS |
335 | 356 | ||
336 | Capability: basic | 357 | Capability: basic |
@@ -342,6 +363,7 @@ Returns: 0 on success, -1 on error | |||
342 | Writes special registers into the vcpu. See KVM_GET_SREGS for the | 363 | Writes special registers into the vcpu. See KVM_GET_SREGS for the |
343 | data structures. | 364 | data structures. |
344 | 365 | ||
366 | |||
345 | 4.15 KVM_TRANSLATE | 367 | 4.15 KVM_TRANSLATE |
346 | 368 | ||
347 | Capability: basic | 369 | Capability: basic |
@@ -365,6 +387,7 @@ struct kvm_translation { | |||
365 | __u8 pad[5]; | 387 | __u8 pad[5]; |
366 | }; | 388 | }; |
367 | 389 | ||
390 | |||
368 | 4.16 KVM_INTERRUPT | 391 | 4.16 KVM_INTERRUPT |
369 | 392 | ||
370 | Capability: basic | 393 | Capability: basic |
@@ -413,6 +436,7 @@ c) KVM_INTERRUPT_SET_LEVEL | |||
413 | Note that any value for 'irq' other than the ones stated above is invalid | 436 | Note that any value for 'irq' other than the ones stated above is invalid |
414 | and incurs unexpected behavior. | 437 | and incurs unexpected behavior. |
415 | 438 | ||
439 | |||
416 | 4.17 KVM_DEBUG_GUEST | 440 | 4.17 KVM_DEBUG_GUEST |
417 | 441 | ||
418 | Capability: basic | 442 | Capability: basic |
@@ -423,6 +447,7 @@ Returns: -1 on error | |||
423 | 447 | ||
424 | Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead. | 448 | Support for this has been removed. Use KVM_SET_GUEST_DEBUG instead. |
425 | 449 | ||
450 | |||
426 | 4.18 KVM_GET_MSRS | 451 | 4.18 KVM_GET_MSRS |
427 | 452 | ||
428 | Capability: basic | 453 | Capability: basic |
@@ -451,6 +476,7 @@ Application code should set the 'nmsrs' member (which indicates the | |||
451 | size of the entries array) and the 'index' member of each array entry. | 476 | size of the entries array) and the 'index' member of each array entry. |
452 | kvm will fill in the 'data' member. | 477 | kvm will fill in the 'data' member. |
453 | 478 | ||
479 | |||
454 | 4.19 KVM_SET_MSRS | 480 | 4.19 KVM_SET_MSRS |
455 | 481 | ||
456 | Capability: basic | 482 | Capability: basic |
@@ -466,6 +492,7 @@ Application code should set the 'nmsrs' member (which indicates the | |||
466 | size of the entries array), and the 'index' and 'data' members of each | 492 | size of the entries array), and the 'index' and 'data' members of each |
467 | array entry. | 493 | array entry. |
468 | 494 | ||
495 | |||
469 | 4.20 KVM_SET_CPUID | 496 | 4.20 KVM_SET_CPUID |
470 | 497 | ||
471 | Capability: basic | 498 | Capability: basic |
@@ -494,6 +521,7 @@ struct kvm_cpuid { | |||
494 | struct kvm_cpuid_entry entries[0]; | 521 | struct kvm_cpuid_entry entries[0]; |
495 | }; | 522 | }; |
496 | 523 | ||
524 | |||
497 | 4.21 KVM_SET_SIGNAL_MASK | 525 | 4.21 KVM_SET_SIGNAL_MASK |
498 | 526 | ||
499 | Capability: basic | 527 | Capability: basic |
@@ -516,6 +544,7 @@ struct kvm_signal_mask { | |||
516 | __u8 sigset[0]; | 544 | __u8 sigset[0]; |
517 | }; | 545 | }; |
518 | 546 | ||
547 | |||
519 | 4.22 KVM_GET_FPU | 548 | 4.22 KVM_GET_FPU |
520 | 549 | ||
521 | Capability: basic | 550 | Capability: basic |
@@ -541,6 +570,7 @@ struct kvm_fpu { | |||
541 | __u32 pad2; | 570 | __u32 pad2; |
542 | }; | 571 | }; |
543 | 572 | ||
573 | |||
544 | 4.23 KVM_SET_FPU | 574 | 4.23 KVM_SET_FPU |
545 | 575 | ||
546 | Capability: basic | 576 | Capability: basic |
@@ -566,6 +596,7 @@ struct kvm_fpu { | |||
566 | __u32 pad2; | 596 | __u32 pad2; |
567 | }; | 597 | }; |
568 | 598 | ||
599 | |||
569 | 4.24 KVM_CREATE_IRQCHIP | 600 | 4.24 KVM_CREATE_IRQCHIP |
570 | 601 | ||
571 | Capability: KVM_CAP_IRQCHIP | 602 | Capability: KVM_CAP_IRQCHIP |
@@ -579,6 +610,7 @@ ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | |||
579 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 610 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
580 | only go to the IOAPIC. On ia64, a IOSAPIC is created. | 611 | only go to the IOAPIC. On ia64, a IOSAPIC is created. |
581 | 612 | ||
613 | |||
582 | 4.25 KVM_IRQ_LINE | 614 | 4.25 KVM_IRQ_LINE |
583 | 615 | ||
584 | Capability: KVM_CAP_IRQCHIP | 616 | Capability: KVM_CAP_IRQCHIP |
@@ -600,6 +632,7 @@ struct kvm_irq_level { | |||
600 | __u32 level; /* 0 or 1 */ | 632 | __u32 level; /* 0 or 1 */ |
601 | }; | 633 | }; |
602 | 634 | ||
635 | |||
603 | 4.26 KVM_GET_IRQCHIP | 636 | 4.26 KVM_GET_IRQCHIP |
604 | 637 | ||
605 | Capability: KVM_CAP_IRQCHIP | 638 | Capability: KVM_CAP_IRQCHIP |
@@ -621,6 +654,7 @@ struct kvm_irqchip { | |||
621 | } chip; | 654 | } chip; |
622 | }; | 655 | }; |
623 | 656 | ||
657 | |||
624 | 4.27 KVM_SET_IRQCHIP | 658 | 4.27 KVM_SET_IRQCHIP |
625 | 659 | ||
626 | Capability: KVM_CAP_IRQCHIP | 660 | Capability: KVM_CAP_IRQCHIP |
@@ -642,6 +676,7 @@ struct kvm_irqchip { | |||
642 | } chip; | 676 | } chip; |
643 | }; | 677 | }; |
644 | 678 | ||
679 | |||
645 | 4.28 KVM_XEN_HVM_CONFIG | 680 | 4.28 KVM_XEN_HVM_CONFIG |
646 | 681 | ||
647 | Capability: KVM_CAP_XEN_HVM | 682 | Capability: KVM_CAP_XEN_HVM |
@@ -666,6 +701,7 @@ struct kvm_xen_hvm_config { | |||
666 | __u8 pad2[30]; | 701 | __u8 pad2[30]; |
667 | }; | 702 | }; |
668 | 703 | ||
704 | |||
669 | 4.29 KVM_GET_CLOCK | 705 | 4.29 KVM_GET_CLOCK |
670 | 706 | ||
671 | Capability: KVM_CAP_ADJUST_CLOCK | 707 | Capability: KVM_CAP_ADJUST_CLOCK |
@@ -684,6 +720,7 @@ struct kvm_clock_data { | |||
684 | __u32 pad[9]; | 720 | __u32 pad[9]; |
685 | }; | 721 | }; |
686 | 722 | ||
723 | |||
687 | 4.30 KVM_SET_CLOCK | 724 | 4.30 KVM_SET_CLOCK |
688 | 725 | ||
689 | Capability: KVM_CAP_ADJUST_CLOCK | 726 | Capability: KVM_CAP_ADJUST_CLOCK |
@@ -702,6 +739,7 @@ struct kvm_clock_data { | |||
702 | __u32 pad[9]; | 739 | __u32 pad[9]; |
703 | }; | 740 | }; |
704 | 741 | ||
742 | |||
705 | 4.31 KVM_GET_VCPU_EVENTS | 743 | 4.31 KVM_GET_VCPU_EVENTS |
706 | 744 | ||
707 | Capability: KVM_CAP_VCPU_EVENTS | 745 | Capability: KVM_CAP_VCPU_EVENTS |
@@ -741,6 +779,7 @@ struct kvm_vcpu_events { | |||
741 | KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that | 779 | KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that |
742 | interrupt.shadow contains a valid state. Otherwise, this field is undefined. | 780 | interrupt.shadow contains a valid state. Otherwise, this field is undefined. |
743 | 781 | ||
782 | |||
744 | 4.32 KVM_SET_VCPU_EVENTS | 783 | 4.32 KVM_SET_VCPU_EVENTS |
745 | 784 | ||
746 | Capability: KVM_CAP_VCPU_EVENTS | 785 | Capability: KVM_CAP_VCPU_EVENTS |
@@ -767,6 +806,7 @@ If KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in | |||
767 | the flags field to signal that interrupt.shadow contains a valid state and | 806 | the flags field to signal that interrupt.shadow contains a valid state and |
768 | shall be written into the VCPU. | 807 | shall be written into the VCPU. |
769 | 808 | ||
809 | |||
770 | 4.33 KVM_GET_DEBUGREGS | 810 | 4.33 KVM_GET_DEBUGREGS |
771 | 811 | ||
772 | Capability: KVM_CAP_DEBUGREGS | 812 | Capability: KVM_CAP_DEBUGREGS |
@@ -785,6 +825,7 @@ struct kvm_debugregs { | |||
785 | __u64 reserved[9]; | 825 | __u64 reserved[9]; |
786 | }; | 826 | }; |
787 | 827 | ||
828 | |||
788 | 4.34 KVM_SET_DEBUGREGS | 829 | 4.34 KVM_SET_DEBUGREGS |
789 | 830 | ||
790 | Capability: KVM_CAP_DEBUGREGS | 831 | Capability: KVM_CAP_DEBUGREGS |
@@ -798,6 +839,7 @@ Writes debug registers into the vcpu. | |||
798 | See KVM_GET_DEBUGREGS for the data structure. The flags field is unused | 839 | See KVM_GET_DEBUGREGS for the data structure. The flags field is unused |
799 | yet and must be cleared on entry. | 840 | yet and must be cleared on entry. |
800 | 841 | ||
842 | |||
801 | 4.35 KVM_SET_USER_MEMORY_REGION | 843 | 4.35 KVM_SET_USER_MEMORY_REGION |
802 | 844 | ||
803 | Capability: KVM_CAP_USER_MEM | 845 | Capability: KVM_CAP_USER_MEM |
@@ -844,6 +886,7 @@ It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. | |||
844 | The KVM_SET_MEMORY_REGION does not allow fine grained control over memory | 886 | The KVM_SET_MEMORY_REGION does not allow fine grained control over memory |
845 | allocation and is deprecated. | 887 | allocation and is deprecated. |
846 | 888 | ||
889 | |||
847 | 4.36 KVM_SET_TSS_ADDR | 890 | 4.36 KVM_SET_TSS_ADDR |
848 | 891 | ||
849 | Capability: KVM_CAP_SET_TSS_ADDR | 892 | Capability: KVM_CAP_SET_TSS_ADDR |
@@ -862,6 +905,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware | |||
862 | because of a quirk in the virtualization implementation (see the internals | 905 | because of a quirk in the virtualization implementation (see the internals |
863 | documentation when it pops into existence). | 906 | documentation when it pops into existence). |
864 | 907 | ||
908 | |||
865 | 4.37 KVM_ENABLE_CAP | 909 | 4.37 KVM_ENABLE_CAP |
866 | 910 | ||
867 | Capability: KVM_CAP_ENABLE_CAP | 911 | Capability: KVM_CAP_ENABLE_CAP |
@@ -897,6 +941,7 @@ function properly, this is the place to put them. | |||
897 | __u8 pad[64]; | 941 | __u8 pad[64]; |
898 | }; | 942 | }; |
899 | 943 | ||
944 | |||
900 | 4.38 KVM_GET_MP_STATE | 945 | 4.38 KVM_GET_MP_STATE |
901 | 946 | ||
902 | Capability: KVM_CAP_MP_STATE | 947 | Capability: KVM_CAP_MP_STATE |
@@ -927,6 +972,7 @@ Possible values are: | |||
927 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel | 972 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel |
928 | irqchip, the multiprocessing state must be maintained by userspace. | 973 | irqchip, the multiprocessing state must be maintained by userspace. |
929 | 974 | ||
975 | |||
930 | 4.39 KVM_SET_MP_STATE | 976 | 4.39 KVM_SET_MP_STATE |
931 | 977 | ||
932 | Capability: KVM_CAP_MP_STATE | 978 | Capability: KVM_CAP_MP_STATE |
@@ -941,6 +987,7 @@ arguments. | |||
941 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel | 987 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel |
942 | irqchip, the multiprocessing state must be maintained by userspace. | 988 | irqchip, the multiprocessing state must be maintained by userspace. |
943 | 989 | ||
990 | |||
944 | 4.40 KVM_SET_IDENTITY_MAP_ADDR | 991 | 4.40 KVM_SET_IDENTITY_MAP_ADDR |
945 | 992 | ||
946 | Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR | 993 | Capability: KVM_CAP_SET_IDENTITY_MAP_ADDR |
@@ -959,6 +1006,7 @@ This ioctl is required on Intel-based hosts. This is needed on Intel hardware | |||
959 | because of a quirk in the virtualization implementation (see the internals | 1006 | because of a quirk in the virtualization implementation (see the internals |
960 | documentation when it pops into existence). | 1007 | documentation when it pops into existence). |
961 | 1008 | ||
1009 | |||
962 | 4.41 KVM_SET_BOOT_CPU_ID | 1010 | 4.41 KVM_SET_BOOT_CPU_ID |
963 | 1011 | ||
964 | Capability: KVM_CAP_SET_BOOT_CPU_ID | 1012 | Capability: KVM_CAP_SET_BOOT_CPU_ID |
@@ -971,6 +1019,7 @@ Define which vcpu is the Bootstrap Processor (BSP). Values are the same | |||
971 | as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default | 1019 | as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default |
972 | is vcpu 0. | 1020 | is vcpu 0. |
973 | 1021 | ||
1022 | |||
974 | 4.42 KVM_GET_XSAVE | 1023 | 4.42 KVM_GET_XSAVE |
975 | 1024 | ||
976 | Capability: KVM_CAP_XSAVE | 1025 | Capability: KVM_CAP_XSAVE |
@@ -985,6 +1034,7 @@ struct kvm_xsave { | |||
985 | 1034 | ||
986 | This ioctl would copy current vcpu's xsave struct to the userspace. | 1035 | This ioctl would copy current vcpu's xsave struct to the userspace. |
987 | 1036 | ||
1037 | |||
988 | 4.43 KVM_SET_XSAVE | 1038 | 4.43 KVM_SET_XSAVE |
989 | 1039 | ||
990 | Capability: KVM_CAP_XSAVE | 1040 | Capability: KVM_CAP_XSAVE |
@@ -999,6 +1049,7 @@ struct kvm_xsave { | |||
999 | 1049 | ||
1000 | This ioctl would copy userspace's xsave struct to the kernel. | 1050 | This ioctl would copy userspace's xsave struct to the kernel. |
1001 | 1051 | ||
1052 | |||
1002 | 4.44 KVM_GET_XCRS | 1053 | 4.44 KVM_GET_XCRS |
1003 | 1054 | ||
1004 | Capability: KVM_CAP_XCRS | 1055 | Capability: KVM_CAP_XCRS |
@@ -1022,6 +1073,7 @@ struct kvm_xcrs { | |||
1022 | 1073 | ||
1023 | This ioctl would copy current vcpu's xcrs to the userspace. | 1074 | This ioctl would copy current vcpu's xcrs to the userspace. |
1024 | 1075 | ||
1076 | |||
1025 | 4.45 KVM_SET_XCRS | 1077 | 4.45 KVM_SET_XCRS |
1026 | 1078 | ||
1027 | Capability: KVM_CAP_XCRS | 1079 | Capability: KVM_CAP_XCRS |
@@ -1045,6 +1097,7 @@ struct kvm_xcrs { | |||
1045 | 1097 | ||
1046 | This ioctl would set vcpu's xcr to the value userspace specified. | 1098 | This ioctl would set vcpu's xcr to the value userspace specified. |
1047 | 1099 | ||
1100 | |||
1048 | 4.46 KVM_GET_SUPPORTED_CPUID | 1101 | 4.46 KVM_GET_SUPPORTED_CPUID |
1049 | 1102 | ||
1050 | Capability: KVM_CAP_EXT_CPUID | 1103 | Capability: KVM_CAP_EXT_CPUID |
@@ -1119,6 +1172,7 @@ support. Instead it is reported via | |||
1119 | if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the | 1172 | if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the |
1120 | feature in userspace, then you can enable the feature for KVM_SET_CPUID2. | 1173 | feature in userspace, then you can enable the feature for KVM_SET_CPUID2. |
1121 | 1174 | ||
1175 | |||
1122 | 4.47 KVM_PPC_GET_PVINFO | 1176 | 4.47 KVM_PPC_GET_PVINFO |
1123 | 1177 | ||
1124 | Capability: KVM_CAP_PPC_GET_PVINFO | 1178 | Capability: KVM_CAP_PPC_GET_PVINFO |
@@ -1142,6 +1196,7 @@ of 4 instructions that make up a hypercall. | |||
1142 | If any additional field gets added to this structure later on, a bit for that | 1196 | If any additional field gets added to this structure later on, a bit for that |
1143 | additional piece of information will be set in the flags bitmap. | 1197 | additional piece of information will be set in the flags bitmap. |
1144 | 1198 | ||
1199 | |||
1145 | 4.48 KVM_ASSIGN_PCI_DEVICE | 1200 | 4.48 KVM_ASSIGN_PCI_DEVICE |
1146 | 1201 | ||
1147 | Capability: KVM_CAP_DEVICE_ASSIGNMENT | 1202 | Capability: KVM_CAP_DEVICE_ASSIGNMENT |
@@ -1185,6 +1240,7 @@ Only PCI header type 0 devices with PCI BAR resources are supported by | |||
1185 | device assignment. The user requesting this ioctl must have read/write | 1240 | device assignment. The user requesting this ioctl must have read/write |
1186 | access to the PCI sysfs resource files associated with the device. | 1241 | access to the PCI sysfs resource files associated with the device. |
1187 | 1242 | ||
1243 | |||
1188 | 4.49 KVM_DEASSIGN_PCI_DEVICE | 1244 | 4.49 KVM_DEASSIGN_PCI_DEVICE |
1189 | 1245 | ||
1190 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT | 1246 | Capability: KVM_CAP_DEVICE_DEASSIGNMENT |
@@ -1198,6 +1254,7 @@ Ends PCI device assignment, releasing all associated resources. | |||
1198 | See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is | 1254 | See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is |
1199 | used in kvm_assigned_pci_dev to identify the device. | 1255 | used in kvm_assigned_pci_dev to identify the device. |
1200 | 1256 | ||
1257 | |||
1201 | 4.50 KVM_ASSIGN_DEV_IRQ | 1258 | 4.50 KVM_ASSIGN_DEV_IRQ |
1202 | 1259 | ||
1203 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | 1260 | Capability: KVM_CAP_ASSIGN_DEV_IRQ |
@@ -1231,6 +1288,7 @@ The following flags are defined: | |||
1231 | It is not valid to specify multiple types per host or guest IRQ. However, the | 1288 | It is not valid to specify multiple types per host or guest IRQ. However, the |
1232 | IRQ type of host and guest can differ or can even be null. | 1289 | IRQ type of host and guest can differ or can even be null. |
1233 | 1290 | ||
1291 | |||
1234 | 4.51 KVM_DEASSIGN_DEV_IRQ | 1292 | 4.51 KVM_DEASSIGN_DEV_IRQ |
1235 | 1293 | ||
1236 | Capability: KVM_CAP_ASSIGN_DEV_IRQ | 1294 | Capability: KVM_CAP_ASSIGN_DEV_IRQ |
@@ -1245,6 +1303,7 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified | |||
1245 | by assigned_dev_id, flags must correspond to the IRQ type specified on | 1303 | by assigned_dev_id, flags must correspond to the IRQ type specified on |
1246 | KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. | 1304 | KVM_ASSIGN_DEV_IRQ. Partial deassignment of host or guest IRQ is allowed. |
1247 | 1305 | ||
1306 | |||
1248 | 4.52 KVM_SET_GSI_ROUTING | 1307 | 4.52 KVM_SET_GSI_ROUTING |
1249 | 1308 | ||
1250 | Capability: KVM_CAP_IRQ_ROUTING | 1309 | Capability: KVM_CAP_IRQ_ROUTING |
@@ -1293,6 +1352,7 @@ struct kvm_irq_routing_msi { | |||
1293 | __u32 pad; | 1352 | __u32 pad; |
1294 | }; | 1353 | }; |
1295 | 1354 | ||
1355 | |||
1296 | 4.53 KVM_ASSIGN_SET_MSIX_NR | 1356 | 4.53 KVM_ASSIGN_SET_MSIX_NR |
1297 | 1357 | ||
1298 | Capability: KVM_CAP_DEVICE_MSIX | 1358 | Capability: KVM_CAP_DEVICE_MSIX |
@@ -1314,6 +1374,7 @@ struct kvm_assigned_msix_nr { | |||
1314 | 1374 | ||
1315 | #define KVM_MAX_MSIX_PER_DEV 256 | 1375 | #define KVM_MAX_MSIX_PER_DEV 256 |
1316 | 1376 | ||
1377 | |||
1317 | 4.54 KVM_ASSIGN_SET_MSIX_ENTRY | 1378 | 4.54 KVM_ASSIGN_SET_MSIX_ENTRY |
1318 | 1379 | ||
1319 | Capability: KVM_CAP_DEVICE_MSIX | 1380 | Capability: KVM_CAP_DEVICE_MSIX |
@@ -1332,7 +1393,8 @@ struct kvm_assigned_msix_entry { | |||
1332 | __u16 padding[3]; | 1393 | __u16 padding[3]; |
1333 | }; | 1394 | }; |
1334 | 1395 | ||
1335 | 4.54 KVM_SET_TSC_KHZ | 1396 | |
1397 | 4.55 KVM_SET_TSC_KHZ | ||
1336 | 1398 | ||
1337 | Capability: KVM_CAP_TSC_CONTROL | 1399 | Capability: KVM_CAP_TSC_CONTROL |
1338 | Architectures: x86 | 1400 | Architectures: x86 |
@@ -1343,7 +1405,8 @@ Returns: 0 on success, -1 on error | |||
1343 | Specifies the tsc frequency for the virtual machine. The unit of the | 1405 | Specifies the tsc frequency for the virtual machine. The unit of the |
1344 | frequency is KHz. | 1406 | frequency is KHz. |
1345 | 1407 | ||
1346 | 4.55 KVM_GET_TSC_KHZ | 1408 | |
1409 | 4.56 KVM_GET_TSC_KHZ | ||
1347 | 1410 | ||
1348 | Capability: KVM_CAP_GET_TSC_KHZ | 1411 | Capability: KVM_CAP_GET_TSC_KHZ |
1349 | Architectures: x86 | 1412 | Architectures: x86 |
@@ -1355,7 +1418,8 @@ Returns the tsc frequency of the guest. The unit of the return value is | |||
1355 | KHz. If the host has unstable tsc this ioctl returns -EIO instead as an | 1418 | KHz. If the host has unstable tsc this ioctl returns -EIO instead as an |
1356 | error. | 1419 | error. |
1357 | 1420 | ||
1358 | 4.56 KVM_GET_LAPIC | 1421 | |
1422 | 4.57 KVM_GET_LAPIC | ||
1359 | 1423 | ||
1360 | Capability: KVM_CAP_IRQCHIP | 1424 | Capability: KVM_CAP_IRQCHIP |
1361 | Architectures: x86 | 1425 | Architectures: x86 |
@@ -1371,7 +1435,8 @@ struct kvm_lapic_state { | |||
1371 | Reads the Local APIC registers and copies them into the input argument. The | 1435 | Reads the Local APIC registers and copies them into the input argument. The |
1372 | data format and layout are the same as documented in the architecture manual. | 1436 | data format and layout are the same as documented in the architecture manual. |
1373 | 1437 | ||
1374 | 4.57 KVM_SET_LAPIC | 1438 | |
1439 | 4.58 KVM_SET_LAPIC | ||
1375 | 1440 | ||
1376 | Capability: KVM_CAP_IRQCHIP | 1441 | Capability: KVM_CAP_IRQCHIP |
1377 | Architectures: x86 | 1442 | Architectures: x86 |
@@ -1387,7 +1452,8 @@ struct kvm_lapic_state { | |||
1387 | Copies the input argument into the the Local APIC registers. The data format | 1452 | Copies the input argument into the the Local APIC registers. The data format |
1388 | and layout are the same as documented in the architecture manual. | 1453 | and layout are the same as documented in the architecture manual. |
1389 | 1454 | ||
1390 | 4.58 KVM_IOEVENTFD | 1455 | |
1456 | 4.59 KVM_IOEVENTFD | ||
1391 | 1457 | ||
1392 | Capability: KVM_CAP_IOEVENTFD | 1458 | Capability: KVM_CAP_IOEVENTFD |
1393 | Architectures: all | 1459 | Architectures: all |
@@ -1417,7 +1483,8 @@ The following flags are defined: | |||
1417 | If datamatch flag is set, the event will be signaled only if the written value | 1483 | If datamatch flag is set, the event will be signaled only if the written value |
1418 | to the registered address is equal to datamatch in struct kvm_ioeventfd. | 1484 | to the registered address is equal to datamatch in struct kvm_ioeventfd. |
1419 | 1485 | ||
1420 | 4.59 KVM_DIRTY_TLB | 1486 | |
1487 | 4.60 KVM_DIRTY_TLB | ||
1421 | 1488 | ||
1422 | Capability: KVM_CAP_SW_TLB | 1489 | Capability: KVM_CAP_SW_TLB |
1423 | Architectures: ppc | 1490 | Architectures: ppc |
@@ -1449,7 +1516,8 @@ The "num_dirty" field is a performance hint for KVM to determine whether it | |||
1449 | should skip processing the bitmap and just invalidate everything. It must | 1516 | should skip processing the bitmap and just invalidate everything. It must |
1450 | be set to the number of set bits in the bitmap. | 1517 | be set to the number of set bits in the bitmap. |
1451 | 1518 | ||
1452 | 4.60 KVM_ASSIGN_SET_INTX_MASK | 1519 | |
1520 | 4.61 KVM_ASSIGN_SET_INTX_MASK | ||
1453 | 1521 | ||
1454 | Capability: KVM_CAP_PCI_2_3 | 1522 | Capability: KVM_CAP_PCI_2_3 |
1455 | Architectures: x86 | 1523 | Architectures: x86 |
@@ -1482,6 +1550,7 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified | |||
1482 | by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is | 1550 | by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is |
1483 | evaluated. | 1551 | evaluated. |
1484 | 1552 | ||
1553 | |||
1485 | 4.62 KVM_CREATE_SPAPR_TCE | 1554 | 4.62 KVM_CREATE_SPAPR_TCE |
1486 | 1555 | ||
1487 | Capability: KVM_CAP_SPAPR_TCE | 1556 | Capability: KVM_CAP_SPAPR_TCE |
@@ -1517,6 +1586,7 @@ the entries written by kernel-handled H_PUT_TCE calls, and also lets | |||
1517 | userspace update the TCE table directly which is useful in some | 1586 | userspace update the TCE table directly which is useful in some |
1518 | circumstances. | 1587 | circumstances. |
1519 | 1588 | ||
1589 | |||
1520 | 4.63 KVM_ALLOCATE_RMA | 1590 | 4.63 KVM_ALLOCATE_RMA |
1521 | 1591 | ||
1522 | Capability: KVM_CAP_PPC_RMA | 1592 | Capability: KVM_CAP_PPC_RMA |
@@ -1549,6 +1619,7 @@ is supported; 2 if the processor requires all virtual machines to have | |||
1549 | an RMA, or 1 if the processor can use an RMA but doesn't require it, | 1619 | an RMA, or 1 if the processor can use an RMA but doesn't require it, |
1550 | because it supports the Virtual RMA (VRMA) facility. | 1620 | because it supports the Virtual RMA (VRMA) facility. |
1551 | 1621 | ||
1622 | |||
1552 | 4.64 KVM_NMI | 1623 | 4.64 KVM_NMI |
1553 | 1624 | ||
1554 | Capability: KVM_CAP_USER_NMI | 1625 | Capability: KVM_CAP_USER_NMI |
@@ -1574,6 +1645,7 @@ following algorithm: | |||
1574 | Some guests configure the LINT1 NMI input to cause a panic, aiding in | 1645 | Some guests configure the LINT1 NMI input to cause a panic, aiding in |
1575 | debugging. | 1646 | debugging. |
1576 | 1647 | ||
1648 | |||
1577 | 4.65 KVM_S390_UCAS_MAP | 1649 | 4.65 KVM_S390_UCAS_MAP |
1578 | 1650 | ||
1579 | Capability: KVM_CAP_S390_UCONTROL | 1651 | Capability: KVM_CAP_S390_UCONTROL |
@@ -1593,6 +1665,7 @@ This ioctl maps the memory at "user_addr" with the length "length" to | |||
1593 | the vcpu's address space starting at "vcpu_addr". All parameters need to | 1665 | the vcpu's address space starting at "vcpu_addr". All parameters need to |
1594 | be alligned by 1 megabyte. | 1666 | be alligned by 1 megabyte. |
1595 | 1667 | ||
1668 | |||
1596 | 4.66 KVM_S390_UCAS_UNMAP | 1669 | 4.66 KVM_S390_UCAS_UNMAP |
1597 | 1670 | ||
1598 | Capability: KVM_CAP_S390_UCONTROL | 1671 | Capability: KVM_CAP_S390_UCONTROL |
@@ -1612,6 +1685,7 @@ This ioctl unmaps the memory in the vcpu's address space starting at | |||
1612 | "vcpu_addr" with the length "length". The field "user_addr" is ignored. | 1685 | "vcpu_addr" with the length "length". The field "user_addr" is ignored. |
1613 | All parameters need to be alligned by 1 megabyte. | 1686 | All parameters need to be alligned by 1 megabyte. |
1614 | 1687 | ||
1688 | |||
1615 | 4.67 KVM_S390_VCPU_FAULT | 1689 | 4.67 KVM_S390_VCPU_FAULT |
1616 | 1690 | ||
1617 | Capability: KVM_CAP_S390_UCONTROL | 1691 | Capability: KVM_CAP_S390_UCONTROL |
@@ -1628,6 +1702,7 @@ table upfront. This is useful to handle validity intercepts for user | |||
1628 | controlled virtual machines to fault in the virtual cpu's lowcore pages | 1702 | controlled virtual machines to fault in the virtual cpu's lowcore pages |
1629 | prior to calling the KVM_RUN ioctl. | 1703 | prior to calling the KVM_RUN ioctl. |
1630 | 1704 | ||
1705 | |||
1631 | 4.68 KVM_SET_ONE_REG | 1706 | 4.68 KVM_SET_ONE_REG |
1632 | 1707 | ||
1633 | Capability: KVM_CAP_ONE_REG | 1708 | Capability: KVM_CAP_ONE_REG |
@@ -1653,6 +1728,7 @@ registers, find a list below: | |||
1653 | | | | 1728 | | | |
1654 | PPC | KVM_REG_PPC_HIOR | 64 | 1729 | PPC | KVM_REG_PPC_HIOR | 64 |
1655 | 1730 | ||
1731 | |||
1656 | 4.69 KVM_GET_ONE_REG | 1732 | 4.69 KVM_GET_ONE_REG |
1657 | 1733 | ||
1658 | Capability: KVM_CAP_ONE_REG | 1734 | Capability: KVM_CAP_ONE_REG |
@@ -1669,7 +1745,193 @@ at the memory location pointed to by "addr". | |||
1669 | The list of registers accessible using this interface is identical to the | 1745 | The list of registers accessible using this interface is identical to the |
1670 | list in 4.64. | 1746 | list in 4.64. |
1671 | 1747 | ||
1748 | |||
1749 | 4.70 KVM_KVMCLOCK_CTRL | ||
1750 | |||
1751 | Capability: KVM_CAP_KVMCLOCK_CTRL | ||
1752 | Architectures: Any that implement pvclocks (currently x86 only) | ||
1753 | Type: vcpu ioctl | ||
1754 | Parameters: None | ||
1755 | Returns: 0 on success, -1 on error | ||
1756 | |||
1757 | This signals to the host kernel that the specified guest is being paused by | ||
1758 | userspace. The host will set a flag in the pvclock structure that is checked | ||
1759 | from the soft lockup watchdog. The flag is part of the pvclock structure that | ||
1760 | is shared between guest and host, specifically the second bit of the flags | ||
1761 | field of the pvclock_vcpu_time_info structure. It will be set exclusively by | ||
1762 | the host and read/cleared exclusively by the guest. The guest operation of | ||
1763 | checking and clearing the flag must an atomic operation so | ||
1764 | load-link/store-conditional, or equivalent must be used. There are two cases | ||
1765 | where the guest will clear the flag: when the soft lockup watchdog timer resets | ||
1766 | itself or when a soft lockup is detected. This ioctl can be called any time | ||
1767 | after pausing the vcpu, but before it is resumed. | ||
1768 | |||
1769 | |||
1770 | 4.71 KVM_SIGNAL_MSI | ||
1771 | |||
1772 | Capability: KVM_CAP_SIGNAL_MSI | ||
1773 | Architectures: x86 | ||
1774 | Type: vm ioctl | ||
1775 | Parameters: struct kvm_msi (in) | ||
1776 | Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error | ||
1777 | |||
1778 | Directly inject a MSI message. Only valid with in-kernel irqchip that handles | ||
1779 | MSI messages. | ||
1780 | |||
1781 | struct kvm_msi { | ||
1782 | __u32 address_lo; | ||
1783 | __u32 address_hi; | ||
1784 | __u32 data; | ||
1785 | __u32 flags; | ||
1786 | __u8 pad[16]; | ||
1787 | }; | ||
1788 | |||
1789 | No flags are defined so far. The corresponding field must be 0. | ||
1790 | |||
1791 | |||
1792 | 4.71 KVM_CREATE_PIT2 | ||
1793 | |||
1794 | Capability: KVM_CAP_PIT2 | ||
1795 | Architectures: x86 | ||
1796 | Type: vm ioctl | ||
1797 | Parameters: struct kvm_pit_config (in) | ||
1798 | Returns: 0 on success, -1 on error | ||
1799 | |||
1800 | Creates an in-kernel device model for the i8254 PIT. This call is only valid | ||
1801 | after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following | ||
1802 | parameters have to be passed: | ||
1803 | |||
1804 | struct kvm_pit_config { | ||
1805 | __u32 flags; | ||
1806 | __u32 pad[15]; | ||
1807 | }; | ||
1808 | |||
1809 | Valid flags are: | ||
1810 | |||
1811 | #define KVM_PIT_SPEAKER_DUMMY 1 /* emulate speaker port stub */ | ||
1812 | |||
1813 | PIT timer interrupts may use a per-VM kernel thread for injection. If it | ||
1814 | exists, this thread will have a name of the following pattern: | ||
1815 | |||
1816 | kvm-pit/<owner-process-pid> | ||
1817 | |||
1818 | When running a guest with elevated priorities, the scheduling parameters of | ||
1819 | this thread may have to be adjusted accordingly. | ||
1820 | |||
1821 | This IOCTL replaces the obsolete KVM_CREATE_PIT. | ||
1822 | |||
1823 | |||
1824 | 4.72 KVM_GET_PIT2 | ||
1825 | |||
1826 | Capability: KVM_CAP_PIT_STATE2 | ||
1827 | Architectures: x86 | ||
1828 | Type: vm ioctl | ||
1829 | Parameters: struct kvm_pit_state2 (out) | ||
1830 | Returns: 0 on success, -1 on error | ||
1831 | |||
1832 | Retrieves the state of the in-kernel PIT model. Only valid after | ||
1833 | KVM_CREATE_PIT2. The state is returned in the following structure: | ||
1834 | |||
1835 | struct kvm_pit_state2 { | ||
1836 | struct kvm_pit_channel_state channels[3]; | ||
1837 | __u32 flags; | ||
1838 | __u32 reserved[9]; | ||
1839 | }; | ||
1840 | |||
1841 | Valid flags are: | ||
1842 | |||
1843 | /* disable PIT in HPET legacy mode */ | ||
1844 | #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001 | ||
1845 | |||
1846 | This IOCTL replaces the obsolete KVM_GET_PIT. | ||
1847 | |||
1848 | |||
1849 | 4.73 KVM_SET_PIT2 | ||
1850 | |||
1851 | Capability: KVM_CAP_PIT_STATE2 | ||
1852 | Architectures: x86 | ||
1853 | Type: vm ioctl | ||
1854 | Parameters: struct kvm_pit_state2 (in) | ||
1855 | Returns: 0 on success, -1 on error | ||
1856 | |||
1857 | Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2. | ||
1858 | See KVM_GET_PIT2 for details on struct kvm_pit_state2. | ||
1859 | |||
1860 | This IOCTL replaces the obsolete KVM_SET_PIT. | ||
1861 | |||
1862 | |||
1863 | 4.74 KVM_PPC_GET_SMMU_INFO | ||
1864 | |||
1865 | Capability: KVM_CAP_PPC_GET_SMMU_INFO | ||
1866 | Architectures: powerpc | ||
1867 | Type: vm ioctl | ||
1868 | Parameters: None | ||
1869 | Returns: 0 on success, -1 on error | ||
1870 | |||
1871 | This populates and returns a structure describing the features of | ||
1872 | the "Server" class MMU emulation supported by KVM. | ||
1873 | This can in turn be used by userspace to generate the appropariate | ||
1874 | device-tree properties for the guest operating system. | ||
1875 | |||
1876 | The structure contains some global informations, followed by an | ||
1877 | array of supported segment page sizes: | ||
1878 | |||
1879 | struct kvm_ppc_smmu_info { | ||
1880 | __u64 flags; | ||
1881 | __u32 slb_size; | ||
1882 | __u32 pad; | ||
1883 | struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
1884 | }; | ||
1885 | |||
1886 | The supported flags are: | ||
1887 | |||
1888 | - KVM_PPC_PAGE_SIZES_REAL: | ||
1889 | When that flag is set, guest page sizes must "fit" the backing | ||
1890 | store page sizes. When not set, any page size in the list can | ||
1891 | be used regardless of how they are backed by userspace. | ||
1892 | |||
1893 | - KVM_PPC_1T_SEGMENTS | ||
1894 | The emulated MMU supports 1T segments in addition to the | ||
1895 | standard 256M ones. | ||
1896 | |||
1897 | The "slb_size" field indicates how many SLB entries are supported | ||
1898 | |||
1899 | The "sps" array contains 8 entries indicating the supported base | ||
1900 | page sizes for a segment in increasing order. Each entry is defined | ||
1901 | as follow: | ||
1902 | |||
1903 | struct kvm_ppc_one_seg_page_size { | ||
1904 | __u32 page_shift; /* Base page shift of segment (or 0) */ | ||
1905 | __u32 slb_enc; /* SLB encoding for BookS */ | ||
1906 | struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ]; | ||
1907 | }; | ||
1908 | |||
1909 | An entry with a "page_shift" of 0 is unused. Because the array is | ||
1910 | organized in increasing order, a lookup can stop when encoutering | ||
1911 | such an entry. | ||
1912 | |||
1913 | The "slb_enc" field provides the encoding to use in the SLB for the | ||
1914 | page size. The bits are in positions such as the value can directly | ||
1915 | be OR'ed into the "vsid" argument of the slbmte instruction. | ||
1916 | |||
1917 | The "enc" array is a list which for each of those segment base page | ||
1918 | size provides the list of supported actual page sizes (which can be | ||
1919 | only larger or equal to the base page size), along with the | ||
1920 | corresponding encoding in the hash PTE. Similarily, the array is | ||
1921 | 8 entries sorted by increasing sizes and an entry with a "0" shift | ||
1922 | is an empty entry and a terminator: | ||
1923 | |||
1924 | struct kvm_ppc_one_page_size { | ||
1925 | __u32 page_shift; /* Page shift (or 0) */ | ||
1926 | __u32 pte_enc; /* Encoding in the HPTE (>>12) */ | ||
1927 | }; | ||
1928 | |||
1929 | The "pte_enc" field provides a value that can OR'ed into the hash | ||
1930 | PTE's RPN field (ie, it needs to be shifted left by 12 to OR it | ||
1931 | into the hash PTE second double word). | ||
1932 | |||
1672 | 5. The kvm_run structure | 1933 | 5. The kvm_run structure |
1934 | ------------------------ | ||
1673 | 1935 | ||
1674 | Application code obtains a pointer to the kvm_run structure by | 1936 | Application code obtains a pointer to the kvm_run structure by |
1675 | mmap()ing a vcpu fd. From that point, application code can control | 1937 | mmap()ing a vcpu fd. From that point, application code can control |
@@ -1910,7 +2172,9 @@ and usually define the validity of a groups of registers. (e.g. one bit | |||
1910 | 2172 | ||
1911 | }; | 2173 | }; |
1912 | 2174 | ||
2175 | |||
1913 | 6. Capabilities that can be enabled | 2176 | 6. Capabilities that can be enabled |
2177 | ----------------------------------- | ||
1914 | 2178 | ||
1915 | There are certain capabilities that change the behavior of the virtual CPU when | 2179 | There are certain capabilities that change the behavior of the virtual CPU when |
1916 | enabled. To enable them, please see section 4.37. Below you can find a list of | 2180 | enabled. To enable them, please see section 4.37. Below you can find a list of |
@@ -1926,6 +2190,7 @@ The following information is provided along with the description: | |||
1926 | Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) | 2190 | Returns: the return value. General error numbers (EBADF, ENOMEM, EINVAL) |
1927 | are not detailed, but errors with specific meanings are. | 2191 | are not detailed, but errors with specific meanings are. |
1928 | 2192 | ||
2193 | |||
1929 | 6.1 KVM_CAP_PPC_OSI | 2194 | 6.1 KVM_CAP_PPC_OSI |
1930 | 2195 | ||
1931 | Architectures: ppc | 2196 | Architectures: ppc |
@@ -1939,6 +2204,7 @@ between the guest and the host. | |||
1939 | 2204 | ||
1940 | When this capability is enabled, KVM_EXIT_OSI can occur. | 2205 | When this capability is enabled, KVM_EXIT_OSI can occur. |
1941 | 2206 | ||
2207 | |||
1942 | 6.2 KVM_CAP_PPC_PAPR | 2208 | 6.2 KVM_CAP_PPC_PAPR |
1943 | 2209 | ||
1944 | Architectures: ppc | 2210 | Architectures: ppc |
@@ -1957,6 +2223,7 @@ HTAB invisible to the guest. | |||
1957 | 2223 | ||
1958 | When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. | 2224 | When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. |
1959 | 2225 | ||
2226 | |||
1960 | 6.3 KVM_CAP_SW_TLB | 2227 | 6.3 KVM_CAP_SW_TLB |
1961 | 2228 | ||
1962 | Architectures: ppc | 2229 | Architectures: ppc |
diff --git a/Documentation/virtual/kvm/cpuid.txt b/Documentation/virtual/kvm/cpuid.txt index 882068538c9c..83afe65d4966 100644 --- a/Documentation/virtual/kvm/cpuid.txt +++ b/Documentation/virtual/kvm/cpuid.txt | |||
@@ -10,11 +10,15 @@ a guest. | |||
10 | KVM cpuid functions are: | 10 | KVM cpuid functions are: |
11 | 11 | ||
12 | function: KVM_CPUID_SIGNATURE (0x40000000) | 12 | function: KVM_CPUID_SIGNATURE (0x40000000) |
13 | returns : eax = 0, | 13 | returns : eax = 0x40000001, |
14 | ebx = 0x4b4d564b, | 14 | ebx = 0x4b4d564b, |
15 | ecx = 0x564b4d56, | 15 | ecx = 0x564b4d56, |
16 | edx = 0x4d. | 16 | edx = 0x4d. |
17 | Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM". | 17 | Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM". |
18 | The value in eax corresponds to the maximum cpuid function present in this leaf, | ||
19 | and will be updated if more functions are added in the future. | ||
20 | Note also that old hosts set eax value to 0x0. This should | ||
21 | be interpreted as if the value was 0x40000001. | ||
18 | This function queries the presence of KVM cpuid leafs. | 22 | This function queries the presence of KVM cpuid leafs. |
19 | 23 | ||
20 | 24 | ||
diff --git a/Documentation/virtual/kvm/msr.txt b/Documentation/virtual/kvm/msr.txt index 50317809113d..96b41bd97523 100644 --- a/Documentation/virtual/kvm/msr.txt +++ b/Documentation/virtual/kvm/msr.txt | |||
@@ -109,6 +109,10 @@ MSR_KVM_SYSTEM_TIME_NEW: 0x4b564d01 | |||
109 | 0 | 24 | multiple cpus are guaranteed to | 109 | 0 | 24 | multiple cpus are guaranteed to |
110 | | | be monotonic | 110 | | | be monotonic |
111 | ------------------------------------------------------------- | 111 | ------------------------------------------------------------- |
112 | | | guest vcpu has been paused by | ||
113 | 1 | N/A | the host | ||
114 | | | See 4.70 in api.txt | ||
115 | ------------------------------------------------------------- | ||
112 | 116 | ||
113 | Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid | 117 | Availability of this MSR must be checked via bit 3 in 0x4000001 cpuid |
114 | leaf prior to usage. | 118 | leaf prior to usage. |
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 29bdf62aac09..f734bb2a78dc 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -166,6 +166,68 @@ behavior. So to make them effective you need to restart any | |||
166 | application that could have been using hugepages. This also applies to | 166 | application that could have been using hugepages. This also applies to |
167 | the regions registered in khugepaged. | 167 | the regions registered in khugepaged. |
168 | 168 | ||
169 | == Monitoring usage == | ||
170 | |||
171 | The number of transparent huge pages currently used by the system is | ||
172 | available by reading the AnonHugePages field in /proc/meminfo. To | ||
173 | identify what applications are using transparent huge pages, it is | ||
174 | necessary to read /proc/PID/smaps and count the AnonHugePages fields | ||
175 | for each mapping. Note that reading the smaps file is expensive and | ||
176 | reading it frequently will incur overhead. | ||
177 | |||
178 | There are a number of counters in /proc/vmstat that may be used to | ||
179 | monitor how successfully the system is providing huge pages for use. | ||
180 | |||
181 | thp_fault_alloc is incremented every time a huge page is successfully | ||
182 | allocated to handle a page fault. This applies to both the | ||
183 | first time a page is faulted and for COW faults. | ||
184 | |||
185 | thp_collapse_alloc is incremented by khugepaged when it has found | ||
186 | a range of pages to collapse into one huge page and has | ||
187 | successfully allocated a new huge page to store the data. | ||
188 | |||
189 | thp_fault_fallback is incremented if a page fault fails to allocate | ||
190 | a huge page and instead falls back to using small pages. | ||
191 | |||
192 | thp_collapse_alloc_failed is incremented if khugepaged found a range | ||
193 | of pages that should be collapsed into one huge page but failed | ||
194 | the allocation. | ||
195 | |||
196 | thp_split is incremented every time a huge page is split into base | ||
197 | pages. This can happen for a variety of reasons but a common | ||
198 | reason is that a huge page is old and is being reclaimed. | ||
199 | |||
200 | As the system ages, allocating huge pages may be expensive as the | ||
201 | system uses memory compaction to copy data around memory to free a | ||
202 | huge page for use. There are some counters in /proc/vmstat to help | ||
203 | monitor this overhead. | ||
204 | |||
205 | compact_stall is incremented every time a process stalls to run | ||
206 | memory compaction so that a huge page is free for use. | ||
207 | |||
208 | compact_success is incremented if the system compacted memory and | ||
209 | freed a huge page for use. | ||
210 | |||
211 | compact_fail is incremented if the system tries to compact memory | ||
212 | but failed. | ||
213 | |||
214 | compact_pages_moved is incremented each time a page is moved. If | ||
215 | this value is increasing rapidly, it implies that the system | ||
216 | is copying a lot of data to satisfy the huge page allocation. | ||
217 | It is possible that the cost of copying exceeds any savings | ||
218 | from reduced TLB misses. | ||
219 | |||
220 | compact_pagemigrate_failed is incremented when the underlying mechanism | ||
221 | for moving a page failed. | ||
222 | |||
223 | compact_blocks_moved is incremented each time memory compaction examines | ||
224 | a huge page aligned range of pages. | ||
225 | |||
226 | It is possible to establish how long the stalls were using the function | ||
227 | tracer to record how long was spent in __alloc_pages_nodemask and | ||
228 | using the mm_page_alloc tracepoint to identify which allocations were | ||
229 | for huge pages. | ||
230 | |||
169 | == get_user_pages and follow_page == | 231 | == get_user_pages and follow_page == |
170 | 232 | ||
171 | get_user_pages and follow_page if run on a hugepage, will return the | 233 | get_user_pages and follow_page if run on a hugepage, will return the |