Skip to contentSkip to conversation

Patch "MIPS: fix mem=X@Y commandline processing" has been added to the 4.9-stable tree

DISCUSSION [email protected] 2 participants 3 messages Apr 25, 2018 – Apr 26, 2018 MIPS

lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

MIPS: fix mem=X@Y commandline processing

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-fix-mem-x-y-commandline-processing.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

#1 lore raw

Hi Greg,

Why is this patch coming back ? This was discussed previously at:

https://www.spinics.net/lists/kernel/msg2617572.html

The correct fix is rather 67a3ba25aa955.

Thanks

Quoted 62 lines · On Wed, Apr 25, 2018 at 6:01 PM, <[email protected]> wrote:

This is a note to let you know that I've just added the patch titled

MIPS: fix mem=X@Y commandline processing

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-fix-mem-x-y-commandline-processing.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 Mon Sep 17 00:00:00 2001
From: Marcin Nowakowski <[email protected]>
Date: Wed, 23 Nov 2016 14:43:49 +0100
Subject: MIPS: fix mem=X@Y commandline processing

From: Marcin Nowakowski <[email protected]>

commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 upstream.

When a memory offset is specified through the commandline, add the memory in range PHYS_OFFSET:Y as reserved memory area. Otherwise the bootmem allocator is initialised with low page equal to min_low_pfn = PHYS_OFFSET, and in free_all_bootmem will process pages starting from min_low_pfn instead of PFN(Y).

Patchwork: https://patchwork.linux-mips.org/patch/14613/

---
 arch/mips/kernel/setup.c |    4 ++++
 1 file changed, 4 insertions(+)
arch/mips/kernel/setup.c +4 -0
@@ -661,6 +661,10 @@ static int __init early_parse_mem(char *
                start = memparse(p + 1, &p);
 
        add_memory_region(start, size, BOOT_MEM_RAM);
+
+       if (start && start > PHYS_OFFSET)
+               add_memory_region(PHYS_OFFSET, start - PHYS_OFFSET,
+                               BOOT_MEM_RESERVED);
        return 0;
 }
 early_param("mem", early_parse_mem);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/irqchip-mips-gic-fix-local-interrupts.patch queue-4.9/mips-fix-mem-x-y-commandline-processing.patch

#2 lore raw
Quoted 5 lines · Mathieu Malaterre

Hi Greg,

Why is this patch coming back ? This was discussed previously at:

https://www.spinics.net/lists/kernel/msg2617572.html

Sorry, I found an old list of patches taht Amit had dug up and grabbed it from there.

Quoted 1 line

The correct fix is rather 67a3ba25aa955.

And as that only goes to 4.11+, I'll leave things alone now.

Patch is now dropped, sorry for the noise.

greg k-h