* [PATCH]IA64: do not include uncached memory to vmcore
@ 2008-09-12 20:10 Jay Lan
2008-09-12 23:35 ` Simon Horman
0 siblings, 1 reply; 5+ messages in thread
From: Jay Lan @ 2008-09-12 20:10 UTC (permalink / raw)
To: kexec
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
Currently a memory segment in memory map with attribute of EFI_MEMORY_UC
is denoted as "System RAM" in /proc/iomem, while memory of attribute
(EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
The kexec utility then includes uncached memory as part of vmcore.
The kdump kernel may MCA when it tries to save the vmcore to a disk.
A normal "cached" access can cause MCAs.
Since kexec assembled memory ranges with memory tagged as "System RAM",
the uncached memory will be excluded if it is labeled differently.
Simon, since only IA64 will create "Uncached RAM" label, i do not
make changes to other arch.
Our HP machine in the lab is dead. I am sorry that i can not test
against other IA64 systems (than SGI's). Feedback is very much
appreciated.
The corresponding kernel patch is needed to test this kexec patch:
http://marc.info/?l=linux-ia64&m=122122791230130&w=2
This patch without the kernel patch will have no effect and do no
harm.
Signed-off-by: Jay Lan <jlan@sgi.com>
[-- Attachment #2: UC-mem.kexec --]
[-- Type: text/plain, Size: 2696 bytes --]
---
kexec/arch/ia64/crashdump-ia64.c | 5 ++++-
kexec/arch/ia64/kexec-ia64.c | 5 ++++-
kexec/firmware_memmap.c | 2 ++
kexec/kexec.h | 1 +
11 files changed, 27 insertions(+), 3 deletions(-)
Index: kexec-tools/kexec/arch/ia64/crashdump-ia64.c
===================================================================
--- kexec-tools.orig/kexec/arch/ia64/crashdump-ia64.c 2008-09-10 17:17:57.751956424 -0700
+++ kexec-tools/kexec/arch/ia64/crashdump-ia64.c 2008-09-10 17:18:02.060031443 -0700
@@ -212,8 +212,11 @@ static int get_crash_memory_ranges(struc
kernel_code_start = start;
kernel_code_end = end;
continue;
- }else
+ } else if (memcmp(str, "Uncached RAM\n", 13) == 0) {
+ type = RANGE_UNCACHED;
+ } else {
continue;
+ }
crash_memory_range[memory_ranges].start = start;
crash_memory_range[memory_ranges].end = end;
crash_memory_range[memory_ranges].type = type;
Index: kexec-tools/kexec/kexec.h
===================================================================
--- kexec-tools.orig/kexec/kexec.h 2008-09-10 17:07:20.892688089 -0700
+++ kexec-tools/kexec/kexec.h 2008-09-10 17:18:02.072031652 -0700
@@ -110,6 +110,7 @@ struct memory_range {
#define RANGE_RESERVED 1
#define RANGE_ACPI 2
#define RANGE_ACPI_NVS 3
+#define RANGE_UNCACHED 4
};
struct kexec_info {
Index: kexec-tools/kexec/arch/ia64/kexec-ia64.c
===================================================================
--- kexec-tools.orig/kexec/arch/ia64/kexec-ia64.c 2008-09-10 17:07:20.892688089 -0700
+++ kexec-tools/kexec/arch/ia64/kexec-ia64.c 2008-09-10 17:18:02.100032140 -0700
@@ -139,8 +139,11 @@ int get_memory_ranges(struct memory_rang
memory_ranges = split_range(memory_ranges, start, end);
saved_efi_memmap_size = end - start;
continue;
- } else
+ } else if (memcmp(str, "Uncached RAM\n", 13) == 0) {
+ type = RANGE_UNCACHED;
+ } else {
continue;
+ }
/*
* Check if this memory range can be coalesced with
* the previous range
Index: kexec-tools/kexec/firmware_memmap.c
===================================================================
--- kexec-tools.orig/kexec/firmware_memmap.c 2008-09-10 17:07:20.892688089 -0700
+++ kexec-tools/kexec/firmware_memmap.c 2008-09-10 17:18:02.120032488 -0700
@@ -158,6 +158,8 @@ static int parse_memmap_entry(const char
range->type = RANGE_RESERVED;
else if (strcmp(type, "ACPI Non-volatile Storage") == 0)
range->type = RANGE_ACPI_NVS;
+ else if (strcmp(type, "Uncached RAM") == 0)
+ range->type = RANGE_UNCACHED;
else {
fprintf(stderr, "Unknown type (%s) while parsing %s. Please "
"report this as bug. Using RANGE_RESERVED now.\n",
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH]IA64: do not include uncached memory to vmcore
2008-09-12 20:10 [PATCH]IA64: do not include uncached memory to vmcore Jay Lan
@ 2008-09-12 23:35 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-09-12 23:35 UTC (permalink / raw)
To: Jay Lan; +Cc: linux-ia64@vger.kernel.org, kexec
On Fri, Sep 12, 2008 at 01:10:34PM -0700, Jay Lan wrote:
> Currently a memory segment in memory map with attribute of EFI_MEMORY_UC
> is denoted as "System RAM" in /proc/iomem, while memory of attribute
> (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
>
> The kexec utility then includes uncached memory as part of vmcore.
> The kdump kernel may MCA when it tries to save the vmcore to a disk.
> A normal "cached" access can cause MCAs.
>
> Since kexec assembled memory ranges with memory tagged as "System RAM",
> the uncached memory will be excluded if it is labeled differently.
>
> Simon, since only IA64 will create "Uncached RAM" label, i do not
> make changes to other arch.
>
> Our HP machine in the lab is dead. I am sorry that i can not test
> against other IA64 systems (than SGI's). Feedback is very much
> appreciated.
>
> The corresponding kernel patch is needed to test this kexec patch:
> http://marc.info/?l=linux-ia64&m=122122791230130&w=2
> This patch without the kernel patch will have no effect and do no
> harm.
Hi Jay,
both of these patches seem reasonable to me, especially from a kexec point
of view. I will try and test them on an HP RX2620 and Intel Tiger 4 and
get back to you shortly.
--
Simon Horman
VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH]IA64: do not include uncached memory to vmcore
@ 2008-09-12 23:35 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-09-12 23:35 UTC (permalink / raw)
To: Jay Lan; +Cc: linux-ia64@vger.kernel.org, kexec
On Fri, Sep 12, 2008 at 01:10:34PM -0700, Jay Lan wrote:
> Currently a memory segment in memory map with attribute of EFI_MEMORY_UC
> is denoted as "System RAM" in /proc/iomem, while memory of attribute
> (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
>
> The kexec utility then includes uncached memory as part of vmcore.
> The kdump kernel may MCA when it tries to save the vmcore to a disk.
> A normal "cached" access can cause MCAs.
>
> Since kexec assembled memory ranges with memory tagged as "System RAM",
> the uncached memory will be excluded if it is labeled differently.
>
> Simon, since only IA64 will create "Uncached RAM" label, i do not
> make changes to other arch.
>
> Our HP machine in the lab is dead. I am sorry that i can not test
> against other IA64 systems (than SGI's). Feedback is very much
> appreciated.
>
> The corresponding kernel patch is needed to test this kexec patch:
> http://marc.info/?l=linux-ia64&m\x122122791230130&w=2
> This patch without the kernel patch will have no effect and do no
> harm.
Hi Jay,
both of these patches seem reasonable to me, especially from a kexec point
of view. I will try and test them on an HP RX2620 and Intel Tiger 4 and
get back to you shortly.
--
Simon Horman
VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH]IA64: do not include uncached memory to vmcore
2008-09-12 23:35 ` Simon Horman
@ 2008-09-23 23:57 ` Simon Horman
-1 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-09-23 23:57 UTC (permalink / raw)
To: Jay Lan; +Cc: linux-ia64@vger.kernel.org, kexec
On Sat, Sep 13, 2008 at 09:35:02AM +1000, Simon Horman wrote:
> On Fri, Sep 12, 2008 at 01:10:34PM -0700, Jay Lan wrote:
> > Currently a memory segment in memory map with attribute of EFI_MEMORY_UC
> > is denoted as "System RAM" in /proc/iomem, while memory of attribute
> > (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
> >
> > The kexec utility then includes uncached memory as part of vmcore.
> > The kdump kernel may MCA when it tries to save the vmcore to a disk.
> > A normal "cached" access can cause MCAs.
> >
> > Since kexec assembled memory ranges with memory tagged as "System RAM",
> > the uncached memory will be excluded if it is labeled differently.
> >
> > Simon, since only IA64 will create "Uncached RAM" label, i do not
> > make changes to other arch.
> >
> > Our HP machine in the lab is dead. I am sorry that i can not test
> > against other IA64 systems (than SGI's). Feedback is very much
> > appreciated.
> >
> > The corresponding kernel patch is needed to test this kexec patch:
> > http://marc.info/?l=linux-ia64&m=122122791230130&w=2
> > This patch without the kernel patch will have no effect and do no
> > harm.
>
> Hi Jay,
>
> both of these patches seem reasonable to me, especially from a kexec point
> of view. I will try and test them on an HP RX2620 and Intel Tiger 4 and
> get back to you shortly.
Hi Jay, Hi All,
As "[IA64] kexec fails on systems with blocks of uncached memory" has
been applied to the kernel by Tony and pulled by Linus, I have
applied this kexec-tools portion of the patch.
--
Simon Horman
VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH]IA64: do not include uncached memory to vmcore
@ 2008-09-23 23:57 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-09-23 23:57 UTC (permalink / raw)
To: Jay Lan; +Cc: linux-ia64@vger.kernel.org, kexec
On Sat, Sep 13, 2008 at 09:35:02AM +1000, Simon Horman wrote:
> On Fri, Sep 12, 2008 at 01:10:34PM -0700, Jay Lan wrote:
> > Currently a memory segment in memory map with attribute of EFI_MEMORY_UC
> > is denoted as "System RAM" in /proc/iomem, while memory of attribute
> > (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
> >
> > The kexec utility then includes uncached memory as part of vmcore.
> > The kdump kernel may MCA when it tries to save the vmcore to a disk.
> > A normal "cached" access can cause MCAs.
> >
> > Since kexec assembled memory ranges with memory tagged as "System RAM",
> > the uncached memory will be excluded if it is labeled differently.
> >
> > Simon, since only IA64 will create "Uncached RAM" label, i do not
> > make changes to other arch.
> >
> > Our HP machine in the lab is dead. I am sorry that i can not test
> > against other IA64 systems (than SGI's). Feedback is very much
> > appreciated.
> >
> > The corresponding kernel patch is needed to test this kexec patch:
> > http://marc.info/?l=linux-ia64&m\x122122791230130&w=2
> > This patch without the kernel patch will have no effect and do no
> > harm.
>
> Hi Jay,
>
> both of these patches seem reasonable to me, especially from a kexec point
> of view. I will try and test them on an HP RX2620 and Intel Tiger 4 and
> get back to you shortly.
Hi Jay, Hi All,
As "[IA64] kexec fails on systems with blocks of uncached memory" has
been applied to the kernel by Tony and pulled by Linus, I have
applied this kexec-tools portion of the patch.
--
Simon Horman
VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-09-23 23:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 20:10 [PATCH]IA64: do not include uncached memory to vmcore Jay Lan
2008-09-12 23:35 ` Simon Horman
2008-09-12 23:35 ` Simon Horman
2008-09-23 23:57 ` Simon Horman
2008-09-23 23:57 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.