aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-05-27 23:30:12 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-05-27 23:30:12 -0400
commit86969cf7330a53c93edfd1bf2c28ad053e289162 (patch)
treea69d5408f126d21c6cae84a0fb44e9a33da0acd0
parentb9d800959e87e538595a723f07dd3829c2f85d85 (diff)
parent011e4b02f1da156ac7fea28a9da878f3c23af739 (diff)
Merge branch 'merge' into next
Merge the binutils and kexec fixes.
-rw-r--r--arch/powerpc/Makefile4
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h7
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c2
-rw-r--r--kernel/kexec.c8
4 files changed, 18 insertions, 3 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 68cde2f8a12c..5687e299d0a5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -155,7 +155,9 @@ endif
155 155
156CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) 156CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
157 157
158KBUILD_CPPFLAGS += -Iarch/$(ARCH) 158asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
159
160KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr)
159KBUILD_AFLAGS += -Iarch/$(ARCH) $(AFLAGS-y) 161KBUILD_AFLAGS += -Iarch/$(ARCH) $(AFLAGS-y)
160KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) 162KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
161CPP = $(CC) -E $(KBUILD_CFLAGS) 163CPP = $(CC) -E $(KBUILD_CFLAGS)
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 6400f1814fe8..9ea266eae33e 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -322,11 +322,16 @@ n:
322 addi reg,reg,(name - 0b)@l; 322 addi reg,reg,(name - 0b)@l;
323 323
324#ifdef __powerpc64__ 324#ifdef __powerpc64__
325#ifdef HAVE_AS_ATHIGH
326#define __AS_ATHIGH high
327#else
328#define __AS_ATHIGH h
329#endif
325#define LOAD_REG_IMMEDIATE(reg,expr) \ 330#define LOAD_REG_IMMEDIATE(reg,expr) \
326 lis reg,(expr)@highest; \ 331 lis reg,(expr)@highest; \
327 ori reg,reg,(expr)@higher; \ 332 ori reg,reg,(expr)@higher; \
328 rldicr reg,reg,32,31; \ 333 rldicr reg,reg,32,31; \
329 oris reg,reg,(expr)@h; \ 334 oris reg,reg,(expr)@__AS_ATHIGH; \
330 ori reg,reg,(expr)@l; 335 ori reg,reg,(expr)@l;
331 336
332#define LOAD_REG_ADDR(reg,name) \ 337#define LOAD_REG_ADDR(reg,name) \
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 59d229a2a3e0..879b3aacac32 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -237,7 +237,7 @@ static void wake_offline_cpus(void)
237 if (!cpu_online(cpu)) { 237 if (!cpu_online(cpu)) {
238 printk(KERN_INFO "kexec: Waking offline cpu %d.\n", 238 printk(KERN_INFO "kexec: Waking offline cpu %d.\n",
239 cpu); 239 cpu);
240 cpu_up(cpu); 240 WARN_ON(cpu_up(cpu));
241 } 241 }
242 } 242 }
243} 243}
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c8380ad203bc..28c57069ef68 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1683,6 +1683,14 @@ int kernel_kexec(void)
1683 kexec_in_progress = true; 1683 kexec_in_progress = true;
1684 kernel_restart_prepare(NULL); 1684 kernel_restart_prepare(NULL);
1685 migrate_to_reboot_cpu(); 1685 migrate_to_reboot_cpu();
1686
1687 /*
1688 * migrate_to_reboot_cpu() disables CPU hotplug assuming that
1689 * no further code needs to use CPU hotplug (which is true in
1690 * the reboot case). However, the kexec path depends on using
1691 * CPU hotplug again; so re-enable it here.
1692 */
1693 cpu_hotplug_enable();
1686 printk(KERN_EMERG "Starting new kernel\n"); 1694 printk(KERN_EMERG "Starting new kernel\n");
1687 machine_shutdown(); 1695 machine_shutdown();
1688 } 1696 }