Skip to contentSkip to conversation

Handle additional e820 memmap type strings

PATCH In review Eric DeVolder 3 participants 7 messages May 10, 2017 – May 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Handle additional e820 memmap type strings

Keep pace with changes to linux arch/x86/kernel/e820.c to function e820_type_to_string(). With this change, the following messages from kexec are eliminated (and allows kexec to load):

Unknown type (Reserved) while parsing /sys/firmware/memmap/8/type. Please report this as bug. Using RANGE_RESERVED now.

Unknown type (Unknown E820 type) while parsing /sys/firmware/memmap/4/type. Please report this as bug. Using RANGE_RESERVED now.

---
 kexec/firmware_memmap.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/firmware_memmap.c +4 -0
index 4d84f00..1ee214a 100644
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
 		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, "Unknown E820 type") == 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)
Signature · 7 lines
2.7.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

There have been no reviews of this patch yet; just bubbling it up to the top to gain some attention.

Regards,
eric

Quoted 21 lines · Eric DeVolder

Keep pace with changes to linux arch/x86/kernel/e820.c to function e820_type_to_string(). With this change, the following messages from kexec are eliminated (and allows kexec to load):

Unknown type (Reserved) while parsing /sys/firmware/memmap/8/type. Please report this as bug. Using RANGE_RESERVED now.

Unknown type (Unknown E820 type) while parsing /sys/firmware/memmap/4/type. Please report this as bug. Using RANGE_RESERVED now.

---
 kexec/firmware_memmap.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/firmware_memmap.c +0 -0
index 4d84f00..1ee214a 100644

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 173

Quoted 10 lines
kexec/firmware_memmap.c +4 -0
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
 		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, "Unknown E820 type") == 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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
In reply to Eric DeVolder
Quoted 20 lines · Eric DeVolder

Keep pace with changes to linux arch/x86/kernel/e820.c to function e820_type_to_string(). With this change, the following messages from kexec are eliminated (and allows kexec to load):

Unknown type (Reserved) while parsing /sys/firmware/memmap/8/type. Please report this as bug. Using RANGE_RESERVED now.

Unknown type (Unknown E820 type) while parsing /sys/firmware/memmap/4/type. Please report this as bug. Using RANGE_RESERVED now.

---
 kexec/firmware_memmap.c | 4 ++++
 1 file changed, 4 insertions(+)
kexec/firmware_memmap.c +0 -0
index 4d84f00..1ee214a 100644

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 170

Quoted 7 lines
kexec/firmware_memmap.c +4 -0
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
 		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, "Unknown E820 type") == 0)
+		range->type = RANGE_RESERVED;

Should we change the "reserved" one to "Reserved" so that we don't need to have "reserved" and "Reserved" at the same time?

Quoted 11 lines
kexec/firmware_memmap.c +0 -0
 	else if (strcmp(type, "ACPI Non-volatile Storage") == 0)
 		range->type = RANGE_ACPI_NVS;
 	else if (strcmp(type, "Uncached RAM") == 0)
Signature · 7 lines
2.7.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
Quoted 16 lines · Baoquan He
Quoted 15 lines · Eric DeVolder

Keep pace with changes to linux arch/x86/kernel/e820.c to function e820_type_to_string(). With this change, the following messages from kexec are eliminated (and allows kexec to load):

Unknown type (Reserved) while parsing /sys/firmware/memmap/8/type. Please report this as bug. Using RANGE_RESERVED now.

Unknown type (Unknown E820 type) while parsing /sys/firmware/memmap/4/type. Please report this as bug. Using RANGE_RESERVED now.

---
  kexec/firmware_memmap.c | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 15 lines

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 170

Quoted 12 lines
kexec/firmware_memmap.c +4 -0
index 4d84f00..1ee214a 100644
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
  		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, "Unknown E820 type") == 0)
+		range->type = RANGE_RESERVED;

Should we change the "reserved" one to "Reserved" so that we don't need to have "reserved" and "Reserved" at the same time?

The lower-case "reserved" has been in use by the kernel for quite a long while, and upper-case "Reserved" has been recently introduced. I think removing lower-case "reserved" would result in problems with existing, older, kernels that still would be using "reserved".

