aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-05-11 13:47:37 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-08 16:45:08 +0100
commit90740f52e9b9076d60119cfe4669366588131fe6 (patch)
treef895bbb35c1a71b9488c4679a5d5f8694082b223 /target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch
parent08ec23f8ea9c63384e127f934bfb8086b8ab368a (diff)
downloadupstream-90740f52e9b9076d60119cfe4669366588131fe6.tar.gz
upstream-90740f52e9b9076d60119cfe4669366588131fe6.tar.bz2
upstream-90740f52e9b9076d60119cfe4669366588131fe6.zip
ar7: update kernel to version 4.14
This adds support for kernel 4.14 to the target and directly make it the default kernel version to use. This patch is build-tested only, but has never been device-tested. It is only added to preserve the changes in Git history prior to removing this target. Use it with care. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [rebased and extended commit message, refreshed patches for 4.14.162] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch')
-rw-r--r--target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch b/target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch
new file mode 100644
index 0000000000..7cc3ada818
--- /dev/null
+++ b/target/linux/ar7/patches-4.14/200-free-mem-below-kernel-offset.patch
@@ -0,0 +1,15 @@
+--- a/arch/mips/ar7/memory.c
++++ b/arch/mips/ar7/memory.c
+@@ -65,5 +65,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);
+ }