RE: [Patch 6/8] powerpc: implement crashkernel=auto
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "'Amerigo Wang'" <amwang@xxxxxxxxxx>, "'linux-kernel@xxxxxxxxxxxxxxx'" <linux-kernel@xxxxxxxxxxxxxxx>
- Subject: RE: [Patch 6/8] powerpc: implement crashkernel=auto
- From: "Yu, Fenghua" <fenghua.yu@xxxxxxxxx>
- Date: Thu, 27 Aug 2009 11:22:21 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
- Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>, "'linux-ia64@xxxxxxxxxxxxxxx'" <linux-ia64@xxxxxxxxxxxxxxx>, "'Neil Horman'" <nhorman@xxxxxxxxxx>, "'Eric W. Biederman'" <ebiederm@xxxxxxxxxxxx>, "'kamezawa.hiroyu@xxxxxxxxxxxxxx'" <kamezawa.hiroyu@xxxxxxxxxxxxxx>, "'Andi Kleen'" <andi@xxxxxxxxxxxxxx>, "'Michael Ellerman'" <michael@xxxxxxxxxxxxxx>, "'M. Mohan Kumar'" <mohan@xxxxxxxxxx>, "'akpm@xxxxxxxxxxxxxxxxxxxx'" <akpm@xxxxxxxxxxxxxxxxxxxx>, "'bernhard.walle@xxxxxx'" <bernhard.walle@xxxxxx>, "'Ingo Molnar'" <mingo@xxxxxxx>, "'Anton Vorontsov'" <avorontsov@xxxxxxxxxxxxx>
- In-reply-to: <20090827031909.4534.24859.sendpatchset@xxxxxxxxxxxxxxxxxxxxx>
- List-id: <linux-ia64.vger.kernel.org>
- References: <20090827031800.4534.94868.sendpatchset@xxxxxxxxxxxxxxxxxxxxx> <20090827031909.4534.24859.sendpatchset@xxxxxxxxxxxxxxxxxxxxx>
- Thread-index: AcomxNp0T6IBrtDlSNKirmeeQDLgoAAfkamQ
- Thread-topic: [Patch 6/8] powerpc: implement crashkernel=auto
>--- linux-2.6.orig/arch/powerpc/include/asm/kexec.h
>+++ linux-2.6/arch/powerpc/include/asm/kexec.h
>@@ -39,6 +39,45 @@ typedef void (*crash_shutdown_t)(void);
>
> #ifdef CONFIG_KEXEC
>
>+#ifdef CONFIG_KEXEC_AUTO_RESERVE
>+
>+#ifndef KEXEC_AUTO_THRESHOLD
>+#define KEXEC_AUTO_THRESHOLD (1ULL<<31) /* 2G */
>+#endif
>+
>+#ifndef arch_default_crash_base
>+static inline
>+unsigned long long arch_default_crash_base(void)
>+{
>+ return KDUMP_KERNELBASE;
>+}
You don't want inline here either.
>+#define arch_default_crash_base arch_default_crash_base
>+#endif
>+
>+#ifndef arch_default_crash_size
>+static inline
>+unsigned long long arch_default_crash_size(unsigned long long total_size)
>+{
Ditto.
>+ if (total_size < KEXEC_AUTO_THRESHOLD)
>+ return 0;
>+ if (total_size < (1ULL<<32))
>+ return 1ULL<<27;
>+ else {
>+#ifdef CONFIG_64BIT
>+ if (total_size > (1ULL<<37)) /* 128G */
>+ return 1ULL<<32; /* 4G */
>+ return 1ULL<<ilog2(roundup(total_size/32, 1ULL<<21));
>+#else
>+ return 1ULL<<28;
>+#endif
>+ }
>+}
>+#define arch_default_crash_size arch_default_crash_size
>+#endif
>+
>+#endif
>+#include <asm-generic/kexec.h>
>+
> /*
> * This function is responsible for capturing register states if coming
> * via panic or invoking dump using sysrq-trigger.
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]