diff options
Diffstat (limited to 'Documentation')
44 files changed, 1180 insertions, 55 deletions
diff --git a/Documentation/ABI/testing/sysfs-ibft b/Documentation/ABI/testing/sysfs-ibft index c2b7d1154bec..cac3930bdb04 100644 --- a/Documentation/ABI/testing/sysfs-ibft +++ b/Documentation/ABI/testing/sysfs-ibft | |||
@@ -20,4 +20,4 @@ Date: November 2007 | |||
20 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | 20 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> |
21 | Description: The /sys/firmware/ibft/ethernetX directory will contain | 21 | Description: The /sys/firmware/ibft/ethernetX directory will contain |
22 | files that expose the iSCSI Boot Firmware Table NIC data. | 22 | files that expose the iSCSI Boot Firmware Table NIC data. |
23 | This can this can the IP address, MAC, and gateway of the NIC. | 23 | Usually this contains the IP address, MAC, and gateway of the NIC. |
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index df2962d9e11e..8bf7c6191296 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile | |||
@@ -25,7 +25,7 @@ GENFILES := $(addprefix $(MEDIA_OBJ_DIR)/, $(MEDIA_TEMP)) | |||
25 | PHONY += cleanmediadocs | 25 | PHONY += cleanmediadocs |
26 | 26 | ||
27 | cleanmediadocs: | 27 | cleanmediadocs: |
28 | -@rm `find $(MEDIA_OBJ_DIR) -type l` $(GENFILES) $(OBJIMGFILES) 2>/dev/null | 28 | -@rm -f `find $(MEDIA_OBJ_DIR) -type l` $(GENFILES) $(OBJIMGFILES) 2>/dev/null |
29 | 29 | ||
30 | $(obj)/media_api.xml: $(GENFILES) FORCE | 30 | $(obj)/media_api.xml: $(GENFILES) FORCE |
31 | 31 | ||
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 07ffc76553ba..0a2debfa68f6 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2566,6 +2566,10 @@ fields changed from _s32 to _u32. | |||
2566 | <para>Added compound control types and &VIDIOC-QUERY-EXT-CTRL;. | 2566 | <para>Added compound control types and &VIDIOC-QUERY-EXT-CTRL;. |
2567 | </para> | 2567 | </para> |
2568 | </listitem> | 2568 | </listitem> |
2569 | </orderedlist> | ||
2570 | </section> | ||
2571 | |||
2572 | <section> | ||
2569 | <title>V4L2 in Linux 3.18</title> | 2573 | <title>V4L2 in Linux 3.18</title> |
2570 | <orderedlist> | 2574 | <orderedlist> |
2571 | <listitem> | 2575 | <listitem> |
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 57cf5efb044d..93aa8604630e 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -324,7 +324,6 @@ tree, they need to be integration-tested. For this purpose, a special | |||
324 | testing repository exists into which virtually all subsystem trees are | 324 | testing repository exists into which virtually all subsystem trees are |
325 | pulled on an almost daily basis: | 325 | pulled on an almost daily basis: |
326 | http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git | 326 | http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git |
327 | http://linux.f-seidel.de/linux-next/pmwiki/ | ||
328 | 327 | ||
329 | This way, the -next kernel gives a summary outlook onto what will be | 328 | This way, the -next kernel gives a summary outlook onto what will be |
330 | expected to go into the mainline kernel at the next merge period. | 329 | expected to go into the mainline kernel at the next merge period. |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 482c74947de0..1fa1caa198eb 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -483,12 +483,10 @@ have been included in the discussion | |||
483 | 483 | ||
484 | 14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: | 484 | 14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: |
485 | 485 | ||
486 | If this patch fixes a problem reported by somebody else, consider adding a | 486 | The Reported-by tag gives credit to people who find bugs and report them and it |
487 | Reported-by: tag to credit the reporter for their contribution. Please | 487 | hopefully inspires them to help us again in the future. Please note that if |
488 | note that this tag should not be added without the reporter's permission, | 488 | the bug was reported in private, then ask for permission first before using the |
489 | especially if the problem was not reported in a public forum. That said, | 489 | Reported-by tag. |
490 | if we diligently credit our bug reporters, they will, hopefully, be | ||
491 | inspired to help us again in the future. | ||
492 | 490 | ||
493 | A Tested-by: tag indicates that the patch has been successfully tested (in | 491 | A Tested-by: tag indicates that the patch has been successfully tested (in |
494 | some environment) by the person named. This tag informs maintainers that | 492 | some environment) by the person named. This tag informs maintainers that |
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index 344e85cc7323..d7273a5f6456 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
@@ -17,7 +17,7 @@ User addresses have bits 63:48 set to 0 while the kernel addresses have | |||
17 | the same bits set to 1. TTBRx selection is given by bit 63 of the | 17 | the same bits set to 1. TTBRx selection is given by bit 63 of the |
18 | virtual address. The swapper_pg_dir contains only kernel (global) | 18 | virtual address. The swapper_pg_dir contains only kernel (global) |
19 | mappings while the user pgd contains only user (non-global) mappings. | 19 | mappings while the user pgd contains only user (non-global) mappings. |
20 | The swapper_pgd_dir address is written to TTBR1 and never written to | 20 | The swapper_pg_dir address is written to TTBR1 and never written to |
21 | TTBR0. | 21 | TTBR0. |
22 | 22 | ||
23 | 23 | ||
diff --git a/Documentation/development-process/2.Process b/Documentation/development-process/2.Process index 2e0617936e8f..c24e156a6118 100644 --- a/Documentation/development-process/2.Process +++ b/Documentation/development-process/2.Process | |||
@@ -289,10 +289,6 @@ lists when they are assembled; they can be downloaded from: | |||
289 | 289 | ||
290 | http://www.kernel.org/pub/linux/kernel/next/ | 290 | http://www.kernel.org/pub/linux/kernel/next/ |
291 | 291 | ||
292 | Some information about linux-next has been gathered at: | ||
293 | |||
294 | http://linux.f-seidel.de/linux-next/pmwiki/ | ||
295 | |||
296 | Linux-next has become an integral part of the kernel development process; | 292 | Linux-next has become an integral part of the kernel development process; |
297 | all patches merged during a given merge window should really have found | 293 | all patches merged during a given merge window should really have found |
298 | their way into linux-next some time before the merge window opens. | 294 | their way into linux-next some time before the merge window opens. |
diff --git a/Documentation/development-process/8.Conclusion b/Documentation/development-process/8.Conclusion index 1990ab4b4949..caef69022e9c 100644 --- a/Documentation/development-process/8.Conclusion +++ b/Documentation/development-process/8.Conclusion | |||
@@ -22,10 +22,6 @@ Beyond that, a valuable resource for kernel developers is: | |||
22 | 22 | ||
23 | http://kernelnewbies.org/ | 23 | http://kernelnewbies.org/ |
24 | 24 | ||
25 | Information about the linux-next tree gathers at: | ||
26 | |||
27 | http://linux.f-seidel.de/linux-next/pmwiki/ | ||
28 | |||
29 | And, of course, one should not forget http://kernel.org/, the definitive | 25 | And, of course, one should not forget http://kernel.org/, the definitive |
30 | location for kernel release information. | 26 | location for kernel release information. |
31 | 27 | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos4415-clock.txt b/Documentation/devicetree/bindings/clock/exynos4415-clock.txt new file mode 100644 index 000000000000..847d98bae8cf --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos4415-clock.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * Samsung Exynos4415 Clock Controller | ||
2 | |||
3 | The Exynos4415 clock controller generates and supplies clock to various | ||
4 | consumer devices within the Exynos4415 SoC. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible: should be one of the following: | ||
9 | - "samsung,exynos4415-cmu" - for the main system clocks controller | ||
10 | (CMU_LEFTBUS, CMU_RIGHTBUS, CMU_TOP, CMU_CPU clock domains). | ||
11 | - "samsung,exynos4415-cmu-dmc" - for the Exynos4415 SoC DRAM Memory | ||
12 | Controller (DMC) domain clock controller. | ||
13 | |||
14 | - reg: physical base address of the controller and length of memory mapped | ||
15 | region. | ||
16 | |||
17 | - #clock-cells: should be 1. | ||
18 | |||
19 | Each clock is assigned an identifier and client nodes can use this identifier | ||
20 | to specify the clock which they consume. | ||
21 | |||
22 | All available clocks are defined as preprocessor macros in | ||
23 | dt-bindings/clock/exynos4415.h header and can be used in device | ||
24 | tree sources. | ||
25 | |||
26 | Example 1: An example of a clock controller node is listed below. | ||
27 | |||
28 | cmu: clock-controller@10030000 { | ||
29 | compatible = "samsung,exynos4415-cmu"; | ||
30 | reg = <0x10030000 0x18000>; | ||
31 | #clock-cells = <1>; | ||
32 | }; | ||
33 | |||
34 | cmu-dmc: clock-controller@105C0000 { | ||
35 | compatible = "samsung,exynos4415-cmu-dmc"; | ||
36 | reg = <0x105C0000 0x3000>; | ||
37 | #clock-cells = <1>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos7-clock.txt b/Documentation/devicetree/bindings/clock/exynos7-clock.txt new file mode 100644 index 000000000000..6d3d5f80c1c3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos7-clock.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | * Samsung Exynos7 Clock Controller | ||
2 | |||
3 | Exynos7 clock controller has various blocks which are instantiated | ||
4 | independently from the device-tree. These clock controllers | ||
5 | generate and supply clocks to various hardware blocks within | ||
6 | the SoC. | ||
7 | |||
8 | Each clock is assigned an identifier and client nodes can use | ||
9 | this identifier to specify the clock which they consume. All | ||
10 | available clocks are defined as preprocessor macros in | ||
11 | dt-bindings/clock/exynos7-clk.h header and can be used in | ||
12 | device tree sources. | ||
13 | |||
14 | External clocks: | ||
15 | |||
16 | There are several clocks that are generated outside the SoC. It | ||
17 | is expected that they are defined using standard clock bindings | ||
18 | with following clock-output-names: | ||
19 | |||
20 | - "fin_pll" - PLL input clock from XXTI | ||
21 | |||
22 | Required Properties for Clock Controller: | ||
23 | |||
24 | - compatible: clock controllers will use one of the following | ||
25 | compatible strings to indicate the clock controller | ||
26 | functionality. | ||
27 | |||
28 | - "samsung,exynos7-clock-topc" | ||
29 | - "samsung,exynos7-clock-top0" | ||
30 | - "samsung,exynos7-clock-top1" | ||
31 | - "samsung,exynos7-clock-ccore" | ||
32 | - "samsung,exynos7-clock-peric0" | ||
33 | - "samsung,exynos7-clock-peric1" | ||
34 | - "samsung,exynos7-clock-peris" | ||
35 | - "samsung,exynos7-clock-fsys0" | ||
36 | - "samsung,exynos7-clock-fsys1" | ||
37 | |||
38 | - reg: physical base address of the controller and the length of | ||
39 | memory mapped region. | ||
40 | |||
41 | - #clock-cells: should be 1. | ||
42 | |||
43 | - clocks: list of clock identifiers which are fed as the input to | ||
44 | the given clock controller. Please refer the next section to | ||
45 | find the input clocks for a given controller. | ||
46 | |||
47 | - clock-names: list of names of clocks which are fed as the input | ||
48 | to the given clock controller. | ||
49 | |||
50 | Input clocks for top0 clock controller: | ||
51 | - fin_pll | ||
52 | - dout_sclk_bus0_pll | ||
53 | - dout_sclk_bus1_pll | ||
54 | - dout_sclk_cc_pll | ||
55 | - dout_sclk_mfc_pll | ||
56 | |||
57 | Input clocks for top1 clock controller: | ||
58 | - fin_pll | ||
59 | - dout_sclk_bus0_pll | ||
60 | - dout_sclk_bus1_pll | ||
61 | - dout_sclk_cc_pll | ||
62 | - dout_sclk_mfc_pll | ||
63 | |||
64 | Input clocks for ccore clock controller: | ||
65 | - fin_pll | ||
66 | - dout_aclk_ccore_133 | ||
67 | |||
68 | Input clocks for peric0 clock controller: | ||
69 | - fin_pll | ||
70 | - dout_aclk_peric0_66 | ||
71 | - sclk_uart0 | ||
72 | |||
73 | Input clocks for peric1 clock controller: | ||
74 | - fin_pll | ||
75 | - dout_aclk_peric1_66 | ||
76 | - sclk_uart1 | ||
77 | - sclk_uart2 | ||
78 | - sclk_uart3 | ||
79 | |||
80 | Input clocks for peris clock controller: | ||
81 | - fin_pll | ||
82 | - dout_aclk_peris_66 | ||
83 | |||
84 | Input clocks for fsys0 clock controller: | ||
85 | - fin_pll | ||
86 | - dout_aclk_fsys0_200 | ||
87 | - dout_sclk_mmc2 | ||
88 | |||
89 | Input clocks for fsys1 clock controller: | ||
90 | - fin_pll | ||
91 | - dout_aclk_fsys1_200 | ||
92 | - dout_sclk_mmc0 | ||
93 | - dout_sclk_mmc1 | ||
diff --git a/Documentation/devicetree/bindings/clock/marvell,mmp2.txt b/Documentation/devicetree/bindings/clock/marvell,mmp2.txt new file mode 100644 index 000000000000..af376a01f2b7 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/marvell,mmp2.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Marvell MMP2 Clock Controller | ||
2 | |||
3 | The MMP2 clock subsystem generates and supplies clock to various | ||
4 | controllers within the MMP2 SoC. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: should be one of the following. | ||
9 | - "marvell,mmp2-clock" - controller compatible with MMP2 SoC. | ||
10 | |||
11 | - reg: physical base address of the clock subsystem and length of memory mapped | ||
12 | region. There are 3 places in SOC has clock control logic: | ||
13 | "mpmu", "apmu", "apbc". So three reg spaces need to be defined. | ||
14 | |||
15 | - #clock-cells: should be 1. | ||
16 | - #reset-cells: should be 1. | ||
17 | |||
18 | Each clock is assigned an identifier and client nodes use this identifier | ||
19 | to specify the clock which they consume. | ||
20 | |||
21 | All these identifier could be found in <dt-bindings/clock/marvell-mmp2.h>. | ||
diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa168.txt b/Documentation/devicetree/bindings/clock/marvell,pxa168.txt new file mode 100644 index 000000000000..c62eb1d173a6 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/marvell,pxa168.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Marvell PXA168 Clock Controller | ||
2 | |||
3 | The PXA168 clock subsystem generates and supplies clock to various | ||
4 | controllers within the PXA168 SoC. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: should be one of the following. | ||
9 | - "marvell,pxa168-clock" - controller compatible with PXA168 SoC. | ||
10 | |||
11 | - reg: physical base address of the clock subsystem and length of memory mapped | ||
12 | region. There are 3 places in SOC has clock control logic: | ||
13 | "mpmu", "apmu", "apbc". So three reg spaces need to be defined. | ||
14 | |||
15 | - #clock-cells: should be 1. | ||
16 | - #reset-cells: should be 1. | ||
17 | |||
18 | Each clock is assigned an identifier and client nodes use this identifier | ||
19 | to specify the clock which they consume. | ||
20 | |||
21 | All these identifier could be found in <dt-bindings/clock/marvell,pxa168.h>. | ||
diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa910.txt b/Documentation/devicetree/bindings/clock/marvell,pxa910.txt new file mode 100644 index 000000000000..d9f41f3c03a0 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/marvell,pxa910.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Marvell PXA910 Clock Controller | ||
2 | |||
3 | The PXA910 clock subsystem generates and supplies clock to various | ||
4 | controllers within the PXA910 SoC. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - compatible: should be one of the following. | ||
9 | - "marvell,pxa910-clock" - controller compatible with PXA910 SoC. | ||
10 | |||
11 | - reg: physical base address of the clock subsystem and length of memory mapped | ||
12 | region. There are 4 places in SOC has clock control logic: | ||
13 | "mpmu", "apmu", "apbc", "apbcp". So four reg spaces need to be defined. | ||
14 | |||
15 | - #clock-cells: should be 1. | ||
16 | - #reset-cells: should be 1. | ||
17 | |||
18 | Each clock is assigned an identifier and client nodes use this identifier | ||
19 | to specify the clock which they consume. | ||
20 | |||
21 | All these identifier could be found in <dt-bindings/clock/marvell-pxa910.h>. | ||
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt index 952e373178d2..054f65f9319c 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt | |||
@@ -7,11 +7,16 @@ to 64. | |||
7 | Required Properties: | 7 | Required Properties: |
8 | 8 | ||
9 | - compatible: Must be one of the following | 9 | - compatible: Must be one of the following |
10 | - "renesas,r8a73a4-div6-clock" for R8A73A4 (R-Mobile APE6) DIV6 clocks | ||
11 | - "renesas,r8a7740-div6-clock" for R8A7740 (R-Mobile A1) DIV6 clocks | ||
10 | - "renesas,r8a7790-div6-clock" for R8A7790 (R-Car H2) DIV6 clocks | 12 | - "renesas,r8a7790-div6-clock" for R8A7790 (R-Car H2) DIV6 clocks |
11 | - "renesas,r8a7791-div6-clock" for R8A7791 (R-Car M2) DIV6 clocks | 13 | - "renesas,r8a7791-div6-clock" for R8A7791 (R-Car M2) DIV6 clocks |
14 | - "renesas,sh73a0-div6-clock" for SH73A0 (SH-Mobile AG5) DIV6 clocks | ||
12 | - "renesas,cpg-div6-clock" for generic DIV6 clocks | 15 | - "renesas,cpg-div6-clock" for generic DIV6 clocks |
13 | - reg: Base address and length of the memory resource used by the DIV6 clock | 16 | - reg: Base address and length of the memory resource used by the DIV6 clock |
14 | - clocks: Reference to the parent clock | 17 | - clocks: Reference to the parent clock(s); either one, four, or eight |
18 | clocks must be specified. For clocks with multiple parents, invalid | ||
19 | settings must be specified as "<0>". | ||
15 | - #clock-cells: Must be 0 | 20 | - #clock-cells: Must be 0 |
16 | - clock-output-names: The name of the clock as a free-form string | 21 | - clock-output-names: The name of the clock as a free-form string |
17 | 22 | ||
@@ -19,10 +24,11 @@ Required Properties: | |||
19 | Example | 24 | Example |
20 | ------- | 25 | ------- |
21 | 26 | ||
22 | sd2_clk: sd2_clk@e6150078 { | 27 | sdhi2_clk: sdhi2_clk@e615007c { |
23 | compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock"; | 28 | compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock"; |
24 | reg = <0 0xe6150078 0 4>; | 29 | reg = <0 0xe615007c 0 4>; |
25 | clocks = <&pll1_div2_clk>; | 30 | clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>, |
31 | <0>, <&extal2_clk>; | ||
26 | #clock-cells = <0>; | 32 | #clock-cells = <0>; |
27 | clock-output-names = "sd2"; | 33 | clock-output-names = "sdhi2ck"; |
28 | }; | 34 | }; |
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt index a5f52238c80d..2e18676bd4b5 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | |||
@@ -26,11 +26,11 @@ Required Properties: | |||
26 | must appear in the same order as the output clocks. | 26 | must appear in the same order as the output clocks. |
27 | - #clock-cells: Must be 1 | 27 | - #clock-cells: Must be 1 |
28 | - clock-output-names: The name of the clocks as free-form strings | 28 | - clock-output-names: The name of the clocks as free-form strings |
29 | - renesas,clock-indices: Indices of the gate clocks into the group (0 to 31) | 29 | - clock-indices: Indices of the gate clocks into the group (0 to 31) |
30 | 30 | ||
31 | The clocks, clock-output-names and renesas,clock-indices properties contain one | 31 | The clocks, clock-output-names and clock-indices properties contain one entry |
32 | entry per gate clock. The MSTP groups are sparsely populated. Unimplemented | 32 | per gate clock. The MSTP groups are sparsely populated. Unimplemented gate |
33 | gate clocks must not be declared. | 33 | clocks must not be declared. |
34 | 34 | ||
35 | 35 | ||
36 | Example | 36 | Example |
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index ed116df9c3e7..67b2b99f2b33 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -10,14 +10,17 @@ Required properties: | |||
10 | "allwinner,sun4i-a10-pll1-clk" - for the main PLL clock and PLL4 | 10 | "allwinner,sun4i-a10-pll1-clk" - for the main PLL clock and PLL4 |
11 | "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31 | 11 | "allwinner,sun6i-a31-pll1-clk" - for the main PLL clock on A31 |
12 | "allwinner,sun8i-a23-pll1-clk" - for the main PLL clock on A23 | 12 | "allwinner,sun8i-a23-pll1-clk" - for the main PLL clock on A23 |
13 | "allwinner,sun9i-a80-pll4-clk" - for the peripheral PLLs on A80 | ||
13 | "allwinner,sun4i-a10-pll5-clk" - for the PLL5 clock | 14 | "allwinner,sun4i-a10-pll5-clk" - for the PLL5 clock |
14 | "allwinner,sun4i-a10-pll6-clk" - for the PLL6 clock | 15 | "allwinner,sun4i-a10-pll6-clk" - for the PLL6 clock |
15 | "allwinner,sun6i-a31-pll6-clk" - for the PLL6 clock on A31 | 16 | "allwinner,sun6i-a31-pll6-clk" - for the PLL6 clock on A31 |
17 | "allwinner,sun9i-a80-gt-clk" - for the GT bus clock on A80 | ||
16 | "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock | 18 | "allwinner,sun4i-a10-cpu-clk" - for the CPU multiplexer clock |
17 | "allwinner,sun4i-a10-axi-clk" - for the AXI clock | 19 | "allwinner,sun4i-a10-axi-clk" - for the AXI clock |
18 | "allwinner,sun8i-a23-axi-clk" - for the AXI clock on A23 | 20 | "allwinner,sun8i-a23-axi-clk" - for the AXI clock on A23 |
19 | "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates | 21 | "allwinner,sun4i-a10-axi-gates-clk" - for the AXI gates |
20 | "allwinner,sun4i-a10-ahb-clk" - for the AHB clock | 22 | "allwinner,sun4i-a10-ahb-clk" - for the AHB clock |
23 | "allwinner,sun9i-a80-ahb-clk" - for the AHB bus clocks on A80 | ||
21 | "allwinner,sun4i-a10-ahb-gates-clk" - for the AHB gates on A10 | 24 | "allwinner,sun4i-a10-ahb-gates-clk" - for the AHB gates on A10 |
22 | "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 | 25 | "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 |
23 | "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s | 26 | "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s |
@@ -26,24 +29,29 @@ Required properties: | |||
26 | "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 | 29 | "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 |
27 | "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 | 30 | "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 |
28 | "allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23 | 31 | "allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23 |
32 | "allwinner,sun9i-a80-ahb0-gates-clk" - for the AHB0 gates on A80 | ||
33 | "allwinner,sun9i-a80-ahb1-gates-clk" - for the AHB1 gates on A80 | ||
34 | "allwinner,sun9i-a80-ahb2-gates-clk" - for the AHB2 gates on A80 | ||
29 | "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock | 35 | "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock |
30 | "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31 | 36 | "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31 |
31 | "allwinner,sun8i-a23-apb0-clk" - for the APB0 clock on A23 | 37 | "allwinner,sun8i-a23-apb0-clk" - for the APB0 clock on A23 |
38 | "allwinner,sun9i-a80-apb0-clk" - for the APB0 bus clock on A80 | ||
32 | "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 | 39 | "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 |
33 | "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 | 40 | "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 |
34 | "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s | 41 | "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s |
35 | "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31 | 42 | "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31 |
36 | "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 | 43 | "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 |
37 | "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 | 44 | "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 |
45 | "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80 | ||
38 | "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock | 46 | "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock |
39 | "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing | 47 | "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80 |
40 | "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 | 48 | "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 |
41 | "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 | 49 | "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 |
42 | "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s | 50 | "allwinner,sun5i-a10s-apb1-gates-clk" - for the APB1 gates on A10s |
43 | "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31 | 51 | "allwinner,sun6i-a31-apb1-gates-clk" - for the APB1 gates on A31 |
44 | "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20 | 52 | "allwinner,sun7i-a20-apb1-gates-clk" - for the APB1 gates on A20 |
45 | "allwinner,sun8i-a23-apb1-gates-clk" - for the APB1 gates on A23 | 53 | "allwinner,sun8i-a23-apb1-gates-clk" - for the APB1 gates on A23 |
46 | "allwinner,sun6i-a31-apb2-div-clk" - for the APB2 gates on A31 | 54 | "allwinner,sun9i-a80-apb1-gates-clk" - for the APB1 gates on A80 |
47 | "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 | 55 | "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 |
48 | "allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23 | 56 | "allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23 |
49 | "allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13 | 57 | "allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13 |
@@ -63,8 +71,9 @@ Required properties for all clocks: | |||
63 | multiplexed clocks, the list order must match the hardware | 71 | multiplexed clocks, the list order must match the hardware |
64 | programming order. | 72 | programming order. |
65 | - #clock-cells : from common clock binding; shall be set to 0 except for | 73 | - #clock-cells : from common clock binding; shall be set to 0 except for |
66 | "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk" and | 74 | the following compatibles where it shall be set to 1: |
67 | "allwinner,sun4i-pll6-clk" where it shall be set to 1 | 75 | "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk", |
76 | "allwinner,sun4i-pll6-clk", "allwinner,sun6i-a31-pll6-clk" | ||
68 | - clock-output-names : shall be the corresponding names of the outputs. | 77 | - clock-output-names : shall be the corresponding names of the outputs. |
69 | If the clock module only has one output, the name shall be the | 78 | If the clock module only has one output, the name shall be the |
70 | module name. | 79 | module name. |
@@ -79,6 +88,12 @@ Clock consumers should specify the desired clocks they use with a | |||
79 | "clocks" phandle cell. Consumers that are using a gated clock should | 88 | "clocks" phandle cell. Consumers that are using a gated clock should |
80 | provide an additional ID in their clock property. This ID is the | 89 | provide an additional ID in their clock property. This ID is the |
81 | offset of the bit controlling this particular gate in the register. | 90 | offset of the bit controlling this particular gate in the register. |
91 | For the other clocks with "#clock-cells" = 1, the additional ID shall | ||
92 | refer to the index of the output. | ||
93 | |||
94 | For "allwinner,sun6i-a31-pll6-clk", there are 2 outputs. The first output | ||
95 | is the normal PLL6 output, or "pll6". The second output is rate doubled | ||
96 | PLL6, or "pll6x2". | ||
82 | 97 | ||
83 | For example: | 98 | For example: |
84 | 99 | ||
@@ -106,6 +121,14 @@ pll5: clk@01c20020 { | |||
106 | clock-output-names = "pll5_ddr", "pll5_other"; | 121 | clock-output-names = "pll5_ddr", "pll5_other"; |
107 | }; | 122 | }; |
108 | 123 | ||
124 | pll6: clk@01c20028 { | ||
125 | #clock-cells = <1>; | ||
126 | compatible = "allwinner,sun6i-a31-pll6-clk"; | ||
127 | reg = <0x01c20028 0x4>; | ||
128 | clocks = <&osc24M>; | ||
129 | clock-output-names = "pll6", "pll6x2"; | ||
130 | }; | ||
131 | |||
109 | cpu: cpu@01c20054 { | 132 | cpu: cpu@01c20054 { |
110 | #clock-cells = <0>; | 133 | #clock-cells = <0>; |
111 | compatible = "allwinner,sun4i-a10-cpu-clk"; | 134 | compatible = "allwinner,sun4i-a10-cpu-clk"; |
diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.txt b/Documentation/devicetree/bindings/mailbox/mailbox.txt new file mode 100644 index 000000000000..1a2cd3d266db --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/mailbox.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * Generic Mailbox Controller and client driver bindings | ||
2 | |||
3 | Generic binding to provide a way for Mailbox controller drivers to | ||
4 | assign appropriate mailbox channel to client drivers. | ||
5 | |||
6 | * Mailbox Controller | ||
7 | |||
8 | Required property: | ||
9 | - #mbox-cells: Must be at least 1. Number of cells in a mailbox | ||
10 | specifier. | ||
11 | |||
12 | Example: | ||
13 | mailbox: mailbox { | ||
14 | ... | ||
15 | #mbox-cells = <1>; | ||
16 | }; | ||
17 | |||
18 | |||
19 | * Mailbox Client | ||
20 | |||
21 | Required property: | ||
22 | - mboxes: List of phandle and mailbox channel specifiers. | ||
23 | |||
24 | Optional property: | ||
25 | - mbox-names: List of identifier strings for each mailbox channel | ||
26 | required by the client. The use of this property | ||
27 | is discouraged in favor of using index in list of | ||
28 | 'mboxes' while requesting a mailbox. Instead the | ||
29 | platforms may define channel indices, in DT headers, | ||
30 | to something legible. | ||
31 | |||
32 | Example: | ||
33 | pwr_cntrl: power { | ||
34 | ... | ||
35 | mbox-names = "pwr-ctrl", "rpc"; | ||
36 | mboxes = <&mailbox 0 | ||
37 | &mailbox 1>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt b/Documentation/devicetree/bindings/net/smsc-lan91c111.txt index 0f8487b88822..e77e167593db 100644 --- a/Documentation/devicetree/bindings/net/smsc-lan91c111.txt +++ b/Documentation/devicetree/bindings/net/smsc-lan91c111.txt | |||
@@ -11,3 +11,5 @@ Optional properties: | |||
11 | are supported on the device. Valid value for SMSC LAN91c111 are | 11 | are supported on the device. Valid value for SMSC LAN91c111 are |
12 | 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning | 12 | 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning |
13 | 16-bit access only. | 13 | 16-bit access only. |
14 | - power-gpios: GPIO to control the PWRDWN pin | ||
15 | - reset-gpios: GPIO to control the RESET pin | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt b/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt index 0bda229a6171..3899d6a557c1 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-fsl-ftm.txt | |||
@@ -1,5 +1,20 @@ | |||
1 | Freescale FlexTimer Module (FTM) PWM controller | 1 | Freescale FlexTimer Module (FTM) PWM controller |
2 | 2 | ||
3 | The same FTM PWM device can have a different endianness on different SoCs. The | ||
4 | device tree provides a property to describing this so that an operating system | ||
5 | device driver can handle all variants of the device. Refer to the table below | ||
6 | for the endianness of the FTM PWM block as integrated into the existing SoCs: | ||
7 | |||
8 | SoC | FTM-PWM endianness | ||
9 | --------+------------------- | ||
10 | Vybrid | LE | ||
11 | LS1 | BE | ||
12 | LS2 | LE | ||
13 | |||
14 | Please see ../regmap/regmap.txt for more detail about how to specify endian | ||
15 | modes in device tree. | ||
16 | |||
17 | |||
3 | Required properties: | 18 | Required properties: |
4 | - compatible: Should be "fsl,vf610-ftm-pwm". | 19 | - compatible: Should be "fsl,vf610-ftm-pwm". |
5 | - reg: Physical base address and length of the controller's registers | 20 | - reg: Physical base address and length of the controller's registers |
@@ -16,7 +31,8 @@ Required properties: | |||
16 | - pinctrl-names: Must contain a "default" entry. | 31 | - pinctrl-names: Must contain a "default" entry. |
17 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. | 32 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. |
18 | See pinctrl/pinctrl-bindings.txt for details of the property values. | 33 | See pinctrl/pinctrl-bindings.txt for details of the property values. |
19 | 34 | - big-endian: Boolean property, required if the FTM PWM registers use a big- | |
35 | endian rather than little-endian layout. | ||
20 | 36 | ||
21 | Example: | 37 | Example: |
22 | 38 | ||
@@ -32,4 +48,5 @@ pwm0: pwm@40038000 { | |||
32 | <&clks VF610_CLK_FTM0_EXT_FIX_EN>; | 48 | <&clks VF610_CLK_FTM0_EXT_FIX_EN>; |
33 | pinctrl-names = "default"; | 49 | pinctrl-names = "default"; |
34 | pinctrl-0 = <&pinctrl_pwm0_1>; | 50 | pinctrl-0 = <&pinctrl_pwm0_1>; |
51 | big-endian; | ||
35 | }; | 52 | }; |
diff --git a/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt b/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt index d47d15a6a298..b8be3d09ee26 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt | |||
@@ -7,8 +7,8 @@ Required properties: | |||
7 | "rockchip,vop-pwm": found integrated in VOP on RK3288 SoC | 7 | "rockchip,vop-pwm": found integrated in VOP on RK3288 SoC |
8 | - reg: physical base address and length of the controller's registers | 8 | - reg: physical base address and length of the controller's registers |
9 | - clocks: phandle and clock specifier of the PWM reference clock | 9 | - clocks: phandle and clock specifier of the PWM reference clock |
10 | - #pwm-cells: should be 2. See pwm.txt in this directory for a | 10 | - #pwm-cells: must be 2 (rk2928) or 3 (rk3288). See pwm.txt in this directory |
11 | description of the cell format. | 11 | for a description of the cell format. |
12 | 12 | ||
13 | Example: | 13 | Example: |
14 | 14 | ||
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index 955df60a118c..d556dcb8816b 100644 --- a/Documentation/devicetree/bindings/sound/sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt | |||
@@ -7,10 +7,20 @@ Required properties: | |||
7 | 7 | ||
8 | - clocks : the clock provider of SYS_MCLK | 8 | - clocks : the clock provider of SYS_MCLK |
9 | 9 | ||
10 | - VDDA-supply : the regulator provider of VDDA | ||
11 | |||
12 | - VDDIO-supply: the regulator provider of VDDIO | ||
13 | |||
14 | Optional properties: | ||
15 | |||
16 | - VDDD-supply : the regulator provider of VDDD | ||
17 | |||
10 | Example: | 18 | Example: |
11 | 19 | ||
12 | codec: sgtl5000@0a { | 20 | codec: sgtl5000@0a { |
13 | compatible = "fsl,sgtl5000"; | 21 | compatible = "fsl,sgtl5000"; |
14 | reg = <0x0a>; | 22 | reg = <0x0a>; |
15 | clocks = <&clks 150>; | 23 | clocks = <&clks 150>; |
24 | VDDA-supply = <®_3p3v>; | ||
25 | VDDIO-supply = <®_3p3v>; | ||
16 | }; | 26 | }; |
diff --git a/Documentation/devicetree/bindings/submitting-patches.txt b/Documentation/devicetree/bindings/submitting-patches.txt index 042a0273b8ba..b7ba01ad1426 100644 --- a/Documentation/devicetree/bindings/submitting-patches.txt +++ b/Documentation/devicetree/bindings/submitting-patches.txt | |||
@@ -12,6 +12,9 @@ I. For patch submitters | |||
12 | 12 | ||
13 | devicetree@vger.kernel.org | 13 | devicetree@vger.kernel.org |
14 | 14 | ||
15 | 3) The Documentation/ portion of the patch should come in the series before | ||
16 | the code implementing the binding. | ||
17 | |||
15 | II. For kernel maintainers | 18 | II. For kernel maintainers |
16 | 19 | ||
17 | 1) If you aren't comfortable reviewing a given binding, reply to it and ask | 20 | 1) If you aren't comfortable reviewing a given binding, reply to it and ask |
diff --git a/Documentation/devicetree/bindings/thermal/imx-thermal.txt b/Documentation/devicetree/bindings/thermal/imx-thermal.txt index 1f0f67234a91..3c67bd50aa10 100644 --- a/Documentation/devicetree/bindings/thermal/imx-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/imx-thermal.txt | |||
@@ -1,7 +1,10 @@ | |||
1 | * Temperature Monitor (TEMPMON) on Freescale i.MX SoCs | 1 | * Temperature Monitor (TEMPMON) on Freescale i.MX SoCs |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "fsl,imx6q-thermal" | 4 | - compatible : "fsl,imx6q-tempmon" for i.MX6Q, "fsl,imx6sx-tempmon" for i.MX6SX. |
5 | i.MX6SX has two more IRQs than i.MX6Q, one is IRQ_LOW and the other is IRQ_PANIC, | ||
6 | when temperature is below than low threshold, IRQ_LOW will be triggered, when temperature | ||
7 | is higher than panic threshold, system will auto reboot by SRC module. | ||
5 | - fsl,tempmon : phandle pointer to system controller that contains TEMPMON | 8 | - fsl,tempmon : phandle pointer to system controller that contains TEMPMON |
6 | control registers, e.g. ANATOP on imx6q. | 9 | control registers, e.g. ANATOP on imx6q. |
7 | - fsl,tempmon-data : phandle pointer to fuse controller that contains TEMPMON | 10 | - fsl,tempmon-data : phandle pointer to fuse controller that contains TEMPMON |
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt index 0ef00be44b01..43404b197933 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt | |||
@@ -7,7 +7,10 @@ Required properties: | |||
7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) | 7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) |
8 | - "renesas,thermal-r8a7779" (R-Car H1) | 8 | - "renesas,thermal-r8a7779" (R-Car H1) |
9 | - "renesas,thermal-r8a7790" (R-Car H2) | 9 | - "renesas,thermal-r8a7790" (R-Car H2) |
10 | - "renesas,thermal-r8a7791" (R-Car M2) | 10 | - "renesas,thermal-r8a7791" (R-Car M2-W) |
11 | - "renesas,thermal-r8a7792" (R-Car V2H) | ||
12 | - "renesas,thermal-r8a7793" (R-Car M2-N) | ||
13 | - "renesas,thermal-r8a7794" (R-Car E2) | ||
11 | - reg : Address range of the thermal registers. | 14 | - reg : Address range of the thermal registers. |
12 | The 1st reg will be recognized as common register | 15 | The 1st reg will be recognized as common register |
13 | if it has "interrupts". | 16 | if it has "interrupts". |
diff --git a/Documentation/devicetree/bindings/watchdog/cadence-wdt.txt b/Documentation/devicetree/bindings/watchdog/cadence-wdt.txt new file mode 100644 index 000000000000..c3a36ee45552 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/cadence-wdt.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Zynq Watchdog Device Tree Bindings | ||
2 | ------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : Should be "cdns,wdt-r1p2". | ||
6 | - clocks : This is pclk (APB clock). | ||
7 | - interrupts : This is wd_irq - watchdog timeout interrupt. | ||
8 | - interrupt-parent : Must be core interrupt controller. | ||
9 | |||
10 | Optional properties | ||
11 | - reset-on-timeout : If this property exists, then a reset is done | ||
12 | when watchdog times out. | ||
13 | - timeout-sec : Watchdog timeout value (in seconds). | ||
14 | |||
15 | Example: | ||
16 | watchdog@f8005000 { | ||
17 | compatible = "cdns,wdt-r1p2"; | ||
18 | clocks = <&clkc 45>; | ||
19 | interrupt-parent = <&intc>; | ||
20 | interrupts = <0 9 1>; | ||
21 | reg = <0xf8005000 0x1000>; | ||
22 | reset-on-timeout; | ||
23 | timeout-sec = <10>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt index e52ba2da868c..8dab6fd024aa 100644 --- a/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt | |||
@@ -7,7 +7,8 @@ Required properties: | |||
7 | 7 | ||
8 | Optional property: | 8 | Optional property: |
9 | - big-endian: If present the watchdog device's registers are implemented | 9 | - big-endian: If present the watchdog device's registers are implemented |
10 | in big endian mode, otherwise in little mode. | 10 | in big endian mode, otherwise in native mode(same with CPU), for more |
11 | detail please see: Documentation/devicetree/bindings/regmap/regmap.txt. | ||
11 | 12 | ||
12 | Examples: | 13 | Examples: |
13 | 14 | ||
diff --git a/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file mode 100644 index 000000000000..9200fc2d508c --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | Meson SoCs Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "amlogic,meson6-wdt" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | |||
8 | Example: | ||
9 | |||
10 | wdt: watchdog@c1109900 { | ||
11 | compatible = "amlogic,meson6-wdt"; | ||
12 | reg = <0xc1109900 0x8>; | ||
13 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt new file mode 100644 index 000000000000..4726924d034e --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | Qualcomm Krait Processor Sub-system (KPSS) Watchdog | ||
2 | --------------------------------------------------- | ||
3 | |||
4 | Required properties : | ||
5 | - compatible : shall contain only one of the following: | ||
6 | |||
7 | "qcom,kpss-wdt-msm8960" | ||
8 | "qcom,kpss-wdt-apq8064" | ||
9 | "qcom,kpss-wdt-ipq8064" | ||
10 | |||
11 | - reg : shall contain base register location and length | ||
12 | - clocks : shall contain the input clock | ||
13 | |||
14 | Optional properties : | ||
15 | - timeout-sec : shall contain the default watchdog timeout in seconds, | ||
16 | if unset, the default timeout is 30 seconds | ||
17 | |||
18 | Example: | ||
19 | watchdog@208a038 { | ||
20 | compatible = "qcom,kpss-wdt-ipq8064"; | ||
21 | reg = <0x0208a038 0x40>; | ||
22 | clocks = <&sleep_clk>; | ||
23 | timeout-sec = <10>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt index cfff37511aac..8f3d96af81d7 100644 --- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt | |||
@@ -9,6 +9,7 @@ Required properties: | |||
9 | (a) "samsung,s3c2410-wdt" for Exynos4 and previous SoCs | 9 | (a) "samsung,s3c2410-wdt" for Exynos4 and previous SoCs |
10 | (b) "samsung,exynos5250-wdt" for Exynos5250 | 10 | (b) "samsung,exynos5250-wdt" for Exynos5250 |
11 | (c) "samsung,exynos5420-wdt" for Exynos5420 | 11 | (c) "samsung,exynos5420-wdt" for Exynos5420 |
12 | (c) "samsung,exynos7-wdt" for Exynos7 | ||
12 | 13 | ||
13 | - reg : base physical address of the controller and length of memory mapped | 14 | - reg : base physical address of the controller and length of memory mapped |
14 | region. | 15 | region. |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 94d93b1f8b53..b30753cbf431 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -67,6 +67,7 @@ prototypes: | |||
67 | struct file *, unsigned open_flag, | 67 | struct file *, unsigned open_flag, |
68 | umode_t create_mode, int *opened); | 68 | umode_t create_mode, int *opened); |
69 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | 69 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); |
70 | int (*dentry_open)(struct dentry *, struct file *, const struct cred *); | ||
70 | 71 | ||
71 | locking rules: | 72 | locking rules: |
72 | all may block | 73 | all may block |
@@ -96,6 +97,7 @@ fiemap: no | |||
96 | update_time: no | 97 | update_time: no |
97 | atomic_open: yes | 98 | atomic_open: yes |
98 | tmpfile: no | 99 | tmpfile: no |
100 | dentry_open: no | ||
99 | 101 | ||
100 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 102 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
101 | victim. | 103 | victim. |
diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt new file mode 100644 index 000000000000..530850a72735 --- /dev/null +++ b/Documentation/filesystems/overlayfs.txt | |||
@@ -0,0 +1,198 @@ | |||
1 | Written by: Neil Brown <neilb@suse.de> | ||
2 | |||
3 | Overlay Filesystem | ||
4 | ================== | ||
5 | |||
6 | This document describes a prototype for a new approach to providing | ||
7 | overlay-filesystem functionality in Linux (sometimes referred to as | ||
8 | union-filesystems). An overlay-filesystem tries to present a | ||
9 | filesystem which is the result over overlaying one filesystem on top | ||
10 | of the other. | ||
11 | |||
12 | The result will inevitably fail to look exactly like a normal | ||
13 | filesystem for various technical reasons. The expectation is that | ||
14 | many use cases will be able to ignore these differences. | ||
15 | |||
16 | This approach is 'hybrid' because the objects that appear in the | ||
17 | filesystem do not all appear to belong to that filesystem. In many | ||
18 | cases an object accessed in the union will be indistinguishable | ||
19 | from accessing the corresponding object from the original filesystem. | ||
20 | This is most obvious from the 'st_dev' field returned by stat(2). | ||
21 | |||
22 | While directories will report an st_dev from the overlay-filesystem, | ||
23 | all non-directory objects will report an st_dev from the lower or | ||
24 | upper filesystem that is providing the object. Similarly st_ino will | ||
25 | only be unique when combined with st_dev, and both of these can change | ||
26 | over the lifetime of a non-directory object. Many applications and | ||
27 | tools ignore these values and will not be affected. | ||
28 | |||
29 | Upper and Lower | ||
30 | --------------- | ||
31 | |||
32 | An overlay filesystem combines two filesystems - an 'upper' filesystem | ||
33 | and a 'lower' filesystem. When a name exists in both filesystems, the | ||
34 | object in the 'upper' filesystem is visible while the object in the | ||
35 | 'lower' filesystem is either hidden or, in the case of directories, | ||
36 | merged with the 'upper' object. | ||
37 | |||
38 | It would be more correct to refer to an upper and lower 'directory | ||
39 | tree' rather than 'filesystem' as it is quite possible for both | ||
40 | directory trees to be in the same filesystem and there is no | ||
41 | requirement that the root of a filesystem be given for either upper or | ||
42 | lower. | ||
43 | |||
44 | The lower filesystem can be any filesystem supported by Linux and does | ||
45 | not need to be writable. The lower filesystem can even be another | ||
46 | overlayfs. The upper filesystem will normally be writable and if it | ||
47 | is it must support the creation of trusted.* extended attributes, and | ||
48 | must provide valid d_type in readdir responses, so NFS is not suitable. | ||
49 | |||
50 | A read-only overlay of two read-only filesystems may use any | ||
51 | filesystem type. | ||
52 | |||
53 | Directories | ||
54 | ----------- | ||
55 | |||
56 | Overlaying mainly involves directories. If a given name appears in both | ||
57 | upper and lower filesystems and refers to a non-directory in either, | ||
58 | then the lower object is hidden - the name refers only to the upper | ||
59 | object. | ||
60 | |||
61 | Where both upper and lower objects are directories, a merged directory | ||
62 | is formed. | ||
63 | |||
64 | At mount time, the two directories given as mount options "lowerdir" and | ||
65 | "upperdir" are combined into a merged directory: | ||
66 | |||
67 | mount -t overlayfs overlayfs -olowerdir=/lower,upperdir=/upper,\ | ||
68 | workdir=/work /merged | ||
69 | |||
70 | The "workdir" needs to be an empty directory on the same filesystem | ||
71 | as upperdir. | ||
72 | |||
73 | Then whenever a lookup is requested in such a merged directory, the | ||
74 | lookup is performed in each actual directory and the combined result | ||
75 | is cached in the dentry belonging to the overlay filesystem. If both | ||
76 | actual lookups find directories, both are stored and a merged | ||
77 | directory is created, otherwise only one is stored: the upper if it | ||
78 | exists, else the lower. | ||
79 | |||
80 | Only the lists of names from directories are merged. Other content | ||
81 | such as metadata and extended attributes are reported for the upper | ||
82 | directory only. These attributes of the lower directory are hidden. | ||
83 | |||
84 | whiteouts and opaque directories | ||
85 | -------------------------------- | ||
86 | |||
87 | In order to support rm and rmdir without changing the lower | ||
88 | filesystem, an overlay filesystem needs to record in the upper filesystem | ||
89 | that files have been removed. This is done using whiteouts and opaque | ||
90 | directories (non-directories are always opaque). | ||
91 | |||
92 | A whiteout is created as a character device with 0/0 device number. | ||
93 | When a whiteout is found in the upper level of a merged directory, any | ||
94 | matching name in the lower level is ignored, and the whiteout itself | ||
95 | is also hidden. | ||
96 | |||
97 | A directory is made opaque by setting the xattr "trusted.overlay.opaque" | ||
98 | to "y". Where the upper filesystem contains an opaque directory, any | ||
99 | directory in the lower filesystem with the same name is ignored. | ||
100 | |||
101 | readdir | ||
102 | ------- | ||
103 | |||
104 | When a 'readdir' request is made on a merged directory, the upper and | ||
105 | lower directories are each read and the name lists merged in the | ||
106 | obvious way (upper is read first, then lower - entries that already | ||
107 | exist are not re-added). This merged name list is cached in the | ||
108 | 'struct file' and so remains as long as the file is kept open. If the | ||
109 | directory is opened and read by two processes at the same time, they | ||
110 | will each have separate caches. A seekdir to the start of the | ||
111 | directory (offset 0) followed by a readdir will cause the cache to be | ||
112 | discarded and rebuilt. | ||
113 | |||
114 | This means that changes to the merged directory do not appear while a | ||
115 | directory is being read. This is unlikely to be noticed by many | ||
116 | programs. | ||
117 | |||
118 | seek offsets are assigned sequentially when the directories are read. | ||
119 | Thus if | ||
120 | - read part of a directory | ||
121 | - remember an offset, and close the directory | ||
122 | - re-open the directory some time later | ||
123 | - seek to the remembered offset | ||
124 | |||
125 | there may be little correlation between the old and new locations in | ||
126 | the list of filenames, particularly if anything has changed in the | ||
127 | directory. | ||
128 | |||
129 | Readdir on directories that are not merged is simply handled by the | ||
130 | underlying directory (upper or lower). | ||
131 | |||
132 | |||
133 | Non-directories | ||
134 | --------------- | ||
135 | |||
136 | Objects that are not directories (files, symlinks, device-special | ||
137 | files etc.) are presented either from the upper or lower filesystem as | ||
138 | appropriate. When a file in the lower filesystem is accessed in a way | ||
139 | the requires write-access, such as opening for write access, changing | ||
140 | some metadata etc., the file is first copied from the lower filesystem | ||
141 | to the upper filesystem (copy_up). Note that creating a hard-link | ||
142 | also requires copy_up, though of course creation of a symlink does | ||
143 | not. | ||
144 | |||
145 | The copy_up may turn out to be unnecessary, for example if the file is | ||
146 | opened for read-write but the data is not modified. | ||
147 | |||
148 | The copy_up process first makes sure that the containing directory | ||
149 | exists in the upper filesystem - creating it and any parents as | ||
150 | necessary. It then creates the object with the same metadata (owner, | ||
151 | mode, mtime, symlink-target etc.) and then if the object is a file, the | ||
152 | data is copied from the lower to the upper filesystem. Finally any | ||
153 | extended attributes are copied up. | ||
154 | |||
155 | Once the copy_up is complete, the overlay filesystem simply | ||
156 | provides direct access to the newly created file in the upper | ||
157 | filesystem - future operations on the file are barely noticed by the | ||
158 | overlay filesystem (though an operation on the name of the file such as | ||
159 | rename or unlink will of course be noticed and handled). | ||
160 | |||
161 | |||
162 | Non-standard behavior | ||
163 | --------------------- | ||
164 | |||
165 | The copy_up operation essentially creates a new, identical file and | ||
166 | moves it over to the old name. The new file may be on a different | ||
167 | filesystem, so both st_dev and st_ino of the file may change. | ||
168 | |||
169 | Any open files referring to this inode will access the old data and | ||
170 | metadata. Similarly any file locks obtained before copy_up will not | ||
171 | apply to the copied up file. | ||
172 | |||
173 | On a file opened with O_RDONLY fchmod(2), fchown(2), futimesat(2) and | ||
174 | fsetxattr(2) will fail with EROFS. | ||
175 | |||
176 | If a file with multiple hard links is copied up, then this will | ||
177 | "break" the link. Changes will not be propagated to other names | ||
178 | referring to the same inode. | ||
179 | |||
180 | Symlinks in /proc/PID/ and /proc/PID/fd which point to a non-directory | ||
181 | object in overlayfs will not contain valid absolute paths, only | ||
182 | relative paths leading up to the filesystem's root. This will be | ||
183 | fixed in the future. | ||
184 | |||
185 | Some operations are not atomic, for example a crash during copy_up or | ||
186 | rename will leave the filesystem in an inconsistent state. This will | ||
187 | be addressed in the future. | ||
188 | |||
189 | Changes to underlying filesystems | ||
190 | --------------------------------- | ||
191 | |||
192 | Offline changes, when the overlay is not mounted, are allowed to either | ||
193 | the upper or the lower trees. | ||
194 | |||
195 | Changes to the underlying filesystems while part of a mounted overlay | ||
196 | filesystem are not allowed. If the underlying filesystem is changed, | ||
197 | the behavior of the overlay is undefined, though it will not result in | ||
198 | a crash or deadlock. | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index fceff7c00a3c..20bf204426ca 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -364,6 +364,7 @@ struct inode_operations { | |||
364 | int (*atomic_open)(struct inode *, struct dentry *, struct file *, | 364 | int (*atomic_open)(struct inode *, struct dentry *, struct file *, |
365 | unsigned open_flag, umode_t create_mode, int *opened); | 365 | unsigned open_flag, umode_t create_mode, int *opened); |
366 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | 366 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); |
367 | int (*dentry_open)(struct dentry *, struct file *, const struct cred *); | ||
367 | }; | 368 | }; |
368 | 369 | ||
369 | Again, all methods are called without any locks being held, unless | 370 | Again, all methods are called without any locks being held, unless |
@@ -696,6 +697,12 @@ struct address_space_operations { | |||
696 | but instead uses bmap to find out where the blocks in the file | 697 | but instead uses bmap to find out where the blocks in the file |
697 | are and uses those addresses directly. | 698 | are and uses those addresses directly. |
698 | 699 | ||
700 | dentry_open: *WARNING: probably going away soon, do not use!* This is an | ||
701 | alternative to f_op->open(), the difference is that this method may open | ||
702 | a file not necessarily originating from the same filesystem as the one | ||
703 | i_op->open() was called on. It may be useful for stacking filesystems | ||
704 | which want to allow native I/O directly on underlying files. | ||
705 | |||
699 | 706 | ||
700 | invalidatepage: If a page has PagePrivate set, then invalidatepage | 707 | invalidatepage: If a page has PagePrivate set, then invalidatepage |
701 | will be called when part or all of the page is to be removed | 708 | will be called when part or all of the page is to be removed |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 7dbe5ec9d9cd..479f33204a37 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1015,10 +1015,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1015 | Format: {"off" | "on" | "skip[mbr]"} | 1015 | Format: {"off" | "on" | "skip[mbr]"} |
1016 | 1016 | ||
1017 | efi= [EFI] | 1017 | efi= [EFI] |
1018 | Format: { "old_map" } | 1018 | Format: { "old_map", "nochunk", "noruntime" } |
1019 | old_map [X86-64]: switch to the old ioremap-based EFI | 1019 | old_map [X86-64]: switch to the old ioremap-based EFI |
1020 | runtime services mapping. 32-bit still uses this one by | 1020 | runtime services mapping. 32-bit still uses this one by |
1021 | default. | 1021 | default. |
1022 | nochunk: disable reading files in "chunks" in the EFI | ||
1023 | boot stub, as chunking can cause problems with some | ||
1024 | firmware implementations. | ||
1025 | noruntime : disable EFI runtime services support | ||
1022 | 1026 | ||
1023 | efi_no_storage_paranoia [EFI; X86] | 1027 | efi_no_storage_paranoia [EFI; X86] |
1024 | Using this parameter you can use more than 50% of | 1028 | Using this parameter you can use more than 50% of |
@@ -1260,7 +1264,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1260 | i8042.noloop [HW] Disable the AUX Loopback command while probing | 1264 | i8042.noloop [HW] Disable the AUX Loopback command while probing |
1261 | for the AUX port | 1265 | for the AUX port |
1262 | i8042.nomux [HW] Don't check presence of an active multiplexing | 1266 | i8042.nomux [HW] Don't check presence of an active multiplexing |
1263 | controller. Default: true. | 1267 | controller |
1264 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX | 1268 | i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX |
1265 | controllers | 1269 | controllers |
1266 | i8042.notimeout [HW] Ignore timeout condition signalled by controller | 1270 | i8042.notimeout [HW] Ignore timeout condition signalled by controller |
@@ -1303,6 +1307,18 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1303 | .cdrom .chs .ignore_cable are additional options | 1307 | .cdrom .chs .ignore_cable are additional options |
1304 | See Documentation/ide/ide.txt. | 1308 | See Documentation/ide/ide.txt. |
1305 | 1309 | ||
1310 | ide-generic.probe-mask= [HW] (E)IDE subsystem | ||
1311 | Format: <int> | ||
1312 | Probe mask for legacy ISA IDE ports. Depending on | ||
1313 | platform up to 6 ports are supported, enabled by | ||
1314 | setting corresponding bits in the mask to 1. The | ||
1315 | default value is 0x0, which has a special meaning. | ||
1316 | On systems that have PCI, it triggers scanning the | ||
1317 | PCI bus for the first and the second port, which | ||
1318 | are then probed. On systems without PCI the value | ||
1319 | of 0x0 enables probing the two first ports as if it | ||
1320 | was 0x3. | ||
1321 | |||
1306 | ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem | 1322 | ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem |
1307 | Claim all unknown PCI IDE storage controllers. | 1323 | Claim all unknown PCI IDE storage controllers. |
1308 | 1324 | ||
@@ -1583,6 +1599,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1583 | kmemleak= [KNL] Boot-time kmemleak enable/disable | 1599 | kmemleak= [KNL] Boot-time kmemleak enable/disable |
1584 | Valid arguments: on, off | 1600 | Valid arguments: on, off |
1585 | Default: on | 1601 | Default: on |
1602 | Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y, | ||
1603 | the default is off. | ||
1586 | 1604 | ||
1587 | kmemcheck= [X86] Boot-time kmemcheck enable/disable/one-shot mode | 1605 | kmemcheck= [X86] Boot-time kmemcheck enable/disable/one-shot mode |
1588 | Valid arguments: 0, 1, 2 | 1606 | Valid arguments: 0, 1, 2 |
@@ -2232,7 +2250,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2232 | 2250 | ||
2233 | nodsp [SH] Disable hardware DSP at boot time. | 2251 | nodsp [SH] Disable hardware DSP at boot time. |
2234 | 2252 | ||
2235 | noefi [X86] Disable EFI runtime services support. | 2253 | noefi Disable EFI runtime services support. |
2236 | 2254 | ||
2237 | noexec [IA-64] | 2255 | noexec [IA-64] |
2238 | 2256 | ||
@@ -3465,6 +3483,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3465 | e.g. base its process migration decisions on it. | 3483 | e.g. base its process migration decisions on it. |
3466 | Default is on. | 3484 | Default is on. |
3467 | 3485 | ||
3486 | topology_updates= [KNL, PPC, NUMA] | ||
3487 | Format: {off} | ||
3488 | Specify if the kernel should ignore (off) | ||
3489 | topology updates sent by the hypervisor to this | ||
3490 | LPAR. | ||
3491 | |||
3468 | tp720= [HW,PS2] | 3492 | tp720= [HW,PS2] |
3469 | 3493 | ||
3470 | tpm_suspend_pcr=[HW,TPM] | 3494 | tpm_suspend_pcr=[HW,TPM] |
@@ -3597,7 +3621,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3597 | 3621 | ||
3598 | usb-storage.delay_use= | 3622 | usb-storage.delay_use= |
3599 | [UMS] The delay in seconds before a new device is | 3623 | [UMS] The delay in seconds before a new device is |
3600 | scanned for Logical Units (default 5). | 3624 | scanned for Logical Units (default 1). |
3601 | 3625 | ||
3602 | usb-storage.quirks= | 3626 | usb-storage.quirks= |
3603 | [UMS] A list of quirks entries to supplement or | 3627 | [UMS] A list of quirks entries to supplement or |
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index f4f033c8d856..45e777f4e41d 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt | |||
@@ -62,6 +62,10 @@ Memory may be allocated or freed before kmemleak is initialised and | |||
62 | these actions are stored in an early log buffer. The size of this buffer | 62 | these actions are stored in an early log buffer. The size of this buffer |
63 | is configured via the CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE option. | 63 | is configured via the CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE option. |
64 | 64 | ||
65 | If CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF are enabled, the kmemleak is | ||
66 | disabled by default. Passing "kmemleak=on" on the kernel command | ||
67 | line enables the function. | ||
68 | |||
65 | Basic Algorithm | 69 | Basic Algorithm |
66 | --------------- | 70 | --------------- |
67 | 71 | ||
diff --git a/Documentation/mailbox.txt b/Documentation/mailbox.txt new file mode 100644 index 000000000000..60f43ff629aa --- /dev/null +++ b/Documentation/mailbox.txt | |||
@@ -0,0 +1,122 @@ | |||
1 | The Common Mailbox Framework | ||
2 | Jassi Brar <jaswinder.singh@linaro.org> | ||
3 | |||
4 | This document aims to help developers write client and controller | ||
5 | drivers for the API. But before we start, let us note that the | ||
6 | client (especially) and controller drivers are likely going to be | ||
7 | very platform specific because the remote firmware is likely to be | ||
8 | proprietary and implement non-standard protocol. So even if two | ||
9 | platforms employ, say, PL320 controller, the client drivers can't | ||
10 | be shared across them. Even the PL320 driver might need to accommodate | ||
11 | some platform specific quirks. So the API is meant mainly to avoid | ||
12 | similar copies of code written for each platform. Having said that, | ||
13 | nothing prevents the remote f/w to also be Linux based and use the | ||
14 | same api there. However none of that helps us locally because we only | ||
15 | ever deal at client's protocol level. | ||
16 | Some of the choices made during implementation are the result of this | ||
17 | peculiarity of this "common" framework. | ||
18 | |||
19 | |||
20 | |||
21 | Part 1 - Controller Driver (See include/linux/mailbox_controller.h) | ||
22 | |||
23 | Allocate mbox_controller and the array of mbox_chan. | ||
24 | Populate mbox_chan_ops, except peek_data() all are mandatory. | ||
25 | The controller driver might know a message has been consumed | ||
26 | by the remote by getting an IRQ or polling some hardware flag | ||
27 | or it can never know (the client knows by way of the protocol). | ||
28 | The method in order of preference is IRQ -> Poll -> None, which | ||
29 | the controller driver should set via 'txdone_irq' or 'txdone_poll' | ||
30 | or neither. | ||
31 | |||
32 | |||
33 | Part 2 - Client Driver (See include/linux/mailbox_client.h) | ||
34 | |||
35 | The client might want to operate in blocking mode (synchronously | ||
36 | send a message through before returning) or non-blocking/async mode (submit | ||
37 | a message and a callback function to the API and return immediately). | ||
38 | |||
39 | |||
40 | struct demo_client { | ||
41 | struct mbox_client cl; | ||
42 | struct mbox_chan *mbox; | ||
43 | struct completion c; | ||
44 | bool async; | ||
45 | /* ... */ | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * This is the handler for data received from remote. The behaviour is purely | ||
50 | * dependent upon the protocol. This is just an example. | ||
51 | */ | ||
52 | static void message_from_remote(struct mbox_client *cl, void *mssg) | ||
53 | { | ||
54 | struct demo_client *dc = container_of(mbox_client, | ||
55 | struct demo_client, cl); | ||
56 | if (dc->aysnc) { | ||
57 | if (is_an_ack(mssg)) { | ||
58 | /* An ACK to our last sample sent */ | ||
59 | return; /* Or do something else here */ | ||
60 | } else { /* A new message from remote */ | ||
61 | queue_req(mssg); | ||
62 | } | ||
63 | } else { | ||
64 | /* Remote f/w sends only ACK packets on this channel */ | ||
65 | return; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | static void sample_sent(struct mbox_client *cl, void *mssg, int r) | ||
70 | { | ||
71 | struct demo_client *dc = container_of(mbox_client, | ||
72 | struct demo_client, cl); | ||
73 | complete(&dc->c); | ||
74 | } | ||
75 | |||
76 | static void client_demo(struct platform_device *pdev) | ||
77 | { | ||
78 | struct demo_client *dc_sync, *dc_async; | ||
79 | /* The controller already knows async_pkt and sync_pkt */ | ||
80 | struct async_pkt ap; | ||
81 | struct sync_pkt sp; | ||
82 | |||
83 | dc_sync = kzalloc(sizeof(*dc_sync), GFP_KERNEL); | ||
84 | dc_async = kzalloc(sizeof(*dc_async), GFP_KERNEL); | ||
85 | |||
86 | /* Populate non-blocking mode client */ | ||
87 | dc_async->cl.dev = &pdev->dev; | ||
88 | dc_async->cl.rx_callback = message_from_remote; | ||
89 | dc_async->cl.tx_done = sample_sent; | ||
90 | dc_async->cl.tx_block = false; | ||
91 | dc_async->cl.tx_tout = 0; /* doesn't matter here */ | ||
92 | dc_async->cl.knows_txdone = false; /* depending upon protocol */ | ||
93 | dc_async->async = true; | ||
94 | init_completion(&dc_async->c); | ||
95 | |||
96 | /* Populate blocking mode client */ | ||
97 | dc_sync->cl.dev = &pdev->dev; | ||
98 | dc_sync->cl.rx_callback = message_from_remote; | ||
99 | dc_sync->cl.tx_done = NULL; /* operate in blocking mode */ | ||
100 | dc_sync->cl.tx_block = true; | ||
101 | dc_sync->cl.tx_tout = 500; /* by half a second */ | ||
102 | dc_sync->cl.knows_txdone = false; /* depending upon protocol */ | ||
103 | dc_sync->async = false; | ||
104 | |||
105 | /* ASync mailbox is listed second in 'mboxes' property */ | ||
106 | dc_async->mbox = mbox_request_channel(&dc_async->cl, 1); | ||
107 | /* Populate data packet */ | ||
108 | /* ap.xxx = 123; etc */ | ||
109 | /* Send async message to remote */ | ||
110 | mbox_send_message(dc_async->mbox, &ap); | ||
111 | |||
112 | /* Sync mailbox is listed first in 'mboxes' property */ | ||
113 | dc_sync->mbox = mbox_request_channel(&dc_sync->cl, 0); | ||
114 | /* Populate data packet */ | ||
115 | /* sp.abc = 123; etc */ | ||
116 | /* Send message to remote in blocking mode */ | ||
117 | mbox_send_message(dc_sync->mbox, &sp); | ||
118 | /* At this point 'sp' has been sent */ | ||
119 | |||
120 | /* Now wait for async chan to be done */ | ||
121 | wait_for_completion(&dc_async->c); | ||
122 | } | ||
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt index a5da5c7e7128..129f7c0e1483 100644 --- a/Documentation/power/pm_qos_interface.txt +++ b/Documentation/power/pm_qos_interface.txt | |||
@@ -5,7 +5,8 @@ performance expectations by drivers, subsystems and user space applications on | |||
5 | one of the parameters. | 5 | one of the parameters. |
6 | 6 | ||
7 | Two different PM QoS frameworks are available: | 7 | Two different PM QoS frameworks are available: |
8 | 1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput. | 8 | 1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput, |
9 | memory_bandwidth. | ||
9 | 2. the per-device PM QoS framework provides the API to manage the per-device latency | 10 | 2. the per-device PM QoS framework provides the API to manage the per-device latency |
10 | constraints and PM QoS flags. | 11 | constraints and PM QoS flags. |
11 | 12 | ||
@@ -13,6 +14,7 @@ Each parameters have defined units: | |||
13 | * latency: usec | 14 | * latency: usec |
14 | * timeout: usec | 15 | * timeout: usec |
15 | * throughput: kbs (kilo bit / sec) | 16 | * throughput: kbs (kilo bit / sec) |
17 | * memory bandwidth: mbs (mega bit / sec) | ||
16 | 18 | ||
17 | 19 | ||
18 | 1. PM QoS framework | 20 | 1. PM QoS framework |
diff --git a/Documentation/prctl/Makefile b/Documentation/prctl/Makefile index 3e3232dcb2b8..2948b7b124b9 100644 --- a/Documentation/prctl/Makefile +++ b/Documentation/prctl/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | # List of programs to build | 1 | # List of programs to build |
2 | hostprogs-y := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test | 2 | hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test |
3 | # Tell kbuild to always build the programs | 3 | # Tell kbuild to always build the programs |
4 | always := $(hostprogs-y) | 4 | always := $(hostprogs-y) |
5 | 5 | ||
diff --git a/Documentation/ptp/testptp.mk b/Documentation/ptp/testptp.mk new file mode 100644 index 000000000000..4ef2d9755421 --- /dev/null +++ b/Documentation/ptp/testptp.mk | |||
@@ -0,0 +1,33 @@ | |||
1 | # PTP 1588 clock support - User space test program | ||
2 | # | ||
3 | # Copyright (C) 2010 OMICRON electronics GmbH | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | |||
19 | CC = $(CROSS_COMPILE)gcc | ||
20 | INC = -I$(KBUILD_OUTPUT)/usr/include | ||
21 | CFLAGS = -Wall $(INC) | ||
22 | LDLIBS = -lrt | ||
23 | PROGS = testptp | ||
24 | |||
25 | all: $(PROGS) | ||
26 | |||
27 | testptp: testptp.o | ||
28 | |||
29 | clean: | ||
30 | rm -f testptp.o | ||
31 | |||
32 | distclean: clean | ||
33 | rm -f $(PROGS) | ||
diff --git a/Documentation/scsi/osd.txt b/Documentation/scsi/osd.txt index da162f7fd5f5..5a9879bad073 100644 --- a/Documentation/scsi/osd.txt +++ b/Documentation/scsi/osd.txt | |||
@@ -184,8 +184,7 @@ Any problems, questions, bug reports, lonely OSD nights, please email: | |||
184 | More up-to-date information can be found on: | 184 | More up-to-date information can be found on: |
185 | http://open-osd.org | 185 | http://open-osd.org |
186 | 186 | ||
187 | Boaz Harrosh <bharrosh@panasas.com> | 187 | Boaz Harrosh <ooo@electrozaur.com> |
188 | Benny Halevy <bhalevy@panasas.com> | ||
189 | 188 | ||
190 | References | 189 | References |
191 | ========== | 190 | ========== |
diff --git a/Documentation/target/tcmu-design.txt b/Documentation/target/tcmu-design.txt new file mode 100644 index 000000000000..5518465290bf --- /dev/null +++ b/Documentation/target/tcmu-design.txt | |||
@@ -0,0 +1,378 @@ | |||
1 | Contents: | ||
2 | |||
3 | 1) TCM Userspace Design | ||
4 | a) Background | ||
5 | b) Benefits | ||
6 | c) Design constraints | ||
7 | d) Implementation overview | ||
8 | i. Mailbox | ||
9 | ii. Command ring | ||
10 | iii. Data Area | ||
11 | e) Device discovery | ||
12 | f) Device events | ||
13 | g) Other contingencies | ||
14 | 2) Writing a user pass-through handler | ||
15 | a) Discovering and configuring TCMU uio devices | ||
16 | b) Waiting for events on the device(s) | ||
17 | c) Managing the command ring | ||
18 | 3) Command filtering and pass_level | ||
19 | 4) A final note | ||
20 | |||
21 | |||
22 | TCM Userspace Design | ||
23 | -------------------- | ||
24 | |||
25 | TCM is another name for LIO, an in-kernel iSCSI target (server). | ||
26 | Existing TCM targets run in the kernel. TCMU (TCM in Userspace) | ||
27 | allows userspace programs to be written which act as iSCSI targets. | ||
28 | This document describes the design. | ||
29 | |||
30 | The existing kernel provides modules for different SCSI transport | ||
31 | protocols. TCM also modularizes the data storage. There are existing | ||
32 | modules for file, block device, RAM or using another SCSI device as | ||
33 | storage. These are called "backstores" or "storage engines". These | ||
34 | built-in modules are implemented entirely as kernel code. | ||
35 | |||
36 | Background: | ||
37 | |||
38 | In addition to modularizing the transport protocol used for carrying | ||
39 | SCSI commands ("fabrics"), the Linux kernel target, LIO, also modularizes | ||
40 | the actual data storage as well. These are referred to as "backstores" | ||
41 | or "storage engines". The target comes with backstores that allow a | ||
42 | file, a block device, RAM, or another SCSI device to be used for the | ||
43 | local storage needed for the exported SCSI LUN. Like the rest of LIO, | ||
44 | these are implemented entirely as kernel code. | ||
45 | |||
46 | These backstores cover the most common use cases, but not all. One new | ||
47 | use case that other non-kernel target solutions, such as tgt, are able | ||
48 | to support is using Gluster's GLFS or Ceph's RBD as a backstore. The | ||
49 | target then serves as a translator, allowing initiators to store data | ||
50 | in these non-traditional networked storage systems, while still only | ||
51 | using standard protocols themselves. | ||
52 | |||
53 | If the target is a userspace process, supporting these is easy. tgt, | ||
54 | for example, needs only a small adapter module for each, because the | ||
55 | modules just use the available userspace libraries for RBD and GLFS. | ||
56 | |||
57 | Adding support for these backstores in LIO is considerably more | ||
58 | difficult, because LIO is entirely kernel code. Instead of undertaking | ||
59 | the significant work to port the GLFS or RBD APIs and protocols to the | ||
60 | kernel, another approach is to create a userspace pass-through | ||
61 | backstore for LIO, "TCMU". | ||
62 | |||
63 | |||
64 | Benefits: | ||
65 | |||
66 | In addition to allowing relatively easy support for RBD and GLFS, TCMU | ||
67 | will also allow easier development of new backstores. TCMU combines | ||
68 | with the LIO loopback fabric to become something similar to FUSE | ||
69 | (Filesystem in Userspace), but at the SCSI layer instead of the | ||
70 | filesystem layer. A SUSE, if you will. | ||
71 | |||
72 | The disadvantage is there are more distinct components to configure, and | ||
73 | potentially to malfunction. This is unavoidable, but hopefully not | ||
74 | fatal if we're careful to keep things as simple as possible. | ||
75 | |||
76 | Design constraints: | ||
77 | |||
78 | - Good performance: high throughput, low latency | ||
79 | - Cleanly handle if userspace: | ||
80 | 1) never attaches | ||
81 | 2) hangs | ||
82 | 3) dies | ||
83 | 4) misbehaves | ||
84 | - Allow future flexibility in user & kernel implementations | ||
85 | - Be reasonably memory-efficient | ||
86 | - Simple to configure & run | ||
87 | - Simple to write a userspace backend | ||
88 | |||
89 | |||
90 | Implementation overview: | ||
91 | |||
92 | The core of the TCMU interface is a memory region that is shared | ||
93 | between kernel and userspace. Within this region is: a control area | ||
94 | (mailbox); a lockless producer/consumer circular buffer for commands | ||
95 | to be passed up, and status returned; and an in/out data buffer area. | ||
96 | |||
97 | TCMU uses the pre-existing UIO subsystem. UIO allows device driver | ||
98 | development in userspace, and this is conceptually very close to the | ||
99 | TCMU use case, except instead of a physical device, TCMU implements a | ||
100 | memory-mapped layout designed for SCSI commands. Using UIO also | ||
101 | benefits TCMU by handling device introspection (e.g. a way for | ||
102 | userspace to determine how large the shared region is) and signaling | ||
103 | mechanisms in both directions. | ||
104 | |||
105 | There are no embedded pointers in the memory region. Everything is | ||
106 | expressed as an offset from the region's starting address. This allows | ||
107 | the ring to still work if the user process dies and is restarted with | ||
108 | the region mapped at a different virtual address. | ||
109 | |||
110 | See target_core_user.h for the struct definitions. | ||
111 | |||
112 | The Mailbox: | ||
113 | |||
114 | The mailbox is always at the start of the shared memory region, and | ||
115 | contains a version, details about the starting offset and size of the | ||
116 | command ring, and head and tail pointers to be used by the kernel and | ||
117 | userspace (respectively) to put commands on the ring, and indicate | ||
118 | when the commands are completed. | ||
119 | |||
120 | version - 1 (userspace should abort if otherwise) | ||
121 | flags - none yet defined. | ||
122 | cmdr_off - The offset of the start of the command ring from the start | ||
123 | of the memory region, to account for the mailbox size. | ||
124 | cmdr_size - The size of the command ring. This does *not* need to be a | ||
125 | power of two. | ||
126 | cmd_head - Modified by the kernel to indicate when a command has been | ||
127 | placed on the ring. | ||
128 | cmd_tail - Modified by userspace to indicate when it has completed | ||
129 | processing of a command. | ||
130 | |||
131 | The Command Ring: | ||
132 | |||
133 | Commands are placed on the ring by the kernel incrementing | ||
134 | mailbox.cmd_head by the size of the command, modulo cmdr_size, and | ||
135 | then signaling userspace via uio_event_notify(). Once the command is | ||
136 | completed, userspace updates mailbox.cmd_tail in the same way and | ||
137 | signals the kernel via a 4-byte write(). When cmd_head equals | ||
138 | cmd_tail, the ring is empty -- no commands are currently waiting to be | ||
139 | processed by userspace. | ||
140 | |||
141 | TCMU commands start with a common header containing "len_op", a 32-bit | ||
142 | value that stores the length, as well as the opcode in the lowest | ||
143 | unused bits. Currently only two opcodes are defined, TCMU_OP_PAD and | ||
144 | TCMU_OP_CMD. When userspace encounters a command with PAD opcode, it | ||
145 | should skip ahead by the bytes in "length". (The kernel inserts PAD | ||
146 | entries to ensure each CMD entry fits contigously into the circular | ||
147 | buffer.) | ||
148 | |||
149 | When userspace handles a CMD, it finds the SCSI CDB (Command Data | ||
150 | Block) via tcmu_cmd_entry.req.cdb_off. This is an offset from the | ||
151 | start of the overall shared memory region, not the entry. The data | ||
152 | in/out buffers are accessible via tht req.iov[] array. Note that | ||
153 | each iov.iov_base is also an offset from the start of the region. | ||
154 | |||
155 | TCMU currently does not support BIDI operations. | ||
156 | |||
157 | When completing a command, userspace sets rsp.scsi_status, and | ||
158 | rsp.sense_buffer if necessary. Userspace then increments | ||
159 | mailbox.cmd_tail by entry.hdr.length (mod cmdr_size) and signals the | ||
160 | kernel via the UIO method, a 4-byte write to the file descriptor. | ||
161 | |||
162 | The Data Area: | ||
163 | |||
164 | This is shared-memory space after the command ring. The organization | ||
165 | of this area is not defined in the TCMU interface, and userspace | ||
166 | should access only the parts referenced by pending iovs. | ||
167 | |||
168 | |||
169 | Device Discovery: | ||
170 | |||
171 | Other devices may be using UIO besides TCMU. Unrelated user processes | ||
172 | may also be handling different sets of TCMU devices. TCMU userspace | ||
173 | processes must find their devices by scanning sysfs | ||
174 | class/uio/uio*/name. For TCMU devices, these names will be of the | ||
175 | format: | ||
176 | |||
177 | tcm-user/<hba_num>/<device_name>/<subtype>/<path> | ||
178 | |||
179 | where "tcm-user" is common for all TCMU-backed UIO devices. <hba_num> | ||
180 | and <device_name> allow userspace to find the device's path in the | ||
181 | kernel target's configfs tree. Assuming the usual mount point, it is | ||
182 | found at: | ||
183 | |||
184 | /sys/kernel/config/target/core/user_<hba_num>/<device_name> | ||
185 | |||
186 | This location contains attributes such as "hw_block_size", that | ||
187 | userspace needs to know for correct operation. | ||
188 | |||
189 | <subtype> will be a userspace-process-unique string to identify the | ||
190 | TCMU device as expecting to be backed by a certain handler, and <path> | ||
191 | will be an additional handler-specific string for the user process to | ||
192 | configure the device, if needed. The name cannot contain ':', due to | ||
193 | LIO limitations. | ||
194 | |||
195 | For all devices so discovered, the user handler opens /dev/uioX and | ||
196 | calls mmap(): | ||
197 | |||
198 | mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0) | ||
199 | |||
200 | where size must be equal to the value read from | ||
201 | /sys/class/uio/uioX/maps/map0/size. | ||
202 | |||
203 | |||
204 | Device Events: | ||
205 | |||
206 | If a new device is added or removed, a notification will be broadcast | ||
207 | over netlink, using a generic netlink family name of "TCM-USER" and a | ||
208 | multicast group named "config". This will include the UIO name as | ||
209 | described in the previous section, as well as the UIO minor | ||
210 | number. This should allow userspace to identify both the UIO device and | ||
211 | the LIO device, so that after determining the device is supported | ||
212 | (based on subtype) it can take the appropriate action. | ||
213 | |||
214 | |||
215 | Other contingencies: | ||
216 | |||
217 | Userspace handler process never attaches: | ||
218 | |||
219 | - TCMU will post commands, and then abort them after a timeout period | ||
220 | (30 seconds.) | ||
221 | |||
222 | Userspace handler process is killed: | ||
223 | |||
224 | - It is still possible to restart and re-connect to TCMU | ||
225 | devices. Command ring is preserved. However, after the timeout period, | ||
226 | the kernel will abort pending tasks. | ||
227 | |||
228 | Userspace handler process hangs: | ||
229 | |||
230 | - The kernel will abort pending tasks after a timeout period. | ||
231 | |||
232 | Userspace handler process is malicious: | ||
233 | |||
234 | - The process can trivially break the handling of devices it controls, | ||
235 | but should not be able to access kernel memory outside its shared | ||
236 | memory areas. | ||
237 | |||
238 | |||
239 | Writing a user pass-through handler (with example code) | ||
240 | ------------------------------------------------------- | ||
241 | |||
242 | A user process handing a TCMU device must support the following: | ||
243 | |||
244 | a) Discovering and configuring TCMU uio devices | ||
245 | b) Waiting for events on the device(s) | ||
246 | c) Managing the command ring: Parsing operations and commands, | ||
247 | performing work as needed, setting response fields (scsi_status and | ||
248 | possibly sense_buffer), updating cmd_tail, and notifying the kernel | ||
249 | that work has been finished | ||
250 | |||
251 | First, consider instead writing a plugin for tcmu-runner. tcmu-runner | ||
252 | implements all of this, and provides a higher-level API for plugin | ||
253 | authors. | ||
254 | |||
255 | TCMU is designed so that multiple unrelated processes can manage TCMU | ||
256 | devices separately. All handlers should make sure to only open their | ||
257 | devices, based opon a known subtype string. | ||
258 | |||
259 | a) Discovering and configuring TCMU UIO devices: | ||
260 | |||
261 | (error checking omitted for brevity) | ||
262 | |||
263 | int fd, dev_fd; | ||
264 | char buf[256]; | ||
265 | unsigned long long map_len; | ||
266 | void *map; | ||
267 | |||
268 | fd = open("/sys/class/uio/uio0/name", O_RDONLY); | ||
269 | ret = read(fd, buf, sizeof(buf)); | ||
270 | close(fd); | ||
271 | buf[ret-1] = '\0'; /* null-terminate and chop off the \n */ | ||
272 | |||
273 | /* we only want uio devices whose name is a format we expect */ | ||
274 | if (strncmp(buf, "tcm-user", 8)) | ||
275 | exit(-1); | ||
276 | |||
277 | /* Further checking for subtype also needed here */ | ||
278 | |||
279 | fd = open(/sys/class/uio/%s/maps/map0/size, O_RDONLY); | ||
280 | ret = read(fd, buf, sizeof(buf)); | ||
281 | close(fd); | ||
282 | str_buf[ret-1] = '\0'; /* null-terminate and chop off the \n */ | ||
283 | |||
284 | map_len = strtoull(buf, NULL, 0); | ||
285 | |||
286 | dev_fd = open("/dev/uio0", O_RDWR); | ||
287 | map = mmap(NULL, map_len, PROT_READ|PROT_WRITE, MAP_SHARED, dev_fd, 0); | ||
288 | |||
289 | |||
290 | b) Waiting for events on the device(s) | ||
291 | |||
292 | while (1) { | ||
293 | char buf[4]; | ||
294 | |||
295 | int ret = read(dev_fd, buf, 4); /* will block */ | ||
296 | |||
297 | handle_device_events(dev_fd, map); | ||
298 | } | ||
299 | |||
300 | |||
301 | c) Managing the command ring | ||
302 | |||
303 | #include <linux/target_core_user.h> | ||
304 | |||
305 | int handle_device_events(int fd, void *map) | ||
306 | { | ||
307 | struct tcmu_mailbox *mb = map; | ||
308 | struct tcmu_cmd_entry *ent = (void *) mb + mb->cmdr_off + mb->cmd_tail; | ||
309 | int did_some_work = 0; | ||
310 | |||
311 | /* Process events from cmd ring until we catch up with cmd_head */ | ||
312 | while (ent != (void *)mb + mb->cmdr_off + mb->cmd_head) { | ||
313 | |||
314 | if (tcmu_hdr_get_op(&ent->hdr) == TCMU_OP_CMD) { | ||
315 | uint8_t *cdb = (void *)mb + ent->req.cdb_off; | ||
316 | bool success = true; | ||
317 | |||
318 | /* Handle command here. */ | ||
319 | printf("SCSI opcode: 0x%x\n", cdb[0]); | ||
320 | |||
321 | /* Set response fields */ | ||
322 | if (success) | ||
323 | ent->rsp.scsi_status = SCSI_NO_SENSE; | ||
324 | else { | ||
325 | /* Also fill in rsp->sense_buffer here */ | ||
326 | ent->rsp.scsi_status = SCSI_CHECK_CONDITION; | ||
327 | } | ||
328 | } | ||
329 | else { | ||
330 | /* Do nothing for PAD entries */ | ||
331 | } | ||
332 | |||
333 | /* update cmd_tail */ | ||
334 | mb->cmd_tail = (mb->cmd_tail + tcmu_hdr_get_len(&ent->hdr)) % mb->cmdr_size; | ||
335 | ent = (void *) mb + mb->cmdr_off + mb->cmd_tail; | ||
336 | did_some_work = 1; | ||
337 | } | ||
338 | |||
339 | /* Notify the kernel that work has been finished */ | ||
340 | if (did_some_work) { | ||
341 | uint32_t buf = 0; | ||
342 | |||
343 | write(fd, &buf, 4); | ||
344 | } | ||
345 | |||
346 | return 0; | ||
347 | } | ||
348 | |||
349 | |||
350 | Command filtering and pass_level | ||
351 | -------------------------------- | ||
352 | |||
353 | TCMU supports a "pass_level" option with valid values of 0 or 1. When | ||
354 | the value is 0 (the default), nearly all SCSI commands received for | ||
355 | the device are passed through to the handler. This allows maximum | ||
356 | flexibility but increases the amount of code required by the handler, | ||
357 | to support all mandatory SCSI commands. If pass_level is set to 1, | ||
358 | then only IO-related commands are presented, and the rest are handled | ||
359 | by LIO's in-kernel command emulation. The commands presented at level | ||
360 | 1 include all versions of: | ||
361 | |||
362 | READ | ||
363 | WRITE | ||
364 | WRITE_VERIFY | ||
365 | XDWRITEREAD | ||
366 | WRITE_SAME | ||
367 | COMPARE_AND_WRITE | ||
368 | SYNCHRONIZE_CACHE | ||
369 | UNMAP | ||
370 | |||
371 | |||
372 | A final note | ||
373 | ------------ | ||
374 | |||
375 | Please be careful to return codes as defined by the SCSI | ||
376 | specifications. These are different than some values defined in the | ||
377 | scsi/scsi.h include file. For example, CHECK CONDITION's status code | ||
378 | is 2, not 1. | ||
diff --git a/Documentation/vDSO/Makefile b/Documentation/vDSO/Makefile index 2b99e57207c1..ee075c3d2124 100644 --- a/Documentation/vDSO/Makefile +++ b/Documentation/vDSO/Makefile | |||
@@ -10,3 +10,6 @@ always := $(hostprogs-y) | |||
10 | HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99 | 10 | HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99 |
11 | HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector | 11 | HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector |
12 | HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib | 12 | HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib |
13 | ifeq ($(CONFIG_X86_32),y) | ||
14 | HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s | ||
15 | endif | ||
diff --git a/Documentation/vDSO/vdso_standalone_test_x86.c b/Documentation/vDSO/vdso_standalone_test_x86.c index d46240265c50..93b0ebf8cc38 100644 --- a/Documentation/vDSO/vdso_standalone_test_x86.c +++ b/Documentation/vDSO/vdso_standalone_test_x86.c | |||
@@ -63,7 +63,7 @@ static inline void linux_exit(int code) | |||
63 | x86_syscall3(__NR_exit, code, 0, 0); | 63 | x86_syscall3(__NR_exit, code, 0, 0); |
64 | } | 64 | } |
65 | 65 | ||
66 | void to_base10(char *lastdig, uint64_t n) | 66 | void to_base10(char *lastdig, time_t n) |
67 | { | 67 | { |
68 | while (n) { | 68 | while (n) { |
69 | *lastdig = (n % 10) + '0'; | 69 | *lastdig = (n % 10) + '0'; |
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt index eeb11a28e4fc..e5a940e3d304 100644 --- a/Documentation/video4linux/vivid.txt +++ b/Documentation/video4linux/vivid.txt | |||
@@ -221,12 +221,11 @@ ccs_out_mode: specify the allowed video output crop/compose/scaling combination | |||
221 | key, not quality. | 221 | key, not quality. |
222 | 222 | ||
223 | multiplanar: select whether each device instance supports multi-planar formats, | 223 | multiplanar: select whether each device instance supports multi-planar formats, |
224 | and thus the V4L2 multi-planar API. By default the first device instance | 224 | and thus the V4L2 multi-planar API. By default device instances are |
225 | is single-planar, the second multi-planar, and it keeps alternating. | 225 | single-planar. |
226 | 226 | ||
227 | This module option can override that for each instance. Values are: | 227 | This module option can override that for each instance. Values are: |
228 | 228 | ||
229 | 0: use alternating single and multi-planar devices. | ||
230 | 1: this is a single-planar instance. | 229 | 1: this is a single-planar instance. |
231 | 2: this is a multi-planar instance. | 230 | 2: this is a multi-planar instance. |
232 | 231 | ||
@@ -975,9 +974,8 @@ is set, then the alpha component is only used for the color red and set to | |||
975 | 0 otherwise. | 974 | 0 otherwise. |
976 | 975 | ||
977 | The driver has to be configured to support the multiplanar formats. By default | 976 | The driver has to be configured to support the multiplanar formats. By default |
978 | the first driver instance is single-planar, the second is multi-planar, and it | 977 | the driver instances are single-planar. This can be changed by setting the |
979 | keeps alternating. This can be changed by setting the multiplanar module option, | 978 | multiplanar module option, see section 1 for more details on that option. |
980 | see section 1 for more details on that option. | ||
981 | 979 | ||
982 | If the driver instance is using the multiplanar formats/API, then the first | 980 | If the driver instance is using the multiplanar formats/API, then the first |
983 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the | 981 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the |
@@ -1021,7 +1019,7 @@ the output overlay for the video output, turn on video looping and capture | |||
1021 | to see the blended framebuffer overlay that's being written to by the second | 1019 | to see the blended framebuffer overlay that's being written to by the second |
1022 | instance. This setup would require the following commands: | 1020 | instance. This setup would require the following commands: |
1023 | 1021 | ||
1024 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 multiplanar=1,1 | 1022 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 |
1025 | $ v4l2-ctl -d1 --find-fb | 1023 | $ v4l2-ctl -d1 --find-fb |
1026 | /dev/fb1 is the framebuffer associated with base address 0x12800000 | 1024 | /dev/fb1 is the framebuffer associated with base address 0x12800000 |
1027 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 | 1025 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 |
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index bdd4bb97fff7..b64e0af9cc56 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -274,7 +274,7 @@ This command mounts a (pseudo) filesystem of type hugetlbfs on the directory | |||
274 | /mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid | 274 | /mnt/huge. Any files created on /mnt/huge uses huge pages. The uid and gid |
275 | options sets the owner and group of the root of the file system. By default | 275 | options sets the owner and group of the root of the file system. By default |
276 | the uid and gid of the current process are taken. The mode option sets the | 276 | the uid and gid of the current process are taken. The mode option sets the |
277 | mode of root of file system to value & 0777. This value is given in octal. | 277 | mode of root of file system to value & 01777. This value is given in octal. |
278 | By default the value 0755 is picked. The size option sets the maximum value of | 278 | By default the value 0755 is picked. The size option sets the maximum value of |
279 | memory (huge pages) allowed for that filesystem (/mnt/huge). The size is | 279 | memory (huge pages) allowed for that filesystem (/mnt/huge). The size is |
280 | rounded down to HPAGE_SIZE. The option nr_inodes sets the maximum number of | 280 | rounded down to HPAGE_SIZE. The option nr_inodes sets the maximum number of |