aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-05-17 04:00:46 -0400
committerPaul Mackerras <paulus@samba.org>2006-05-19 01:02:15 -0400
commit2babf5c2ec2f2d5de3e38d20f7df7fd815fd10c9 (patch)
tree9ecda21067fe36f36fbefae87141150b62c39acd /include/asm-powerpc
parent846f77b08c8301682ded5ce127c56397327a60d0 (diff)
[PATCH] powerpc: Unify mem= handling
We currently do mem= handling in three seperate places. And as benh pointed out I wrote two of them. Now that we parse command line parameters earlier we can clean this mess up. Moving the parsing out of prom_init means the device tree might be allocated above the memory limit. If that happens we'd have to move it. As it happens we already have logic to do that for kdump, so just genericise it. This also means we might have reserved regions above the memory limit, if we do the bootmem allocator will blow up, so we have to modify lmb_enforce_memory_limit() to truncate the reserves as well. Tested on P5 LPAR, iSeries, F50, 44p. Tested moving device tree on P5 and 44p and F50. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/kexec.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index 6a2af2f6853b..0a1afced173f 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -31,9 +31,10 @@
31#define KEXEC_ARCH KEXEC_ARCH_PPC 31#define KEXEC_ARCH KEXEC_ARCH_PPC
32#endif 32#endif
33 33
34#ifndef __ASSEMBLY__
35
34#ifdef CONFIG_KEXEC 36#ifdef CONFIG_KEXEC
35 37
36#ifndef __ASSEMBLY__
37#ifdef __powerpc64__ 38#ifdef __powerpc64__
38/* 39/*
39 * This function is responsible for capturing register states if coming 40 * This function is responsible for capturing register states if coming
@@ -123,8 +124,16 @@ extern int default_machine_kexec_prepare(struct kimage *image);
123extern void default_machine_crash_shutdown(struct pt_regs *regs); 124extern void default_machine_crash_shutdown(struct pt_regs *regs);
124 125
125extern void machine_kexec_simple(struct kimage *image); 126extern void machine_kexec_simple(struct kimage *image);
127extern int overlaps_crashkernel(unsigned long start, unsigned long size);
128
129#else /* !CONFIG_KEXEC */
130
131static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
132{
133 return 0;
134}
126 135
127#endif /* ! __ASSEMBLY__ */
128#endif /* CONFIG_KEXEC */ 136#endif /* CONFIG_KEXEC */
137#endif /* ! __ASSEMBLY__ */
129#endif /* __KERNEL__ */ 138#endif /* __KERNEL__ */
130#endif /* _ASM_POWERPC_KEXEC_H */ 139#endif /* _ASM_POWERPC_KEXEC_H */