diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-07-05 21:32:44 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-07-05 21:32:44 +0000 |
commit | 7f3182da169223b848d6b4c9a34c3d650de32312 (patch) | |
tree | 581c224dfe199a248cb2eab1b0aa83cf8e992755 /target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch | |
parent | 62cdc72fb87773188e761e6ebde2c104831b6a64 (diff) | |
download | upstream-7f3182da169223b848d6b4c9a34c3d650de32312.tar.gz upstream-7f3182da169223b848d6b4c9a34c3d650de32312.tar.bz2 upstream-7f3182da169223b848d6b4c9a34c3d650de32312.zip |
ar7: add linux 4.1 support
Compile tested only.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46186
Diffstat (limited to 'target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch')
-rw-r--r-- | target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch b/target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch new file mode 100644 index 0000000000..4011942d79 --- /dev/null +++ b/target/linux/ar7/patches-4.1/200-free-mem-below-kernel-offset.patch @@ -0,0 +1,15 @@ +--- a/arch/mips/ar7/memory.c ++++ b/arch/mips/ar7/memory.c +@@ -66,5 +66,11 @@ void __init prom_meminit(void) + + void __init prom_free_prom_memory(void) + { +- /* Nothing to free */ ++ /* adapted from arch/mips/txx9/generic/setup.c */ ++ unsigned long saddr = PHYS_OFFSET + PAGE_SIZE; ++ unsigned long eaddr = __pa_symbol(&_text); ++ ++ /* free memory between prom-record and kernel _text base */ ++ if (saddr < eaddr) ++ free_init_pages("prom memory", saddr, eaddr); + } |