* [PATCH] memmap: Parse "Reserved" together with "reserved"
@ 2017-04-26 0:55 Yinghai Lu
2017-04-26 6:01 ` Dave Young
2017-04-26 6:22 ` Ingo Molnar
0 siblings, 2 replies; 10+ messages in thread
From: Yinghai Lu @ 2017-04-26 0:55 UTC (permalink / raw)
To: Simon Horman, Ingo Molnar; +Cc: Yinghai Lu, kexec
For x86 with recent kernel after
commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
So here, we add handling for that too.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
kexec/arch/i386/crashdump-x86.c | 2 ++
kexec/arch/ia64/kexec-ia64.c | 2 ++
kexec/arch/mips/kexec-mips.c | 2 ++
kexec/firmware_memmap.c | 2 ++
4 files changed, 8 insertions(+)
Index: kexec-tools/kexec/arch/i386/crashdump-x86.c
===================================================================
--- kexec-tools.orig/kexec/arch/i386/crashdump-x86.c
+++ kexec-tools/kexec/arch/i386/crashdump-x86.c
@@ -323,6 +323,8 @@ static int get_crash_memory_ranges(struc
type = RANGE_PMEM;
} else if(memcmp(str,"reserved\n",9) == 0 ) {
type = RANGE_RESERVED;
+ } else if(memcmp(str,"Reserved\n",9) == 0 ) {
+ type = RANGE_RESERVED;
} else if (memcmp(str, "GART\n", 5) == 0) {
gart_start = start;
gart_end = end;
Index: kexec-tools/kexec/arch/ia64/kexec-ia64.c
===================================================================
--- kexec-tools.orig/kexec/arch/ia64/kexec-ia64.c
+++ kexec-tools/kexec/arch/ia64/kexec-ia64.c
@@ -117,6 +117,8 @@ int get_memory_ranges(struct memory_rang
}
else if (memcmp(str, "reserved\n", 9) == 0) {
type = RANGE_RESERVED;
+ else if (memcmp(str, "Reserved\n", 9) == 0) {
+ type = RANGE_RESERVED;
}
else if (memcmp(str, "Crash kernel\n", 13) == 0) {
/* Redefine the memory region boundaries if kernel
Index: kexec-tools/kexec/arch/mips/kexec-mips.c
===================================================================
--- kexec-tools.orig/kexec/arch/mips/kexec-mips.c
+++ kexec-tools/kexec/arch/mips/kexec-mips.c
@@ -57,6 +57,8 @@ int get_memory_ranges(struct memory_rang
type = RANGE_RAM;
} else if (memcmp(str, "reserved\n", 9) == 0) {
type = RANGE_RESERVED;
+ } else if (memcmp(str, "Reserved\n", 9) == 0) {
+ type = RANGE_RESERVED;
} else {
continue;
}
Index: kexec-tools/kexec/firmware_memmap.c
===================================================================
--- kexec-tools.orig/kexec/firmware_memmap.c
+++ kexec-tools/kexec/firmware_memmap.c
@@ -164,6 +164,8 @@ static int parse_memmap_entry(const char
range->type = RANGE_RESERVED;
else if (strcmp(type, "reserved") == 0)
range->type = RANGE_RESERVED;
+ else if (strcmp(type, "Reserved") == 0)
+ 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)
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
2017-04-26 0:55 [PATCH] memmap: Parse "Reserved" together with "reserved" Yinghai Lu
@ 2017-04-26 6:01 ` Dave Young
2017-04-26 6:22 ` Ingo Molnar
1 sibling, 0 replies; 10+ messages in thread
From: Dave Young @ 2017-04-26 6:01 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Simon Horman, kexec, Ingo Molnar
On 04/25/17 at 05:55pm, Yinghai Lu wrote:
> For x86 with recent kernel after
> commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
Need to mention that this is not in mainline yet.
> change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
>
> So here, we add handling for that too.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> kexec/arch/i386/crashdump-x86.c | 2 ++
> kexec/arch/ia64/kexec-ia64.c | 2 ++
> kexec/arch/mips/kexec-mips.c | 2 ++
The tip commit only changes x86, so mips and ia64 are not needed here?
> kexec/firmware_memmap.c | 2 ++
> 4 files changed, 8 insertions(+)
>
> Index: kexec-tools/kexec/arch/i386/crashdump-x86.c
> ===================================================================
> --- kexec-tools.orig/kexec/arch/i386/crashdump-x86.c
> +++ kexec-tools/kexec/arch/i386/crashdump-x86.c
> @@ -323,6 +323,8 @@ static int get_crash_memory_ranges(struc
> type = RANGE_PMEM;
> } else if(memcmp(str,"reserved\n",9) == 0 ) {
> type = RANGE_RESERVED;
> + } else if(memcmp(str,"Reserved\n",9) == 0 ) {
> + type = RANGE_RESERVED;
> } else if (memcmp(str, "GART\n", 5) == 0) {
> gart_start = start;
> gart_end = end;
> Index: kexec-tools/kexec/arch/ia64/kexec-ia64.c
> ===================================================================
> --- kexec-tools.orig/kexec/arch/ia64/kexec-ia64.c
> +++ kexec-tools/kexec/arch/ia64/kexec-ia64.c
> @@ -117,6 +117,8 @@ int get_memory_ranges(struct memory_rang
> }
> else if (memcmp(str, "reserved\n", 9) == 0) {
> type = RANGE_RESERVED;
> + else if (memcmp(str, "Reserved\n", 9) == 0) {
> + type = RANGE_RESERVED;
> }
> else if (memcmp(str, "Crash kernel\n", 13) == 0) {
> /* Redefine the memory region boundaries if kernel
> Index: kexec-tools/kexec/arch/mips/kexec-mips.c
> ===================================================================
> --- kexec-tools.orig/kexec/arch/mips/kexec-mips.c
> +++ kexec-tools/kexec/arch/mips/kexec-mips.c
> @@ -57,6 +57,8 @@ int get_memory_ranges(struct memory_rang
> type = RANGE_RAM;
> } else if (memcmp(str, "reserved\n", 9) == 0) {
> type = RANGE_RESERVED;
> + } else if (memcmp(str, "Reserved\n", 9) == 0) {
> + type = RANGE_RESERVED;
> } else {
> continue;
> }
> Index: kexec-tools/kexec/firmware_memmap.c
> ===================================================================
> --- kexec-tools.orig/kexec/firmware_memmap.c
> +++ kexec-tools/kexec/firmware_memmap.c
> @@ -164,6 +164,8 @@ static int parse_memmap_entry(const char
> range->type = RANGE_RESERVED;
> else if (strcmp(type, "reserved") == 0)
> range->type = RANGE_RESERVED;
> + else if (strcmp(type, "Reserved") == 0)
> + 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)
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
2017-04-26 0:55 [PATCH] memmap: Parse "Reserved" together with "reserved" Yinghai Lu
@ 2017-04-26 6:22 ` Ingo Molnar
2017-04-26 6:22 ` Ingo Molnar
1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2017-04-26 6:22 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Simon Horman, kexec, linux-kernel
* Yinghai Lu <yinghai@kernel.org> wrote:
> For x86 with recent kernel after
> commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
>
> So here, we add handling for that too.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> kexec/arch/i386/crashdump-x86.c | 2 ++
> kexec/arch/ia64/kexec-ia64.c | 2 ++
> kexec/arch/mips/kexec-mips.c | 2 ++
> kexec/firmware_memmap.c | 2 ++
> 4 files changed, 8 insertions(+)
I'd rather fix the bug I introduced and undo the reserved->Reserved string change
in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
consequences for kexec.
Agreed?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
@ 2017-04-26 6:22 ` Ingo Molnar
0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2017-04-26 6:22 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Simon Horman, kexec, linux-kernel
* Yinghai Lu <yinghai@kernel.org> wrote:
> For x86 with recent kernel after
> commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
>
> So here, we add handling for that too.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> kexec/arch/i386/crashdump-x86.c | 2 ++
> kexec/arch/ia64/kexec-ia64.c | 2 ++
> kexec/arch/mips/kexec-mips.c | 2 ++
> kexec/firmware_memmap.c | 2 ++
> 4 files changed, 8 insertions(+)
I'd rather fix the bug I introduced and undo the reserved->Reserved string change
in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
consequences for kexec.
Agreed?
Thanks,
Ingo
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
2017-04-26 6:22 ` Ingo Molnar
@ 2017-04-26 7:28 ` Dave Young
-1 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2017-04-26 7:28 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Yinghai Lu, Simon Horman, kexec, linux-kernel
On 04/26/17 at 08:22am, Ingo Molnar wrote:
>
> * Yinghai Lu <yinghai@kernel.org> wrote:
>
> > For x86 with recent kernel after
> > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> >
> > So here, we add handling for that too.
> >
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> >
> > ---
> > kexec/arch/i386/crashdump-x86.c | 2 ++
> > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > kexec/arch/mips/kexec-mips.c | 2 ++
> > kexec/firmware_memmap.c | 2 ++
> > 4 files changed, 8 insertions(+)
>
> I'd rather fix the bug I introduced and undo the reserved->Reserved string change
This patch parses both 'reserved' and 'Reserved' it should be fine, but
reverting the change in kernel sounds better..
> in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> consequences for kexec.
>
> Agreed?
>
> Thanks,
>
> Ingo
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
Thanks
Dave
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
@ 2017-04-26 7:28 ` Dave Young
0 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2017-04-26 7:28 UTC (permalink / raw)
To: Ingo Molnar; +Cc: kexec, Simon Horman, Yinghai Lu, linux-kernel
On 04/26/17 at 08:22am, Ingo Molnar wrote:
>
> * Yinghai Lu <yinghai@kernel.org> wrote:
>
> > For x86 with recent kernel after
> > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> >
> > So here, we add handling for that too.
> >
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> >
> > ---
> > kexec/arch/i386/crashdump-x86.c | 2 ++
> > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > kexec/arch/mips/kexec-mips.c | 2 ++
> > kexec/firmware_memmap.c | 2 ++
> > 4 files changed, 8 insertions(+)
>
> I'd rather fix the bug I introduced and undo the reserved->Reserved string change
This patch parses both 'reserved' and 'Reserved' it should be fine, but
reverting the change in kernel sounds better..
> in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> consequences for kexec.
>
> Agreed?
>
> Thanks,
>
> Ingo
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
2017-04-26 7:28 ` Dave Young
@ 2017-04-26 7:31 ` Dave Young
-1 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2017-04-26 7:31 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Yinghai Lu, Simon Horman, kexec, linux-kernel
On 04/26/17 at 03:28pm, Dave Young wrote:
> On 04/26/17 at 08:22am, Ingo Molnar wrote:
> >
> > * Yinghai Lu <yinghai@kernel.org> wrote:
> >
> > > For x86 with recent kernel after
> > > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> > >
> > > So here, we add handling for that too.
> > >
> > > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > >
> > > ---
> > > kexec/arch/i386/crashdump-x86.c | 2 ++
> > > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > > kexec/arch/mips/kexec-mips.c | 2 ++
> > > kexec/firmware_memmap.c | 2 ++
> > > 4 files changed, 8 insertions(+)
> >
> > I'd rather fix the bug I introduced and undo the reserved->Reserved string change
>
> This patch parses both 'reserved' and 'Reserved' it should be fine, but
> reverting the change in kernel sounds better..
Hmm, after press sending I noticed old kexec-tools with new kernel, it
is still a problem, so we'd better to revert the kernel changes.
>
> > in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> > consequences for kexec.
> >
> > Agreed?
> >
> > Thanks,
> >
> > Ingo
> >
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
>
> Thanks
> Dave
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
@ 2017-04-26 7:31 ` Dave Young
0 siblings, 0 replies; 10+ messages in thread
From: Dave Young @ 2017-04-26 7:31 UTC (permalink / raw)
To: Ingo Molnar; +Cc: kexec, Simon Horman, Yinghai Lu, linux-kernel
On 04/26/17 at 03:28pm, Dave Young wrote:
> On 04/26/17 at 08:22am, Ingo Molnar wrote:
> >
> > * Yinghai Lu <yinghai@kernel.org> wrote:
> >
> > > For x86 with recent kernel after
> > > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> > >
> > > So here, we add handling for that too.
> > >
> > > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > >
> > > ---
> > > kexec/arch/i386/crashdump-x86.c | 2 ++
> > > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > > kexec/arch/mips/kexec-mips.c | 2 ++
> > > kexec/firmware_memmap.c | 2 ++
> > > 4 files changed, 8 insertions(+)
> >
> > I'd rather fix the bug I introduced and undo the reserved->Reserved string change
>
> This patch parses both 'reserved' and 'Reserved' it should be fine, but
> reverting the change in kernel sounds better..
Hmm, after press sending I noticed old kexec-tools with new kernel, it
is still a problem, so we'd better to revert the kernel changes.
>
> > in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> > consequences for kexec.
> >
> > Agreed?
> >
> > Thanks,
> >
> > Ingo
> >
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
>
> Thanks
> Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
2017-04-26 7:31 ` Dave Young
@ 2017-04-26 10:49 ` Simon Horman
-1 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2017-04-26 10:49 UTC (permalink / raw)
To: Dave Young; +Cc: Ingo Molnar, Yinghai Lu, kexec, linux-kernel
On Wed, Apr 26, 2017 at 03:31:48PM +0800, Dave Young wrote:
> On 04/26/17 at 03:28pm, Dave Young wrote:
> > On 04/26/17 at 08:22am, Ingo Molnar wrote:
> > >
> > > * Yinghai Lu <yinghai@kernel.org> wrote:
> > >
> > > > For x86 with recent kernel after
> > > > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > > > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> > > >
> > > > So here, we add handling for that too.
> > > >
> > > > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > > >
> > > > ---
> > > > kexec/arch/i386/crashdump-x86.c | 2 ++
> > > > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > > > kexec/arch/mips/kexec-mips.c | 2 ++
> > > > kexec/firmware_memmap.c | 2 ++
> > > > 4 files changed, 8 insertions(+)
> > >
> > > I'd rather fix the bug I introduced and undo the reserved->Reserved string change
> >
> > This patch parses both 'reserved' and 'Reserved' it should be fine, but
> > reverting the change in kernel sounds better..
>
> Hmm, after press sending I noticed old kexec-tools with new kernel, it
> is still a problem, so we'd better to revert the kernel changes.
FWIW, if the kernel change hasn't hit a release then reverting (the
reserved->Reserved portion of) it would be my preference.
> > > in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> > > consequences for kexec.
> > >
> > > Agreed?
> > >
> > > Thanks,
> > >
> > > Ingo
> > >
> > > _______________________________________________
> > > kexec mailing list
> > > kexec@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/kexec
> >
> > Thanks
> > Dave
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] memmap: Parse "Reserved" together with "reserved"
@ 2017-04-26 10:49 ` Simon Horman
0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2017-04-26 10:49 UTC (permalink / raw)
To: Dave Young; +Cc: kexec, Yinghai Lu, Ingo Molnar, linux-kernel
On Wed, Apr 26, 2017 at 03:31:48PM +0800, Dave Young wrote:
> On 04/26/17 at 03:28pm, Dave Young wrote:
> > On 04/26/17 at 08:22am, Ingo Molnar wrote:
> > >
> > > * Yinghai Lu <yinghai@kernel.org> wrote:
> > >
> > > > For x86 with recent kernel after
> > > > commit 640e1b38b0 ("x86/boot/e820: Basic cleanup of e820.c")
> > > > change "reserved" to "Reserved" in /sys firmware memmap and /proc/iomem.
> > > >
> > > > So here, we add handling for that too.
> > > >
> > > > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > > >
> > > > ---
> > > > kexec/arch/i386/crashdump-x86.c | 2 ++
> > > > kexec/arch/ia64/kexec-ia64.c | 2 ++
> > > > kexec/arch/mips/kexec-mips.c | 2 ++
> > > > kexec/firmware_memmap.c | 2 ++
> > > > 4 files changed, 8 insertions(+)
> > >
> > > I'd rather fix the bug I introduced and undo the reserved->Reserved string change
> >
> > This patch parses both 'reserved' and 'Reserved' it should be fine, but
> > reverting the change in kernel sounds better..
>
> Hmm, after press sending I noticed old kexec-tools with new kernel, it
> is still a problem, so we'd better to revert the kernel changes.
FWIW, if the kernel change hasn't hit a release then reverting (the
reserved->Reserved portion of) it would be my preference.
> > > in e820.c: I didn't realize that it's exposed in sysfs and had quasi-ABI
> > > consequences for kexec.
> > >
> > > Agreed?
> > >
> > > Thanks,
> > >
> > > Ingo
> > >
> > > _______________________________________________
> > > kexec mailing list
> > > kexec@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/kexec
> >
> > Thanks
> > Dave
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-04-26 10:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 0:55 [PATCH] memmap: Parse "Reserved" together with "reserved" Yinghai Lu
2017-04-26 6:01 ` Dave Young
2017-04-26 6:22 ` Ingo Molnar
2017-04-26 6:22 ` Ingo Molnar
2017-04-26 7:28 ` Dave Young
2017-04-26 7:28 ` Dave Young
2017-04-26 7:31 ` Dave Young
2017-04-26 7:31 ` Dave Young
2017-04-26 10:49 ` Simon Horman
2017-04-26 10:49 ` 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.