Quoted 8 lines
Quoted 8 lines
kexec/firmware_memmap.c +0 -0
  	else if (strcmp(type, "ACPI Non-volatile Storage") == 0)
  		range->type = RANGE_ACPI_NVS;
  	else if (strcmp(type, "Uncached RAM") == 0)
Signature · 1 line
2.7.4
Quoted 4 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 16 lines · Eric DeVolder
Quoted 7 lines
Quoted 7 lines
kexec/firmware_memmap.c +0 -0
index 4d84f00..1ee214a 100644
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
  		range->type = RANGE_RESERVED;
  	else if (strcmp(type, "reserved") == 0)
Quoted 8 lines

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 170

Quoted 5 lines
kexec/firmware_memmap.c +4 -0
  		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Reserved") == 0)
+		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Unknown E820 type") == 0)
+		range->type = RANGE_RESERVED;

Should we change the "reserved" one to "Reserved" so that we don't need to have "reserved" and "Reserved" at the same time?

Quoted 4 lines

The lower-case "reserved" has been in use by the kernel for quite a long while, and upper-case "Reserved" has been recently introduced. I think removing lower-case "reserved" would result in problems with existing, older, kernels that still would be using "reserved".

Thanks. Then it looks good to me. Ack.

Simon might pick several patches one time every several days. Please wait.

Quoted 14 lines
Quoted 9 lines
Quoted 9 lines
kexec/firmware_memmap.c +0 -0
  	else if (strcmp(type, "ACPI Non-volatile Storage") == 0)
  		range->type = RANGE_ACPI_NVS;
  	else if (strcmp(type, "Uncached RAM") == 0)
Signature · 1 line
2.7.4
Quoted 4 lines
Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Quoted 4 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
Quoted 22 lines · Baoquan He
Quoted 16 lines · Eric DeVolder
Quoted 7 lines
Quoted 7 lines
kexec/firmware_memmap.c +0 -0
index 4d84f00..1ee214a 100644
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
  		range->type = RANGE_RESERVED;
  	else if (strcmp(type, "reserved") == 0)
Quoted 8 lines

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 170

Quoted 5 lines
kexec/firmware_memmap.c +4 -0
  		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Reserved") == 0)
+		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Unknown E820 type") == 0)
+		range->type = RANGE_RESERVED;

Should we change the "reserved" one to "Reserved" so that we don't need to have "reserved" and "Reserved" at the same time?

Quoted 4 lines

The lower-case "reserved" has been in use by the kernel for quite a long while, and upper-case "Reserved" has been recently introduced. I think removing lower-case "reserved" would result in problems with existing, older, kernels that still would be using "reserved".

Quoted 4 lines

Thanks. Then it looks good to me. Ack.

Simon might pick several patches one time every several days. Please wait.

Yes, I try to pick up new patches within a few working days. I have applied this one.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#6 lore raw
Quoted 23 lines · Simon Horman
Quoted 22 lines · Baoquan He
Quoted 20 lines · Eric DeVolder
Quoted 7 lines
Quoted 7 lines
kexec/firmware_memmap.c +0 -0
index 4d84f00..1ee214a 100644
@@ -164,6 +164,10 @@ static int parse_memmap_entry(const char *entry, struct memory_range *range)
  		range->type = RANGE_RESERVED;
  	else if (strcmp(type, "reserved") == 0)
Quoted 8 lines

kexec/firmware_memmap.c static int parse_memmap_entry(const char *entry, struct memory_range *range) · line 170

Quoted 5 lines
kexec/firmware_memmap.c +4 -0
  		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Reserved") == 0)
+		range->type = RANGE_RESERVED;
+	else if (strcmp(type, "Unknown E820 type") == 0)
+		range->type = RANGE_RESERVED;

Should we change the "reserved" one to "Reserved" so that we don't need to have "reserved" and "Reserved" at the same time?

The lower-case "reserved" has been in use by the kernel for quite a long while, and upper-case "Reserved" has been recently introduced. I think removing lower-case "reserved" would result in problems with existing, older, kernels that still would be using "reserved".

Quoted 7 lines
Quoted 4 lines

Thanks. Then it looks good to me. Ack.

Simon might pick several patches one time every several days. Please wait.

Yes, I try to pick up new patches within a few working days. I have applied this one.

Thanks, Simon!

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec