* Kexec/Kdump: honour non-zero crashkernel offset.
@ 2006-09-20 2:43 Horms
2006-09-21 1:01 ` Zou Nan hai
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Horms @ 2006-09-20 2:43 UTC (permalink / raw)
To: linux-ia64
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.
The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.
With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.
This should probably be backed by a documentation change.
Signed-Off-By: Simon Horman <horms@verge.net.au>
Index: linux-2.6/arch/ia64/kernel/setup.c
=================================--- linux-2.6.orig/arch/ia64/kernel/setup.c 2006-09-20 10:56:28.000000000 +0900
+++ linux-2.6/arch/ia64/kernel/setup.c 2006-09-20 10:58:06.000000000 +0900
@@ -257,7 +257,7 @@
#ifdef CONFIG_KEXEC
/* crashkernel=size@offset specifies the size to reserve for a crash
- * kernel.(offset is ingored for keep compatibility with other archs)
+ * kernel. If offset is 0, then it is determined automatically.
* By reserving this memory we guarantee that linux
* never set's it up as a DMA target.
* Useful for holding code to do something appropriate
@@ -268,7 +268,7 @@
unsigned long base, size;
if (from) {
size = memparse(from + 12, &from);
- if (size) {
+ if (size && !base) {
sort_regions(rsvd_region, n);
base = kdump_find_rsvd_region(size,
rsvd_region, n);
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kexec/Kdump: honour non-zero crashkernel offset.
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
@ 2006-09-21 1:01 ` Zou Nan hai
2006-09-21 5:33 ` Horms
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Zou Nan hai @ 2006-09-21 1:01 UTC (permalink / raw)
To: linux-ia64
On Wed, 2006-09-20 at 10:43, Horms wrote:
> There seems to be a value in both allowing the kernel to determine
> the base offset of the crashkernel automatically and allowing
> users's to sepcify it.
>
> The old behaviour on ia64, which is still the current behaviour on
> most architectures is for the user to always specify the address.
> Recently ia64 was changed so that it is always automatically
> determined.
>
> With this patch the kernel automatically determines the offset if
> the supplied value is 0, otherwise it uses the value provided.
>
> This should probably be backed by a documentation change.
>
> Signed-Off-By: Simon Horman <horms@verge.net.au>
> Index: linux-2.6/arch/ia64/kernel/setup.c
> =================================> --- linux-2.6.orig/arch/ia64/kernel/setup.c 2006-09-20
> 10:56:28.000000000 +0900
> +++ linux-2.6/arch/ia64/kernel/setup.c 2006-09-20 10:58:06.000000000
> +0900
> @@ -257,7 +257,7 @@
>
> #ifdef CONFIG_KEXEC
> /* crashkernel=size@offset specifies the size to reserve for a
> crash
> - * kernel.(offset is ingored for keep compatibility with other
> archs)
> + * kernel. If offset is 0, then it is determined
> automatically.
> * By reserving this memory we guarantee that linux
> * never set's it up as a DMA target.
> * Useful for holding code to do something appropriate
> @@ -268,7 +268,7 @@
> unsigned long base, size;
> if (from) {
> size = memparse(from + 12, &from);
> - if (size) {
> + if (size && !base) {
> sort_regions(rsvd_region, n);
> base = kdump_find_rsvd_region(size,
> rsvd_region, n);
>
This patch is incorrect.
I think you will get a compile warning of base is used before it is
aligned a value here...
Thanks
Zou Nan hai
> --
> Horms
> H: http://www.vergenet.net/~horms/
> W: http://www.valinux.co.jp/en/
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kexec/Kdump: honour non-zero crashkernel offset.
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
2006-09-21 1:01 ` Zou Nan hai
@ 2006-09-21 5:33 ` Horms
2006-09-21 5:49 ` Zou, Nanhai
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Horms @ 2006-09-21 5:33 UTC (permalink / raw)
To: linux-ia64
On Thu, Sep 21, 2006 at 09:01:33AM +0800, Zou Nan hai wrote:
> This patch is incorrect.
> I think you will get a compile warning of base is used before it is
> aligned a value here...
Sorry about that. Is this better?
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
[IA64] Kexec/Kdump: honour non-zero crashkernel offset.
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.
The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.
With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.
This should probably be backed by a documentation change.
Signed-Off-By: Simon Horman <horms@verge.net.au>
Index: linux-2.6-ia64/arch/ia64/kernel/setup.c
=================================--- linux-2.6-ia64.orig/arch/ia64/kernel/setup.c 2006-09-21 14:08:20.000000000 +0900
+++ linux-2.6-ia64/arch/ia64/kernel/setup.c 2006-09-21 14:15:36.000000000 +0900
@@ -257,7 +257,7 @@
#ifdef CONFIG_KEXEC
/* crashkernel=size@offset specifies the size to reserve for a crash
- * kernel.(offset is ingored for keep compatibility with other archs)
+ * kernel. If offset is 0, then it is determined automatically.
* By reserving this memory we guarantee that linux
* never set's it up as a DMA target.
* Useful for holding code to do something appropriate
@@ -268,7 +268,11 @@
unsigned long base, size;
if (from) {
size = memparse(from + 12, &from);
- if (size) {
+ if (*from = '@')
+ base = memparse(from+1, &from);
+ else
+ base = 0;
+ if (size && !base) {
sort_regions(rsvd_region, n);
base = kdump_find_rsvd_region(size,
rsvd_region, n);
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Kexec/Kdump: honour non-zero crashkernel offset.
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
2006-09-21 1:01 ` Zou Nan hai
2006-09-21 5:33 ` Horms
@ 2006-09-21 5:49 ` Zou, Nanhai
2006-09-21 9:45 ` Horms
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Zou, Nanhai @ 2006-09-21 5:49 UTC (permalink / raw)
To: linux-ia64
> -----Original Message-----
> From: Horms [mailto:horms@verge.net.au]
> Sent: 2006Äê9ÔÂ21ÈÕ 13:33
> To: Zou, Nanhai
> Cc: Luck, Tony; Linux-IA64; fastboot
> Subject: Re: Kexec/Kdump: honour non-zero crashkernel offset.
>
> On Thu, Sep 21, 2006 at 09:01:33AM +0800, Zou Nan hai wrote:
> > This patch is incorrect.
> > I think you will get a compile warning of base is used before it is
> > aligned a value here...
>
> Sorry about that. Is this better?
>
> --
> Horms
> H: http://www.vergenet.net/~horms/
> W: http://www.valinux.co.jp/en/
>
> [IA64] Kexec/Kdump: honour non-zero crashkernel offset.
>
> There seems to be a value in both allowing the kernel to determine
> the base offset of the crashkernel automatically and allowing
> users's to sepcify it.
>
> The old behaviour on ia64, which is still the current behaviour on
> most architectures is for the user to always specify the address.
> Recently ia64 was changed so that it is always automatically determined.
>
> With this patch the kernel automatically determines the offset if
> the supplied value is 0, otherwise it uses the value provided.
>
> This should probably be backed by a documentation change.
>
> Signed-Off-By: Simon Horman <horms@verge.net.au>
>
> Index: linux-2.6-ia64/arch/ia64/kernel/setup.c
> =================================> --- linux-2.6-ia64.orig/arch/ia64/kernel/setup.c 2006-09-21
> 14:08:20.000000000 +0900
> +++ linux-2.6-ia64/arch/ia64/kernel/setup.c 2006-09-21
> 14:15:36.000000000 +0900
> @@ -257,7 +257,7 @@
>
> #ifdef CONFIG_KEXEC
> /* crashkernel=size@offset specifies the size to reserve for a crash
> - * kernel.(offset is ingored for keep compatibility with other archs)
> + * kernel. If offset is 0, then it is determined automatically.
> * By reserving this memory we guarantee that linux
> * never set's it up as a DMA target.
> * Useful for holding code to do something appropriate
> @@ -268,7 +268,11 @@
> unsigned long base, size;
> if (from) {
> size = memparse(from + 12, &from);
> - if (size) {
> + if (*from = '@')
> + base = memparse(from+1, &from);
> + else
> + base = 0;
> + if (size && !base) {
> sort_regions(rsvd_region, n);
> base = kdump_find_rsvd_region(size,
> rsvd_region, n);
This patch is still incorrect. You will miss the rsvd_region code if base not equals 0.
Zou Nan hai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kexec/Kdump: honour non-zero crashkernel offset.
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
` (2 preceding siblings ...)
2006-09-21 5:49 ` Zou, Nanhai
@ 2006-09-21 9:45 ` Horms
2006-10-20 5:52 ` Horms
2006-12-12 9:08 ` Horms
5 siblings, 0 replies; 7+ messages in thread
From: Horms @ 2006-09-21 9:45 UTC (permalink / raw)
To: linux-ia64
On Thu, Sep 21, 2006 at 01:49:09PM +0800, Zou, Nanhai wrote:
> This patch is still incorrect. You will miss the rsvd_region code if base not equals 0.
Thanks, I guess this is closer, though I'm assuming that calling
sort_regions() isn't needed unless kdump_find_rsvd_region() is going
to be called.
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
[IA64] Kexec/Kdump: honour non-zero crashkernel offset.
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.
The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.
With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.
This should probably be backed by a documentation change.
Signed-Off-By: Simon Horman <horms@verge.net.au>
Index: linux-2.6-ia64/arch/ia64/kernel/setup.c
=================================--- linux-2.6-ia64.orig/arch/ia64/kernel/setup.c 2006-09-21 14:08:20.000000000 +0900
+++ linux-2.6-ia64/arch/ia64/kernel/setup.c 2006-09-21 18:43:10.000000000 +0900
@@ -257,7 +257,7 @@
#ifdef CONFIG_KEXEC
/* crashkernel=size@offset specifies the size to reserve for a crash
- * kernel.(offset is ingored for keep compatibility with other archs)
+ * kernel. If offset is 0, then it is determined automatically.
* By reserving this memory we guarantee that linux
* never set's it up as a DMA target.
* Useful for holding code to do something appropriate
@@ -268,10 +268,16 @@
unsigned long base, size;
if (from) {
size = memparse(from + 12, &from);
+ if (*from = '@')
+ base = memparse(from+1, &from);
+ else
+ base = 0;
if (size) {
- sort_regions(rsvd_region, n);
- base = kdump_find_rsvd_region(size,
- rsvd_region, n);
+ if (!base) {
+ sort_regions(rsvd_region, n);
+ base = kdump_find_rsvd_region(size,
+ rsvd_region, n);
+ }
if (base != ~0UL) {
rsvd_region[n].start (unsigned long)__va(base);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kexec/Kdump: honour non-zero crashkernel offset.
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
` (3 preceding siblings ...)
2006-09-21 9:45 ` Horms
@ 2006-10-20 5:52 ` Horms
2006-12-12 9:08 ` Horms
5 siblings, 0 replies; 7+ messages in thread
From: Horms @ 2006-10-20 5:52 UTC (permalink / raw)
To: linux-ia64
On Thu, Sep 21, 2006 at 06:45:48PM +0900, Horms wrote:
> On Thu, Sep 21, 2006 at 01:49:09PM +0800, Zou, Nanhai wrote:
> > This patch is still incorrect. You will miss the rsvd_region code if base not equals 0.
>
> Thanks, I guess this is closer, though I'm assuming that calling
> sort_regions() isn't needed unless kdump_find_rsvd_region() is going
> to be called.
Hi,
here is yet another version of this patch. This time I tested it
and it actually seems to work (unlike previous itterations I sent).
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
[IA64] Kexec/Kdump: honour non-zero crashkernel offset.
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.
The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.
With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.
This should probably be backed by a documentation change.
Signed-Off-By: Simon Horman <horms@verge.net.au>
Index: kexec-ia64-2.6/arch/ia64/kernel/setup.c
=================================--- kexec-ia64-2.6.orig/arch/ia64/kernel/setup.c 2006-10-20 13:13:38.000000000 +0900
+++ kexec-ia64-2.6/arch/ia64/kernel/setup.c 2006-10-20 14:49:05.000000000 +0900
@@ -257,7 +257,7 @@
#ifdef CONFIG_KEXEC
/* crashkernel=size@offset specifies the size to reserve for a crash
- * kernel.(offset is ingored for keep compatibility with other archs)
+ * kernel. If offset is 0, then it is determined automatically.
* By reserving this memory we guarantee that linux never set's it
* up as a DMA target.Useful for holding code to do something
* appropriate after a kernel panic.
@@ -267,10 +267,16 @@
unsigned long base, size;
if (from) {
size = memparse(from + 12, &from);
+ if (*from = '@')
+ base = memparse(from+1, &from);
+ else
+ base = 0;
if (size) {
- sort_regions(rsvd_region, n);
- base = kdump_find_rsvd_region(size,
- rsvd_region, n);
+ if (!base) {
+ sort_regions(rsvd_region, n);
+ base = kdump_find_rsvd_region(size,
+ rsvd_region, n);
+ }
if (base != ~0UL) {
rsvd_region[n].start (unsigned long)__va(base);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Kexec/Kdump: honour non-zero crashkernel offset
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
` (4 preceding siblings ...)
2006-10-20 5:52 ` Horms
@ 2006-12-12 9:08 ` Horms
5 siblings, 0 replies; 7+ messages in thread
From: Horms @ 2006-12-12 9:08 UTC (permalink / raw)
To: linux-ia64
[IA64] Kexec/Kdump: honour non-zero crashkernel offset.
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.
The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.
With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.
This should probably be backed by a documentation change.
Signed-Off-By: Simon Horman <horms@verge.net.au>
Index: linux-2.6/arch/ia64/kernel/setup.c
=================================--- linux-2.6.orig/arch/ia64/kernel/setup.c 2006-10-23 17:34:24.000000000 +0900
+++ linux-2.6/arch/ia64/kernel/setup.c 2006-10-23 17:34:56.000000000 +0900
@@ -257,7 +257,7 @@
#ifdef CONFIG_KEXEC
/* crashkernel=size@offset specifies the size to reserve for a crash
- * kernel.(offset is ingored for keep compatibility with other archs)
+ * kernel. If offset is 0, then it is determined automatically.
* By reserving this memory we guarantee that linux never set's it
* up as a DMA target.Useful for holding code to do something
* appropriate after a kernel panic.
@@ -267,10 +267,16 @@
unsigned long base, size;
if (from) {
size = memparse(from + 12, &from);
+ if (*from = '@')
+ base = memparse(from+1, &from);
+ else
+ base = 0;
if (size) {
- sort_regions(rsvd_region, n);
- base = kdump_find_rsvd_region(size,
- rsvd_region, n);
+ if (!base) {
+ sort_regions(rsvd_region, n);
+ base = kdump_find_rsvd_region(size,
+ rsvd_region, n);
+ }
if (base != ~0UL) {
rsvd_region[n].start (unsigned long)__va(base);
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-12-12 9:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-20 2:43 Kexec/Kdump: honour non-zero crashkernel offset Horms
2006-09-21 1:01 ` Zou Nan hai
2006-09-21 5:33 ` Horms
2006-09-21 5:49 ` Zou, Nanhai
2006-09-21 9:45 ` Horms
2006-10-20 5:52 ` Horms
2006-12-12 9:08 ` Horms
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox