Commit 79b8cb97373445d3f27d9dd8633fb2b8e3369af6
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge tag 'powerpc-3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc fixes from Michael Ellerman: - Wire up sys_execveat(). Tested on 32 & 64 bit. - Fix for kdump on LE systems with cpus hot unplugged. - Revert Anton's fix for "kernel BUG at kernel/smpboot.c:134!", this broke other platforms, we'll do a proper fix for 3.20. * tag 'powerpc-3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting active and online" powerpc/kdump: Ignore failure in enabling big endian exception during crash powerpc: Wire up sys_execveat() syscall
Showing 7 changed files Side-by-side Diff
arch/powerpc/include/asm/kexec.h
... | ... | @@ -86,6 +86,11 @@ |
86 | 86 | extern void reserve_crashkernel(void); |
87 | 87 | extern void machine_kexec_mask_interrupts(void); |
88 | 88 | |
89 | +static inline bool kdump_in_progress(void) | |
90 | +{ | |
91 | + return crashing_cpu >= 0; | |
92 | +} | |
93 | + | |
89 | 94 | #else /* !CONFIG_KEXEC */ |
90 | 95 | static inline void crash_kexec_secondary(struct pt_regs *regs) { } |
91 | 96 | |
... | ... | @@ -104,6 +109,11 @@ |
104 | 109 | static inline int crash_shutdown_unregister(crash_shutdown_t handler) |
105 | 110 | { |
106 | 111 | return 0; |
112 | +} | |
113 | + | |
114 | +static inline bool kdump_in_progress(void) | |
115 | +{ | |
116 | + return false; | |
107 | 117 | } |
108 | 118 | |
109 | 119 | #endif /* CONFIG_KEXEC */ |
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/unistd.h
arch/powerpc/include/uapi/asm/unistd.h
arch/powerpc/kernel/machine_kexec_64.c
arch/powerpc/kernel/smp.c
... | ... | @@ -700,6 +700,7 @@ |
700 | 700 | smp_store_cpu_info(cpu); |
701 | 701 | set_dec(tb_ticks_per_jiffy); |
702 | 702 | preempt_disable(); |
703 | + cpu_callin_map[cpu] = 1; | |
703 | 704 | |
704 | 705 | if (smp_ops->setup_cpu) |
705 | 706 | smp_ops->setup_cpu(cpu); |
... | ... | @@ -737,14 +738,6 @@ |
737 | 738 | smp_wmb(); |
738 | 739 | notify_cpu_starting(cpu); |
739 | 740 | set_cpu_online(cpu, true); |
740 | - | |
741 | - /* | |
742 | - * CPU must be marked active and online before we signal back to the | |
743 | - * master, because the scheduler needs to see the cpu_online and | |
744 | - * cpu_active bits set. | |
745 | - */ | |
746 | - smp_wmb(); | |
747 | - cpu_callin_map[cpu] = 1; | |
748 | 741 | |
749 | 742 | local_irq_enable(); |
750 | 743 |
arch/powerpc/platforms/pseries/lpar.c
... | ... | @@ -43,6 +43,7 @@ |
43 | 43 | #include <asm/trace.h> |
44 | 44 | #include <asm/firmware.h> |
45 | 45 | #include <asm/plpar_wrappers.h> |
46 | +#include <asm/kexec.h> | |
46 | 47 | #include <asm/fadump.h> |
47 | 48 | |
48 | 49 | #include "pseries.h" |
49 | 50 | |
... | ... | @@ -267,8 +268,13 @@ |
267 | 268 | * out to the user, but at least this will stop us from |
268 | 269 | * continuing on further and creating an even more |
269 | 270 | * difficult to debug situation. |
271 | + * | |
272 | + * There is a known problem when kdump'ing, if cpus are offline | |
273 | + * the above call will fail. Rather than panicking again, keep | |
274 | + * going and hope the kdump kernel is also little endian, which | |
275 | + * it usually is. | |
270 | 276 | */ |
271 | - if (rc) | |
277 | + if (rc && !kdump_in_progress()) | |
272 | 278 | panic("Could not enable big endian exceptions"); |
273 | 279 | } |
274 | 280 | #endif |