diff options
author | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
commit | 6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1 (patch) | |
tree | 2ab49b7d19fb69cdae5b6be9e7ba44f6cf3d45ef /arch/arm | |
parent | 35e1efd25a9e7d5cf2884fa23441ab87353849bb (diff) | |
parent | 19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff) |
Merge commit 'v3.16' into next
Diffstat (limited to 'arch/arm')
27 files changed, 144 insertions, 71 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 245058b3b0ef..290f02ee0157 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -6,6 +6,7 @@ config ARM | |||
6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST | 6 | select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST |
7 | select ARCH_HAVE_CUSTOM_GPIO_H | 7 | select ARCH_HAVE_CUSTOM_GPIO_H |
8 | select ARCH_MIGHT_HAVE_PC_PARPORT | 8 | select ARCH_MIGHT_HAVE_PC_PARPORT |
9 | select ARCH_SUPPORTS_ATOMIC_RMW | ||
9 | select ARCH_USE_BUILTIN_BSWAP | 10 | select ARCH_USE_BUILTIN_BSWAP |
10 | select ARCH_USE_CMPXCHG_LOCKREF | 11 | select ARCH_USE_CMPXCHG_LOCKREF |
11 | select ARCH_WANT_IPC_PARSE_VERSION | 12 | select ARCH_WANT_IPC_PARSE_VERSION |
@@ -312,7 +313,7 @@ config ARCH_MULTIPLATFORM | |||
312 | config ARCH_INTEGRATOR | 313 | config ARCH_INTEGRATOR |
313 | bool "ARM Ltd. Integrator family" | 314 | bool "ARM Ltd. Integrator family" |
314 | select ARM_AMBA | 315 | select ARM_AMBA |
315 | select ARM_PATCH_PHYS_VIRT | 316 | select ARM_PATCH_PHYS_VIRT if MMU |
316 | select AUTO_ZRELADDR | 317 | select AUTO_ZRELADDR |
317 | select COMMON_CLK | 318 | select COMMON_CLK |
318 | select COMMON_CLK_VERSATILE | 319 | select COMMON_CLK_VERSATILE |
@@ -658,7 +659,7 @@ config ARCH_MSM | |||
658 | config ARCH_SHMOBILE_LEGACY | 659 | config ARCH_SHMOBILE_LEGACY |
659 | bool "Renesas ARM SoCs (non-multiplatform)" | 660 | bool "Renesas ARM SoCs (non-multiplatform)" |
660 | select ARCH_SHMOBILE | 661 | select ARCH_SHMOBILE |
661 | select ARM_PATCH_PHYS_VIRT | 662 | select ARM_PATCH_PHYS_VIRT if MMU |
662 | select CLKDEV_LOOKUP | 663 | select CLKDEV_LOOKUP |
663 | select GENERIC_CLOCKEVENTS | 664 | select GENERIC_CLOCKEVENTS |
664 | select HAVE_ARM_SCU if SMP | 665 | select HAVE_ARM_SCU if SMP |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index 287795985e32..b84bac5bada4 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -925,7 +925,7 @@ | |||
925 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | 925 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; |
926 | reg = <0x00500000 0x00100000>; | 926 | reg = <0x00500000 0x00100000>; |
927 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 927 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
928 | clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, | 928 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, |
929 | <&uhpck>; | 929 | <&uhpck>; |
930 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; | 930 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; |
931 | status = "disabled"; | 931 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 2ebc42140ea6..2c0d6ea3ab41 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -1124,6 +1124,7 @@ | |||
1124 | compatible = "atmel,at91sam9rl-pwm"; | 1124 | compatible = "atmel,at91sam9rl-pwm"; |
1125 | reg = <0xf8034000 0x300>; | 1125 | reg = <0xf8034000 0x300>; |
1126 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; | 1126 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; |
1127 | clocks = <&pwm_clk>; | ||
1127 | #pwm-cells = <3>; | 1128 | #pwm-cells = <3>; |
1128 | status = "disabled"; | 1129 | status = "disabled"; |
1129 | }; | 1130 | }; |
@@ -1155,8 +1156,7 @@ | |||
1155 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | 1156 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; |
1156 | reg = <0x00600000 0x100000>; | 1157 | reg = <0x00600000 0x100000>; |
1157 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 1158 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
1158 | clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, | 1159 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; |
1159 | <&uhpck>; | ||
1160 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; | 1160 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; |
1161 | status = "disabled"; | 1161 | status = "disabled"; |
1162 | }; | 1162 | }; |
diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi index ab1116d086be..83a5b8685bd9 100644 --- a/arch/arm/boot/dts/hi3620.dtsi +++ b/arch/arm/boot/dts/hi3620.dtsi | |||
@@ -73,7 +73,7 @@ | |||
73 | 73 | ||
74 | L2: l2-cache { | 74 | L2: l2-cache { |
75 | compatible = "arm,pl310-cache"; | 75 | compatible = "arm,pl310-cache"; |
76 | reg = <0xfc10000 0x100000>; | 76 | reg = <0x100000 0x100000>; |
77 | interrupts = <0 15 4>; | 77 | interrupts = <0 15 4>; |
78 | cache-unified; | 78 | cache-unified; |
79 | cache-level = <2>; | 79 | cache-level = <2>; |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 1fe45d1f75ec..b15f1a77d684 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
@@ -353,7 +353,7 @@ | |||
353 | }; | 353 | }; |
354 | 354 | ||
355 | twl_power: power { | 355 | twl_power: power { |
356 | compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off"; | 356 | compatible = "ti,twl4030-power-n900"; |
357 | ti,use_poweroff; | 357 | ti,use_poweroff; |
358 | }; | 358 | }; |
359 | }; | 359 | }; |
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 8d7ffaeff6e0..79f68acfd5d4 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi | |||
@@ -540,9 +540,9 @@ | |||
540 | #clock-cells = <0>; | 540 | #clock-cells = <0>; |
541 | clock-output-names = "sd1"; | 541 | clock-output-names = "sd1"; |
542 | }; | 542 | }; |
543 | sd2_clk: sd3_clk@e615007c { | 543 | sd2_clk: sd3_clk@e615026c { |
544 | compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock"; | 544 | compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock"; |
545 | reg = <0 0xe615007c 0 4>; | 545 | reg = <0 0xe615026c 0 4>; |
546 | clocks = <&pll1_div2_clk>; | 546 | clocks = <&pll1_div2_clk>; |
547 | #clock-cells = <0>; | 547 | #clock-cells = <0>; |
548 | clock-output-names = "sd2"; | 548 | clock-output-names = "sd2"; |
diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts index f557feb997f4..90d8b6c7a205 100644 --- a/arch/arm/boot/dts/ste-nomadik-s8815.dts +++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts | |||
@@ -4,7 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | /dts-v1/; | 6 | /dts-v1/; |
7 | /include/ "ste-nomadik-stn8815.dtsi" | 7 | #include "ste-nomadik-stn8815.dtsi" |
8 | 8 | ||
9 | / { | 9 | / { |
10 | model = "Calao Systems USB-S8815"; | 10 | model = "Calao Systems USB-S8815"; |
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index d316c955bd5f..dbcf521b017f 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC | 2 | * Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC |
3 | */ | 3 | */ |
4 | /include/ "skeleton.dtsi" | 4 | |
5 | #include <dt-bindings/gpio/gpio.h> | ||
6 | #include "skeleton.dtsi" | ||
5 | 7 | ||
6 | / { | 8 | / { |
7 | #address-cells = <1>; | 9 | #address-cells = <1>; |
@@ -842,8 +844,7 @@ | |||
842 | bus-width = <4>; | 844 | bus-width = <4>; |
843 | cap-mmc-highspeed; | 845 | cap-mmc-highspeed; |
844 | cap-sd-highspeed; | 846 | cap-sd-highspeed; |
845 | cd-gpios = <&gpio3 15 0x1>; | 847 | cd-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; |
846 | cd-inverted; | ||
847 | pinctrl-names = "default"; | 848 | pinctrl-names = "default"; |
848 | pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; | 849 | pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; |
849 | vmmc-supply = <&vmmc_regulator>; | 850 | vmmc-supply = <&vmmc_regulator>; |
diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c index 4522366da759..15468fbbdea3 100644 --- a/arch/arm/crypto/aesbs-glue.c +++ b/arch/arm/crypto/aesbs-glue.c | |||
@@ -137,7 +137,7 @@ static int aesbs_cbc_encrypt(struct blkcipher_desc *desc, | |||
137 | dst += AES_BLOCK_SIZE; | 137 | dst += AES_BLOCK_SIZE; |
138 | } while (--blocks); | 138 | } while (--blocks); |
139 | } | 139 | } |
140 | err = blkcipher_walk_done(desc, &walk, 0); | 140 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
141 | } | 141 | } |
142 | return err; | 142 | return err; |
143 | } | 143 | } |
@@ -158,7 +158,7 @@ static int aesbs_cbc_decrypt(struct blkcipher_desc *desc, | |||
158 | bsaes_cbc_encrypt(walk.src.virt.addr, walk.dst.virt.addr, | 158 | bsaes_cbc_encrypt(walk.src.virt.addr, walk.dst.virt.addr, |
159 | walk.nbytes, &ctx->dec, walk.iv); | 159 | walk.nbytes, &ctx->dec, walk.iv); |
160 | kernel_neon_end(); | 160 | kernel_neon_end(); |
161 | err = blkcipher_walk_done(desc, &walk, 0); | 161 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
162 | } | 162 | } |
163 | while (walk.nbytes) { | 163 | while (walk.nbytes) { |
164 | u32 blocks = walk.nbytes / AES_BLOCK_SIZE; | 164 | u32 blocks = walk.nbytes / AES_BLOCK_SIZE; |
@@ -182,7 +182,7 @@ static int aesbs_cbc_decrypt(struct blkcipher_desc *desc, | |||
182 | dst += AES_BLOCK_SIZE; | 182 | dst += AES_BLOCK_SIZE; |
183 | src += AES_BLOCK_SIZE; | 183 | src += AES_BLOCK_SIZE; |
184 | } while (--blocks); | 184 | } while (--blocks); |
185 | err = blkcipher_walk_done(desc, &walk, 0); | 185 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
186 | } | 186 | } |
187 | return err; | 187 | return err; |
188 | } | 188 | } |
@@ -268,7 +268,7 @@ static int aesbs_xts_encrypt(struct blkcipher_desc *desc, | |||
268 | bsaes_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr, | 268 | bsaes_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr, |
269 | walk.nbytes, &ctx->enc, walk.iv); | 269 | walk.nbytes, &ctx->enc, walk.iv); |
270 | kernel_neon_end(); | 270 | kernel_neon_end(); |
271 | err = blkcipher_walk_done(desc, &walk, 0); | 271 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
272 | } | 272 | } |
273 | return err; | 273 | return err; |
274 | } | 274 | } |
@@ -292,7 +292,7 @@ static int aesbs_xts_decrypt(struct blkcipher_desc *desc, | |||
292 | bsaes_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr, | 292 | bsaes_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr, |
293 | walk.nbytes, &ctx->dec, walk.iv); | 293 | walk.nbytes, &ctx->dec, walk.iv); |
294 | kernel_neon_end(); | 294 | kernel_neon_end(); |
295 | err = blkcipher_walk_done(desc, &walk, 0); | 295 | err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); |
296 | } | 296 | } |
297 | return err; | 297 | return err; |
298 | } | 298 | } |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 060a75e99263..0406cb3f1af7 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -50,6 +50,7 @@ struct machine_desc { | |||
50 | struct smp_operations *smp; /* SMP operations */ | 50 | struct smp_operations *smp; /* SMP operations */ |
51 | bool (*smp_init)(void); | 51 | bool (*smp_init)(void); |
52 | void (*fixup)(struct tag *, char **); | 52 | void (*fixup)(struct tag *, char **); |
53 | void (*dt_fixup)(void); | ||
53 | void (*init_meminfo)(void); | 54 | void (*init_meminfo)(void); |
54 | void (*reserve)(void);/* reserve mem blocks */ | 55 | void (*reserve)(void);/* reserve mem blocks */ |
55 | void (*map_io)(void);/* IO mapping function */ | 56 | void (*map_io)(void);/* IO mapping function */ |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index e94a157ddff1..11c54de9f8cf 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -212,7 +212,7 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
212 | mdesc_best = &__mach_desc_GENERIC_DT; | 212 | mdesc_best = &__mach_desc_GENERIC_DT; |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | if (!dt_phys || !early_init_dt_scan(phys_to_virt(dt_phys))) | 215 | if (!dt_phys || !early_init_dt_verify(phys_to_virt(dt_phys))) |
216 | return NULL; | 216 | return NULL; |
217 | 217 | ||
218 | mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); | 218 | mdesc = of_flat_dt_match_machine(mdesc_best, arch_get_next_mach); |
@@ -237,6 +237,12 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
237 | dump_machine_table(); /* does not return */ | 237 | dump_machine_table(); /* does not return */ |
238 | } | 238 | } |
239 | 239 | ||
240 | /* We really don't want to do this, but sometimes firmware provides buggy data */ | ||
241 | if (mdesc->dt_fixup) | ||
242 | mdesc->dt_fixup(); | ||
243 | |||
244 | early_init_dt_scan_nodes(); | ||
245 | |||
240 | /* Change machine number to match the mdesc we're using */ | 246 | /* Change machine number to match the mdesc we're using */ |
241 | __machine_arch_type = mdesc->nr; | 247 | __machine_arch_type = mdesc->nr; |
242 | 248 | ||
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index a5599cfc43cb..2b32978ae905 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S | |||
@@ -94,13 +94,19 @@ ENTRY(iwmmxt_task_enable) | |||
94 | 94 | ||
95 | mrc p15, 0, r2, c2, c0, 0 | 95 | mrc p15, 0, r2, c2, c0, 0 |
96 | mov r2, r2 @ cpwait | 96 | mov r2, r2 @ cpwait |
97 | bl concan_save | ||
97 | 98 | ||
98 | teq r1, #0 @ test for last ownership | 99 | #ifdef CONFIG_PREEMPT_COUNT |
99 | mov lr, r9 @ normal exit from exception | 100 | get_thread_info r10 |
100 | beq concan_load @ no owner, skip save | 101 | #endif |
102 | 4: dec_preempt_count r10, r3 | ||
103 | mov pc, r9 @ normal exit from exception | ||
101 | 104 | ||
102 | concan_save: | 105 | concan_save: |
103 | 106 | ||
107 | teq r1, #0 @ test for last ownership | ||
108 | beq concan_load @ no owner, skip save | ||
109 | |||
104 | tmrc r2, wCon | 110 | tmrc r2, wCon |
105 | 111 | ||
106 | @ CUP? wCx | 112 | @ CUP? wCx |
@@ -138,7 +144,7 @@ concan_dump: | |||
138 | wstrd wR15, [r1, #MMX_WR15] | 144 | wstrd wR15, [r1, #MMX_WR15] |
139 | 145 | ||
140 | 2: teq r0, #0 @ anything to load? | 146 | 2: teq r0, #0 @ anything to load? |
141 | beq 3f | 147 | moveq pc, lr @ if not, return |
142 | 148 | ||
143 | concan_load: | 149 | concan_load: |
144 | 150 | ||
@@ -171,14 +177,9 @@ concan_load: | |||
171 | @ clear CUP/MUP (only if r1 != 0) | 177 | @ clear CUP/MUP (only if r1 != 0) |
172 | teq r1, #0 | 178 | teq r1, #0 |
173 | mov r2, #0 | 179 | mov r2, #0 |
174 | beq 3f | 180 | moveq pc, lr |
175 | tmcr wCon, r2 | ||
176 | 181 | ||
177 | 3: | 182 | tmcr wCon, r2 |
178 | #ifdef CONFIG_PREEMPT_COUNT | ||
179 | get_thread_info r10 | ||
180 | #endif | ||
181 | 4: dec_preempt_count r10, r3 | ||
182 | mov pc, lr | 183 | mov pc, lr |
183 | 184 | ||
184 | /* | 185 | /* |
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index 778c2f7024ff..a74b53c1b7df 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c | |||
@@ -160,12 +160,16 @@ static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr) | |||
160 | static struct undef_hook kgdb_brkpt_hook = { | 160 | static struct undef_hook kgdb_brkpt_hook = { |
161 | .instr_mask = 0xffffffff, | 161 | .instr_mask = 0xffffffff, |
162 | .instr_val = KGDB_BREAKINST, | 162 | .instr_val = KGDB_BREAKINST, |
163 | .cpsr_mask = MODE_MASK, | ||
164 | .cpsr_val = SVC_MODE, | ||
163 | .fn = kgdb_brk_fn | 165 | .fn = kgdb_brk_fn |
164 | }; | 166 | }; |
165 | 167 | ||
166 | static struct undef_hook kgdb_compiled_brkpt_hook = { | 168 | static struct undef_hook kgdb_compiled_brkpt_hook = { |
167 | .instr_mask = 0xffffffff, | 169 | .instr_mask = 0xffffffff, |
168 | .instr_val = KGDB_COMPILED_BREAK, | 170 | .instr_val = KGDB_COMPILED_BREAK, |
171 | .cpsr_mask = MODE_MASK, | ||
172 | .cpsr_val = SVC_MODE, | ||
169 | .fn = kgdb_compiled_brk_fn | 173 | .fn = kgdb_compiled_brk_fn |
170 | }; | 174 | }; |
171 | 175 | ||
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 9d853189028b..e35d880f9773 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -275,7 +275,7 @@ void store_cpu_topology(unsigned int cpuid) | |||
275 | cpu_topology[cpuid].socket_id, mpidr); | 275 | cpu_topology[cpuid].socket_id, mpidr); |
276 | } | 276 | } |
277 | 277 | ||
278 | static inline const int cpu_corepower_flags(void) | 278 | static inline int cpu_corepower_flags(void) |
279 | { | 279 | { |
280 | return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; | 280 | return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; |
281 | } | 281 | } |
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 46d893fcbe85..66c9b9614f3c 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c | |||
@@ -335,6 +335,15 @@ static void __init exynos_reserve(void) | |||
335 | #endif | 335 | #endif |
336 | } | 336 | } |
337 | 337 | ||
338 | static void __init exynos_dt_fixup(void) | ||
339 | { | ||
340 | /* | ||
341 | * Some versions of uboot pass garbage entries in the memory node, | ||
342 | * use the old CONFIG_ARM_NR_BANKS | ||
343 | */ | ||
344 | of_fdt_limit_memory(8); | ||
345 | } | ||
346 | |||
338 | DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") | 347 | DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") |
339 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | 348 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
340 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 349 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
@@ -348,4 +357,5 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") | |||
348 | .dt_compat = exynos_dt_compat, | 357 | .dt_compat = exynos_dt_compat, |
349 | .restart = exynos_restart, | 358 | .restart = exynos_restart, |
350 | .reserve = exynos_reserve, | 359 | .reserve = exynos_reserve, |
360 | .dt_fixup = exynos_dt_fixup, | ||
351 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 8a134d019cb3..920a4baa53cd 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
@@ -40,15 +40,17 @@ static inline void cpu_leave_lowpower(void) | |||
40 | 40 | ||
41 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | 41 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
42 | { | 42 | { |
43 | u32 mpidr = cpu_logical_map(cpu); | ||
44 | u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
45 | |||
43 | for (;;) { | 46 | for (;;) { |
44 | 47 | ||
45 | /* make cpu1 to be turned off at next WFI command */ | 48 | /* Turn the CPU off on next WFI instruction. */ |
46 | if (cpu == 1) | 49 | exynos_cpu_power_down(core_id); |
47 | exynos_cpu_power_down(cpu); | ||
48 | 50 | ||
49 | wfi(); | 51 | wfi(); |
50 | 52 | ||
51 | if (pen_release == cpu_logical_map(cpu)) { | 53 | if (pen_release == core_id) { |
52 | /* | 54 | /* |
53 | * OK, proper wakeup, we're done | 55 | * OK, proper wakeup, we're done |
54 | */ | 56 | */ |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 1c8d31e39520..50b9aad5e27b 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -90,7 +90,8 @@ static void exynos_secondary_init(unsigned int cpu) | |||
90 | static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | 90 | static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) |
91 | { | 91 | { |
92 | unsigned long timeout; | 92 | unsigned long timeout; |
93 | unsigned long phys_cpu = cpu_logical_map(cpu); | 93 | u32 mpidr = cpu_logical_map(cpu); |
94 | u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
94 | int ret = -ENOSYS; | 95 | int ret = -ENOSYS; |
95 | 96 | ||
96 | /* | 97 | /* |
@@ -104,17 +105,18 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
104 | * the holding pen - release it, then wait for it to flag | 105 | * the holding pen - release it, then wait for it to flag |
105 | * that it has been released by resetting pen_release. | 106 | * that it has been released by resetting pen_release. |
106 | * | 107 | * |
107 | * Note that "pen_release" is the hardware CPU ID, whereas | 108 | * Note that "pen_release" is the hardware CPU core ID, whereas |
108 | * "cpu" is Linux's internal ID. | 109 | * "cpu" is Linux's internal ID. |
109 | */ | 110 | */ |
110 | write_pen_release(phys_cpu); | 111 | write_pen_release(core_id); |
111 | 112 | ||
112 | if (!exynos_cpu_power_state(cpu)) { | 113 | if (!exynos_cpu_power_state(core_id)) { |
113 | exynos_cpu_power_up(cpu); | 114 | exynos_cpu_power_up(core_id); |
114 | timeout = 10; | 115 | timeout = 10; |
115 | 116 | ||
116 | /* wait max 10 ms until cpu1 is on */ | 117 | /* wait max 10 ms until cpu1 is on */ |
117 | while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) { | 118 | while (exynos_cpu_power_state(core_id) |
119 | != S5P_CORE_LOCAL_PWR_EN) { | ||
118 | if (timeout-- == 0) | 120 | if (timeout-- == 0) |
119 | break; | 121 | break; |
120 | 122 | ||
@@ -145,20 +147,20 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
145 | * Try to set boot address using firmware first | 147 | * Try to set boot address using firmware first |
146 | * and fall back to boot register if it fails. | 148 | * and fall back to boot register if it fails. |
147 | */ | 149 | */ |
148 | ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr); | 150 | ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr); |
149 | if (ret && ret != -ENOSYS) | 151 | if (ret && ret != -ENOSYS) |
150 | goto fail; | 152 | goto fail; |
151 | if (ret == -ENOSYS) { | 153 | if (ret == -ENOSYS) { |
152 | void __iomem *boot_reg = cpu_boot_reg(phys_cpu); | 154 | void __iomem *boot_reg = cpu_boot_reg(core_id); |
153 | 155 | ||
154 | if (IS_ERR(boot_reg)) { | 156 | if (IS_ERR(boot_reg)) { |
155 | ret = PTR_ERR(boot_reg); | 157 | ret = PTR_ERR(boot_reg); |
156 | goto fail; | 158 | goto fail; |
157 | } | 159 | } |
158 | __raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); | 160 | __raw_writel(boot_addr, cpu_boot_reg(core_id)); |
159 | } | 161 | } |
160 | 162 | ||
161 | call_firmware_op(cpu_boot, phys_cpu); | 163 | call_firmware_op(cpu_boot, core_id); |
162 | 164 | ||
163 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); | 165 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); |
164 | 166 | ||
@@ -227,22 +229,24 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) | |||
227 | * boot register if it fails. | 229 | * boot register if it fails. |
228 | */ | 230 | */ |
229 | for (i = 1; i < max_cpus; ++i) { | 231 | for (i = 1; i < max_cpus; ++i) { |
230 | unsigned long phys_cpu; | ||
231 | unsigned long boot_addr; | 232 | unsigned long boot_addr; |
233 | u32 mpidr; | ||
234 | u32 core_id; | ||
232 | int ret; | 235 | int ret; |
233 | 236 | ||
234 | phys_cpu = cpu_logical_map(i); | 237 | mpidr = cpu_logical_map(i); |
238 | core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
235 | boot_addr = virt_to_phys(exynos4_secondary_startup); | 239 | boot_addr = virt_to_phys(exynos4_secondary_startup); |
236 | 240 | ||
237 | ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr); | 241 | ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr); |
238 | if (ret && ret != -ENOSYS) | 242 | if (ret && ret != -ENOSYS) |
239 | break; | 243 | break; |
240 | if (ret == -ENOSYS) { | 244 | if (ret == -ENOSYS) { |
241 | void __iomem *boot_reg = cpu_boot_reg(phys_cpu); | 245 | void __iomem *boot_reg = cpu_boot_reg(core_id); |
242 | 246 | ||
243 | if (IS_ERR(boot_reg)) | 247 | if (IS_ERR(boot_reg)) |
244 | break; | 248 | break; |
245 | __raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); | 249 | __raw_writel(boot_addr, cpu_boot_reg(core_id)); |
246 | } | 250 | } |
247 | } | 251 | } |
248 | } | 252 | } |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 8e795dea02ec..8556c787e59c 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -70,7 +70,7 @@ static const char *cko_sels[] = { "cko1", "cko2", }; | |||
70 | static const char *lvds_sels[] = { | 70 | static const char *lvds_sels[] = { |
71 | "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", | 71 | "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", |
72 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", | 72 | "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", |
73 | "pcie_ref", "sata_ref", | 73 | "pcie_ref_125m", "sata_ref_100m", |
74 | }; | 74 | }; |
75 | 75 | ||
76 | enum mx6q_clks { | 76 | enum mx6q_clks { |
@@ -491,7 +491,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
491 | 491 | ||
492 | /* All existing boards with PCIe use LVDS1 */ | 492 | /* All existing boards with PCIe use LVDS1 */ |
493 | if (IS_ENABLED(CONFIG_PCI_IMX6)) | 493 | if (IS_ENABLED(CONFIG_PCI_IMX6)) |
494 | clk_set_parent(clk[lvds1_sel], clk[sata_ref]); | 494 | clk_set_parent(clk[lvds1_sel], clk[sata_ref_100m]); |
495 | 495 | ||
496 | /* Set initial power mode */ | 496 | /* Set initial power mode */ |
497 | imx6q_set_lpm(WAIT_CLOCKED); | 497 | imx6q_set_lpm(WAIT_CLOCKED); |
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 477202fd39cc..2bdc3233abe2 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
@@ -292,6 +292,10 @@ static struct notifier_block mvebu_hwcc_nb = { | |||
292 | .notifier_call = mvebu_hwcc_notifier, | 292 | .notifier_call = mvebu_hwcc_notifier, |
293 | }; | 293 | }; |
294 | 294 | ||
295 | static struct notifier_block mvebu_hwcc_pci_nb = { | ||
296 | .notifier_call = mvebu_hwcc_notifier, | ||
297 | }; | ||
298 | |||
295 | static void __init armada_370_coherency_init(struct device_node *np) | 299 | static void __init armada_370_coherency_init(struct device_node *np) |
296 | { | 300 | { |
297 | struct resource res; | 301 | struct resource res; |
@@ -427,7 +431,7 @@ static int __init coherency_pci_init(void) | |||
427 | { | 431 | { |
428 | if (coherency_available()) | 432 | if (coherency_available()) |
429 | bus_register_notifier(&pci_bus_type, | 433 | bus_register_notifier(&pci_bus_type, |
430 | &mvebu_hwcc_nb); | 434 | &mvebu_hwcc_pci_nb); |
431 | return 0; | 435 | return 0; |
432 | } | 436 | } |
433 | 437 | ||
diff --git a/arch/arm/mach-mvebu/headsmp-a9.S b/arch/arm/mach-mvebu/headsmp-a9.S index 5925366bc03c..da5bb292b91c 100644 --- a/arch/arm/mach-mvebu/headsmp-a9.S +++ b/arch/arm/mach-mvebu/headsmp-a9.S | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | 17 | ||
18 | #include <asm/assembler.h> | ||
19 | |||
18 | __CPUINIT | 20 | __CPUINIT |
19 | #define CPU_RESUME_ADDR_REG 0xf10182d4 | 21 | #define CPU_RESUME_ADDR_REG 0xf10182d4 |
20 | 22 | ||
@@ -22,13 +24,18 @@ | |||
22 | .global armada_375_smp_cpu1_enable_code_end | 24 | .global armada_375_smp_cpu1_enable_code_end |
23 | 25 | ||
24 | armada_375_smp_cpu1_enable_code_start: | 26 | armada_375_smp_cpu1_enable_code_start: |
25 | ldr r0, [pc, #4] | 27 | ARM_BE8(setend be) |
28 | adr r0, 1f | ||
29 | ldr r0, [r0] | ||
26 | ldr r1, [r0] | 30 | ldr r1, [r0] |
31 | ARM_BE8(rev r1, r1) | ||
27 | mov pc, r1 | 32 | mov pc, r1 |
33 | 1: | ||
28 | .word CPU_RESUME_ADDR_REG | 34 | .word CPU_RESUME_ADDR_REG |
29 | armada_375_smp_cpu1_enable_code_end: | 35 | armada_375_smp_cpu1_enable_code_end: |
30 | 36 | ||
31 | ENTRY(mvebu_cortex_a9_secondary_startup) | 37 | ENTRY(mvebu_cortex_a9_secondary_startup) |
38 | ARM_BE8(setend be) | ||
32 | bl v7_invalidate_l1 | 39 | bl v7_invalidate_l1 |
33 | b secondary_startup | 40 | b secondary_startup |
34 | ENDPROC(mvebu_cortex_a9_secondary_startup) | 41 | ENDPROC(mvebu_cortex_a9_secondary_startup) |
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index a1d407c0febe..25aa8237d668 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -201,12 +201,12 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle) | |||
201 | 201 | ||
202 | /* Test the CR_C bit and set it if it was cleared */ | 202 | /* Test the CR_C bit and set it if it was cleared */ |
203 | asm volatile( | 203 | asm volatile( |
204 | "mrc p15, 0, %0, c1, c0, 0 \n\t" | 204 | "mrc p15, 0, r0, c1, c0, 0 \n\t" |
205 | "tst %0, #(1 << 2) \n\t" | 205 | "tst r0, #(1 << 2) \n\t" |
206 | "orreq %0, %0, #(1 << 2) \n\t" | 206 | "orreq r0, r0, #(1 << 2) \n\t" |
207 | "mcreq p15, 0, %0, c1, c0, 0 \n\t" | 207 | "mcreq p15, 0, r0, c1, c0, 0 \n\t" |
208 | "isb " | 208 | "isb " |
209 | : : "r" (0)); | 209 | : : : "r0"); |
210 | 210 | ||
211 | pr_warn("Failed to suspend the system\n"); | 211 | pr_warn("Failed to suspend the system\n"); |
212 | 212 | ||
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 17cd39360afe..93914d220069 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -50,6 +50,16 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) | |||
50 | soc_is_omap54xx() || soc_is_dra7xx()) | 50 | soc_is_omap54xx() || soc_is_dra7xx()) |
51 | return 1; | 51 | return 1; |
52 | 52 | ||
53 | if (ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW || | ||
54 | ecc_opt == OMAP_ECC_BCH8_CODE_HW_DETECTION_SW) { | ||
55 | if (cpu_is_omap24xx()) | ||
56 | return 0; | ||
57 | else if (cpu_is_omap3630() && (GET_OMAP_REVISION() == 0)) | ||
58 | return 0; | ||
59 | else | ||
60 | return 1; | ||
61 | } | ||
62 | |||
53 | /* OMAP3xxx do not have ELM engine, so cannot support ECC schemes | 63 | /* OMAP3xxx do not have ELM engine, so cannot support ECC schemes |
54 | * which require H/W based ECC error detection */ | 64 | * which require H/W based ECC error detection */ |
55 | if ((cpu_is_omap34xx() || cpu_is_omap3630()) && | 65 | if ((cpu_is_omap34xx() || cpu_is_omap3630()) && |
@@ -57,14 +67,6 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) | |||
57 | (ecc_opt == OMAP_ECC_BCH8_CODE_HW))) | 67 | (ecc_opt == OMAP_ECC_BCH8_CODE_HW))) |
58 | return 0; | 68 | return 0; |
59 | 69 | ||
60 | /* | ||
61 | * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1 | ||
62 | * and AM33xx derivates. Other chips may be added if confirmed to work. | ||
63 | */ | ||
64 | if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW) && | ||
65 | (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) | ||
66 | return 0; | ||
67 | |||
68 | /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ | 70 | /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ |
69 | if (ecc_opt == OMAP_ECC_HAM1_CODE_HW) | 71 | if (ecc_opt == OMAP_ECC_HAM1_CODE_HW) |
70 | return 1; | 72 | return 1; |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 539e8106eb96..a0fe747634c1 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -168,6 +168,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg) | |||
168 | smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX; | 168 | smc_op = OMAP4_MON_L2X0_PREFETCH_INDEX; |
169 | break; | 169 | break; |
170 | 170 | ||
171 | case L310_POWER_CTRL: | ||
172 | pr_info_once("OMAP L2C310: ROM does not support power control setting\n"); | ||
173 | return; | ||
174 | |||
171 | default: | 175 | default: |
172 | WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg); | 176 | WARN_ONCE(1, "OMAP L2C310: ignoring write to reg 0x%x\n", reg); |
173 | return; | 177 | return; |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 4c88935654ca..1f88db06b133 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -461,12 +461,21 @@ void __init dma_contiguous_remap(void) | |||
461 | map.type = MT_MEMORY_DMA_READY; | 461 | map.type = MT_MEMORY_DMA_READY; |
462 | 462 | ||
463 | /* | 463 | /* |
464 | * Clear previous low-memory mapping | 464 | * Clear previous low-memory mapping to ensure that the |
465 | * TLB does not see any conflicting entries, then flush | ||
466 | * the TLB of the old entries before creating new mappings. | ||
467 | * | ||
468 | * This ensures that any speculatively loaded TLB entries | ||
469 | * (even though they may be rare) can not cause any problems, | ||
470 | * and ensures that this code is architecturally compliant. | ||
465 | */ | 471 | */ |
466 | for (addr = __phys_to_virt(start); addr < __phys_to_virt(end); | 472 | for (addr = __phys_to_virt(start); addr < __phys_to_virt(end); |
467 | addr += PMD_SIZE) | 473 | addr += PMD_SIZE) |
468 | pmd_clear(pmd_off_k(addr)); | 474 | pmd_clear(pmd_off_k(addr)); |
469 | 475 | ||
476 | flush_tlb_kernel_range(__phys_to_virt(start), | ||
477 | __phys_to_virt(end)); | ||
478 | |||
470 | iotable_init(&map, 1); | 479 | iotable_init(&map, 1); |
471 | } | 480 | } |
472 | } | 481 | } |
diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index 8e0e52eb76b5..c447ec70e868 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c | |||
@@ -9,6 +9,11 @@ | |||
9 | #include <asm/sections.h> | 9 | #include <asm/sections.h> |
10 | #include <asm/system_info.h> | 10 | #include <asm/system_info.h> |
11 | 11 | ||
12 | /* | ||
13 | * Note: accesses outside of the kernel image and the identity map area | ||
14 | * are not supported on any CPU using the idmap tables as its current | ||
15 | * page tables. | ||
16 | */ | ||
12 | pgd_t *idmap_pgd; | 17 | pgd_t *idmap_pgd; |
13 | phys_addr_t (*arch_virt_to_idmap) (unsigned long x); | 18 | phys_addr_t (*arch_virt_to_idmap) (unsigned long x); |
14 | 19 | ||
@@ -25,6 +30,13 @@ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end, | |||
25 | pr_warning("Failed to allocate identity pmd.\n"); | 30 | pr_warning("Failed to allocate identity pmd.\n"); |
26 | return; | 31 | return; |
27 | } | 32 | } |
33 | /* | ||
34 | * Copy the original PMD to ensure that the PMD entries for | ||
35 | * the kernel image are preserved. | ||
36 | */ | ||
37 | if (!pud_none(*pud)) | ||
38 | memcpy(pmd, pmd_offset(pud, 0), | ||
39 | PTRS_PER_PMD * sizeof(pmd_t)); | ||
28 | pud_populate(&init_mm, pud, pmd); | 40 | pud_populate(&init_mm, pud, pmd); |
29 | pmd += pmd_index(addr); | 41 | pmd += pmd_index(addr); |
30 | } else | 42 | } else |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ab14b79b03f0..6e3ba8d112a2 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1406,8 +1406,8 @@ void __init early_paging_init(const struct machine_desc *mdesc, | |||
1406 | return; | 1406 | return; |
1407 | 1407 | ||
1408 | /* remap kernel code and data */ | 1408 | /* remap kernel code and data */ |
1409 | map_start = init_mm.start_code; | 1409 | map_start = init_mm.start_code & PMD_MASK; |
1410 | map_end = init_mm.brk; | 1410 | map_end = ALIGN(init_mm.brk, PMD_SIZE); |
1411 | 1411 | ||
1412 | /* get a handle on things... */ | 1412 | /* get a handle on things... */ |
1413 | pgd0 = pgd_offset_k(0); | 1413 | pgd0 = pgd_offset_k(0); |
@@ -1442,7 +1442,7 @@ void __init early_paging_init(const struct machine_desc *mdesc, | |||
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | /* remap pmds for kernel mapping */ | 1444 | /* remap pmds for kernel mapping */ |
1445 | phys = __pa(map_start) & PMD_MASK; | 1445 | phys = __pa(map_start); |
1446 | do { | 1446 | do { |
1447 | *pmdk++ = __pmd(phys | pmdprot); | 1447 | *pmdk++ = __pmd(phys | pmdprot); |
1448 | phys += PMD_SIZE; | 1448 | phys += PMD_SIZE; |
diff --git a/arch/arm/xen/grant-table.c b/arch/arm/xen/grant-table.c index 859a9bb002d5..91cf08ba1e95 100644 --- a/arch/arm/xen/grant-table.c +++ b/arch/arm/xen/grant-table.c | |||
@@ -51,3 +51,8 @@ int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, | |||
51 | { | 51 | { |
52 | return -ENOSYS; | 52 | return -ENOSYS; |
53 | } | 53 | } |
54 | |||
55 | int arch_gnttab_init(unsigned long nr_shared, unsigned long nr_status) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||