diff options
author | Vishal Mahaveer | 2018-08-28 14:56:54 -0500 |
---|---|---|
committer | Vishal Mahaveer | 2018-08-28 14:56:54 -0500 |
commit | dc4699c65d94c3afe98699a82f7551f3db76dc02 (patch) | |
tree | f2533a2e7df9b794986a4c3206cb84a00937894e | |
parent | 76d1124a747c3cdb42f233ec6fd7e3743711419a (diff) | |
parent | eb496200efeb6c580f386523062b0ccc80325315 (diff) | |
download | kernel-omap-6AO.1.1-lcard-revb.tar.gz kernel-omap-6AO.1.1-lcard-revb.tar.xz kernel-omap-6AO.1.1-lcard-revb.zip |
Merge tag '6AO.1.1' into 6AO.1.0-lcard-revb6AO.1.1-lcard-revb
Change-Id: Ic07856859ae494d89ebddbed039e77bba979bc82
1271 files changed, 16345 insertions, 6476 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index b683e8ee69ec..ea6a043f5beb 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
@@ -271,3 +271,19 @@ Description: Parameters for the CPU cache attributes | |||
271 | - WriteBack: data is written only to the cache line and | 271 | - WriteBack: data is written only to the cache line and |
272 | the modified cache line is written to main | 272 | the modified cache line is written to main |
273 | memory only when it is replaced | 273 | memory only when it is replaced |
274 | |||
275 | What: /sys/devices/system/cpu/vulnerabilities | ||
276 | /sys/devices/system/cpu/vulnerabilities/meltdown | ||
277 | /sys/devices/system/cpu/vulnerabilities/spectre_v1 | ||
278 | /sys/devices/system/cpu/vulnerabilities/spectre_v2 | ||
279 | Date: January 2018 | ||
280 | Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
281 | Description: Information about CPU vulnerabilities | ||
282 | |||
283 | The files are named after the code names of CPU | ||
284 | vulnerabilities. The output of those files reflects the | ||
285 | state of the CPUs in the system. Possible output values: | ||
286 | |||
287 | "Not affected" CPU is not affected by the vulnerability | ||
288 | "Vulnerable" CPU is affected and no mitigation in effect | ||
289 | "Mitigation: $M" CPU is affected and mitigation $M is in effect | ||
diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt deleted file mode 100644 index 6ec1a880ac18..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | THS8135 Video DAC | ||
2 | ----------------- | ||
3 | |||
4 | This is the binding for Texas Instruments THS8135 Video DAC bridge. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible: Must be "ti,ths8135" | ||
9 | |||
10 | Required nodes: | ||
11 | |||
12 | This device has two video ports. Their connections are modelled using the OF | ||
13 | graph bindings specified in Documentation/devicetree/bindings/graph.txt. | ||
14 | |||
15 | - Video port 0 for RGB input | ||
16 | - Video port 1 for VGA output | ||
17 | |||
18 | Example | ||
19 | ------- | ||
20 | |||
21 | vga-bridge { | ||
22 | compatible = "ti,ths8135"; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <0>; | ||
25 | |||
26 | ports { | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <0>; | ||
29 | |||
30 | port@0 { | ||
31 | reg = <0>; | ||
32 | |||
33 | vga_bridge_in: endpoint { | ||
34 | remote-endpoint = <&lcdc_out_vga>; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | port@1 { | ||
39 | reg = <1>; | ||
40 | |||
41 | vga_bridge_out: endpoint { | ||
42 | remote-endpoint = <&vga_con_in>; | ||
43 | }; | ||
44 | }; | ||
45 | }; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index c261598164a7..17d43ca27f41 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt | |||
@@ -58,6 +58,6 @@ Example: | |||
58 | interrupts = <0 35 0x4>; | 58 | interrupts = <0 35 0x4>; |
59 | status = "disabled"; | 59 | status = "disabled"; |
60 | dmas = <&dmahost 12 0 1>, | 60 | dmas = <&dmahost 12 0 1>, |
61 | <&dmahost 13 0 1 0>; | 61 | <&dmahost 13 1 0>; |
62 | dma-names = "rx", "rx"; | 62 | dma-names = "rx", "rx"; |
63 | }; | 63 | }; |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 6c0108eb0137..2139ea253142 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -233,7 +233,7 @@ data_err=ignore(*) Just print an error message if an error occurs | |||
233 | data_err=abort Abort the journal if an error occurs in a file | 233 | data_err=abort Abort the journal if an error occurs in a file |
234 | data buffer in ordered mode. | 234 | data buffer in ordered mode. |
235 | 235 | ||
236 | grpid Give objects the same group ID as their creator. | 236 | grpid New objects have the group ID of their parent. |
237 | bsdgroups | 237 | bsdgroups |
238 | 238 | ||
239 | nogrpid (*) New objects have the group ID of their creator. | 239 | nogrpid (*) New objects have the group ID of their creator. |
diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/kdump/gdbmacros.txt index 9b9b454b048a..35f6a982a0d5 100644 --- a/Documentation/kdump/gdbmacros.txt +++ b/Documentation/kdump/gdbmacros.txt | |||
@@ -15,15 +15,16 @@ | |||
15 | 15 | ||
16 | define bttnobp | 16 | define bttnobp |
17 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) | 17 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) |
18 | set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next) | 18 | set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next) |
19 | set $init_t=&init_task | 19 | set $init_t=&init_task |
20 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) | 20 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) |
21 | set var $stacksize = sizeof(union thread_union) | ||
21 | while ($next_t != $init_t) | 22 | while ($next_t != $init_t) |
22 | set $next_t=(struct task_struct *)$next_t | 23 | set $next_t=(struct task_struct *)$next_t |
23 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm | 24 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm |
24 | printf "===================\n" | 25 | printf "===================\n" |
25 | set var $stackp = $next_t.thread.esp | 26 | set var $stackp = $next_t.thread.sp |
26 | set var $stack_top = ($stackp & ~4095) + 4096 | 27 | set var $stack_top = ($stackp & ~($stacksize - 1)) + $stacksize |
27 | 28 | ||
28 | while ($stackp < $stack_top) | 29 | while ($stackp < $stack_top) |
29 | if (*($stackp) > _stext && *($stackp) < _sinittext) | 30 | if (*($stackp) > _stext && *($stackp) < _sinittext) |
@@ -31,13 +32,13 @@ define bttnobp | |||
31 | end | 32 | end |
32 | set $stackp += 4 | 33 | set $stackp += 4 |
33 | end | 34 | end |
34 | set $next_th=(((char *)$next_t->pids[1].pid_list.next) - $pid_off) | 35 | set $next_th=(((char *)$next_t->thread_group.next) - $pid_off) |
35 | while ($next_th != $next_t) | 36 | while ($next_th != $next_t) |
36 | set $next_th=(struct task_struct *)$next_th | 37 | set $next_th=(struct task_struct *)$next_th |
37 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm | 38 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm |
38 | printf "===================\n" | 39 | printf "===================\n" |
39 | set var $stackp = $next_t.thread.esp | 40 | set var $stackp = $next_t.thread.sp |
40 | set var $stack_top = ($stackp & ~4095) + 4096 | 41 | set var $stack_top = ($stackp & ~($stacksize - 1)) + stacksize |
41 | 42 | ||
42 | while ($stackp < $stack_top) | 43 | while ($stackp < $stack_top) |
43 | if (*($stackp) > _stext && *($stackp) < _sinittext) | 44 | if (*($stackp) > _stext && *($stackp) < _sinittext) |
@@ -45,7 +46,7 @@ define bttnobp | |||
45 | end | 46 | end |
46 | set $stackp += 4 | 47 | set $stackp += 4 |
47 | end | 48 | end |
48 | set $next_th=(((char *)$next_th->pids[1].pid_list.next) - $pid_off) | 49 | set $next_th=(((char *)$next_th->thread_group.next) - $pid_off) |
49 | end | 50 | end |
50 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off | 51 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off |
51 | end | 52 | end |
@@ -54,42 +55,44 @@ document bttnobp | |||
54 | dump all thread stack traces on a kernel compiled with !CONFIG_FRAME_POINTER | 55 | dump all thread stack traces on a kernel compiled with !CONFIG_FRAME_POINTER |
55 | end | 56 | end |
56 | 57 | ||
58 | define btthreadstack | ||
59 | set var $pid_task = $arg0 | ||
60 | |||
61 | printf "\npid %d; comm %s:\n", $pid_task.pid, $pid_task.comm | ||
62 | printf "task struct: " | ||
63 | print $pid_task | ||
64 | printf "===================\n" | ||
65 | set var $stackp = $pid_task.thread.sp | ||
66 | set var $stacksize = sizeof(union thread_union) | ||
67 | set var $stack_top = ($stackp & ~($stacksize - 1)) + $stacksize | ||
68 | set var $stack_bot = ($stackp & ~($stacksize - 1)) | ||
69 | |||
70 | set $stackp = *((unsigned long *) $stackp) | ||
71 | while (($stackp < $stack_top) && ($stackp > $stack_bot)) | ||
72 | set var $addr = *(((unsigned long *) $stackp) + 1) | ||
73 | info symbol $addr | ||
74 | set $stackp = *((unsigned long *) $stackp) | ||
75 | end | ||
76 | end | ||
77 | document btthreadstack | ||
78 | dump a thread stack using the given task structure pointer | ||
79 | end | ||
80 | |||
81 | |||
57 | define btt | 82 | define btt |
58 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) | 83 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) |
59 | set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next) | 84 | set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next) |
60 | set $init_t=&init_task | 85 | set $init_t=&init_task |
61 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) | 86 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) |
62 | while ($next_t != $init_t) | 87 | while ($next_t != $init_t) |
63 | set $next_t=(struct task_struct *)$next_t | 88 | set $next_t=(struct task_struct *)$next_t |
64 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm | 89 | btthreadstack $next_t |
65 | printf "===================\n" | ||
66 | set var $stackp = $next_t.thread.esp | ||
67 | set var $stack_top = ($stackp & ~4095) + 4096 | ||
68 | set var $stack_bot = ($stackp & ~4095) | ||
69 | |||
70 | set $stackp = *($stackp) | ||
71 | while (($stackp < $stack_top) && ($stackp > $stack_bot)) | ||
72 | set var $addr = *($stackp + 4) | ||
73 | info symbol $addr | ||
74 | set $stackp = *($stackp) | ||
75 | end | ||
76 | 90 | ||
77 | set $next_th=(((char *)$next_t->pids[1].pid_list.next) - $pid_off) | 91 | set $next_th=(((char *)$next_t->thread_group.next) - $pid_off) |
78 | while ($next_th != $next_t) | 92 | while ($next_th != $next_t) |
79 | set $next_th=(struct task_struct *)$next_th | 93 | set $next_th=(struct task_struct *)$next_th |
80 | printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm | 94 | btthreadstack $next_th |
81 | printf "===================\n" | 95 | set $next_th=(((char *)$next_th->thread_group.next) - $pid_off) |
82 | set var $stackp = $next_t.thread.esp | ||
83 | set var $stack_top = ($stackp & ~4095) + 4096 | ||
84 | set var $stack_bot = ($stackp & ~4095) | ||
85 | |||
86 | set $stackp = *($stackp) | ||
87 | while (($stackp < $stack_top) && ($stackp > $stack_bot)) | ||
88 | set var $addr = *($stackp + 4) | ||
89 | info symbol $addr | ||
90 | set $stackp = *($stackp) | ||
91 | end | ||
92 | set $next_th=(((char *)$next_th->pids[1].pid_list.next) - $pid_off) | ||
93 | end | 96 | end |
94 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off | 97 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off |
95 | end | 98 | end |
@@ -101,7 +104,7 @@ end | |||
101 | define btpid | 104 | define btpid |
102 | set var $pid = $arg0 | 105 | set var $pid = $arg0 |
103 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) | 106 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) |
104 | set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next) | 107 | set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next) |
105 | set $init_t=&init_task | 108 | set $init_t=&init_task |
106 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) | 109 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) |
107 | set var $pid_task = 0 | 110 | set var $pid_task = 0 |
@@ -113,29 +116,18 @@ define btpid | |||
113 | set $pid_task = $next_t | 116 | set $pid_task = $next_t |
114 | end | 117 | end |
115 | 118 | ||
116 | set $next_th=(((char *)$next_t->pids[1].pid_list.next) - $pid_off) | 119 | set $next_th=(((char *)$next_t->thread_group.next) - $pid_off) |
117 | while ($next_th != $next_t) | 120 | while ($next_th != $next_t) |
118 | set $next_th=(struct task_struct *)$next_th | 121 | set $next_th=(struct task_struct *)$next_th |
119 | if ($next_th.pid == $pid) | 122 | if ($next_th.pid == $pid) |
120 | set $pid_task = $next_th | 123 | set $pid_task = $next_th |
121 | end | 124 | end |
122 | set $next_th=(((char *)$next_th->pids[1].pid_list.next) - $pid_off) | 125 | set $next_th=(((char *)$next_th->thread_group.next) - $pid_off) |
123 | end | 126 | end |
124 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off | 127 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off |
125 | end | 128 | end |
126 | 129 | ||
127 | printf "\npid %d; comm %s:\n", $pid_task.pid, $pid_task.comm | 130 | btthreadstack $pid_task |
128 | printf "===================\n" | ||
129 | set var $stackp = $pid_task.thread.esp | ||
130 | set var $stack_top = ($stackp & ~4095) + 4096 | ||
131 | set var $stack_bot = ($stackp & ~4095) | ||
132 | |||
133 | set $stackp = *($stackp) | ||
134 | while (($stackp < $stack_top) && ($stackp > $stack_bot)) | ||
135 | set var $addr = *($stackp + 4) | ||
136 | info symbol $addr | ||
137 | set $stackp = *($stackp) | ||
138 | end | ||
139 | end | 131 | end |
140 | document btpid | 132 | document btpid |
141 | backtrace of pid | 133 | backtrace of pid |
@@ -145,7 +137,7 @@ end | |||
145 | define trapinfo | 137 | define trapinfo |
146 | set var $pid = $arg0 | 138 | set var $pid = $arg0 |
147 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) | 139 | set $tasks_off=((size_t)&((struct task_struct *)0)->tasks) |
148 | set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next) | 140 | set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next) |
149 | set $init_t=&init_task | 141 | set $init_t=&init_task |
150 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) | 142 | set $next_t=(((char *)($init_t->tasks).next) - $tasks_off) |
151 | set var $pid_task = 0 | 143 | set var $pid_task = 0 |
@@ -157,13 +149,13 @@ define trapinfo | |||
157 | set $pid_task = $next_t | 149 | set $pid_task = $next_t |
158 | end | 150 | end |
159 | 151 | ||
160 | set $next_th=(((char *)$next_t->pids[1].pid_list.next) - $pid_off) | 152 | set $next_th=(((char *)$next_t->thread_group.next) - $pid_off) |
161 | while ($next_th != $next_t) | 153 | while ($next_th != $next_t) |
162 | set $next_th=(struct task_struct *)$next_th | 154 | set $next_th=(struct task_struct *)$next_th |
163 | if ($next_th.pid == $pid) | 155 | if ($next_th.pid == $pid) |
164 | set $pid_task = $next_th | 156 | set $pid_task = $next_th |
165 | end | 157 | end |
166 | set $next_th=(((char *)$next_th->pids[1].pid_list.next) - $pid_off) | 158 | set $next_th=(((char *)$next_th->thread_group.next) - $pid_off) |
167 | end | 159 | end |
168 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off | 160 | set $next_t=(char *)($next_t->tasks.next) - $tasks_off |
169 | end | 161 | end |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 21321b9acfb0..9fee3a90deaa 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -2458,6 +2458,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2458 | 2458 | ||
2459 | nohugeiomap [KNL,x86] Disable kernel huge I/O mappings. | 2459 | nohugeiomap [KNL,x86] Disable kernel huge I/O mappings. |
2460 | 2460 | ||
2461 | nospectre_v2 [X86] Disable all mitigations for the Spectre variant 2 | ||
2462 | (indirect branch prediction) vulnerability. System may | ||
2463 | allow data leaks with this option, which is equivalent | ||
2464 | to spectre_v2=off. | ||
2465 | |||
2461 | noxsave [BUGS=X86] Disables x86 extended register state save | 2466 | noxsave [BUGS=X86] Disables x86 extended register state save |
2462 | and restore using xsave. The kernel will fallback to | 2467 | and restore using xsave. The kernel will fallback to |
2463 | enabling legacy floating-point and sse state. | 2468 | enabling legacy floating-point and sse state. |
@@ -2525,6 +2530,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2525 | 2530 | ||
2526 | nointroute [IA-64] | 2531 | nointroute [IA-64] |
2527 | 2532 | ||
2533 | noinvpcid [X86] Disable the INVPCID cpu feature. | ||
2534 | |||
2528 | nojitter [IA-64] Disables jitter checking for ITC timers. | 2535 | nojitter [IA-64] Disables jitter checking for ITC timers. |
2529 | 2536 | ||
2530 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver | 2537 | no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver |
@@ -2559,6 +2566,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2559 | nopat [X86] Disable PAT (page attribute table extension of | 2566 | nopat [X86] Disable PAT (page attribute table extension of |
2560 | pagetables) support. | 2567 | pagetables) support. |
2561 | 2568 | ||
2569 | nopcid [X86-64] Disable the PCID cpu feature. | ||
2570 | |||
2562 | norandmaps Don't use address space randomization. Equivalent to | 2571 | norandmaps Don't use address space randomization. Equivalent to |
2563 | echo 0 > /proc/sys/kernel/randomize_va_space | 2572 | echo 0 > /proc/sys/kernel/randomize_va_space |
2564 | 2573 | ||
@@ -3056,6 +3065,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3056 | pt. [PARIDE] | 3065 | pt. [PARIDE] |
3057 | See Documentation/blockdev/paride.txt. | 3066 | See Documentation/blockdev/paride.txt. |
3058 | 3067 | ||
3068 | pti= [X86_64] Control Page Table Isolation of user and | ||
3069 | kernel address spaces. Disabling this feature | ||
3070 | removes hardening, but improves performance of | ||
3071 | system calls and interrupts. | ||
3072 | |||
3073 | on - unconditionally enable | ||
3074 | off - unconditionally disable | ||
3075 | auto - kernel detects whether your CPU model is | ||
3076 | vulnerable to issues that PTI mitigates | ||
3077 | |||
3078 | Not specifying this option is equivalent to pti=auto. | ||
3079 | |||
3080 | nopti [X86_64] | ||
3081 | Equivalent to pti=off | ||
3082 | |||
3059 | pty.legacy_count= | 3083 | pty.legacy_count= |
3060 | [KNL] Number of legacy pty's. Overwrites compiled-in | 3084 | [KNL] Number of legacy pty's. Overwrites compiled-in |
3061 | default number. | 3085 | default number. |
@@ -3585,6 +3609,29 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3585 | sonypi.*= [HW] Sony Programmable I/O Control Device driver | 3609 | sonypi.*= [HW] Sony Programmable I/O Control Device driver |
3586 | See Documentation/laptops/sonypi.txt | 3610 | See Documentation/laptops/sonypi.txt |
3587 | 3611 | ||
3612 | spectre_v2= [X86] Control mitigation of Spectre variant 2 | ||
3613 | (indirect branch speculation) vulnerability. | ||
3614 | |||
3615 | on - unconditionally enable | ||
3616 | off - unconditionally disable | ||
3617 | auto - kernel detects whether your CPU model is | ||
3618 | vulnerable | ||
3619 | |||
3620 | Selecting 'on' will, and 'auto' may, choose a | ||
3621 | mitigation method at run time according to the | ||
3622 | CPU, the available microcode, the setting of the | ||
3623 | CONFIG_RETPOLINE configuration option, and the | ||
3624 | compiler with which the kernel was built. | ||
3625 | |||
3626 | Specific mitigations can also be selected manually: | ||
3627 | |||
3628 | retpoline - replace indirect branches | ||
3629 | retpoline,generic - google's original retpoline | ||
3630 | retpoline,amd - AMD-specific minimal thunk | ||
3631 | |||
3632 | Not specifying this option is equivalent to | ||
3633 | spectre_v2=auto. | ||
3634 | |||
3588 | spia_io_base= [HW,MTD] | 3635 | spia_io_base= [HW,MTD] |
3589 | spia_fio_base= | 3636 | spia_fio_base= |
3590 | spia_pedr= | 3637 | spia_pedr= |
diff --git a/Documentation/x86/pti.txt b/Documentation/x86/pti.txt new file mode 100644 index 000000000000..5cd58439ad2d --- /dev/null +++ b/Documentation/x86/pti.txt | |||
@@ -0,0 +1,186 @@ | |||
1 | Overview | ||
2 | ======== | ||
3 | |||
4 | Page Table Isolation (pti, previously known as KAISER[1]) is a | ||
5 | countermeasure against attacks on the shared user/kernel address | ||
6 | space such as the "Meltdown" approach[2]. | ||
7 | |||
8 | To mitigate this class of attacks, we create an independent set of | ||
9 | page tables for use only when running userspace applications. When | ||
10 | the kernel is entered via syscalls, interrupts or exceptions, the | ||
11 | page tables are switched to the full "kernel" copy. When the system | ||
12 | switches back to user mode, the user copy is used again. | ||
13 | |||
14 | The userspace page tables contain only a minimal amount of kernel | ||
15 | data: only what is needed to enter/exit the kernel such as the | ||
16 | entry/exit functions themselves and the interrupt descriptor table | ||
17 | (IDT). There are a few strictly unnecessary things that get mapped | ||
18 | such as the first C function when entering an interrupt (see | ||
19 | comments in pti.c). | ||
20 | |||
21 | This approach helps to ensure that side-channel attacks leveraging | ||
22 | the paging structures do not function when PTI is enabled. It can be | ||
23 | enabled by setting CONFIG_PAGE_TABLE_ISOLATION=y at compile time. | ||
24 | Once enabled at compile-time, it can be disabled at boot with the | ||
25 | 'nopti' or 'pti=' kernel parameters (see kernel-parameters.txt). | ||
26 | |||
27 | Page Table Management | ||
28 | ===================== | ||
29 | |||
30 | When PTI is enabled, the kernel manages two sets of page tables. | ||
31 | The first set is very similar to the single set which is present in | ||
32 | kernels without PTI. This includes a complete mapping of userspace | ||
33 | that the kernel can use for things like copy_to_user(). | ||
34 | |||
35 | Although _complete_, the user portion of the kernel page tables is | ||
36 | crippled by setting the NX bit in the top level. This ensures | ||
37 | that any missed kernel->user CR3 switch will immediately crash | ||
38 | userspace upon executing its first instruction. | ||
39 | |||
40 | The userspace page tables map only the kernel data needed to enter | ||
41 | and exit the kernel. This data is entirely contained in the 'struct | ||
42 | cpu_entry_area' structure which is placed in the fixmap which gives | ||
43 | each CPU's copy of the area a compile-time-fixed virtual address. | ||
44 | |||
45 | For new userspace mappings, the kernel makes the entries in its | ||
46 | page tables like normal. The only difference is when the kernel | ||
47 | makes entries in the top (PGD) level. In addition to setting the | ||
48 | entry in the main kernel PGD, a copy of the entry is made in the | ||
49 | userspace page tables' PGD. | ||
50 | |||
51 | This sharing at the PGD level also inherently shares all the lower | ||
52 | layers of the page tables. This leaves a single, shared set of | ||
53 | userspace page tables to manage. One PTE to lock, one set of | ||
54 | accessed bits, dirty bits, etc... | ||
55 | |||
56 | Overhead | ||
57 | ======== | ||
58 | |||
59 | Protection against side-channel attacks is important. But, | ||
60 | this protection comes at a cost: | ||
61 | |||
62 | 1. Increased Memory Use | ||
63 | a. Each process now needs an order-1 PGD instead of order-0. | ||
64 | (Consumes an additional 4k per process). | ||
65 | b. The 'cpu_entry_area' structure must be 2MB in size and 2MB | ||
66 | aligned so that it can be mapped by setting a single PMD | ||
67 | entry. This consumes nearly 2MB of RAM once the kernel | ||
68 | is decompressed, but no space in the kernel image itself. | ||
69 | |||
70 | 2. Runtime Cost | ||
71 | a. CR3 manipulation to switch between the page table copies | ||
72 | must be done at interrupt, syscall, and exception entry | ||
73 | and exit (it can be skipped when the kernel is interrupted, | ||
74 | though.) Moves to CR3 are on the order of a hundred | ||
75 | cycles, and are required at every entry and exit. | ||
76 | b. A "trampoline" must be used for SYSCALL entry. This | ||
77 | trampoline depends on a smaller set of resources than the | ||
78 | non-PTI SYSCALL entry code, so requires mapping fewer | ||
79 | things into the userspace page tables. The downside is | ||
80 | that stacks must be switched at entry time. | ||
81 | c. Global pages are disabled for all kernel structures not | ||
82 | mapped into both kernel and userspace page tables. This | ||
83 | feature of the MMU allows different processes to share TLB | ||
84 | entries mapping the kernel. Losing the feature means more | ||
85 | TLB misses after a context switch. The actual loss of | ||
86 | performance is very small, however, never exceeding 1%. | ||
87 | d. Process Context IDentifiers (PCID) is a CPU feature that | ||
88 | allows us to skip flushing the entire TLB when switching page | ||
89 | tables by setting a special bit in CR3 when the page tables | ||
90 | are changed. This makes switching the page tables (at context | ||
91 | switch, or kernel entry/exit) cheaper. But, on systems with | ||
92 | PCID support, the context switch code must flush both the user | ||
93 | and kernel entries out of the TLB. The user PCID TLB flush is | ||
94 | deferred until the exit to userspace, minimizing the cost. | ||
95 | See intel.com/sdm for the gory PCID/INVPCID details. | ||
96 | e. The userspace page tables must be populated for each new | ||
97 | process. Even without PTI, the shared kernel mappings | ||
98 | are created by copying top-level (PGD) entries into each | ||
99 | new process. But, with PTI, there are now *two* kernel | ||
100 | mappings: one in the kernel page tables that maps everything | ||
101 | and one for the entry/exit structures. At fork(), we need to | ||
102 | copy both. | ||
103 | f. In addition to the fork()-time copying, there must also | ||
104 | be an update to the userspace PGD any time a set_pgd() is done | ||
105 | on a PGD used to map userspace. This ensures that the kernel | ||
106 | and userspace copies always map the same userspace | ||
107 | memory. | ||
108 | g. On systems without PCID support, each CR3 write flushes | ||
109 | the entire TLB. That means that each syscall, interrupt | ||
110 | or exception flushes the TLB. | ||
111 | h. INVPCID is a TLB-flushing instruction which allows flushing | ||
112 | of TLB entries for non-current PCIDs. Some systems support | ||
113 | PCIDs, but do not support INVPCID. On these systems, addresses | ||
114 | can only be flushed from the TLB for the current PCID. When | ||
115 | flushing a kernel address, we need to flush all PCIDs, so a | ||
116 | single kernel address flush will require a TLB-flushing CR3 | ||
117 | write upon the next use of every PCID. | ||
118 | |||
119 | Possible Future Work | ||
120 | ==================== | ||
121 | 1. We can be more careful about not actually writing to CR3 | ||
122 | unless its value is actually changed. | ||
123 | 2. Allow PTI to be enabled/disabled at runtime in addition to the | ||
124 | boot-time switching. | ||
125 | |||
126 | Testing | ||
127 | ======== | ||
128 | |||
129 | To test stability of PTI, the following test procedure is recommended, | ||
130 | ideally doing all of these in parallel: | ||
131 | |||
132 | 1. Set CONFIG_DEBUG_ENTRY=y | ||
133 | 2. Run several copies of all of the tools/testing/selftests/x86/ tests | ||
134 | (excluding MPX and protection_keys) in a loop on multiple CPUs for | ||
135 | several minutes. These tests frequently uncover corner cases in the | ||
136 | kernel entry code. In general, old kernels might cause these tests | ||
137 | themselves to crash, but they should never crash the kernel. | ||
138 | 3. Run the 'perf' tool in a mode (top or record) that generates many | ||
139 | frequent performance monitoring non-maskable interrupts (see "NMI" | ||
140 | in /proc/interrupts). This exercises the NMI entry/exit code which | ||
141 | is known to trigger bugs in code paths that did not expect to be | ||
142 | interrupted, including nested NMIs. Using "-c" boosts the rate of | ||
143 | NMIs, and using two -c with separate counters encourages nested NMIs | ||
144 | and less deterministic behavior. | ||
145 | |||
146 | while true; do perf record -c 10000 -e instructions,cycles -a sleep 10; done | ||
147 | |||
148 | 4. Launch a KVM virtual machine. | ||
149 | 5. Run 32-bit binaries on systems supporting the SYSCALL instruction. | ||
150 | This has been a lightly-tested code path and needs extra scrutiny. | ||
151 | |||
152 | Debugging | ||
153 | ========= | ||
154 | |||
155 | Bugs in PTI cause a few different signatures of crashes | ||
156 | that are worth noting here. | ||
157 | |||
158 | * Failures of the selftests/x86 code. Usually a bug in one of the | ||
159 | more obscure corners of entry_64.S | ||
160 | * Crashes in early boot, especially around CPU bringup. Bugs | ||
161 | in the trampoline code or mappings cause these. | ||
162 | * Crashes at the first interrupt. Caused by bugs in entry_64.S, | ||
163 | like screwing up a page table switch. Also caused by | ||
164 | incorrectly mapping the IRQ handler entry code. | ||
165 | * Crashes at the first NMI. The NMI code is separate from main | ||
166 | interrupt handlers and can have bugs that do not affect | ||
167 | normal interrupts. Also caused by incorrectly mapping NMI | ||
168 | code. NMIs that interrupt the entry code must be very | ||
169 | careful and can be the cause of crashes that show up when | ||
170 | running perf. | ||
171 | * Kernel crashes at the first exit to userspace. entry_64.S | ||
172 | bugs, or failing to map some of the exit code. | ||
173 | * Crashes at first interrupt that interrupts userspace. The paths | ||
174 | in entry_64.S that return to userspace are sometimes separate | ||
175 | from the ones that return to the kernel. | ||
176 | * Double faults: overflowing the kernel stack because of page | ||
177 | faults upon page faults. Caused by touching non-pti-mapped | ||
178 | data in the entry code, or forgetting to switch to kernel | ||
179 | CR3 before calling into C functions which are not pti-mapped. | ||
180 | * Userspace segfaults early in boot, sometimes manifesting | ||
181 | as mount(8) failing to mount the rootfs. These have | ||
182 | tended to be TLB invalidation issues. Usually invalidating | ||
183 | the wrong PCID, or otherwise missing an invalidation. | ||
184 | |||
185 | 1. https://gruss.cc/files/kaiser.pdf | ||
186 | 2. https://meltdownattack.com/meltdown.pdf | ||
@@ -1,6 +1,6 @@ | |||
1 | VERSION = 4 | 1 | VERSION = 4 |
2 | PATCHLEVEL = 4 | 2 | PATCHLEVEL = 4 |
3 | SUBLEVEL = 91 | 3 | SUBLEVEL = 117 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = |
5 | NAME = Blurry Fish Butt | 5 | NAME = Blurry Fish Butt |
6 | 6 | ||
@@ -782,6 +782,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) | |||
782 | # disable invalid "can't wrap" optimizations for signed / pointers | 782 | # disable invalid "can't wrap" optimizations for signed / pointers |
783 | KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) | 783 | KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) |
784 | 784 | ||
785 | # Make sure -fstack-check isn't enabled (like gentoo apparently did) | ||
786 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) | ||
787 | |||
785 | # conserve stack if available | 788 | # conserve stack if available |
786 | KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) | 789 | KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) |
787 | 790 | ||
diff --git a/arch/alpha/include/asm/mmu_context.h b/arch/alpha/include/asm/mmu_context.h index 4c51c05333c6..4cafffa80e2c 100644 --- a/arch/alpha/include/asm/mmu_context.h +++ b/arch/alpha/include/asm/mmu_context.h | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 1996, Linus Torvalds | 7 | * Copyright (C) 1996, Linus Torvalds |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/sched.h> | ||
10 | #include <asm/machvec.h> | 11 | #include <asm/machvec.h> |
11 | #include <asm/compiler.h> | 12 | #include <asm/compiler.h> |
12 | #include <asm-generic/mm_hooks.h> | 13 | #include <asm-generic/mm_hooks.h> |
diff --git a/arch/alpha/kernel/pci_impl.h b/arch/alpha/kernel/pci_impl.h index 2b0ac429f5eb..412bb3c24f36 100644 --- a/arch/alpha/kernel/pci_impl.h +++ b/arch/alpha/kernel/pci_impl.h | |||
@@ -143,7 +143,8 @@ struct pci_iommu_arena | |||
143 | }; | 143 | }; |
144 | 144 | ||
145 | #if defined(CONFIG_ALPHA_SRM) && \ | 145 | #if defined(CONFIG_ALPHA_SRM) && \ |
146 | (defined(CONFIG_ALPHA_CIA) || defined(CONFIG_ALPHA_LCA)) | 146 | (defined(CONFIG_ALPHA_CIA) || defined(CONFIG_ALPHA_LCA) || \ |
147 | defined(CONFIG_ALPHA_AVANTI)) | ||
147 | # define NEED_SRM_SAVE_RESTORE | 148 | # define NEED_SRM_SAVE_RESTORE |
148 | #else | 149 | #else |
149 | # undef NEED_SRM_SAVE_RESTORE | 150 | # undef NEED_SRM_SAVE_RESTORE |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 84d13263ce46..8095fb2c5c94 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -273,12 +273,13 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
273 | application calling fork. */ | 273 | application calling fork. */ |
274 | if (clone_flags & CLONE_SETTLS) | 274 | if (clone_flags & CLONE_SETTLS) |
275 | childti->pcb.unique = regs->r20; | 275 | childti->pcb.unique = regs->r20; |
276 | else | ||
277 | regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */ | ||
276 | childti->pcb.usp = usp ?: rdusp(); | 278 | childti->pcb.usp = usp ?: rdusp(); |
277 | *childregs = *regs; | 279 | *childregs = *regs; |
278 | childregs->r0 = 0; | 280 | childregs->r0 = 0; |
279 | childregs->r19 = 0; | 281 | childregs->r19 = 0; |
280 | childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ | 282 | childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ |
281 | regs->r20 = 0; | ||
282 | stack = ((struct switch_stack *) regs) - 1; | 283 | stack = ((struct switch_stack *) regs) - 1; |
283 | *childstack = *stack; | 284 | *childstack = *stack; |
284 | childstack->r26 = (unsigned long) ret_from_fork; | 285 | childstack->r26 = (unsigned long) ret_from_fork; |
diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h index d4d8df706efa..57387b567f34 100644 --- a/arch/arc/include/asm/uaccess.h +++ b/arch/arc/include/asm/uaccess.h | |||
@@ -673,6 +673,7 @@ __arc_strncpy_from_user(char *dst, const char __user *src, long count) | |||
673 | return 0; | 673 | return 0; |
674 | 674 | ||
675 | __asm__ __volatile__( | 675 | __asm__ __volatile__( |
676 | " mov lp_count, %5 \n" | ||
676 | " lp 3f \n" | 677 | " lp 3f \n" |
677 | "1: ldb.ab %3, [%2, 1] \n" | 678 | "1: ldb.ab %3, [%2, 1] \n" |
678 | " breq.d %3, 0, 3f \n" | 679 | " breq.d %3, 0, 3f \n" |
@@ -689,8 +690,8 @@ __arc_strncpy_from_user(char *dst, const char __user *src, long count) | |||
689 | " .word 1b, 4b \n" | 690 | " .word 1b, 4b \n" |
690 | " .previous \n" | 691 | " .previous \n" |
691 | : "+r"(res), "+r"(dst), "+r"(src), "=r"(val) | 692 | : "+r"(res), "+r"(dst), "+r"(src), "=r"(val) |
692 | : "g"(-EFAULT), "l"(count) | 693 | : "g"(-EFAULT), "r"(count) |
693 | : "memory"); | 694 | : "lp_count", "lp_start", "lp_end", "memory"); |
694 | 695 | ||
695 | return res; | 696 | return res; |
696 | } | 697 | } |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4255537981b2..4d40f497e12c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -530,7 +530,8 @@ dtb-$(CONFIG_SOC_DRA7XX) += \ | |||
530 | dra7-evm-late-attach.dtb \ | 530 | dra7-evm-late-attach.dtb \ |
531 | dra72-evm-late-attach.dtb \ | 531 | dra72-evm-late-attach.dtb \ |
532 | dra71-evm-late-attach.dtb \ | 532 | dra71-evm-late-attach.dtb \ |
533 | dra76-evm-late-attach.dtb | 533 | dra76-evm-late-attach.dtb \ |
534 | dra76-evm-tfp410.dtb | ||
534 | dtb-$(CONFIG_ARCH_ORION5X) += \ | 535 | dtb-$(CONFIG_ARCH_ORION5X) += \ |
535 | orion5x-lacie-d2-network.dtb \ | 536 | orion5x-lacie-d2-network.dtb \ |
536 | orion5x-lacie-ethernet-disk-mini-v2.dtb \ | 537 | orion5x-lacie-ethernet-disk-mini-v2.dtb \ |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 1f65a9881fe9..cef4bf4a40ad 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
@@ -217,10 +217,11 @@ | |||
217 | }; | 217 | }; |
218 | 218 | ||
219 | scm_conf: scm_conf@0 { | 219 | scm_conf: scm_conf@0 { |
220 | compatible = "syscon"; | 220 | compatible = "syscon", "simple-bus"; |
221 | reg = <0x0 0x800>; | 221 | reg = <0x0 0x800>; |
222 | #address-cells = <1>; | 222 | #address-cells = <1>; |
223 | #size-cells = <1>; | 223 | #size-cells = <1>; |
224 | ranges = <0 0 0x800>; | ||
224 | 225 | ||
225 | scm_clocks: clocks { | 226 | scm_clocks: clocks { |
226 | #address-cells = <1>; | 227 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi index cc952cf8ec30..024f1b75b0a3 100644 --- a/arch/arm/boot/dts/armada-375.dtsi +++ b/arch/arm/boot/dts/armada-375.dtsi | |||
@@ -176,9 +176,9 @@ | |||
176 | reg = <0x8000 0x1000>; | 176 | reg = <0x8000 0x1000>; |
177 | cache-unified; | 177 | cache-unified; |
178 | cache-level = <2>; | 178 | cache-level = <2>; |
179 | arm,double-linefill-incr = <1>; | 179 | arm,double-linefill-incr = <0>; |
180 | arm,double-linefill-wrap = <0>; | 180 | arm,double-linefill-wrap = <0>; |
181 | arm,double-linefill = <1>; | 181 | arm,double-linefill = <0>; |
182 | prefetch-data = <1>; | 182 | prefetch-data = <1>; |
183 | }; | 183 | }; |
184 | 184 | ||
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi index e8b7f6726772..bf20918f1fad 100644 --- a/arch/arm/boot/dts/armada-38x.dtsi +++ b/arch/arm/boot/dts/armada-38x.dtsi | |||
@@ -143,9 +143,9 @@ | |||
143 | reg = <0x8000 0x1000>; | 143 | reg = <0x8000 0x1000>; |
144 | cache-unified; | 144 | cache-unified; |
145 | cache-level = <2>; | 145 | cache-level = <2>; |
146 | arm,double-linefill-incr = <1>; | 146 | arm,double-linefill-incr = <0>; |
147 | arm,double-linefill-wrap = <0>; | 147 | arm,double-linefill-wrap = <0>; |
148 | arm,double-linefill = <1>; | 148 | arm,double-linefill = <0>; |
149 | prefetch-data = <1>; | 149 | prefetch-data = <1>; |
150 | }; | 150 | }; |
151 | 151 | ||
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi index dc6efd386dbc..e67f1fd7a4d1 100644 --- a/arch/arm/boot/dts/armada-39x.dtsi +++ b/arch/arm/boot/dts/armada-39x.dtsi | |||
@@ -104,9 +104,9 @@ | |||
104 | reg = <0x8000 0x1000>; | 104 | reg = <0x8000 0x1000>; |
105 | cache-unified; | 105 | cache-unified; |
106 | cache-level = <2>; | 106 | cache-level = <2>; |
107 | arm,double-linefill-incr = <1>; | 107 | arm,double-linefill-incr = <0>; |
108 | arm,double-linefill-wrap = <0>; | 108 | arm,double-linefill-wrap = <0>; |
109 | arm,double-linefill = <1>; | 109 | arm,double-linefill = <0>; |
110 | prefetch-data = <1>; | 110 | prefetch-data = <1>; |
111 | }; | 111 | }; |
112 | 112 | ||
diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi index 63f109796046..fc06801776cd 100644 --- a/arch/arm/boot/dts/dm814x.dtsi +++ b/arch/arm/boot/dts/dm814x.dtsi | |||
@@ -138,7 +138,7 @@ | |||
138 | }; | 138 | }; |
139 | 139 | ||
140 | uart1: uart@20000 { | 140 | uart1: uart@20000 { |
141 | compatible = "ti,omap3-uart"; | 141 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
142 | ti,hwmods = "uart1"; | 142 | ti,hwmods = "uart1"; |
143 | reg = <0x20000 0x2000>; | 143 | reg = <0x20000 0x2000>; |
144 | clock-frequency = <48000000>; | 144 | clock-frequency = <48000000>; |
@@ -148,7 +148,7 @@ | |||
148 | }; | 148 | }; |
149 | 149 | ||
150 | uart2: uart@22000 { | 150 | uart2: uart@22000 { |
151 | compatible = "ti,omap3-uart"; | 151 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
152 | ti,hwmods = "uart2"; | 152 | ti,hwmods = "uart2"; |
153 | reg = <0x22000 0x2000>; | 153 | reg = <0x22000 0x2000>; |
154 | clock-frequency = <48000000>; | 154 | clock-frequency = <48000000>; |
@@ -158,7 +158,7 @@ | |||
158 | }; | 158 | }; |
159 | 159 | ||
160 | uart3: uart@24000 { | 160 | uart3: uart@24000 { |
161 | compatible = "ti,omap3-uart"; | 161 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
162 | ti,hwmods = "uart3"; | 162 | ti,hwmods = "uart3"; |
163 | reg = <0x24000 0x2000>; | 163 | reg = <0x24000 0x2000>; |
164 | clock-frequency = <48000000>; | 164 | clock-frequency = <48000000>; |
@@ -189,10 +189,11 @@ | |||
189 | ranges = <0 0x160000 0x16d000>; | 189 | ranges = <0 0x160000 0x16d000>; |
190 | 190 | ||
191 | scm_conf: scm_conf@0 { | 191 | scm_conf: scm_conf@0 { |
192 | compatible = "syscon"; | 192 | compatible = "syscon", "simple-bus"; |
193 | reg = <0x0 0x800>; | 193 | reg = <0x0 0x800>; |
194 | #address-cells = <1>; | 194 | #address-cells = <1>; |
195 | #size-cells = <1>; | 195 | #size-cells = <1>; |
196 | ranges = <0 0 0x800>; | ||
196 | 197 | ||
197 | scm_clocks: clocks { | 198 | scm_clocks: clocks { |
198 | #address-cells = <1>; | 199 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi index 4fa3a4cf3ac5..336ded693208 100644 --- a/arch/arm/boot/dts/dm816x.dtsi +++ b/arch/arm/boot/dts/dm816x.dtsi | |||
@@ -351,7 +351,7 @@ | |||
351 | }; | 351 | }; |
352 | 352 | ||
353 | uart1: uart@48020000 { | 353 | uart1: uart@48020000 { |
354 | compatible = "ti,omap3-uart"; | 354 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
355 | ti,hwmods = "uart1"; | 355 | ti,hwmods = "uart1"; |
356 | reg = <0x48020000 0x2000>; | 356 | reg = <0x48020000 0x2000>; |
357 | clock-frequency = <48000000>; | 357 | clock-frequency = <48000000>; |
@@ -361,7 +361,7 @@ | |||
361 | }; | 361 | }; |
362 | 362 | ||
363 | uart2: uart@48022000 { | 363 | uart2: uart@48022000 { |
364 | compatible = "ti,omap3-uart"; | 364 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
365 | ti,hwmods = "uart2"; | 365 | ti,hwmods = "uart2"; |
366 | reg = <0x48022000 0x2000>; | 366 | reg = <0x48022000 0x2000>; |
367 | clock-frequency = <48000000>; | 367 | clock-frequency = <48000000>; |
@@ -371,7 +371,7 @@ | |||
371 | }; | 371 | }; |
372 | 372 | ||
373 | uart3: uart@48024000 { | 373 | uart3: uart@48024000 { |
374 | compatible = "ti,omap3-uart"; | 374 | compatible = "ti,am3352-uart", "ti,omap3-uart"; |
375 | ti,hwmods = "uart3"; | 375 | ti,hwmods = "uart3"; |
376 | reg = <0x48024000 0x2000>; | 376 | reg = <0x48024000 0x2000>; |
377 | clock-frequency = <48000000>; | 377 | clock-frequency = <48000000>; |
diff --git a/arch/arm/boot/dts/dra7-evm-common.dtsi b/arch/arm/boot/dts/dra7-evm-common.dtsi index 1f9008d8e14e..c1bee515079f 100644 --- a/arch/arm/boot/dts/dra7-evm-common.dtsi +++ b/arch/arm/boot/dts/dra7-evm-common.dtsi | |||
@@ -292,3 +292,19 @@ | |||
292 | &pcie1_rc { | 292 | &pcie1_rc { |
293 | status = "okay"; | 293 | status = "okay"; |
294 | }; | 294 | }; |
295 | |||
296 | &mmc4 { | ||
297 | bus-width = <4>; | ||
298 | cap-power-off-card; | ||
299 | keep-power-in-suspend; | ||
300 | ti,non-removable; | ||
301 | |||
302 | #address-cells = <1>; | ||
303 | #size-cells = <0>; | ||
304 | wlcore: wlcore@2 { | ||
305 | compatible = "ti,wl1835"; | ||
306 | reg = <2>; | ||
307 | interrupt-parent = <&gpio5>; | ||
308 | interrupts = <7 IRQ_TYPE_EDGE_RISING>; | ||
309 | }; | ||
310 | }; | ||
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 3f27909b7b46..25070a073a94 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts | |||
@@ -907,10 +907,6 @@ i2c_p3_exp: &i2c2 { | |||
907 | &mmc4 { | 907 | &mmc4 { |
908 | status = "okay"; | 908 | status = "okay"; |
909 | vmmc-supply = <&vmmcwl_fixed>; | 909 | vmmc-supply = <&vmmcwl_fixed>; |
910 | bus-width = <4>; | ||
911 | cap-power-off-card; | ||
912 | keep-power-in-suspend; | ||
913 | ti,non-removable; | ||
914 | 910 | ||
915 | pinctrl-names = "default-rev11", "default", "hs-rev11", "hs", "sdr12-rev11", "sdr12", "sdr25-rev11", "sdr25"; | 911 | pinctrl-names = "default-rev11", "default", "hs-rev11", "hs", "sdr12-rev11", "sdr12", "sdr25-rev11", "sdr25"; |
916 | pinctrl-0 = <&mmc4_pins_default &mmc4_iodelay_ds_rev11_conf>; | 912 | pinctrl-0 = <&mmc4_pins_default &mmc4_iodelay_ds_rev11_conf>; |
@@ -921,15 +917,6 @@ i2c_p3_exp: &i2c2 { | |||
921 | pinctrl-5 = <&mmc4_pins_sdr12 &mmc4_iodelay_sdr12_hs_sdr25_rev20_conf>; | 917 | pinctrl-5 = <&mmc4_pins_sdr12 &mmc4_iodelay_sdr12_hs_sdr25_rev20_conf>; |
922 | pinctrl-6 = <&mmc4_pins_sdr25 &mmc4_iodelay_sdr12_hs_sdr25_rev11_conf>; | 918 | pinctrl-6 = <&mmc4_pins_sdr25 &mmc4_iodelay_sdr12_hs_sdr25_rev11_conf>; |
923 | pinctrl-7 = <&mmc4_pins_sdr25 &mmc4_iodelay_sdr12_hs_sdr25_rev20_conf>; | 919 | pinctrl-7 = <&mmc4_pins_sdr25 &mmc4_iodelay_sdr12_hs_sdr25_rev20_conf>; |
924 | |||
925 | #address-cells = <1>; | ||
926 | #size-cells = <0>; | ||
927 | wlcore: wlcore@2 { | ||
928 | compatible = "ti,wl1835"; | ||
929 | reg = <2>; | ||
930 | interrupt-parent = <&gpio5>; | ||
931 | interrupts = <7 IRQ_TYPE_LEVEL_HIGH>; | ||
932 | }; | ||
933 | }; | 920 | }; |
934 | 921 | ||
935 | &oppdm_mpu { | 922 | &oppdm_mpu { |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 4fa2eedc71f4..9f49f96e6f93 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
@@ -308,6 +308,7 @@ | |||
308 | device_type = "pci"; | 308 | device_type = "pci"; |
309 | ranges = <0x81000000 0 0 0x03000 0 0x00010000 | 309 | ranges = <0x81000000 0 0 0x03000 0 0x00010000 |
310 | 0x82000000 0 0x20013000 0x13000 0 0xffed000>; | 310 | 0x82000000 0 0x20013000 0x13000 0 0xffed000>; |
311 | bus-range = <0x00 0xff>; | ||
311 | #interrupt-cells = <1>; | 312 | #interrupt-cells = <1>; |
312 | num-lanes = <1>; | 313 | num-lanes = <1>; |
313 | linux,pci-domain = <0>; | 314 | linux,pci-domain = <0>; |
@@ -360,6 +361,7 @@ | |||
360 | device_type = "pci"; | 361 | device_type = "pci"; |
361 | ranges = <0x81000000 0 0 0x03000 0 0x00010000 | 362 | ranges = <0x81000000 0 0 0x03000 0 0x00010000 |
362 | 0x82000000 0 0x30013000 0x13000 0 0xffed000>; | 363 | 0x82000000 0 0x30013000 0x13000 0 0xffed000>; |
364 | bus-range = <0x00 0xff>; | ||
363 | #interrupt-cells = <1>; | 365 | #interrupt-cells = <1>; |
364 | num-lanes = <1>; | 366 | num-lanes = <1>; |
365 | linux,pci-domain = <1>; | 367 | linux,pci-domain = <1>; |
@@ -2386,4 +2388,24 @@ | |||
2386 | polling-delay = <500>; /* milliseconds */ | 2388 | polling-delay = <500>; /* milliseconds */ |
2387 | }; | 2389 | }; |
2388 | 2390 | ||
2391 | &cpu_crit { | ||
2392 | temperature = <120000>; /* milli Celsius */ | ||
2393 | }; | ||
2394 | |||
2395 | &core_crit { | ||
2396 | temperature = <120000>; /* milli Celsius */ | ||
2397 | }; | ||
2398 | |||
2399 | &gpu_crit { | ||
2400 | temperature = <120000>; /* milli Celsius */ | ||
2401 | }; | ||
2402 | |||
2403 | &dspeve_crit { | ||
2404 | temperature = <120000>; /* milli Celsius */ | ||
2405 | }; | ||
2406 | |||
2407 | &iva_crit { | ||
2408 | temperature = <120000>; /* milli Celsius */ | ||
2409 | }; | ||
2410 | |||
2389 | /include/ "dra7xx-clocks.dtsi" | 2411 | /include/ "dra7xx-clocks.dtsi" |
diff --git a/arch/arm/boot/dts/dra76-evm-tfp410.dts b/arch/arm/boot/dts/dra76-evm-tfp410.dts new file mode 100644 index 000000000000..77390c0277ce --- /dev/null +++ b/arch/arm/boot/dts/dra76-evm-tfp410.dts | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #include <dra76-evm.dts> | ||
9 | |||
10 | / { | ||
11 | tfp410: encoder@0 { | ||
12 | compatible = "ti,tfp410"; | ||
13 | |||
14 | ports { | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <0>; | ||
17 | |||
18 | port@0 { | ||
19 | reg = <0>; | ||
20 | tfp410_in: endpoint@0 { | ||
21 | remote-endpoint = <&dpi_out>; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | port@1 { | ||
26 | reg = <1>; | ||
27 | |||
28 | tfp410_out: endpoint@0 { | ||
29 | remote-endpoint = <&dvi_connector_in>; | ||
30 | }; | ||
31 | }; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | dvi0: connector@0 { | ||
36 | compatible = "dvi-connector"; | ||
37 | label = "dvi"; | ||
38 | |||
39 | digital; | ||
40 | |||
41 | ddc-i2c-bus = <&i2c3>; | ||
42 | |||
43 | hpd-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; /* wakeup2/sys_nirq2/gpio1_2 HPD */ | ||
44 | |||
45 | port { | ||
46 | dvi_connector_in: endpoint { | ||
47 | remote-endpoint = <&tfp410_out>; | ||
48 | }; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | &dss { | ||
54 | status = "ok"; | ||
55 | ports { | ||
56 | #address-cells = <1>; | ||
57 | #size-cells = <0>; | ||
58 | status = "ok"; | ||
59 | |||
60 | port { | ||
61 | reg = <0>; | ||
62 | |||
63 | dpi_out: endpoint { | ||
64 | remote-endpoint = <&tfp410_in>; | ||
65 | data-lines = <24>; | ||
66 | }; | ||
67 | }; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | &gpio3 { | ||
72 | p1 { | ||
73 | /* GPIO3_1 CON_LCD_PWR_DN */ | ||
74 | /* This affects the TFP410 and the USB */ | ||
75 | gpio-hog; | ||
76 | gpios = <1 GPIO_ACTIVE_HIGH>; | ||
77 | output-low; | ||
78 | line-name = "CON_LCD_PWR_DN"; | ||
79 | }; | ||
80 | }; | ||
81 | |||
82 | &i2c3 { | ||
83 | clock-frequency = <100000>; | ||
84 | |||
85 | pcf_tfp: pcf8757@20 { | ||
86 | compatible = "ti,pcf8575", "nxp,pcf8575"; | ||
87 | reg = <0x27>; | ||
88 | gpio-controller; | ||
89 | #gpio-cells = <2>; | ||
90 | |||
91 | p2 { | ||
92 | gpio-hog; | ||
93 | gpios = <2 GPIO_ACTIVE_HIGH>; | ||
94 | output-high; | ||
95 | line-name = "ct_hpd"; | ||
96 | }; | ||
97 | |||
98 | p3 { | ||
99 | gpio-hog; | ||
100 | gpios = <3 GPIO_ACTIVE_HIGH>; | ||
101 | output-high; | ||
102 | line-name = "ls_oe"; | ||
103 | }; | ||
104 | }; | ||
105 | }; | ||
diff --git a/arch/arm/boot/dts/dra76-evm.dts b/arch/arm/boot/dts/dra76-evm.dts index c852a76ec21d..9012e7677e52 100644 --- a/arch/arm/boot/dts/dra76-evm.dts +++ b/arch/arm/boot/dts/dra76-evm.dts | |||
@@ -119,6 +119,16 @@ | |||
119 | vin-supply = <&smps5_reg>; | 119 | vin-supply = <&smps5_reg>; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | vmmcwl_fixed: fixedregulator-mmcwl { | ||
123 | compatible = "regulator-fixed"; | ||
124 | regulator-name = "vmmcwl_fixed"; | ||
125 | regulator-min-microvolt = <1800000>; | ||
126 | regulator-max-microvolt = <1800000>; | ||
127 | gpio = <&gpio5 8 0>; /* gpio5_8 */ | ||
128 | startup-delay-us = <70000>; | ||
129 | enable-active-high; | ||
130 | }; | ||
131 | |||
122 | vtt_fixed: fixedregulator-vtt { | 132 | vtt_fixed: fixedregulator-vtt { |
123 | compatible = "regulator-fixed"; | 133 | compatible = "regulator-fixed"; |
124 | regulator-name = "vtt_fixed"; | 134 | regulator-name = "vtt_fixed"; |
@@ -147,6 +157,7 @@ | |||
147 | compatible = "ti,tps65917"; | 157 | compatible = "ti,tps65917"; |
148 | reg = <0x58>; | 158 | reg = <0x58>; |
149 | ti,system-power-controller; | 159 | ti,system-power-controller; |
160 | ti,palmas-override-powerhold; | ||
150 | interrupt-controller; | 161 | interrupt-controller; |
151 | #interrupt-cells = <2>; | 162 | #interrupt-cells = <2>; |
152 | 163 | ||
@@ -427,6 +438,17 @@ | |||
427 | pinctrl-3 = <&mmc2_pins_hs200 &mmc2_iodelay_hs200_conf>; | 438 | pinctrl-3 = <&mmc2_pins_hs200 &mmc2_iodelay_hs200_conf>; |
428 | }; | 439 | }; |
429 | 440 | ||
441 | &mmc4 { | ||
442 | status = "okay"; | ||
443 | vmmc-supply = <&vmmcwl_fixed>; | ||
444 | |||
445 | pinctrl-names = "default", "hs", "sdr12", "sdr25"; | ||
446 | pinctrl-0 = <&mmc4_pins_hs &mmc4_iodelay_default_conf>; | ||
447 | pinctrl-1 = <&mmc4_pins_hs &mmc4_iodelay_manual1_conf>; | ||
448 | pinctrl-2 = <&mmc4_pins_hs &mmc4_iodelay_manual1_conf>; | ||
449 | pinctrl-3 = <&mmc4_pins_hs &mmc4_iodelay_manual1_conf>; | ||
450 | }; | ||
451 | |||
430 | &oppdm_mpu { | 452 | &oppdm_mpu { |
431 | vdd-supply = <&buck10_reg>; | 453 | vdd-supply = <&buck10_reg>; |
432 | }; | 454 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts index d5e3bc518968..d57f48543f76 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts | |||
@@ -53,7 +53,8 @@ | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | pinctrl: pin-controller@10000 { | 55 | pinctrl: pin-controller@10000 { |
56 | pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; | 56 | pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header |
57 | &pmx_gpio_header_gpo>; | ||
57 | pinctrl-names = "default"; | 58 | pinctrl-names = "default"; |
58 | 59 | ||
59 | pmx_uart0: pmx-uart0 { | 60 | pmx_uart0: pmx-uart0 { |
@@ -85,11 +86,16 @@ | |||
85 | * ground. | 86 | * ground. |
86 | */ | 87 | */ |
87 | pmx_gpio_header: pmx-gpio-header { | 88 | pmx_gpio_header: pmx-gpio-header { |
88 | marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28", | 89 | marvell,pins = "mpp17", "mpp29", "mpp28", |
89 | "mpp35", "mpp34", "mpp40"; | 90 | "mpp35", "mpp34", "mpp40"; |
90 | marvell,function = "gpio"; | 91 | marvell,function = "gpio"; |
91 | }; | 92 | }; |
92 | 93 | ||
94 | pmx_gpio_header_gpo: pxm-gpio-header-gpo { | ||
95 | marvell,pins = "mpp7"; | ||
96 | marvell,function = "gpo"; | ||
97 | }; | ||
98 | |||
93 | pmx_gpio_init: pmx-init { | 99 | pmx_gpio_init: pmx-init { |
94 | marvell,pins = "mpp38"; | 100 | marvell,pins = "mpp38"; |
95 | marvell,function = "gpio"; | 101 | marvell,function = "gpio"; |
diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts index 059de2f8b024..3c8078876508 100644 --- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts +++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | |||
@@ -89,7 +89,7 @@ | |||
89 | interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>; | 89 | interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>; |
90 | pinctrl-names = "default"; | 90 | pinctrl-names = "default"; |
91 | pinctrl-0 = <&mmc1_pins &mmc1_cd>; | 91 | pinctrl-0 = <&mmc1_pins &mmc1_cd>; |
92 | cd-gpios = <&gpio4 31 IRQ_TYPE_LEVEL_LOW>; /* gpio127 */ | 92 | cd-gpios = <&gpio4 31 GPIO_ACTIVE_LOW>; /* gpio127 */ |
93 | vmmc-supply = <&vmmc1>; | 93 | vmmc-supply = <&vmmc1>; |
94 | bus-width = <4>; | 94 | bus-width = <4>; |
95 | cap-power-off-card; | 95 | cap-power-off-card; |
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi index 8344a0ee2b86..b03fe747b98c 100644 --- a/arch/arm/boot/dts/s5pv210.dtsi +++ b/arch/arm/boot/dts/s5pv210.dtsi | |||
@@ -461,6 +461,7 @@ | |||
461 | compatible = "samsung,exynos4210-ohci"; | 461 | compatible = "samsung,exynos4210-ohci"; |
462 | reg = <0xec300000 0x100>; | 462 | reg = <0xec300000 0x100>; |
463 | interrupts = <23>; | 463 | interrupts = <23>; |
464 | interrupt-parent = <&vic1>; | ||
464 | clocks = <&clocks CLK_USB_HOST>; | 465 | clocks = <&clocks CLK_USB_HOST>; |
465 | clock-names = "usbhost"; | 466 | clock-names = "usbhost"; |
466 | #address-cells = <1>; | 467 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/spear1310-evb.dts b/arch/arm/boot/dts/spear1310-evb.dts index e48857249ce7..3d83992efd90 100644 --- a/arch/arm/boot/dts/spear1310-evb.dts +++ b/arch/arm/boot/dts/spear1310-evb.dts | |||
@@ -349,7 +349,7 @@ | |||
349 | spi0: spi@e0100000 { | 349 | spi0: spi@e0100000 { |
350 | status = "okay"; | 350 | status = "okay"; |
351 | num-cs = <3>; | 351 | num-cs = <3>; |
352 | cs-gpios = <&gpio1 7 0>, <&spics 0>, <&spics 1>; | 352 | cs-gpios = <&gpio1 7 0>, <&spics 0 0>, <&spics 1 0>; |
353 | 353 | ||
354 | stmpe610@0 { | 354 | stmpe610@0 { |
355 | compatible = "st,stmpe610"; | 355 | compatible = "st,stmpe610"; |
diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi index df2232d767ed..6361cbfcbe5e 100644 --- a/arch/arm/boot/dts/spear1340.dtsi +++ b/arch/arm/boot/dts/spear1340.dtsi | |||
@@ -141,8 +141,8 @@ | |||
141 | reg = <0xb4100000 0x1000>; | 141 | reg = <0xb4100000 0x1000>; |
142 | interrupts = <0 105 0x4>; | 142 | interrupts = <0 105 0x4>; |
143 | status = "disabled"; | 143 | status = "disabled"; |
144 | dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */ | 144 | dmas = <&dwdma0 12 0 1>, |
145 | <&dwdma0 0x680 0 1 0>; /* 0xD << 7 */ | 145 | <&dwdma0 13 1 0>; |
146 | dma-names = "tx", "rx"; | 146 | dma-names = "tx", "rx"; |
147 | }; | 147 | }; |
148 | 148 | ||
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi index 14594ce8c18a..8fd8a3328acb 100644 --- a/arch/arm/boot/dts/spear13xx.dtsi +++ b/arch/arm/boot/dts/spear13xx.dtsi | |||
@@ -100,7 +100,7 @@ | |||
100 | reg = <0xb2800000 0x1000>; | 100 | reg = <0xb2800000 0x1000>; |
101 | interrupts = <0 29 0x4>; | 101 | interrupts = <0 29 0x4>; |
102 | status = "disabled"; | 102 | status = "disabled"; |
103 | dmas = <&dwdma0 0 0 0 0>; | 103 | dmas = <&dwdma0 0 0 0>; |
104 | dma-names = "data"; | 104 | dma-names = "data"; |
105 | }; | 105 | }; |
106 | 106 | ||
@@ -288,8 +288,8 @@ | |||
288 | #size-cells = <0>; | 288 | #size-cells = <0>; |
289 | interrupts = <0 31 0x4>; | 289 | interrupts = <0 31 0x4>; |
290 | status = "disabled"; | 290 | status = "disabled"; |
291 | dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */ | 291 | dmas = <&dwdma0 4 0 0>, |
292 | <&dwdma0 0x0280 0 0 0>; /* 0x5 << 7 */ | 292 | <&dwdma0 5 0 0>; |
293 | dma-names = "tx", "rx"; | 293 | dma-names = "tx", "rx"; |
294 | }; | 294 | }; |
295 | 295 | ||
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi index 9f60a7b6a42b..bd379034993c 100644 --- a/arch/arm/boot/dts/spear600.dtsi +++ b/arch/arm/boot/dts/spear600.dtsi | |||
@@ -194,6 +194,7 @@ | |||
194 | rtc@fc900000 { | 194 | rtc@fc900000 { |
195 | compatible = "st,spear600-rtc"; | 195 | compatible = "st,spear600-rtc"; |
196 | reg = <0xfc900000 0x1000>; | 196 | reg = <0xfc900000 0x1000>; |
197 | interrupt-parent = <&vic0>; | ||
197 | interrupts = <10>; | 198 | interrupts = <10>; |
198 | status = "disabled"; | 199 | status = "disabled"; |
199 | }; | 200 | }; |
diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi index d60f0d8add26..e4b508ce38a2 100644 --- a/arch/arm/boot/dts/stih407.dtsi +++ b/arch/arm/boot/dts/stih407.dtsi | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include "stih407-clock.dtsi" | 9 | #include "stih407-clock.dtsi" |
10 | #include "stih407-family.dtsi" | 10 | #include "stih407-family.dtsi" |
11 | #include <dt-bindings/gpio/gpio.h> | ||
11 | / { | 12 | / { |
12 | soc { | 13 | soc { |
13 | sti-display-subsystem { | 14 | sti-display-subsystem { |
@@ -112,7 +113,7 @@ | |||
112 | <&clk_s_d2_quadfs 0>, | 113 | <&clk_s_d2_quadfs 0>, |
113 | <&clk_s_d2_quadfs 1>; | 114 | <&clk_s_d2_quadfs 1>; |
114 | 115 | ||
115 | hdmi,hpd-gpio = <&pio5 3>; | 116 | hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; |
116 | reset-names = "hdmi"; | 117 | reset-names = "hdmi"; |
117 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; | 118 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; |
118 | ddc = <&hdmiddc>; | 119 | ddc = <&hdmiddc>; |
diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi index 40318869c733..3c32fb8cdcac 100644 --- a/arch/arm/boot/dts/stih410.dtsi +++ b/arch/arm/boot/dts/stih410.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "stih410-clock.dtsi" | 9 | #include "stih410-clock.dtsi" |
10 | #include "stih407-family.dtsi" | 10 | #include "stih407-family.dtsi" |
11 | #include "stih410-pinctrl.dtsi" | 11 | #include "stih410-pinctrl.dtsi" |
12 | #include <dt-bindings/gpio/gpio.h> | ||
12 | / { | 13 | / { |
13 | aliases { | 14 | aliases { |
14 | bdisp0 = &bdisp0; | 15 | bdisp0 = &bdisp0; |
@@ -203,7 +204,7 @@ | |||
203 | <&clk_s_d2_quadfs 0>, | 204 | <&clk_s_d2_quadfs 0>, |
204 | <&clk_s_d2_quadfs 1>; | 205 | <&clk_s_d2_quadfs 1>; |
205 | 206 | ||
206 | hdmi,hpd-gpio = <&pio5 3>; | 207 | hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; |
207 | reset-names = "hdmi"; | 208 | reset-names = "hdmi"; |
208 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; | 209 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; |
209 | ddc = <&hdmiddc>; | 210 | ddc = <&hdmiddc>; |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index c5e1943e5427..09ebd37e01e0 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -221,6 +221,7 @@ CONFIG_SERIO=m | |||
221 | CONFIG_SERIAL_8250=y | 221 | CONFIG_SERIAL_8250=y |
222 | CONFIG_SERIAL_8250_CONSOLE=y | 222 | CONFIG_SERIAL_8250_CONSOLE=y |
223 | CONFIG_SERIAL_8250_NR_UARTS=32 | 223 | CONFIG_SERIAL_8250_NR_UARTS=32 |
224 | CONFIG_SERIAL_8250_RUNTIME_UARTS=6 | ||
224 | CONFIG_SERIAL_8250_EXTENDED=y | 225 | CONFIG_SERIAL_8250_EXTENDED=y |
225 | CONFIG_SERIAL_8250_MANY_PORTS=y | 226 | CONFIG_SERIAL_8250_MANY_PORTS=y |
226 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 227 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c index 6d685298690e..648d5fac9cbf 100644 --- a/arch/arm/crypto/aesbs-glue.c +++ b/arch/arm/crypto/aesbs-glue.c | |||
@@ -357,7 +357,7 @@ static struct crypto_alg aesbs_algs[] = { { | |||
357 | }, { | 357 | }, { |
358 | .cra_name = "cbc(aes)", | 358 | .cra_name = "cbc(aes)", |
359 | .cra_driver_name = "cbc-aes-neonbs", | 359 | .cra_driver_name = "cbc-aes-neonbs", |
360 | .cra_priority = 300, | 360 | .cra_priority = 250, |
361 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, | 361 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, |
362 | .cra_blocksize = AES_BLOCK_SIZE, | 362 | .cra_blocksize = AES_BLOCK_SIZE, |
363 | .cra_ctxsize = sizeof(struct async_helper_ctx), | 363 | .cra_ctxsize = sizeof(struct async_helper_ctx), |
@@ -377,7 +377,7 @@ static struct crypto_alg aesbs_algs[] = { { | |||
377 | }, { | 377 | }, { |
378 | .cra_name = "ctr(aes)", | 378 | .cra_name = "ctr(aes)", |
379 | .cra_driver_name = "ctr-aes-neonbs", | 379 | .cra_driver_name = "ctr-aes-neonbs", |
380 | .cra_priority = 300, | 380 | .cra_priority = 250, |
381 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, | 381 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, |
382 | .cra_blocksize = 1, | 382 | .cra_blocksize = 1, |
383 | .cra_ctxsize = sizeof(struct async_helper_ctx), | 383 | .cra_ctxsize = sizeof(struct async_helper_ctx), |
@@ -397,7 +397,7 @@ static struct crypto_alg aesbs_algs[] = { { | |||
397 | }, { | 397 | }, { |
398 | .cra_name = "xts(aes)", | 398 | .cra_name = "xts(aes)", |
399 | .cra_driver_name = "xts-aes-neonbs", | 399 | .cra_driver_name = "xts-aes-neonbs", |
400 | .cra_priority = 300, | 400 | .cra_priority = 250, |
401 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, | 401 | .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC, |
402 | .cra_blocksize = AES_BLOCK_SIZE, | 402 | .cra_blocksize = AES_BLOCK_SIZE, |
403 | .cra_ctxsize = sizeof(struct async_helper_ctx), | 403 | .cra_ctxsize = sizeof(struct async_helper_ctx), |
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index bd425302c97a..628a38a11a70 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -36,4 +36,3 @@ generic-y += termbits.h | |||
36 | generic-y += termios.h | 36 | generic-y += termios.h |
37 | generic-y += timex.h | 37 | generic-y += timex.h |
38 | generic-y += trace_clock.h | 38 | generic-y += trace_clock.h |
39 | generic-y += unaligned.h | ||
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index b2bc8e11471d..2c16d9e7c03c 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -512,4 +512,22 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) | |||
512 | #endif | 512 | #endif |
513 | .endm | 513 | .endm |
514 | 514 | ||
515 | .macro bug, msg, line | ||
516 | #ifdef CONFIG_THUMB2_KERNEL | ||
517 | 1: .inst 0xde02 | ||
518 | #else | ||
519 | 1: .inst 0xe7f001f2 | ||
520 | #endif | ||
521 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
522 | .pushsection .rodata.str, "aMS", %progbits, 1 | ||
523 | 2: .asciz "\msg" | ||
524 | .popsection | ||
525 | .pushsection __bug_table, "aw" | ||
526 | .align 2 | ||
527 | .word 1b, 2b | ||
528 | .hword \line | ||
529 | .popsection | ||
530 | #endif | ||
531 | .endm | ||
532 | |||
515 | #endif /* __ASM_ASSEMBLER_H__ */ | 533 | #endif /* __ASM_ASSEMBLER_H__ */ |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index f13ae153fb24..d2315ffd8f12 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -112,8 +112,12 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); | |||
112 | #define CORE_DUMP_USE_REGSET | 112 | #define CORE_DUMP_USE_REGSET |
113 | #define ELF_EXEC_PAGESIZE 4096 | 113 | #define ELF_EXEC_PAGESIZE 4096 |
114 | 114 | ||
115 | /* This is the base location for PIE (ET_DYN with INTERP) loads. */ | 115 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
116 | #define ELF_ET_DYN_BASE 0x400000UL | 116 | use of this is to invoke "./ld.so someprog" to test out a new version of |
117 | the loader. We need to make sure that it is out of the way of the program | ||
118 | that it will "exec", and that there is sufficient room for the brk. */ | ||
119 | |||
120 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | ||
117 | 121 | ||
118 | /* When the program starts, a1 contains a pointer to a function to be | 122 | /* When the program starts, a1 contains a pointer to a function to be |
119 | registered with atexit, as per the SVR4 ABI. A value of 0 means we | 123 | registered with atexit, as per the SVR4 ABI. A value of 0 means we |
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h index e22089fb44dc..48e6ee2d4f5c 100644 --- a/arch/arm/include/asm/kvm_arm.h +++ b/arch/arm/include/asm/kvm_arm.h | |||
@@ -161,8 +161,7 @@ | |||
161 | #else | 161 | #else |
162 | #define VTTBR_X (5 - KVM_T0SZ) | 162 | #define VTTBR_X (5 - KVM_T0SZ) |
163 | #endif | 163 | #endif |
164 | #define VTTBR_BADDR_SHIFT (VTTBR_X - 1) | 164 | #define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_X) |
165 | #define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT) | ||
166 | #define VTTBR_VMID_SHIFT _AC(48, ULL) | 165 | #define VTTBR_VMID_SHIFT _AC(48, ULL) |
167 | #define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT) | 166 | #define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT) |
168 | 167 | ||
@@ -209,6 +208,7 @@ | |||
209 | #define HSR_EC_IABT_HYP (0x21) | 208 | #define HSR_EC_IABT_HYP (0x21) |
210 | #define HSR_EC_DABT (0x24) | 209 | #define HSR_EC_DABT (0x24) |
211 | #define HSR_EC_DABT_HYP (0x25) | 210 | #define HSR_EC_DABT_HYP (0x25) |
211 | #define HSR_EC_MAX (0x3f) | ||
212 | 212 | ||
213 | #define HSR_WFI_IS_WFE (_AC(1, UL) << 0) | 213 | #define HSR_WFI_IS_WFE (_AC(1, UL) << 0) |
214 | 214 | ||
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 9b32f76bb0dd..10f662498eb7 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -61,6 +61,7 @@ static inline void check_and_switch_context(struct mm_struct *mm, | |||
61 | cpu_switch_mm(mm->pgd, mm); | 61 | cpu_switch_mm(mm->pgd, mm); |
62 | } | 62 | } |
63 | 63 | ||
64 | #ifndef MODULE | ||
64 | #define finish_arch_post_lock_switch \ | 65 | #define finish_arch_post_lock_switch \ |
65 | finish_arch_post_lock_switch | 66 | finish_arch_post_lock_switch |
66 | static inline void finish_arch_post_lock_switch(void) | 67 | static inline void finish_arch_post_lock_switch(void) |
@@ -82,6 +83,7 @@ static inline void finish_arch_post_lock_switch(void) | |||
82 | preempt_enable_no_resched(); | 83 | preempt_enable_no_resched(); |
83 | } | 84 | } |
84 | } | 85 | } |
86 | #endif /* !MODULE */ | ||
85 | 87 | ||
86 | #endif /* CONFIG_MMU */ | 88 | #endif /* CONFIG_MMU */ |
87 | 89 | ||
diff --git a/arch/arm/include/asm/unaligned.h b/arch/arm/include/asm/unaligned.h new file mode 100644 index 000000000000..ab905ffcf193 --- /dev/null +++ b/arch/arm/include/asm/unaligned.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __ASM_ARM_UNALIGNED_H | ||
2 | #define __ASM_ARM_UNALIGNED_H | ||
3 | |||
4 | /* | ||
5 | * We generally want to set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on ARMv6+, | ||
6 | * but we don't want to use linux/unaligned/access_ok.h since that can lead | ||
7 | * to traps on unaligned stm/ldm or strd/ldrd. | ||
8 | */ | ||
9 | #include <asm/byteorder.h> | ||
10 | |||
11 | #if defined(__LITTLE_ENDIAN) | ||
12 | # include <linux/unaligned/le_struct.h> | ||
13 | # include <linux/unaligned/be_byteshift.h> | ||
14 | # include <linux/unaligned/generic.h> | ||
15 | # define get_unaligned __get_unaligned_le | ||
16 | # define put_unaligned __put_unaligned_le | ||
17 | #elif defined(__BIG_ENDIAN) | ||
18 | # include <linux/unaligned/be_struct.h> | ||
19 | # include <linux/unaligned/le_byteshift.h> | ||
20 | # include <linux/unaligned/generic.h> | ||
21 | # define get_unaligned __get_unaligned_be | ||
22 | # define put_unaligned __put_unaligned_be | ||
23 | #else | ||
24 | # error need to define endianess | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASM_ARM_UNALIGNED_H */ | ||
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 0d22ad206d52..6d243e830516 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -295,6 +295,8 @@ | |||
295 | mov r2, sp | 295 | mov r2, sp |
296 | ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr | 296 | ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr |
297 | ldr lr, [r2, #\offset + S_PC]! @ get pc | 297 | ldr lr, [r2, #\offset + S_PC]! @ get pc |
298 | tst r1, #PSR_I_BIT | 0x0f | ||
299 | bne 1f | ||
298 | msr spsr_cxsf, r1 @ save in spsr_svc | 300 | msr spsr_cxsf, r1 @ save in spsr_svc |
299 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) | 301 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) |
300 | @ We must avoid clrex due to Cortex-A15 erratum #830321 | 302 | @ We must avoid clrex due to Cortex-A15 erratum #830321 |
@@ -309,6 +311,7 @@ | |||
309 | @ after ldm {}^ | 311 | @ after ldm {}^ |
310 | add sp, sp, #\offset + S_FRAME_SIZE | 312 | add sp, sp, #\offset + S_FRAME_SIZE |
311 | movs pc, lr @ return & move spsr_svc into cpsr | 313 | movs pc, lr @ return & move spsr_svc into cpsr |
314 | 1: bug "Returning to usermode but unexpected PSR bits set?", \@ | ||
312 | #elif defined(CONFIG_CPU_V7M) | 315 | #elif defined(CONFIG_CPU_V7M) |
313 | @ V7M restore. | 316 | @ V7M restore. |
314 | @ Note that we don't need to do clrex here as clearing the local | 317 | @ Note that we don't need to do clrex here as clearing the local |
@@ -324,6 +327,8 @@ | |||
324 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr | 327 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr |
325 | ldr lr, [sp, #\offset + S_PC] @ get pc | 328 | ldr lr, [sp, #\offset + S_PC] @ get pc |
326 | add sp, sp, #\offset + S_SP | 329 | add sp, sp, #\offset + S_SP |
330 | tst r1, #PSR_I_BIT | 0x0f | ||
331 | bne 1f | ||
327 | msr spsr_cxsf, r1 @ save in spsr_svc | 332 | msr spsr_cxsf, r1 @ save in spsr_svc |
328 | 333 | ||
329 | @ We must avoid clrex due to Cortex-A15 erratum #830321 | 334 | @ We must avoid clrex due to Cortex-A15 erratum #830321 |
@@ -336,6 +341,7 @@ | |||
336 | .endif | 341 | .endif |
337 | add sp, sp, #S_FRAME_SIZE - S_SP | 342 | add sp, sp, #S_FRAME_SIZE - S_SP |
338 | movs pc, lr @ return & move spsr_svc into cpsr | 343 | movs pc, lr @ return & move spsr_svc into cpsr |
344 | 1: bug "Returning to usermode but unexpected PSR bits set?", \@ | ||
339 | #endif /* !CONFIG_THUMB2_KERNEL */ | 345 | #endif /* !CONFIG_THUMB2_KERNEL */ |
340 | .endm | 346 | .endm |
341 | 347 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index bc698383e822..c92b535150a0 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -132,30 +132,26 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom, | |||
132 | set_fs(fs); | 132 | set_fs(fs); |
133 | } | 133 | } |
134 | 134 | ||
135 | static void dump_instr(const char *lvl, struct pt_regs *regs) | 135 | static void __dump_instr(const char *lvl, struct pt_regs *regs) |
136 | { | 136 | { |
137 | unsigned long addr = instruction_pointer(regs); | 137 | unsigned long addr = instruction_pointer(regs); |
138 | const int thumb = thumb_mode(regs); | 138 | const int thumb = thumb_mode(regs); |
139 | const int width = thumb ? 4 : 8; | 139 | const int width = thumb ? 4 : 8; |
140 | mm_segment_t fs; | ||
141 | char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; | 140 | char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str; |
142 | int i; | 141 | int i; |
143 | 142 | ||
144 | /* | 143 | /* |
145 | * We need to switch to kernel mode so that we can use __get_user | 144 | * Note that we now dump the code first, just in case the backtrace |
146 | * to safely read from kernel space. Note that we now dump the | 145 | * kills us. |
147 | * code first, just in case the backtrace kills us. | ||
148 | */ | 146 | */ |
149 | fs = get_fs(); | ||
150 | set_fs(KERNEL_DS); | ||
151 | 147 | ||
152 | for (i = -4; i < 1 + !!thumb; i++) { | 148 | for (i = -4; i < 1 + !!thumb; i++) { |
153 | unsigned int val, bad; | 149 | unsigned int val, bad; |
154 | 150 | ||
155 | if (thumb) | 151 | if (thumb) |
156 | bad = __get_user(val, &((u16 *)addr)[i]); | 152 | bad = get_user(val, &((u16 *)addr)[i]); |
157 | else | 153 | else |
158 | bad = __get_user(val, &((u32 *)addr)[i]); | 154 | bad = get_user(val, &((u32 *)addr)[i]); |
159 | 155 | ||
160 | if (!bad) | 156 | if (!bad) |
161 | p += sprintf(p, i == 0 ? "(%0*x) " : "%0*x ", | 157 | p += sprintf(p, i == 0 ? "(%0*x) " : "%0*x ", |
@@ -166,8 +162,20 @@ static void dump_instr(const char *lvl, struct pt_regs *regs) | |||
166 | } | 162 | } |
167 | } | 163 | } |
168 | printk("%sCode: %s\n", lvl, str); | 164 | printk("%sCode: %s\n", lvl, str); |
165 | } | ||
169 | 166 | ||
170 | set_fs(fs); | 167 | static void dump_instr(const char *lvl, struct pt_regs *regs) |
168 | { | ||
169 | mm_segment_t fs; | ||
170 | |||
171 | if (!user_mode(regs)) { | ||
172 | fs = get_fs(); | ||
173 | set_fs(KERNEL_DS); | ||
174 | __dump_instr(lvl, regs); | ||
175 | set_fs(fs); | ||
176 | } else { | ||
177 | __dump_instr(lvl, regs); | ||
178 | } | ||
171 | } | 179 | } |
172 | 180 | ||
173 | #ifdef CONFIG_ARM_UNWIND | 181 | #ifdef CONFIG_ARM_UNWIND |
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 95f12b2ccdcb..05b2f8294968 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c | |||
@@ -45,7 +45,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
45 | 45 | ||
46 | ret = kvm_psci_call(vcpu); | 46 | ret = kvm_psci_call(vcpu); |
47 | if (ret < 0) { | 47 | if (ret < 0) { |
48 | kvm_inject_undefined(vcpu); | 48 | vcpu_set_reg(vcpu, 0, ~0UL); |
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
51 | 51 | ||
@@ -54,7 +54,16 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
54 | 54 | ||
55 | static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) | 55 | static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) |
56 | { | 56 | { |
57 | kvm_inject_undefined(vcpu); | 57 | /* |
58 | * "If an SMC instruction executed at Non-secure EL1 is | ||
59 | * trapped to EL2 because HCR_EL2.TSC is 1, the exception is a | ||
60 | * Trap exception, not a Secure Monitor Call exception [...]" | ||
61 | * | ||
62 | * We need to advance the PC after the trap, as it would | ||
63 | * otherwise return to the same address... | ||
64 | */ | ||
65 | vcpu_set_reg(vcpu, 0, ~0UL); | ||
66 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | ||
58 | return 1; | 67 | return 1; |
59 | } | 68 | } |
60 | 69 | ||
@@ -100,7 +109,19 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
100 | return 1; | 109 | return 1; |
101 | } | 110 | } |
102 | 111 | ||
112 | static int kvm_handle_unknown_ec(struct kvm_vcpu *vcpu, struct kvm_run *run) | ||
113 | { | ||
114 | u32 hsr = kvm_vcpu_get_hsr(vcpu); | ||
115 | |||
116 | kvm_pr_unimpl("Unknown exception class: hsr: %#08x\n", | ||
117 | hsr); | ||
118 | |||
119 | kvm_inject_undefined(vcpu); | ||
120 | return 1; | ||
121 | } | ||
122 | |||
103 | static exit_handle_fn arm_exit_handlers[] = { | 123 | static exit_handle_fn arm_exit_handlers[] = { |
124 | [0 ... HSR_EC_MAX] = kvm_handle_unknown_ec, | ||
104 | [HSR_EC_WFI] = kvm_handle_wfx, | 125 | [HSR_EC_WFI] = kvm_handle_wfx, |
105 | [HSR_EC_CP15_32] = kvm_handle_cp15_32, | 126 | [HSR_EC_CP15_32] = kvm_handle_cp15_32, |
106 | [HSR_EC_CP15_64] = kvm_handle_cp15_64, | 127 | [HSR_EC_CP15_64] = kvm_handle_cp15_64, |
@@ -122,13 +143,6 @@ static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) | |||
122 | { | 143 | { |
123 | u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu); | 144 | u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu); |
124 | 145 | ||
125 | if (hsr_ec >= ARRAY_SIZE(arm_exit_handlers) || | ||
126 | !arm_exit_handlers[hsr_ec]) { | ||
127 | kvm_err("Unknown exception class: hsr: %#08x\n", | ||
128 | (unsigned int)kvm_vcpu_get_hsr(vcpu)); | ||
129 | BUG(); | ||
130 | } | ||
131 | |||
132 | return arm_exit_handlers[hsr_ec]; | 146 | return arm_exit_handlers[hsr_ec]; |
133 | } | 147 | } |
134 | 148 | ||
diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c index 3a10c9f1d0a4..387ee2a11e36 100644 --- a/arch/arm/kvm/mmio.c +++ b/arch/arm/kvm/mmio.c | |||
@@ -113,7 +113,7 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr, | 115 | trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr, |
116 | data); | 116 | &data); |
117 | data = vcpu_data_host_to_guest(vcpu, data, len); | 117 | data = vcpu_data_host_to_guest(vcpu, data, len); |
118 | vcpu_set_reg(vcpu, vcpu->arch.mmio_decode.rt, data); | 118 | vcpu_set_reg(vcpu, vcpu->arch.mmio_decode.rt, data); |
119 | } | 119 | } |
@@ -189,14 +189,14 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run, | |||
189 | data = vcpu_data_guest_to_host(vcpu, vcpu_get_reg(vcpu, rt), | 189 | data = vcpu_data_guest_to_host(vcpu, vcpu_get_reg(vcpu, rt), |
190 | len); | 190 | len); |
191 | 191 | ||
192 | trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, fault_ipa, data); | 192 | trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, fault_ipa, &data); |
193 | mmio_write_buf(data_buf, len, data); | 193 | mmio_write_buf(data_buf, len, data); |
194 | 194 | ||
195 | ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, fault_ipa, len, | 195 | ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, fault_ipa, len, |
196 | data_buf); | 196 | data_buf); |
197 | } else { | 197 | } else { |
198 | trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, len, | 198 | trace_kvm_mmio(KVM_TRACE_MMIO_READ_UNSATISFIED, len, |
199 | fault_ipa, 0); | 199 | fault_ipa, NULL); |
200 | 200 | ||
201 | ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, fault_ipa, len, | 201 | ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, fault_ipa, len, |
202 | data_buf); | 202 | data_buf); |
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index f6ba589cd312..c821c1d5610e 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "soc.h" | 32 | #include "soc.h" |
33 | 33 | ||
34 | #define OMAP1_DMA_BASE (0xfffed800) | 34 | #define OMAP1_DMA_BASE (0xfffed800) |
35 | #define OMAP1_LOGICAL_DMA_CH_COUNT 17 | ||
36 | 35 | ||
37 | static u32 enable_1510_mode; | 36 | static u32 enable_1510_mode; |
38 | 37 | ||
@@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void) | |||
348 | goto exit_iounmap; | 347 | goto exit_iounmap; |
349 | } | 348 | } |
350 | 349 | ||
351 | d->lch_count = OMAP1_LOGICAL_DMA_CH_COUNT; | ||
352 | |||
353 | /* Valid attributes for omap1 plus processors */ | 350 | /* Valid attributes for omap1 plus processors */ |
354 | if (cpu_is_omap15xx()) | 351 | if (cpu_is_omap15xx()) |
355 | d->dev_caps = ENABLE_1510_MODE; | 352 | d->dev_caps = ENABLE_1510_MODE; |
@@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void) | |||
366 | d->dev_caps |= CLEAR_CSR_ON_READ; | 363 | d->dev_caps |= CLEAR_CSR_ON_READ; |
367 | d->dev_caps |= IS_WORD_16; | 364 | d->dev_caps |= IS_WORD_16; |
368 | 365 | ||
369 | if (cpu_is_omap15xx()) | 366 | /* available logical channels */ |
370 | d->chan_count = 9; | 367 | if (cpu_is_omap15xx()) { |
371 | else if (cpu_is_omap16xx() || cpu_is_omap7xx()) { | 368 | d->lch_count = 9; |
372 | if (!(d->dev_caps & ENABLE_1510_MODE)) | 369 | } else { |
373 | d->chan_count = 16; | 370 | if (d->dev_caps & ENABLE_1510_MODE) |
371 | d->lch_count = 9; | ||
374 | else | 372 | else |
375 | d->chan_count = 9; | 373 | d->lch_count = 16; |
376 | } | 374 | } |
377 | 375 | ||
378 | p = dma_plat_info; | 376 | p = dma_plat_info; |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 8633c703546a..2944af820558 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -367,7 +367,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr) | |||
367 | return ret; | 367 | return ret; |
368 | } | 368 | } |
369 | 369 | ||
370 | void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) | 370 | int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) |
371 | { | 371 | { |
372 | int err; | 372 | int err; |
373 | struct device *dev = &gpmc_onenand_device.dev; | 373 | struct dev |