diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-07-05 00:39:43 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-17 02:41:10 -0400 |
commit | b6f35b4966e0ae59cec45e5292b100698d12dc5f (patch) | |
tree | 5ff3b2832c1c3eebbef699df710068ab106ab2db /arch/powerpc | |
parent | 47585d8f5dea10dea49c948f1fb13ef7632409c7 (diff) |
[POWERPC] Make crash.c work on 32-bit and 64-bit
To compile kexec on 32-bit we need a few more bits and pieces. Rather
than add empty definitions, we can make crash.c work on 32-bit, with
only a couple of kludges.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/Makefile | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash.c | 11 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 3 |
4 files changed, 13 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 814f242aeb8c..956c2e5564b7 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -67,9 +67,9 @@ pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ | |||
67 | pci_direct_iommu.o iomap.o | 67 | pci_direct_iommu.o iomap.o |
68 | pci32-$(CONFIG_PPC32) := pci_32.o | 68 | pci32-$(CONFIG_PPC32) := pci_32.o |
69 | obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) | 69 | obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) |
70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o | 70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o |
71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o | 71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o |
72 | obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y) | 72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) |
73 | 73 | ||
74 | ifeq ($(CONFIG_PPC_ISERIES),y) | 74 | ifeq ($(CONFIG_PPC_ISERIES),y) |
75 | $(obj)/head_64.o: $(obj)/lparmap.s | 75 | $(obj)/head_64.o: $(obj)/lparmap.s |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 358cecdc6aef..f04c18e08b8b 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -44,6 +44,7 @@ | |||
44 | /* This keeps a track of which one is crashing cpu. */ | 44 | /* This keeps a track of which one is crashing cpu. */ |
45 | int crashing_cpu = -1; | 45 | int crashing_cpu = -1; |
46 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; | 46 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; |
47 | cpumask_t cpus_in_sr = CPU_MASK_NONE; | ||
47 | 48 | ||
48 | static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data, | 49 | static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data, |
49 | size_t data_len) | 50 | size_t data_len) |
@@ -139,7 +140,13 @@ void crash_ipi_callback(struct pt_regs *regs) | |||
139 | 140 | ||
140 | if (ppc_md.kexec_cpu_down) | 141 | if (ppc_md.kexec_cpu_down) |
141 | ppc_md.kexec_cpu_down(1, 1); | 142 | ppc_md.kexec_cpu_down(1, 1); |
143 | |||
144 | #ifdef CONFIG_PPC64 | ||
142 | kexec_smp_wait(); | 145 | kexec_smp_wait(); |
146 | #else | ||
147 | for (;;); /* FIXME */ | ||
148 | #endif | ||
149 | |||
143 | /* NOTREACHED */ | 150 | /* NOTREACHED */ |
144 | } | 151 | } |
145 | 152 | ||
@@ -255,7 +262,11 @@ static void crash_kexec_prepare_cpus(int cpu) | |||
255 | * | 262 | * |
256 | * do this if kexec in setup.c ? | 263 | * do this if kexec in setup.c ? |
257 | */ | 264 | */ |
265 | #ifdef CONFIG_PPC64 | ||
258 | smp_release_cpus(); | 266 | smp_release_cpus(); |
267 | #else | ||
268 | /* FIXME */ | ||
269 | #endif | ||
259 | } | 270 | } |
260 | 271 | ||
261 | void crash_kexec_secondary(struct pt_regs *regs) | 272 | void crash_kexec_secondary(struct pt_regs *regs) |
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index b6db19d61435..be58985c7681 100644 --- a/arch/powerpc/kernel/machine_kexec_64.c +++ b/arch/powerpc/kernel/machine_kexec_64.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | 12 | ||
13 | #include <linux/cpumask.h> | ||
14 | #include <linux/kexec.h> | 13 | #include <linux/kexec.h> |
15 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
16 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 5147175f921c..125761aaa40b 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -55,9 +55,6 @@ | |||
55 | 55 | ||
56 | #ifdef CONFIG_PPC64 /* XXX */ | 56 | #ifdef CONFIG_PPC64 /* XXX */ |
57 | #define _IO_BASE pci_io_base | 57 | #define _IO_BASE pci_io_base |
58 | #ifdef CONFIG_KEXEC | ||
59 | cpumask_t cpus_in_sr = CPU_MASK_NONE; | ||
60 | #endif | ||
61 | #endif | 58 | #endif |
62 | 59 | ||
63 | #ifdef CONFIG_DEBUGGER | 60 | #ifdef CONFIG_DEBUGGER |