diff options
Diffstat (limited to 'arch')
55 files changed, 319 insertions, 194 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 49d993cee512..2651b1da1c56 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1189,6 +1189,16 @@ config PL310_ERRATA_588369 | |||
1189 | is not correctly implemented in PL310 as clean lines are not | 1189 | is not correctly implemented in PL310 as clean lines are not |
1190 | invalidated as a result of these operations. | 1190 | invalidated as a result of these operations. |
1191 | 1191 | ||
1192 | config ARM_ERRATA_643719 | ||
1193 | bool "ARM errata: LoUIS bit field in CLIDR register is incorrect" | ||
1194 | depends on CPU_V7 && SMP | ||
1195 | help | ||
1196 | This option enables the workaround for the 643719 Cortex-A9 (prior to | ||
1197 | r1p0) erratum. On affected cores the LoUIS bit field of the CLIDR | ||
1198 | register returns zero when it should return one. The workaround | ||
1199 | corrects this value, ensuring cache maintenance operations which use | ||
1200 | it behave as intended and avoiding data corruption. | ||
1201 | |||
1192 | config ARM_ERRATA_720789 | 1202 | config ARM_ERRATA_720789 |
1193 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" | 1203 | bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" |
1194 | depends on CPU_V7 | 1204 | depends on CPU_V7 |
@@ -2006,7 +2016,7 @@ config XIP_PHYS_ADDR | |||
2006 | 2016 | ||
2007 | config KEXEC | 2017 | config KEXEC |
2008 | bool "Kexec system call (EXPERIMENTAL)" | 2018 | bool "Kexec system call (EXPERIMENTAL)" |
2009 | depends on (!SMP || HOTPLUG_CPU) | 2019 | depends on (!SMP || PM_SLEEP_SMP) |
2010 | help | 2020 | help |
2011 | kexec is a system call that implements the ability to shutdown your | 2021 | kexec is a system call that implements the ability to shutdown your |
2012 | current kernel, and to start another kernel. It is like a reboot | 2022 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 79e9bdbfc491..120b83bfde20 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -116,7 +116,8 @@ targets := vmlinux vmlinux.lds \ | |||
116 | 116 | ||
117 | # Make sure files are removed during clean | 117 | # Make sure files are removed during clean |
118 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \ | 118 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \ |
119 | lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) | 119 | lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \ |
120 | hyp-stub.S | ||
120 | 121 | ||
121 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | 122 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
122 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 123 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi index d1650fb34c0a..ded558bb0f3b 100644 --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi | |||
@@ -763,7 +763,7 @@ | |||
763 | }; | 763 | }; |
764 | }; | 764 | }; |
765 | 765 | ||
766 | pinctrl@03680000 { | 766 | pinctrl@03860000 { |
767 | gpz: gpz { | 767 | gpz: gpz { |
768 | gpio-controller; | 768 | gpio-controller; |
769 | #gpio-cells = <2>; | 769 | #gpio-cells = <2>; |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 0673524238a6..fc9fb3d526e2 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -161,9 +161,9 @@ | |||
161 | interrupts = <0 50 0>; | 161 | interrupts = <0 50 0>; |
162 | }; | 162 | }; |
163 | 163 | ||
164 | pinctrl_3: pinctrl@03680000 { | 164 | pinctrl_3: pinctrl@03860000 { |
165 | compatible = "samsung,exynos5250-pinctrl"; | 165 | compatible = "samsung,exynos5250-pinctrl"; |
166 | reg = <0x0368000 0x1000>; | 166 | reg = <0x03860000 0x1000>; |
167 | interrupts = <0 47 0>; | 167 | interrupts = <0 47 0>; |
168 | }; | 168 | }; |
169 | 169 | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index bff71388e72a..17d0ae8672fa 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -320,9 +320,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
320 | } | 320 | } |
321 | 321 | ||
322 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | 322 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE |
323 | static inline void flush_kernel_dcache_page(struct page *page) | 323 | extern void flush_kernel_dcache_page(struct page *); |
324 | { | ||
325 | } | ||
326 | 324 | ||
327 | #define flush_dcache_mmap_lock(mapping) \ | 325 | #define flush_dcache_mmap_lock(mapping) \ |
328 | spin_lock_irq(&(mapping)->tree_lock) | 326 | spin_lock_irq(&(mapping)->tree_lock) |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 8ef8c9337809..4fb074c446bf 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -134,6 +134,10 @@ void machine_kexec(struct kimage *image) | |||
134 | unsigned long reboot_code_buffer_phys; | 134 | unsigned long reboot_code_buffer_phys; |
135 | void *reboot_code_buffer; | 135 | void *reboot_code_buffer; |
136 | 136 | ||
137 | if (num_online_cpus() > 1) { | ||
138 | pr_err("kexec: error: multiple CPUs still online\n"); | ||
139 | return; | ||
140 | } | ||
137 | 141 | ||
138 | page_list = image->head & PAGE_MASK; | 142 | page_list = image->head & PAGE_MASK; |
139 | 143 | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 282de4826abb..6e8931ccf13e 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -184,30 +184,61 @@ int __init reboot_setup(char *str) | |||
184 | 184 | ||
185 | __setup("reboot=", reboot_setup); | 185 | __setup("reboot=", reboot_setup); |
186 | 186 | ||
187 | /* | ||
188 | * Called by kexec, immediately prior to machine_kexec(). | ||
189 | * | ||
190 | * This must completely disable all secondary CPUs; simply causing those CPUs | ||
191 | * to execute e.g. a RAM-based pin loop is not sufficient. This allows the | ||
192 | * kexec'd kernel to use any and all RAM as it sees fit, without having to | ||
193 | * avoid any code or data used by any SW CPU pin loop. The CPU hotplug | ||
194 | * functionality embodied in disable_nonboot_cpus() to achieve this. | ||
195 | */ | ||
187 | void machine_shutdown(void) | 196 | void machine_shutdown(void) |
188 | { | 197 | { |
189 | #ifdef CONFIG_SMP | 198 | disable_nonboot_cpus(); |
190 | smp_send_stop(); | ||
191 | #endif | ||
192 | } | 199 | } |
193 | 200 | ||
201 | /* | ||
202 | * Halting simply requires that the secondary CPUs stop performing any | ||
203 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
204 | * achieves this. | ||
205 | */ | ||
194 | void machine_halt(void) | 206 | void machine_halt(void) |
195 | { | 207 | { |
196 | machine_shutdown(); | 208 | smp_send_stop(); |
209 | |||
197 | local_irq_disable(); | 210 | local_irq_disable(); |
198 | while (1); | 211 | while (1); |
199 | } | 212 | } |
200 | 213 | ||
214 | /* | ||
215 | * Power-off simply requires that the secondary CPUs stop performing any | ||
216 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
217 | * achieves this. When the system power is turned off, it will take all CPUs | ||
218 | * with it. | ||
219 | */ | ||
201 | void machine_power_off(void) | 220 | void machine_power_off(void) |
202 | { | 221 | { |
203 | machine_shutdown(); | 222 | smp_send_stop(); |
223 | |||
204 | if (pm_power_off) | 224 | if (pm_power_off) |
205 | pm_power_off(); | 225 | pm_power_off(); |
206 | } | 226 | } |
207 | 227 | ||
228 | /* | ||
229 | * Restart requires that the secondary CPUs stop performing any activity | ||
230 | * while the primary CPU resets the system. Systems with a single CPU can | ||
231 | * use soft_restart() as their machine descriptor's .restart hook, since that | ||
232 | * will cause the only available CPU to reset. Systems with multiple CPUs must | ||
233 | * provide a HW restart implementation, to ensure that all CPUs reset at once. | ||
234 | * This is required so that any code running after reset on the primary CPU | ||
235 | * doesn't have to co-ordinate with other CPUs to ensure they aren't still | ||
236 | * executing pre-reset code, and using RAM that the primary CPU's code wishes | ||
237 | * to use. Implementing such co-ordination would be essentially impossible. | ||
238 | */ | ||
208 | void machine_restart(char *cmd) | 239 | void machine_restart(char *cmd) |
209 | { | 240 | { |
210 | machine_shutdown(); | 241 | smp_send_stop(); |
211 | 242 | ||
212 | arm_pm_restart(reboot_mode, cmd); | 243 | arm_pm_restart(reboot_mode, cmd); |
213 | 244 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 550d63cef68e..5919eb451bb9 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -651,17 +651,6 @@ void smp_send_reschedule(int cpu) | |||
651 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); | 651 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); |
652 | } | 652 | } |
653 | 653 | ||
654 | #ifdef CONFIG_HOTPLUG_CPU | ||
655 | static void smp_kill_cpus(cpumask_t *mask) | ||
656 | { | ||
657 | unsigned int cpu; | ||
658 | for_each_cpu(cpu, mask) | ||
659 | platform_cpu_kill(cpu); | ||
660 | } | ||
661 | #else | ||
662 | static void smp_kill_cpus(cpumask_t *mask) { } | ||
663 | #endif | ||
664 | |||
665 | void smp_send_stop(void) | 654 | void smp_send_stop(void) |
666 | { | 655 | { |
667 | unsigned long timeout; | 656 | unsigned long timeout; |
@@ -679,8 +668,6 @@ void smp_send_stop(void) | |||
679 | 668 | ||
680 | if (num_online_cpus() > 1) | 669 | if (num_online_cpus() > 1) |
681 | pr_warning("SMP: failed to stop secondary CPUs\n"); | 670 | pr_warning("SMP: failed to stop secondary CPUs\n"); |
682 | |||
683 | smp_kill_cpus(&mask); | ||
684 | } | 671 | } |
685 | 672 | ||
686 | /* | 673 | /* |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 15451ee4acc8..515b00064da8 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -92,6 +92,14 @@ ENTRY(v7_flush_dcache_louis) | |||
92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr | 92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr |
93 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr | 93 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr |
94 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr | 94 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr |
95 | #ifdef CONFIG_ARM_ERRATA_643719 | ||
96 | ALT_SMP(mrceq p15, 0, r2, c0, c0, 0) @ read main ID register | ||
97 | ALT_UP(moveq pc, lr) @ LoUU is zero, so nothing to do | ||
98 | ldreq r1, =0x410fc090 @ ID of ARM Cortex A9 r0p? | ||
99 | biceq r2, r2, #0x0000000f @ clear minor revision number | ||
100 | teqeq r2, r1 @ test for errata affected core and if so... | ||
101 | orreqs r3, #(1 << 21) @ fix LoUIS value (and set flags state to 'ne') | ||
102 | #endif | ||
95 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 | 103 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 |
96 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 | 104 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 |
97 | moveq pc, lr @ return if level == 0 | 105 | moveq pc, lr @ return if level == 0 |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 0d473cce501c..32aa5861119f 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -301,6 +301,39 @@ void flush_dcache_page(struct page *page) | |||
301 | EXPORT_SYMBOL(flush_dcache_page); | 301 | EXPORT_SYMBOL(flush_dcache_page); |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Ensure cache coherency for the kernel mapping of this page. We can | ||
305 | * assume that the page is pinned via kmap. | ||
306 | * | ||
307 | * If the page only exists in the page cache and there are no user | ||
308 | * space mappings, this is a no-op since the page was already marked | ||
309 | * dirty at creation. Otherwise, we need to flush the dirty kernel | ||
310 | * cache lines directly. | ||
311 | */ | ||
312 | void flush_kernel_dcache_page(struct page *page) | ||
313 | { | ||
314 | if (cache_is_vivt() || cache_is_vipt_aliasing()) { | ||
315 | struct address_space *mapping; | ||
316 | |||
317 | mapping = page_mapping(page); | ||
318 | |||
319 | if (!mapping || mapping_mapped(mapping)) { | ||
320 | void *addr; | ||
321 | |||
322 | addr = page_address(page); | ||
323 | /* | ||
324 | * kmap_atomic() doesn't set the page virtual | ||
325 | * address for highmem pages, and | ||
326 | * kunmap_atomic() takes care of cache | ||
327 | * flushing already. | ||
328 | */ | ||
329 | if (!IS_ENABLED(CONFIG_HIGHMEM) || addr) | ||
330 | __cpuc_flush_dcache_area(addr, PAGE_SIZE); | ||
331 | } | ||
332 | } | ||
333 | } | ||
334 | EXPORT_SYMBOL(flush_kernel_dcache_page); | ||
335 | |||
336 | /* | ||
304 | * Flush an anonymous page so that users of get_user_pages() | 337 | * Flush an anonymous page so that users of get_user_pages() |
305 | * can safely access the data. The expected sequence is: | 338 | * can safely access the data. The expected sequence is: |
306 | * | 339 | * |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index e0d8565671a6..4d409e6a552d 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -616,10 +616,12 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr, | |||
616 | } while (pte++, addr += PAGE_SIZE, addr != end); | 616 | } while (pte++, addr += PAGE_SIZE, addr != end); |
617 | } | 617 | } |
618 | 618 | ||
619 | static void __init map_init_section(pmd_t *pmd, unsigned long addr, | 619 | static void __init __map_init_section(pmd_t *pmd, unsigned long addr, |
620 | unsigned long end, phys_addr_t phys, | 620 | unsigned long end, phys_addr_t phys, |
621 | const struct mem_type *type) | 621 | const struct mem_type *type) |
622 | { | 622 | { |
623 | pmd_t *p = pmd; | ||
624 | |||
623 | #ifndef CONFIG_ARM_LPAE | 625 | #ifndef CONFIG_ARM_LPAE |
624 | /* | 626 | /* |
625 | * In classic MMU format, puds and pmds are folded in to | 627 | * In classic MMU format, puds and pmds are folded in to |
@@ -638,7 +640,7 @@ static void __init map_init_section(pmd_t *pmd, unsigned long addr, | |||
638 | phys += SECTION_SIZE; | 640 | phys += SECTION_SIZE; |
639 | } while (pmd++, addr += SECTION_SIZE, addr != end); | 641 | } while (pmd++, addr += SECTION_SIZE, addr != end); |
640 | 642 | ||
641 | flush_pmd_entry(pmd); | 643 | flush_pmd_entry(p); |
642 | } | 644 | } |
643 | 645 | ||
644 | static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, | 646 | static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, |
@@ -661,7 +663,7 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, | |||
661 | */ | 663 | */ |
662 | if (type->prot_sect && | 664 | if (type->prot_sect && |
663 | ((addr | next | phys) & ~SECTION_MASK) == 0) { | 665 | ((addr | next | phys) & ~SECTION_MASK) == 0) { |
664 | map_init_section(pmd, addr, next, phys, type); | 666 | __map_init_section(pmd, addr, next, phys, type); |
665 | } else { | 667 | } else { |
666 | alloc_init_pte(pmd, addr, next, | 668 | alloc_init_pte(pmd, addr, next, |
667 | __phys_to_pfn(phys), type); | 669 | __phys_to_pfn(phys), type); |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 2c73a7301ff7..4c8c9c10a388 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -409,8 +409,8 @@ __v7_ca9mp_proc_info: | |||
409 | */ | 409 | */ |
410 | .type __v7_pj4b_proc_info, #object | 410 | .type __v7_pj4b_proc_info, #object |
411 | __v7_pj4b_proc_info: | 411 | __v7_pj4b_proc_info: |
412 | .long 0x562f5840 | 412 | .long 0x560f5800 |
413 | .long 0xfffffff0 | 413 | .long 0xff0fff00 |
414 | __v7_proc __v7_pj4b_setup | 414 | __v7_proc __v7_pj4b_setup |
415 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info | 415 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info |
416 | 416 | ||
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 1e49e5eb81e9..9ba33c40cdf8 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c | |||
@@ -1336,6 +1336,7 @@ void perf_callchain_user(struct perf_callchain_entry *entry, | |||
1336 | return; | 1336 | return; |
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | perf_callchain_store(entry, regs->pc); | ||
1339 | tail = (struct frame_tail __user *)regs->regs[29]; | 1340 | tail = (struct frame_tail __user *)regs->regs[29]; |
1340 | 1341 | ||
1341 | while (entry->nr < PERF_MAX_STACK_DEPTH && | 1342 | while (entry->nr < PERF_MAX_STACK_DEPTH && |
diff --git a/arch/ia64/include/asm/irqflags.h b/arch/ia64/include/asm/irqflags.h index 1bf2cf2f4ab4..cec6c06b52c0 100644 --- a/arch/ia64/include/asm/irqflags.h +++ b/arch/ia64/include/asm/irqflags.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _ASM_IA64_IRQFLAGS_H | 11 | #define _ASM_IA64_IRQFLAGS_H |
12 | 12 | ||
13 | #include <asm/pal.h> | 13 | #include <asm/pal.h> |
14 | #include <asm/kregs.h> | ||
14 | 15 | ||
15 | #ifdef CONFIG_IA64_DEBUG_IRQ | 16 | #ifdef CONFIG_IA64_DEBUG_IRQ |
16 | extern unsigned long last_cli_ip; | 17 | extern unsigned long last_cli_ip; |
diff --git a/arch/metag/include/asm/hugetlb.h b/arch/metag/include/asm/hugetlb.h index f545477e61f3..471f481e67f3 100644 --- a/arch/metag/include/asm/hugetlb.h +++ b/arch/metag/include/asm/hugetlb.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_METAG_HUGETLB_H | 2 | #define _ASM_METAG_HUGETLB_H |
3 | 3 | ||
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <asm-generic/hugetlb.h> | ||
5 | 6 | ||
6 | 7 | ||
7 | static inline int is_hugepage_only_range(struct mm_struct *mm, | 8 | static inline int is_hugepage_only_range(struct mm_struct *mm, |
diff --git a/arch/mn10300/include/asm/irqflags.h b/arch/mn10300/include/asm/irqflags.h index 678f68d5f37b..8730c0a3c37d 100644 --- a/arch/mn10300/include/asm/irqflags.h +++ b/arch/mn10300/include/asm/irqflags.h | |||
@@ -13,9 +13,8 @@ | |||
13 | #define _ASM_IRQFLAGS_H | 13 | #define _ASM_IRQFLAGS_H |
14 | 14 | ||
15 | #include <asm/cpu-regs.h> | 15 | #include <asm/cpu-regs.h> |
16 | #ifndef __ASSEMBLY__ | 16 | /* linux/smp.h <- linux/irqflags.h needs asm/smp.h first */ |
17 | #include <linux/smp.h> | 17 | #include <asm/smp.h> |
18 | #endif | ||
19 | 18 | ||
20 | /* | 19 | /* |
21 | * interrupt control | 20 | * interrupt control |
diff --git a/arch/mn10300/include/asm/smp.h b/arch/mn10300/include/asm/smp.h index 6745dbe64944..56c42417d428 100644 --- a/arch/mn10300/include/asm/smp.h +++ b/arch/mn10300/include/asm/smp.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
25 | #include <linux/threads.h> | 25 | #include <linux/threads.h> |
26 | #include <linux/cpumask.h> | 26 | #include <linux/cpumask.h> |
27 | #include <linux/thread_info.h> | ||
27 | #endif | 28 | #endif |
28 | 29 | ||
29 | #ifdef CONFIG_SMP | 30 | #ifdef CONFIG_SMP |
@@ -85,7 +86,7 @@ extern cpumask_t cpu_boot_map; | |||
85 | extern void smp_init_cpus(void); | 86 | extern void smp_init_cpus(void); |
86 | extern void smp_cache_interrupt(void); | 87 | extern void smp_cache_interrupt(void); |
87 | extern void send_IPI_allbutself(int irq); | 88 | extern void send_IPI_allbutself(int irq); |
88 | extern int smp_nmi_call_function(smp_call_func_t func, void *info, int wait); | 89 | extern int smp_nmi_call_function(void (*func)(void *), void *info, int wait); |
89 | 90 | ||
90 | extern void arch_send_call_function_single_ipi(int cpu); | 91 | extern void arch_send_call_function_single_ipi(int cpu); |
91 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 92 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
@@ -100,6 +101,7 @@ extern void __cpu_die(unsigned int cpu); | |||
100 | #ifndef __ASSEMBLY__ | 101 | #ifndef __ASSEMBLY__ |
101 | 102 | ||
102 | static inline void smp_init_cpus(void) {} | 103 | static inline void smp_init_cpus(void) {} |
104 | #define raw_smp_processor_id() 0 | ||
103 | 105 | ||
104 | #endif /* __ASSEMBLY__ */ | 106 | #endif /* __ASSEMBLY__ */ |
105 | #endif /* CONFIG_SMP */ | 107 | #endif /* CONFIG_SMP */ |
diff --git a/arch/parisc/include/asm/mmzone.h b/arch/parisc/include/asm/mmzone.h index cc50d33b7b88..b6b34a0987e7 100644 --- a/arch/parisc/include/asm/mmzone.h +++ b/arch/parisc/include/asm/mmzone.h | |||
@@ -27,7 +27,7 @@ extern struct node_map_data node_data[]; | |||
27 | 27 | ||
28 | #define PFNNID_SHIFT (30 - PAGE_SHIFT) | 28 | #define PFNNID_SHIFT (30 - PAGE_SHIFT) |
29 | #define PFNNID_MAP_MAX 512 /* support 512GB */ | 29 | #define PFNNID_MAP_MAX 512 /* support 512GB */ |
30 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; | 30 | extern signed char pfnnid_map[PFNNID_MAP_MAX]; |
31 | 31 | ||
32 | #ifndef CONFIG_64BIT | 32 | #ifndef CONFIG_64BIT |
33 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) | 33 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) |
@@ -46,7 +46,7 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
46 | i = pfn >> PFNNID_SHIFT; | 46 | i = pfn >> PFNNID_SHIFT; |
47 | BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); | 47 | BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); |
48 | 48 | ||
49 | return (int)pfnnid_map[i]; | 49 | return pfnnid_map[i]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline int pfn_valid(int pfn) | 52 | static inline int pfn_valid(int pfn) |
diff --git a/arch/parisc/include/asm/pci.h b/arch/parisc/include/asm/pci.h index 3234f492d575..465154076d23 100644 --- a/arch/parisc/include/asm/pci.h +++ b/arch/parisc/include/asm/pci.h | |||
@@ -225,4 +225,9 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
225 | return channel ? 15 : 14; | 225 | return channel ? 15 : 14; |
226 | } | 226 | } |
227 | 227 | ||
228 | #define HAVE_PCI_MMAP | ||
229 | |||
230 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | ||
231 | enum pci_mmap_state mmap_state, int write_combine); | ||
232 | |||
228 | #endif /* __ASM_PARISC_PCI_H */ | 233 | #endif /* __ASM_PARISC_PCI_H */ |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 9e2d2e408529..872275659d98 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -1205,6 +1205,7 @@ static struct hp_hardware hp_hardware_list[] = { | |||
1205 | {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, | 1205 | {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, |
1206 | {HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"}, | 1206 | {HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"}, |
1207 | {HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"}, | 1207 | {HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"}, |
1208 | {HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"}, | ||
1208 | {HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"}, | 1209 | {HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"}, |
1209 | {HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"}, | 1210 | {HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"}, |
1210 | {HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"}, | 1211 | {HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"}, |
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 36d7f402e48e..b743a80eaba0 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -860,7 +860,7 @@ ENTRY(flush_dcache_page_asm) | |||
860 | #endif | 860 | #endif |
861 | 861 | ||
862 | ldil L%dcache_stride, %r1 | 862 | ldil L%dcache_stride, %r1 |
863 | ldw R%dcache_stride(%r1), %r1 | 863 | ldw R%dcache_stride(%r1), r31 |
864 | 864 | ||
865 | #ifdef CONFIG_64BIT | 865 | #ifdef CONFIG_64BIT |
866 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 866 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
@@ -868,26 +868,26 @@ ENTRY(flush_dcache_page_asm) | |||
868 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 868 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
869 | #endif | 869 | #endif |
870 | add %r28, %r25, %r25 | 870 | add %r28, %r25, %r25 |
871 | sub %r25, %r1, %r25 | 871 | sub %r25, r31, %r25 |
872 | 872 | ||
873 | 873 | ||
874 | 1: fdc,m %r1(%r28) | 874 | 1: fdc,m r31(%r28) |
875 | fdc,m %r1(%r28) | 875 | fdc,m r31(%r28) |
876 | fdc,m %r1(%r28) | 876 | fdc,m r31(%r28) |
877 | fdc,m %r1(%r28) | 877 | fdc,m r31(%r28) |
878 | fdc,m %r1(%r28) | 878 | fdc,m r31(%r28) |
879 | fdc,m %r1(%r28) | 879 | fdc,m r31(%r28) |
880 | fdc,m %r1(%r28) | 880 | fdc,m r31(%r28) |
881 | fdc,m %r1(%r28) | 881 | fdc,m r31(%r28) |
882 | fdc,m %r1(%r28) | 882 | fdc,m r31(%r28) |
883 | fdc,m %r1(%r28) | 883 | fdc,m r31(%r28) |
884 | fdc,m %r1(%r28) | 884 | fdc,m r31(%r28) |
885 | fdc,m %r1(%r28) | 885 | fdc,m r31(%r28) |
886 | fdc,m %r1(%r28) | 886 | fdc,m r31(%r28) |
887 | fdc,m %r1(%r28) | 887 | fdc,m r31(%r28) |
888 | fdc,m %r1(%r28) | 888 | fdc,m r31(%r28) |
889 | cmpb,COND(<<) %r28, %r25,1b | 889 | cmpb,COND(<<) %r28, %r25,1b |
890 | fdc,m %r1(%r28) | 890 | fdc,m r31(%r28) |
891 | 891 | ||
892 | sync | 892 | sync |
893 | 893 | ||
@@ -936,7 +936,7 @@ ENTRY(flush_icache_page_asm) | |||
936 | #endif | 936 | #endif |
937 | 937 | ||
938 | ldil L%icache_stride, %r1 | 938 | ldil L%icache_stride, %r1 |
939 | ldw R%icache_stride(%r1), %r1 | 939 | ldw R%icache_stride(%r1), %r31 |
940 | 940 | ||
941 | #ifdef CONFIG_64BIT | 941 | #ifdef CONFIG_64BIT |
942 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 942 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
@@ -944,28 +944,28 @@ ENTRY(flush_icache_page_asm) | |||
944 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 944 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
945 | #endif | 945 | #endif |
946 | add %r28, %r25, %r25 | 946 | add %r28, %r25, %r25 |
947 | sub %r25, %r1, %r25 | 947 | sub %r25, %r31, %r25 |
948 | 948 | ||
949 | 949 | ||
950 | /* fic only has the type 26 form on PA1.1, requiring an | 950 | /* fic only has the type 26 form on PA1.1, requiring an |
951 | * explicit space specification, so use %sr4 */ | 951 | * explicit space specification, so use %sr4 */ |
952 | 1: fic,m %r1(%sr4,%r28) | 952 | 1: fic,m %r31(%sr4,%r28) |
953 | fic,m %r1(%sr4,%r28) | 953 | fic,m %r31(%sr4,%r28) |
954 | fic,m %r1(%sr4,%r28) | 954 | fic,m %r31(%sr4,%r28) |
955 | fic,m %r1(%sr4,%r28) | 955 | fic,m %r31(%sr4,%r28) |
956 | fic,m %r1(%sr4,%r28) | 956 | fic,m %r31(%sr4,%r28) |
957 | fic,m %r1(%sr4,%r28) | 957 | fic,m %r31(%sr4,%r28) |
958 | fic,m %r1(%sr4,%r28) | 958 | fic,m %r31(%sr4,%r28) |
959 | fic,m %r1(%sr4,%r28) | 959 | fic,m %r31(%sr4,%r28) |
960 | fic,m %r1(%sr4,%r28) | 960 | fic,m %r31(%sr4,%r28) |
961 | fic,m %r1(%sr4,%r28) | 961 | fic,m %r31(%sr4,%r28) |
962 | fic,m %r1(%sr4,%r28) | 962 | fic,m %r31(%sr4,%r28) |
963 | fic,m %r1(%sr4,%r28) | 963 | fic,m %r31(%sr4,%r28) |
964 | fic,m %r1(%sr4,%r28) | 964 | fic,m %r31(%sr4,%r28) |
965 | fic,m %r1(%sr4,%r28) | 965 | fic,m %r31(%sr4,%r28) |
966 | fic,m %r1(%sr4,%r28) | 966 | fic,m %r31(%sr4,%r28) |
967 | cmpb,COND(<<) %r28, %r25,1b | 967 | cmpb,COND(<<) %r28, %r25,1b |
968 | fic,m %r1(%sr4,%r28) | 968 | fic,m %r31(%sr4,%r28) |
969 | 969 | ||
970 | sync | 970 | sync |
971 | 971 | ||
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 60309051875e..64f2764a8cef 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
@@ -220,6 +220,33 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, | |||
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | ||
223 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | ||
224 | enum pci_mmap_state mmap_state, int write_combine) | ||
225 | { | ||
226 | unsigned long prot; | ||
227 | |||
228 | /* | ||
229 | * I/O space can be accessed via normal processor loads and stores on | ||
230 | * this platform but for now we elect not to do this and portable | ||
231 | * drivers should not do this anyway. | ||
232 | */ | ||
233 | if (mmap_state == pci_mmap_io) | ||
234 | return -EINVAL; | ||
235 | |||
236 | if (write_combine) | ||
237 | return -EINVAL; | ||
238 | |||
239 | /* | ||
240 | * Ignore write-combine; for now only return uncached mappings. | ||
241 | */ | ||
242 | prot = pgprot_val(vma->vm_page_prot); | ||
243 | prot |= _PAGE_NO_CACHE; | ||
244 | vma->vm_page_prot = __pgprot(prot); | ||
245 | |||
246 | return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | ||
247 | vma->vm_end - vma->vm_start, vma->vm_page_prot); | ||
248 | } | ||
249 | |||
223 | /* | 250 | /* |
224 | * A driver is enabling the device. We make sure that all the appropriate | 251 | * A driver is enabling the device. We make sure that all the appropriate |
225 | * bits are set to allow the device to operate as the driver is expecting. | 252 | * bits are set to allow the device to operate as the driver is expecting. |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 1c965642068b..505b56c6b9b9 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -47,7 +47,7 @@ pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pt | |||
47 | 47 | ||
48 | #ifdef CONFIG_DISCONTIGMEM | 48 | #ifdef CONFIG_DISCONTIGMEM |
49 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; | 49 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; |
50 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; | 50 | signed char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | static struct resource data_resource = { | 53 | static struct resource data_resource = { |
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 5cd7ad0c1176..1a1b51189773 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -673,7 +673,6 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
673 | ret = s; | 673 | ret = s; |
674 | goto out; | 674 | goto out; |
675 | } | 675 | } |
676 | kvmppc_lazy_ee_enable(); | ||
677 | 676 | ||
678 | kvm_guest_enter(); | 677 | kvm_guest_enter(); |
679 | 678 | ||
@@ -699,6 +698,8 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
699 | kvmppc_load_guest_fp(vcpu); | 698 | kvmppc_load_guest_fp(vcpu); |
700 | #endif | 699 | #endif |
701 | 700 | ||
701 | kvmppc_lazy_ee_enable(); | ||
702 | |||
702 | ret = __kvmppc_vcpu_run(kvm_run, vcpu); | 703 | ret = __kvmppc_vcpu_run(kvm_run, vcpu); |
703 | 704 | ||
704 | /* No need for kvm_guest_exit. It's done in handle_exit. | 705 | /* No need for kvm_guest_exit. It's done in handle_exit. |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 237c8e5f2640..77fdd2cef33b 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -592,8 +592,14 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, | |||
592 | do { | 592 | do { |
593 | pmd = pmd_offset(pud, addr); | 593 | pmd = pmd_offset(pud, addr); |
594 | next = pmd_addr_end(addr, end); | 594 | next = pmd_addr_end(addr, end); |
595 | if (pmd_none_or_clear_bad(pmd)) | 595 | if (!is_hugepd(pmd)) { |
596 | /* | ||
597 | * if it is not hugepd pointer, we should already find | ||
598 | * it cleared. | ||
599 | */ | ||
600 | WARN_ON(!pmd_none_or_clear_bad(pmd)); | ||
596 | continue; | 601 | continue; |
602 | } | ||
597 | #ifdef CONFIG_PPC_FSL_BOOK3E | 603 | #ifdef CONFIG_PPC_FSL_BOOK3E |
598 | /* | 604 | /* |
599 | * Increment next by the size of the huge mapping since | 605 | * Increment next by the size of the huge mapping since |
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index ff18e3cfb6b1..7e4a97fbded4 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -6,6 +6,7 @@ generic-y += cputime.h | |||
6 | generic-y += div64.h | 6 | generic-y += div64.h |
7 | generic-y += emergency-restart.h | 7 | generic-y += emergency-restart.h |
8 | generic-y += exec.h | 8 | generic-y += exec.h |
9 | generic-y += linkage.h | ||
9 | generic-y += local64.h | 10 | generic-y += local64.h |
10 | generic-y += mutex.h | 11 | generic-y += mutex.h |
11 | generic-y += irq_regs.h | 12 | generic-y += irq_regs.h |
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 15a716934e4d..b836e9297f2a 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -135,7 +135,7 @@ static inline int sparc_leon3_cpuid(void) | |||
135 | 135 | ||
136 | #ifdef CONFIG_SMP | 136 | #ifdef CONFIG_SMP |
137 | # define LEON3_IRQ_IPI_DEFAULT 13 | 137 | # define LEON3_IRQ_IPI_DEFAULT 13 |
138 | # define LEON3_IRQ_TICKER (leon3_ticker_irq) | 138 | # define LEON3_IRQ_TICKER (leon3_gptimer_irq) |
139 | # define LEON3_IRQ_CROSS_CALL 15 | 139 | # define LEON3_IRQ_CROSS_CALL 15 |
140 | #endif | 140 | #endif |
141 | 141 | ||
diff --git a/arch/sparc/include/asm/leon_amba.h b/arch/sparc/include/asm/leon_amba.h index f3034eddf468..24ec48c3ff90 100644 --- a/arch/sparc/include/asm/leon_amba.h +++ b/arch/sparc/include/asm/leon_amba.h | |||
@@ -47,6 +47,7 @@ struct amba_prom_registers { | |||
47 | #define LEON3_GPTIMER_LD 4 | 47 | #define LEON3_GPTIMER_LD 4 |
48 | #define LEON3_GPTIMER_IRQEN 8 | 48 | #define LEON3_GPTIMER_IRQEN 8 |
49 | #define LEON3_GPTIMER_SEPIRQ 8 | 49 | #define LEON3_GPTIMER_SEPIRQ 8 |
50 | #define LEON3_GPTIMER_TIMERS 0x7 | ||
50 | 51 | ||
51 | #define LEON23_REG_TIMER_CONTROL_EN 0x00000001 /* 1 = enable counting */ | 52 | #define LEON23_REG_TIMER_CONTROL_EN 0x00000001 /* 1 = enable counting */ |
52 | /* 0 = hold scalar and counter */ | 53 | /* 0 = hold scalar and counter */ |
diff --git a/arch/sparc/include/asm/linkage.h b/arch/sparc/include/asm/linkage.h deleted file mode 100644 index 291c2d01c44f..000000000000 --- a/arch/sparc/include/asm/linkage.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | ||
2 | #define __ASM_LINKAGE_H | ||
3 | |||
4 | /* Nothing to see here... */ | ||
5 | |||
6 | #endif | ||
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 75bb608c423e..5ef48dab5636 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -843,7 +843,8 @@ void ldom_reboot(const char *boot_command) | |||
843 | unsigned long len; | 843 | unsigned long len; |
844 | 844 | ||
845 | strcpy(full_boot_str, "boot "); | 845 | strcpy(full_boot_str, "boot "); |
846 | strcpy(full_boot_str + strlen("boot "), boot_command); | 846 | strlcpy(full_boot_str + strlen("boot "), boot_command, |
847 | sizeof(full_boot_str + strlen("boot "))); | ||
847 | len = strlen(full_boot_str); | 848 | len = strlen(full_boot_str); |
848 | 849 | ||
849 | if (reboot_data_supported) { | 850 | if (reboot_data_supported) { |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 7c0231dabe44..b7c68976cbc7 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -38,7 +38,6 @@ static DEFINE_SPINLOCK(leon_irq_lock); | |||
38 | 38 | ||
39 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ | 39 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ |
40 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ | 40 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ |
41 | int leon3_ticker_irq; /* Timer ticker IRQ */ | ||
42 | unsigned int sparc_leon_eirq; | 41 | unsigned int sparc_leon_eirq; |
43 | #define LEON_IMASK(cpu) (&leon3_irqctrl_regs->mask[cpu]) | 42 | #define LEON_IMASK(cpu) (&leon3_irqctrl_regs->mask[cpu]) |
44 | #define LEON_IACK (&leon3_irqctrl_regs->iclear) | 43 | #define LEON_IACK (&leon3_irqctrl_regs->iclear) |
@@ -278,6 +277,9 @@ irqreturn_t leon_percpu_timer_ce_interrupt(int irq, void *unused) | |||
278 | 277 | ||
279 | leon_clear_profile_irq(cpu); | 278 | leon_clear_profile_irq(cpu); |
280 | 279 | ||
280 | if (cpu == boot_cpu_id) | ||
281 | timer_interrupt(irq, NULL); | ||
282 | |||
281 | ce = &per_cpu(sparc32_clockevent, cpu); | 283 | ce = &per_cpu(sparc32_clockevent, cpu); |
282 | 284 | ||
283 | irq_enter(); | 285 | irq_enter(); |
@@ -299,6 +301,7 @@ void __init leon_init_timers(void) | |||
299 | int icsel; | 301 | int icsel; |
300 | int ampopts; | 302 | int ampopts; |
301 | int err; | 303 | int err; |
304 | u32 config; | ||
302 | 305 | ||
303 | sparc_config.get_cycles_offset = leon_cycles_offset; | 306 | sparc_config.get_cycles_offset = leon_cycles_offset; |
304 | sparc_config.cs_period = 1000000 / HZ; | 307 | sparc_config.cs_period = 1000000 / HZ; |
@@ -377,23 +380,6 @@ void __init leon_init_timers(void) | |||
377 | LEON3_BYPASS_STORE_PA( | 380 | LEON3_BYPASS_STORE_PA( |
378 | &leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, 0); | 381 | &leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, 0); |
379 | 382 | ||
380 | #ifdef CONFIG_SMP | ||
381 | leon3_ticker_irq = leon3_gptimer_irq + 1 + leon3_gptimer_idx; | ||
382 | |||
383 | if (!(LEON3_BYPASS_LOAD_PA(&leon3_gptimer_regs->config) & | ||
384 | (1<<LEON3_GPTIMER_SEPIRQ))) { | ||
385 | printk(KERN_ERR "timer not configured with separate irqs\n"); | ||
386 | BUG(); | ||
387 | } | ||
388 | |||
389 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx+1].val, | ||
390 | 0); | ||
391 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx+1].rld, | ||
392 | (((1000000/HZ) - 1))); | ||
393 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx+1].ctrl, | ||
394 | 0); | ||
395 | #endif | ||
396 | |||
397 | /* | 383 | /* |
398 | * The IRQ controller may (if implemented) consist of multiple | 384 | * The IRQ controller may (if implemented) consist of multiple |
399 | * IRQ controllers, each mapped on a 4Kb boundary. | 385 | * IRQ controllers, each mapped on a 4Kb boundary. |
@@ -416,13 +402,6 @@ void __init leon_init_timers(void) | |||
416 | if (eirq != 0) | 402 | if (eirq != 0) |
417 | leon_eirq_setup(eirq); | 403 | leon_eirq_setup(eirq); |
418 | 404 | ||
419 | irq = _leon_build_device_irq(NULL, leon3_gptimer_irq+leon3_gptimer_idx); | ||
420 | err = request_irq(irq, timer_interrupt, IRQF_TIMER, "timer", NULL); | ||
421 | if (err) { | ||
422 | printk(KERN_ERR "unable to attach timer IRQ%d\n", irq); | ||
423 | prom_halt(); | ||
424 | } | ||
425 | |||
426 | #ifdef CONFIG_SMP | 405 | #ifdef CONFIG_SMP |
427 | { | 406 | { |
428 | unsigned long flags; | 407 | unsigned long flags; |
@@ -439,30 +418,31 @@ void __init leon_init_timers(void) | |||
439 | } | 418 | } |
440 | #endif | 419 | #endif |
441 | 420 | ||
442 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, | 421 | config = LEON3_BYPASS_LOAD_PA(&leon3_gptimer_regs->config); |
443 | LEON3_GPTIMER_EN | | 422 | if (config & (1 << LEON3_GPTIMER_SEPIRQ)) |
444 | LEON3_GPTIMER_RL | | 423 | leon3_gptimer_irq += leon3_gptimer_idx; |
445 | LEON3_GPTIMER_LD | | 424 | else if ((config & LEON3_GPTIMER_TIMERS) > 1) |
446 | LEON3_GPTIMER_IRQEN); | 425 | pr_warn("GPTIMER uses shared irqs, using other timers of the same core will fail.\n"); |
447 | 426 | ||
448 | #ifdef CONFIG_SMP | 427 | #ifdef CONFIG_SMP |
449 | /* Install per-cpu IRQ handler for broadcasted ticker */ | 428 | /* Install per-cpu IRQ handler for broadcasted ticker */ |
450 | irq = leon_build_device_irq(leon3_ticker_irq, handle_percpu_irq, | 429 | irq = leon_build_device_irq(leon3_gptimer_irq, handle_percpu_irq, |
451 | "per-cpu", 0); | 430 | "per-cpu", 0); |
452 | err = request_irq(irq, leon_percpu_timer_ce_interrupt, | 431 | err = request_irq(irq, leon_percpu_timer_ce_interrupt, |
453 | IRQF_PERCPU | IRQF_TIMER, "ticker", | 432 | IRQF_PERCPU | IRQF_TIMER, "timer", NULL); |
454 | NULL); | 433 | #else |
434 | irq = _leon_build_device_irq(NULL, leon3_gptimer_irq); | ||
435 | err = request_irq(irq, timer_interrupt, IRQF_TIMER, "timer", NULL); | ||
436 | #endif | ||
455 | if (err) { | 437 | if (err) { |
456 | printk(KERN_ERR "unable to attach ticker IRQ%d\n", irq); | 438 | pr_err("Unable to attach timer IRQ%d\n", irq); |
457 | prom_halt(); | 439 | prom_halt(); |
458 | } | 440 | } |
459 | 441 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx].ctrl, | |
460 | LEON3_BYPASS_STORE_PA(&leon3_gptimer_regs->e[leon3_gptimer_idx+1].ctrl, | ||
461 | LEON3_GPTIMER_EN | | 442 | LEON3_GPTIMER_EN | |
462 | LEON3_GPTIMER_RL | | 443 | LEON3_GPTIMER_RL | |
463 | LEON3_GPTIMER_LD | | 444 | LEON3_GPTIMER_LD | |
464 | LEON3_GPTIMER_IRQEN); | 445 | LEON3_GPTIMER_IRQEN); |
465 | #endif | ||
466 | return; | 446 | return; |
467 | bad: | 447 | bad: |
468 | printk(KERN_ERR "No Timer/irqctrl found\n"); | 448 | printk(KERN_ERR "No Timer/irqctrl found\n"); |
diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c index 7739a54315e2..6df26e37f879 100644 --- a/arch/sparc/kernel/leon_pci_grpci1.c +++ b/arch/sparc/kernel/leon_pci_grpci1.c | |||
@@ -536,11 +536,9 @@ static int grpci1_of_probe(struct platform_device *ofdev) | |||
536 | 536 | ||
537 | /* find device register base address */ | 537 | /* find device register base address */ |
538 | res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); | 538 | res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); |
539 | regs = devm_request_and_ioremap(&ofdev->dev, res); | 539 | regs = devm_ioremap_resource(&ofdev->dev, res); |
540 | if (!regs) { | 540 | if (IS_ERR(regs)) |
541 | dev_err(&ofdev->dev, "io-regs mapping failed\n"); | 541 | return PTR_ERR(regs); |
542 | return -EADDRNOTAVAIL; | ||
543 | } | ||
544 | 542 | ||
545 | /* | 543 | /* |
546 | * check that we're in Host Slot and that we can act as a Host Bridge | 544 | * check that we're in Host Slot and that we can act as a Host Bridge |
diff --git a/arch/sparc/kernel/leon_pmc.c b/arch/sparc/kernel/leon_pmc.c index bdf53d9a8d46..b0b3967a2dd2 100644 --- a/arch/sparc/kernel/leon_pmc.c +++ b/arch/sparc/kernel/leon_pmc.c | |||
@@ -47,6 +47,10 @@ void pmc_leon_idle_fixup(void) | |||
47 | * MMU does not get a TLB miss here by using the MMU BYPASS ASI. | 47 | * MMU does not get a TLB miss here by using the MMU BYPASS ASI. |
48 | */ | 48 | */ |
49 | register unsigned int address = (unsigned int)leon3_irqctrl_regs; | 49 | register unsigned int address = (unsigned int)leon3_irqctrl_regs; |
50 | |||
51 | /* Interrupts need to be enabled to not hang the CPU */ | ||
52 | local_irq_enable(); | ||
53 | |||
50 | __asm__ __volatile__ ( | 54 | __asm__ __volatile__ ( |
51 | "wr %%g0, %%asr19\n" | 55 | "wr %%g0, %%asr19\n" |
52 | "lda [%0] %1, %%g0\n" | 56 | "lda [%0] %1, %%g0\n" |
@@ -60,6 +64,9 @@ void pmc_leon_idle_fixup(void) | |||
60 | */ | 64 | */ |
61 | void pmc_leon_idle(void) | 65 | void pmc_leon_idle(void) |
62 | { | 66 | { |
67 | /* Interrupts need to be enabled to not hang the CPU */ | ||
68 | local_irq_enable(); | ||
69 | |||
63 | /* For systems without power-down, this will be no-op */ | 70 | /* For systems without power-down, this will be no-op */ |
64 | __asm__ __volatile__ ("wr %g0, %asr19\n\t"); | 71 | __asm__ __volatile__ ("wr %g0, %asr19\n\t"); |
65 | } | 72 | } |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 38bf80a22f02..1434526970a6 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -304,7 +304,7 @@ void __init setup_arch(char **cmdline_p) | |||
304 | 304 | ||
305 | /* Initialize PROM console and command line. */ | 305 | /* Initialize PROM console and command line. */ |
306 | *cmdline_p = prom_getbootargs(); | 306 | *cmdline_p = prom_getbootargs(); |
307 | strcpy(boot_command_line, *cmdline_p); | 307 | strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE); |
308 | parse_early_param(); | 308 | parse_early_param(); |
309 | 309 | ||
310 | boot_flags_init(*cmdline_p); | 310 | boot_flags_init(*cmdline_p); |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 88a127b9c69e..13785547e435 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -555,7 +555,7 @@ void __init setup_arch(char **cmdline_p) | |||
555 | { | 555 | { |
556 | /* Initialize PROM console and command line. */ | 556 | /* Initialize PROM console and command line. */ |
557 | *cmdline_p = prom_getbootargs(); | 557 | *cmdline_p = prom_getbootargs(); |
558 | strcpy(boot_command_line, *cmdline_p); | 558 | strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE); |
559 | parse_early_param(); | 559 | parse_early_param(); |
560 | 560 | ||
561 | boot_flags_init(*cmdline_p); | 561 | boot_flags_init(*cmdline_p); |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index a7171997adfd..04fd55a6e461 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1098,7 +1098,14 @@ static int __init grab_mblocks(struct mdesc_handle *md) | |||
1098 | m->size = *val; | 1098 | m->size = *val; |
1099 | val = mdesc_get_property(md, node, | 1099 | val = mdesc_get_property(md, node, |
1100 | "address-congruence-offset", NULL); | 1100 | "address-congruence-offset", NULL); |
1101 | m->offset = *val; | 1101 | |
1102 | /* The address-congruence-offset property is optional. | ||
1103 | * Explicity zero it be identifty this. | ||
1104 | */ | ||
1105 | if (val) | ||
1106 | m->offset = *val; | ||
1107 | else | ||
1108 | m->offset = 0UL; | ||
1102 | 1109 | ||
1103 | numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n", | 1110 | numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n", |
1104 | count - 1, m->base, m->size, m->offset); | 1111 | count - 1, m->base, m->size, m->offset); |
diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index 83d89bcb44af..37e7bc4c95b3 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c | |||
@@ -85,8 +85,8 @@ static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr, | |||
85 | } | 85 | } |
86 | 86 | ||
87 | if (!tb->active) { | 87 | if (!tb->active) { |
88 | global_flush_tlb_page(mm, vaddr); | ||
89 | flush_tsb_user_page(mm, vaddr); | 88 | flush_tsb_user_page(mm, vaddr); |
89 | global_flush_tlb_page(mm, vaddr); | ||
90 | goto out; | 90 | goto out; |
91 | } | 91 | } |
92 | 92 | ||
diff --git a/arch/sparc/prom/bootstr_32.c b/arch/sparc/prom/bootstr_32.c index f5ec32e0d419..d2b49d2365e7 100644 --- a/arch/sparc/prom/bootstr_32.c +++ b/arch/sparc/prom/bootstr_32.c | |||
@@ -23,23 +23,25 @@ prom_getbootargs(void) | |||
23 | return barg_buf; | 23 | return barg_buf; |
24 | } | 24 | } |
25 | 25 | ||
26 | switch(prom_vers) { | 26 | switch (prom_vers) { |
27 | case PROM_V0: | 27 | case PROM_V0: |
28 | cp = barg_buf; | 28 | cp = barg_buf; |
29 | /* Start from 1 and go over fd(0,0,0)kernel */ | 29 | /* Start from 1 and go over fd(0,0,0)kernel */ |
30 | for(iter = 1; iter < 8; iter++) { | 30 | for (iter = 1; iter < 8; iter++) { |
31 | arg = (*(romvec->pv_v0bootargs))->argv[iter]; | 31 | arg = (*(romvec->pv_v0bootargs))->argv[iter]; |
32 | if (arg == NULL) | 32 | if (arg == NULL) |
33 | break; | 33 | break; |
34 | while(*arg != 0) { | 34 | while (*arg != 0) { |
35 | /* Leave place for space and null. */ | 35 | /* Leave place for space and null. */ |
36 | if(cp >= barg_buf + BARG_LEN-2){ | 36 | if (cp >= barg_buf + BARG_LEN - 2) |
37 | /* We might issue a warning here. */ | 37 | /* We might issue a warning here. */ |
38 | break; | 38 | break; |
39 | } | ||
40 | *cp++ = *arg++; | 39 | *cp++ = *arg++; |
41 | } | 40 | } |
42 | *cp++ = ' '; | 41 | *cp++ = ' '; |
42 | if (cp >= barg_buf + BARG_LEN - 1) | ||
43 | /* We might issue a warning here. */ | ||
44 | break; | ||
43 | } | 45 | } |
44 | *cp = 0; | 46 | *cp = 0; |
45 | break; | 47 | break; |
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 92204c3800b5..bd1b2a3ac34e 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c | |||
@@ -39,7 +39,7 @@ inline phandle __prom_getchild(phandle node) | |||
39 | return prom_node_to_node("child", node); | 39 | return prom_node_to_node("child", node); |
40 | } | 40 | } |
41 | 41 | ||
42 | inline phandle prom_getchild(phandle node) | 42 | phandle prom_getchild(phandle node) |
43 | { | 43 | { |
44 | phandle cnode; | 44 | phandle cnode; |
45 | 45 | ||
@@ -72,7 +72,7 @@ inline phandle __prom_getsibling(phandle node) | |||
72 | return prom_node_to_node(prom_peer_name, node); | 72 | return prom_node_to_node(prom_peer_name, node); |
73 | } | 73 | } |
74 | 74 | ||
75 | inline phandle prom_getsibling(phandle node) | 75 | phandle prom_getsibling(phandle node) |
76 | { | 76 | { |
77 | phandle sibnode; | 77 | phandle sibnode; |
78 | 78 | ||
@@ -89,7 +89,7 @@ EXPORT_SYMBOL(prom_getsibling); | |||
89 | /* Return the length in bytes of property 'prop' at node 'node'. | 89 | /* Return the length in bytes of property 'prop' at node 'node'. |
90 | * Return -1 on error. | 90 | * Return -1 on error. |
91 | */ | 91 | */ |
92 | inline int prom_getproplen(phandle node, const char *prop) | 92 | int prom_getproplen(phandle node, const char *prop) |
93 | { | 93 | { |
94 | unsigned long args[6]; | 94 | unsigned long args[6]; |
95 | 95 | ||
@@ -113,8 +113,8 @@ EXPORT_SYMBOL(prom_getproplen); | |||
113 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 113 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
114 | * was successful the length will be returned, else -1 is returned. | 114 | * was successful the length will be returned, else -1 is returned. |
115 | */ | 115 | */ |
116 | inline int prom_getproperty(phandle node, const char *prop, | 116 | int prom_getproperty(phandle node, const char *prop, |
117 | char *buffer, int bufsize) | 117 | char *buffer, int bufsize) |
118 | { | 118 | { |
119 | unsigned long args[8]; | 119 | unsigned long args[8]; |
120 | int plen; | 120 | int plen; |
@@ -141,7 +141,7 @@ EXPORT_SYMBOL(prom_getproperty); | |||
141 | /* Acquire an integer property and return its value. Returns -1 | 141 | /* Acquire an integer property and return its value. Returns -1 |
142 | * on failure. | 142 | * on failure. |
143 | */ | 143 | */ |
144 | inline int prom_getint(phandle node, const char *prop) | 144 | int prom_getint(phandle node, const char *prop) |
145 | { | 145 | { |
146 | int intprop; | 146 | int intprop; |
147 | 147 | ||
@@ -235,7 +235,7 @@ static const char *prom_nextprop_name = "nextprop"; | |||
235 | /* Return the first property type for node 'node'. | 235 | /* Return the first property type for node 'node'. |
236 | * buffer should be at least 32B in length | 236 | * buffer should be at least 32B in length |
237 | */ | 237 | */ |
238 | inline char *prom_firstprop(phandle node, char *buffer) | 238 | char *prom_firstprop(phandle node, char *buffer) |
239 | { | 239 | { |
240 | unsigned long args[7]; | 240 | unsigned long args[7]; |
241 | 241 | ||
@@ -261,7 +261,7 @@ EXPORT_SYMBOL(prom_firstprop); | |||
261 | * at node 'node' . Returns NULL string if no more | 261 | * at node 'node' . Returns NULL string if no more |
262 | * property types for this node. | 262 | * property types for this node. |
263 | */ | 263 | */ |
264 | inline char *prom_nextprop(phandle node, const char *oprop, char *buffer) | 264 | char *prom_nextprop(phandle node, const char *oprop, char *buffer) |
265 | { | 265 | { |
266 | unsigned long args[7]; | 266 | unsigned long args[7]; |
267 | char buf[32]; | 267 | char buf[32]; |
diff --git a/arch/tile/lib/exports.c b/arch/tile/lib/exports.c index 4385cb6fa00a..a93b02a25222 100644 --- a/arch/tile/lib/exports.c +++ b/arch/tile/lib/exports.c | |||
@@ -84,4 +84,6 @@ uint64_t __ashrdi3(uint64_t, unsigned int); | |||
84 | EXPORT_SYMBOL(__ashrdi3); | 84 | EXPORT_SYMBOL(__ashrdi3); |
85 | uint64_t __ashldi3(uint64_t, unsigned int); | 85 | uint64_t __ashldi3(uint64_t, unsigned int); |
86 | EXPORT_SYMBOL(__ashldi3); | 86 | EXPORT_SYMBOL(__ashldi3); |
87 | int __ffsdi2(uint64_t); | ||
88 | EXPORT_SYMBOL(__ffsdi2); | ||
87 | #endif | 89 | #endif |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index d7d21851e60c..3df3bd544492 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -147,7 +147,7 @@ void mconsole_proc(struct mc_request *req) | |||
147 | } | 147 | } |
148 | 148 | ||
149 | do { | 149 | do { |
150 | loff_t pos; | 150 | loff_t pos = file->f_pos; |
151 | mm_segment_t old_fs = get_fs(); | 151 | mm_segment_t old_fs = get_fs(); |
152 | set_fs(KERNEL_DS); | 152 | set_fs(KERNEL_DS); |
153 | len = vfs_read(file, buf, PAGE_SIZE - 1, &pos); | 153 | len = vfs_read(file, buf, PAGE_SIZE - 1, &pos); |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 685692c94f05..fe120da25625 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -2265,6 +2265,7 @@ source "fs/Kconfig.binfmt" | |||
2265 | config IA32_EMULATION | 2265 | config IA32_EMULATION |
2266 | bool "IA32 Emulation" | 2266 | bool "IA32 Emulation" |
2267 | depends on X86_64 | 2267 | depends on X86_64 |
2268 | select BINFMT_ELF | ||
2268 | select COMPAT_BINFMT_ELF | 2269 | select COMPAT_BINFMT_ELF |
2269 | select HAVE_UID16 | 2270 | select HAVE_UID16 |
2270 | ---help--- | 2271 | ---help--- |
diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S index 62fe22cd4cba..477e9d75149b 100644 --- a/arch/x86/crypto/aesni-intel_asm.S +++ b/arch/x86/crypto/aesni-intel_asm.S | |||
@@ -2681,56 +2681,68 @@ ENTRY(aesni_xts_crypt8) | |||
2681 | addq %rcx, KEYP | 2681 | addq %rcx, KEYP |
2682 | 2682 | ||
2683 | movdqa IV, STATE1 | 2683 | movdqa IV, STATE1 |
2684 | pxor 0x00(INP), STATE1 | 2684 | movdqu 0x00(INP), INC |
2685 | pxor INC, STATE1 | ||
2685 | movdqu IV, 0x00(OUTP) | 2686 | movdqu IV, 0x00(OUTP) |
2686 | 2687 | ||
2687 | _aesni_gf128mul_x_ble() | 2688 | _aesni_gf128mul_x_ble() |
2688 | movdqa IV, STATE2 | 2689 | movdqa IV, STATE2 |
2689 | pxor 0x10(INP), STATE2 | 2690 | movdqu 0x10(INP), INC |
2691 | pxor INC, STATE2 | ||
2690 | movdqu IV, 0x10(OUTP) | 2692 | movdqu IV, 0x10(OUTP) |
2691 | 2693 | ||
2692 | _aesni_gf128mul_x_ble() | 2694 | _aesni_gf128mul_x_ble() |
2693 | movdqa IV, STATE3 | 2695 | movdqa IV, STATE3 |
2694 | pxor 0x20(INP), STATE3 | 2696 | movdqu 0x20(INP), INC |
2697 | pxor INC, STATE3 | ||
2695 | movdqu IV, 0x20(OUTP) | 2698 | movdqu IV, 0x20(OUTP) |
2696 | 2699 | ||
2697 | _aesni_gf128mul_x_ble() | 2700 | _aesni_gf128mul_x_ble() |
2698 | movdqa IV, STATE4 | 2701 | movdqa IV, STATE4 |
2699 | pxor 0x30(INP), STATE4 | 2702 | movdqu 0x30(INP), INC |
2703 | pxor INC, STATE4 | ||
2700 | movdqu IV, 0x30(OUTP) | 2704 | movdqu IV, 0x30(OUTP) |
2701 | 2705 | ||
2702 | call *%r11 | 2706 | call *%r11 |
2703 | 2707 | ||
2704 | pxor 0x00(OUTP), STATE1 | 2708 | movdqu 0x00(OUTP), INC |
2709 | pxor INC, STATE1 | ||
2705 | movdqu STATE1, 0x00(OUTP) | 2710 | movdqu STATE1, 0x00(OUTP) |
2706 | 2711 | ||
2707 | _aesni_gf128mul_x_ble() | 2712 | _aesni_gf128mul_x_ble() |
2708 | movdqa IV, STATE1 | 2713 | movdqa IV, STATE1 |
2709 | pxor 0x40(INP), STATE1 | 2714 | movdqu 0x40(INP), INC |
2715 | pxor INC, STATE1 | ||
2710 | movdqu IV, 0x40(OUTP) | 2716 | movdqu IV, 0x40(OUTP) |
2711 | 2717 | ||
2712 | pxor 0x10(OUTP), STATE2 | 2718 | movdqu 0x10(OUTP), INC |
2719 | pxor INC, STATE2 | ||
2713 | movdqu STATE2, 0x10(OUTP) | 2720 | movdqu STATE2, 0x10(OUTP) |
2714 | 2721 | ||
2715 | _aesni_gf128mul_x_ble() | 2722 | _aesni_gf128mul_x_ble() |
2716 | movdqa IV, STATE2 | 2723 | movdqa IV, STATE2 |
2717 | pxor 0x50(INP), STATE2 | 2724 | movdqu 0x50(INP), INC |
2725 | pxor INC, STATE2 | ||
2718 | movdqu IV, 0x50(OUTP) | 2726 | movdqu IV, 0x50(OUTP) |
2719 | 2727 | ||
2720 | pxor 0x20(OUTP), STATE3 | 2728 | movdqu 0x20(OUTP), INC |
2729 | pxor INC, STATE3 | ||
2721 | movdqu STATE3, 0x20(OUTP) | 2730 | movdqu STATE3, 0x20(OUTP) |
2722 | 2731 | ||
2723 | _aesni_gf128mul_x_ble() | 2732 | _aesni_gf128mul_x_ble() |
2724 | movdqa IV, STATE3 | 2733 | movdqa IV, STATE3 |
2725 | pxor 0x60(INP), STATE3 | 2734 | movdqu 0x60(INP), INC |
2735 | pxor INC, STATE3 | ||
2726 | movdqu IV, 0x60(OUTP) | 2736 | movdqu IV, 0x60(OUTP) |
2727 | 2737 | ||
2728 | pxor 0x30(OUTP), STATE4 | 2738 | movdqu 0x30(OUTP), INC |
2739 | pxor INC, STATE4 | ||
2729 | movdqu STATE4, 0x30(OUTP) | 2740 | movdqu STATE4, 0x30(OUTP) |
2730 | 2741 | ||
2731 | _aesni_gf128mul_x_ble() | 2742 | _aesni_gf128mul_x_ble() |
2732 | movdqa IV, STATE4 | 2743 | movdqa IV, STATE4 |
2733 | pxor 0x70(INP), STATE4 | 2744 | movdqu 0x70(INP), INC |
2745 | pxor INC, STATE4 | ||
2734 | movdqu IV, 0x70(OUTP) | 2746 | movdqu IV, 0x70(OUTP) |
2735 | 2747 | ||
2736 | _aesni_gf128mul_x_ble() | 2748 | _aesni_gf128mul_x_ble() |
@@ -2738,16 +2750,20 @@ ENTRY(aesni_xts_crypt8) | |||
2738 | 2750 | ||
2739 | call *%r11 | 2751 | call *%r11 |
2740 | 2752 | ||
2741 | pxor 0x40(OUTP), STATE1 | 2753 | movdqu 0x40(OUTP), INC |
2754 | pxor INC, STATE1 | ||
2742 | movdqu STATE1, 0x40(OUTP) | 2755 | movdqu STATE1, 0x40(OUTP) |
2743 | 2756 | ||
2744 | pxor 0x50(OUTP), STATE2 | 2757 | movdqu 0x50(OUTP), INC |
2758 | pxor INC, STATE2 | ||
2745 | movdqu STATE2, 0x50(OUTP) | 2759 | movdqu STATE2, 0x50(OUTP) |
2746 | 2760 | ||
2747 | pxor 0x60(OUTP), STATE3 | 2761 | movdqu 0x60(OUTP), INC |
2762 | pxor INC, STATE3 | ||
2748 | movdqu STATE3, 0x60(OUTP) | 2763 | movdqu STATE3, 0x60(OUTP) |
2749 | 2764 | ||
2750 | pxor 0x70(OUTP), STATE4 | 2765 | movdqu 0x70(OUTP), INC |
2766 | pxor INC, STATE4 | ||
2751 | movdqu STATE4, 0x70(OUTP) | 2767 | movdqu STATE4, 0x70(OUTP) |
2752 | 2768 | ||
2753 | ret | 2769 | ret |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 805078e08013..52ff81cce008 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -192,7 +192,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, | |||
192 | /* struct user */ | 192 | /* struct user */ |
193 | DUMP_WRITE(&dump, sizeof(dump)); | 193 | DUMP_WRITE(&dump, sizeof(dump)); |
194 | /* Now dump all of the user data. Include malloced stuff as well */ | 194 | /* Now dump all of the user data. Include malloced stuff as well */ |
195 | DUMP_SEEK(PAGE_SIZE); | 195 | DUMP_SEEK(PAGE_SIZE - sizeof(dump)); |
196 | /* now we start writing out the user space info */ | 196 | /* now we start writing out the user space info */ |
197 | set_fs(USER_DS); | 197 | set_fs(USER_DS); |
198 | /* Dump the data area */ | 198 | /* Dump the data area */ |
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index ba870bb6dd8e..57873beb3292 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h | |||
@@ -41,4 +41,9 @@ extern int vector_used_by_percpu_irq(unsigned int vector); | |||
41 | 41 | ||
42 | extern void init_ISA_irqs(void); | 42 | extern void init_ISA_irqs(void); |
43 | 43 | ||
44 | #ifdef CONFIG_X86_LOCAL_APIC | ||
45 | void arch_trigger_all_cpu_backtrace(void); | ||
46 | #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace | ||
47 | #endif | ||
48 | |||
44 | #endif /* _ASM_X86_IRQ_H */ | 49 | #endif /* _ASM_X86_IRQ_H */ |
diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h index 6825e2efd1b4..6bc3985ee473 100644 --- a/arch/x86/include/asm/microcode.h +++ b/arch/x86/include/asm/microcode.h | |||
@@ -60,11 +60,11 @@ static inline void __exit exit_amd_microcode(void) {} | |||
60 | #ifdef CONFIG_MICROCODE_EARLY | 60 | #ifdef CONFIG_MICROCODE_EARLY |
61 | #define MAX_UCODE_COUNT 128 | 61 | #define MAX_UCODE_COUNT 128 |
62 | extern void __init load_ucode_bsp(void); | 62 | extern void __init load_ucode_bsp(void); |
63 | extern __init void load_ucode_ap(void); | 63 | extern void __cpuinit load_ucode_ap(void); |
64 | extern int __init save_microcode_in_initrd(void); | 64 | extern int __init save_microcode_in_initrd(void); |
65 | #else | 65 | #else |
66 | static inline void __init load_ucode_bsp(void) {} | 66 | static inline void __init load_ucode_bsp(void) {} |
67 | static inline __init void load_ucode_ap(void) {} | 67 | static inline void __cpuinit load_ucode_ap(void) {} |
68 | static inline int __init save_microcode_in_initrd(void) | 68 | static inline int __init save_microcode_in_initrd(void) |
69 | { | 69 | { |
70 | return 0; | 70 | return 0; |
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index c0fa356e90de..86f9301903c8 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h | |||
@@ -18,9 +18,7 @@ extern int proc_nmi_enabled(struct ctl_table *, int , | |||
18 | void __user *, size_t *, loff_t *); | 18 | void __user *, size_t *, loff_t *); |
19 | extern int unknown_nmi_panic; | 19 | extern int unknown_nmi_panic; |
20 | 20 | ||
21 | void arch_trigger_all_cpu_backtrace(void); | 21 | #endif /* CONFIG_X86_LOCAL_APIC */ |
22 | #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace | ||
23 | #endif | ||
24 | 22 | ||
25 | #define NMI_FLAG_FIRST 1 | 23 | #define NMI_FLAG_FIRST 1 |
26 | 24 | ||
diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c index 31cb9ae992b7..a698d7165c96 100644 --- a/arch/x86/kernel/apic/hw_nmi.c +++ b/arch/x86/kernel/apic/hw_nmi.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <asm/apic.h> | 11 | #include <asm/apic.h> |
12 | #include <asm/nmi.h> | ||
12 | 13 | ||
13 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
14 | #include <linux/kdebug.h> | 15 | #include <linux/kdebug.h> |
diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c index 35ffda5d0727..5f90b85ff22e 100644 --- a/arch/x86/kernel/cpu/mtrr/cleanup.c +++ b/arch/x86/kernel/cpu/mtrr/cleanup.c | |||
@@ -714,15 +714,15 @@ int __init mtrr_cleanup(unsigned address_bits) | |||
714 | if (mtrr_tom2) | 714 | if (mtrr_tom2) |
715 | x_remove_size = (mtrr_tom2 >> PAGE_SHIFT) - x_remove_base; | 715 | x_remove_size = (mtrr_tom2 >> PAGE_SHIFT) - x_remove_base; |
716 | 716 | ||
717 | nr_range = x86_get_mtrr_mem_range(range, 0, x_remove_base, x_remove_size); | ||
718 | /* | 717 | /* |
719 | * [0, 1M) should always be covered by var mtrr with WB | 718 | * [0, 1M) should always be covered by var mtrr with WB |
720 | * and fixed mtrrs should take effect before var mtrr for it: | 719 | * and fixed mtrrs should take effect before var mtrr for it: |
721 | */ | 720 | */ |
722 | nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, 0, | 721 | nr_range = add_range_with_merge(range, RANGE_NUM, 0, 0, |
723 | 1ULL<<(20 - PAGE_SHIFT)); | 722 | 1ULL<<(20 - PAGE_SHIFT)); |
724 | /* Sort the ranges: */ | 723 | /* add from var mtrr at last */ |
725 | sort_range(range, nr_range); | 724 | nr_range = x86_get_mtrr_mem_range(range, nr_range, |
725 | x_remove_base, x_remove_size); | ||
726 | 726 | ||
727 | range_sums = sum_ranges(range, nr_range); | 727 | range_sums = sum_ranges(range, nr_range); |
728 | printk(KERN_INFO "total RAM covered: %ldM\n", | 728 | printk(KERN_INFO "total RAM covered: %ldM\n", |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index f60d41ff9a97..a9e22073bd56 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -165,13 +165,13 @@ static struct extra_reg intel_snb_extra_regs[] __read_mostly = { | |||
165 | INTEL_EVENT_EXTRA_REG(0xb7, MSR_OFFCORE_RSP_0, 0x3f807f8fffull, RSP_0), | 165 | INTEL_EVENT_EXTRA_REG(0xb7, MSR_OFFCORE_RSP_0, 0x3f807f8fffull, RSP_0), |
166 | INTEL_EVENT_EXTRA_REG(0xbb, MSR_OFFCORE_RSP_1, 0x3f807f8fffull, RSP_1), | 166 | INTEL_EVENT_EXTRA_REG(0xbb, MSR_OFFCORE_RSP_1, 0x3f807f8fffull, RSP_1), |
167 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), | 167 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), |
168 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), | ||
169 | EVENT_EXTRA_END | 168 | EVENT_EXTRA_END |
170 | }; | 169 | }; |
171 | 170 | ||
172 | static struct extra_reg intel_snbep_extra_regs[] __read_mostly = { | 171 | static struct extra_reg intel_snbep_extra_regs[] __read_mostly = { |
173 | INTEL_EVENT_EXTRA_REG(0xb7, MSR_OFFCORE_RSP_0, 0x3fffff8fffull, RSP_0), | 172 | INTEL_EVENT_EXTRA_REG(0xb7, MSR_OFFCORE_RSP_0, 0x3fffff8fffull, RSP_0), |
174 | INTEL_EVENT_EXTRA_REG(0xbb, MSR_OFFCORE_RSP_1, 0x3fffff8fffull, RSP_1), | 173 | INTEL_EVENT_EXTRA_REG(0xbb, MSR_OFFCORE_RSP_1, 0x3fffff8fffull, RSP_1), |
174 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), | ||
175 | EVENT_EXTRA_END | 175 | EVENT_EXTRA_END |
176 | }; | 176 | }; |
177 | 177 | ||
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index d2c381280e3c..3dd37ebd591b 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -242,6 +242,7 @@ void __init kvmclock_init(void) | |||
242 | if (!mem) | 242 | if (!mem) |
243 | return; | 243 | return; |
244 | hv_clock = __va(mem); | 244 | hv_clock = __va(mem); |
245 | memset(hv_clock, 0, size); | ||
245 | 246 | ||
246 | if (kvm_register_clock("boot clock")) { | 247 | if (kvm_register_clock("boot clock")) { |
247 | hv_clock = NULL; | 248 | hv_clock = NULL; |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 4e7a37ff03ab..81a5f5e8f142 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -277,18 +277,6 @@ void exit_idle(void) | |||
277 | } | 277 | } |
278 | #endif | 278 | #endif |
279 | 279 | ||
280 | void arch_cpu_idle_prepare(void) | ||
281 | { | ||
282 | /* | ||
283 | * If we're the non-boot CPU, nothing set the stack canary up | ||
284 | * for us. CPU0 already has it initialized but no harm in | ||
285 | * doing it again. This is a good place for updating it, as | ||
286 | * we wont ever return from this function (so the invalid | ||
287 | * canaries already on the stack wont ever trigger). | ||
288 | */ | ||
289 | boot_init_stack_canary(); | ||
290 | } | ||
291 | |||
292 | void arch_cpu_idle_enter(void) | 280 | void arch_cpu_idle_enter(void) |
293 | { | 281 | { |
294 | local_touch_nmi(); | 282 | local_touch_nmi(); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 9c73b51817e4..bfd348e99369 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -372,15 +372,15 @@ static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) | |||
372 | 372 | ||
373 | void __cpuinit set_cpu_sibling_map(int cpu) | 373 | void __cpuinit set_cpu_sibling_map(int cpu) |
374 | { | 374 | { |
375 | bool has_mc = boot_cpu_data.x86_max_cores > 1; | ||
376 | bool has_smt = smp_num_siblings > 1; | 375 | bool has_smt = smp_num_siblings > 1; |
376 | bool has_mp = has_smt || boot_cpu_data.x86_max_cores > 1; | ||
377 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 377 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
378 | struct cpuinfo_x86 *o; | 378 | struct cpuinfo_x86 *o; |
379 | int i; | 379 | int i; |
380 | 380 | ||
381 | cpumask_set_cpu(cpu, cpu_sibling_setup_mask); | 381 | cpumask_set_cpu(cpu, cpu_sibling_setup_mask); |
382 | 382 | ||
383 | if (!has_smt && !has_mc) { | 383 | if (!has_mp) { |
384 | cpumask_set_cpu(cpu, cpu_sibling_mask(cpu)); | 384 | cpumask_set_cpu(cpu, cpu_sibling_mask(cpu)); |
385 | cpumask_set_cpu(cpu, cpu_llc_shared_mask(cpu)); | 385 | cpumask_set_cpu(cpu, cpu_llc_shared_mask(cpu)); |
386 | cpumask_set_cpu(cpu, cpu_core_mask(cpu)); | 386 | cpumask_set_cpu(cpu, cpu_core_mask(cpu)); |
@@ -394,7 +394,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
394 | if ((i == cpu) || (has_smt && match_smt(c, o))) | 394 | if ((i == cpu) || (has_smt && match_smt(c, o))) |
395 | link_mask(sibling, cpu, i); | 395 | link_mask(sibling, cpu, i); |
396 | 396 | ||
397 | if ((i == cpu) || (has_mc && match_llc(c, o))) | 397 | if ((i == cpu) || (has_mp && match_llc(c, o))) |
398 | link_mask(llc_shared, cpu, i); | 398 | link_mask(llc_shared, cpu, i); |
399 | 399 | ||
400 | } | 400 | } |
@@ -406,7 +406,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
406 | for_each_cpu(i, cpu_sibling_setup_mask) { | 406 | for_each_cpu(i, cpu_sibling_setup_mask) { |
407 | o = &cpu_data(i); | 407 | o = &cpu_data(i); |
408 | 408 | ||
409 | if ((i == cpu) || (has_mc && match_mc(c, o))) { | 409 | if ((i == cpu) || (has_mp && match_mc(c, o))) { |
410 | link_mask(core, cpu, i); | 410 | link_mask(core, cpu, i); |
411 | 411 | ||
412 | /* | 412 | /* |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 094b5d96ab14..e8ba99c34180 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -582,8 +582,6 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) | |||
582 | if (index != XCR_XFEATURE_ENABLED_MASK) | 582 | if (index != XCR_XFEATURE_ENABLED_MASK) |
583 | return 1; | 583 | return 1; |
584 | xcr0 = xcr; | 584 | xcr0 = xcr; |
585 | if (kvm_x86_ops->get_cpl(vcpu) != 0) | ||
586 | return 1; | ||
587 | if (!(xcr0 & XSTATE_FP)) | 585 | if (!(xcr0 & XSTATE_FP)) |
588 | return 1; | 586 | return 1; |
589 | if ((xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE)) | 587 | if ((xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE)) |
@@ -597,7 +595,8 @@ int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) | |||
597 | 595 | ||
598 | int kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) | 596 | int kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) |
599 | { | 597 | { |
600 | if (__kvm_set_xcr(vcpu, index, xcr)) { | 598 | if (kvm_x86_ops->get_cpl(vcpu) != 0 || |
599 | __kvm_set_xcr(vcpu, index, xcr)) { | ||
601 | kvm_inject_gp(vcpu, 0); | 600 | kvm_inject_gp(vcpu, 0); |
602 | return 1; | 601 | return 1; |
603 | } | 602 | } |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 5ae2eb09419e..d2fbcedcf6ea 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -1069,7 +1069,10 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | |||
1069 | * that by attempting to use more space than is available. | 1069 | * that by attempting to use more space than is available. |
1070 | */ | 1070 | */ |
1071 | unsigned long dummy_size = remaining_size + 1024; | 1071 | unsigned long dummy_size = remaining_size + 1024; |
1072 | void *dummy = kmalloc(dummy_size, GFP_ATOMIC); | 1072 | void *dummy = kzalloc(dummy_size, GFP_ATOMIC); |
1073 | |||
1074 | if (!dummy) | ||
1075 | return EFI_OUT_OF_RESOURCES; | ||
1073 | 1076 | ||
1074 | status = efi.set_variable(efi_dummy_name, &EFI_DUMMY_GUID, | 1077 | status = efi.set_variable(efi_dummy_name, &EFI_DUMMY_GUID, |
1075 | EFI_VARIABLE_NON_VOLATILE | | 1078 | EFI_VARIABLE_NON_VOLATILE | |
@@ -1089,6 +1092,8 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | |||
1089 | 0, dummy); | 1092 | 0, dummy); |
1090 | } | 1093 | } |
1091 | 1094 | ||
1095 | kfree(dummy); | ||
1096 | |||
1092 | /* | 1097 | /* |
1093 | * The runtime code may now have triggered a garbage collection | 1098 | * The runtime code may now have triggered a garbage collection |
1094 | * run, so check the variable info again | 1099 | * run, so check the variable info again |