linux/arch/mips
Matt Redfearn 61cd52d4e4 MIPS: bootmem: When relocatable, free memory below kernel
The kernel reserves all memory before the _end symbol as bootmem,
however, once the kernel can be relocated elsewhere in memory this may
result in a large amount of wasted memory. The assumption is that the
memory between the link and relocated address of the kernel may be
released back to the available memory pool.

Memory statistics for a Malta with the kernel relocating by
16Mb, without the patch:
Memory: 105952K/131072K available (4604K kernel code, 242K rwdata,
892K rodata, 1280K init, 183K bss, 25120K reserved, 0K cma-reserved)
And with the patch:
Memory: 122336K/131072K available (4604K kernel code, 242K rwdata,
892K rodata, 1280K init, 183K bss, 8736K reserved, 0K cma-reserved)

The 16Mb offset is removed from the reserved region and added back to
the available region.

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: kernel-hardening@lists.openwall.com
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12986/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-05-13 14:02:03 +02:00
..
alchemy MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
ar7 MIPS: ar7: use gpiochip data pointer 2016-02-19 09:51:43 +01:00
ath25 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
ath79 MIPS: ath79: update devicetree clock support for AR9331 2016-05-13 14:01:46 +02:00
bcm47xx MIPS: BCM47xx: Move SPROM driver to drivers/firmware/ 2016-05-13 14:01:43 +02:00
bcm63xx Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel 2016-03-09 17:40:37 +07:00
bmips MIPS: BMIPS: Add early CPU initialization code 2016-05-13 14:01:55 +02:00
boot MIPS: tools: Build relocs tool 2016-05-13 14:02:02 +02:00
cavium-octeon MIPS: Octeon: Add Octeon III CN7xxx interface detection 2016-05-13 14:01:54 +02:00
cobalt MIPS: Cobalt Don't use module_init in non-modular MTD registration. 2015-06-21 22:14:30 +02:00
configs MIPS: defconfigs: Remove CONFIG_IPV6_PRIVACY 2016-05-13 14:01:58 +02:00
dec MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
include MIPS: seccomp: Support compat with both O32 and N32 2016-05-13 14:02:01 +02:00
jazz MIPS: Jazz: Migrate to new 'set-state' interface 2015-09-03 12:07:50 +02:00
jz4740 MIPS: jz4740: Fix surviving instance of irq_to_gpio() 2016-02-29 11:23:49 +01:00
kernel MIPS: bootmem: When relocatable, free memory below kernel 2016-05-13 14:02:03 +02:00
kvm MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
lantiq MIPS: Lantiq: Make it possible to build in no device tree 2016-05-13 14:01:44 +02:00
lasat [mips] switch pvc_proc_cleanup() to remove_proc_subtree() 2015-12-23 10:41:38 -05:00
lib MIPS: memset.S: Disable code unused with non-R6 MIPS configs 2016-05-09 12:00:04 +02:00
loongson32 MIPS: loongsoon32: Migrate to new 'set-state' interface 2015-09-03 12:07:53 +02:00
loongson64 MIPS: Loongson64: Remove call to flush_cache_all(). 2016-05-13 14:01:38 +02:00
math-emu MIPS: math-emu: dsemul: Remove an unused bit in ADDIUPC emulation 2016-05-13 14:01:55 +02:00
mm MIPS: Sync icache & dcache in set_pte_at 2016-05-13 14:01:58 +02:00
mti-malta MIPS: Fix early CM probing 2016-02-09 17:18:31 +01:00
mti-sead3 LED/MIPS: Move SEAD3 LED driver to where it belongs. 2015-11-03 08:59:20 +01:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-06 00:43:52 -05:00
netlogic MIPS: Netlogic: Fix CP0_EBASE redefinition warnings 2016-05-09 12:00:05 +02:00
oprofile MIPS: oprofile: Fix a preemption issue 2016-05-09 12:00:03 +02:00
paravirt MIPS: SMP: Don't increment irq_count multiple times for call function IPIs 2015-08-03 09:25:12 +02:00
pci PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
pic32 clk: Get rid of HAVE_MACH_CLKDEV 2016-02-25 14:41:20 -08:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-11-15 09:10:53 -08:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x mips: nand: make use of mtd_to_nand() where appropriate 2015-12-08 13:03:07 -08:00
power MIPS: Hibernate: flush TLB entries earlier 2015-04-10 15:41:52 +02:00
ralink MIPS: ralink: Make reset_control_ops const 2016-05-13 14:01:43 +02:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22 MIPS: ip22-gio: Remove legacy suspend/resume support 2015-02-20 13:30:55 +01:00
sgi-ip27 MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
sgi-ip32 MIPS: IP32: Fix build errors in reset code in DS1685 platform hook. 2015-05-13 00:01:41 +02:00
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni MIPS: Fix build error due to unused variables. 2015-12-22 15:21:18 +01:00
txx9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-03-19 10:05:34 -07:00
vdso Fix ld-version.sh to handle large 3rd version part 2016-01-04 10:22:52 +01:00
vr41xx MIPS: VR41xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
xilfpga Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-11-15 09:10:53 -08:00
Kbuild MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Kbuild.platforms MIPS: Add support for PIC32MZDA platform 2016-01-24 02:53:28 +01:00
Kconfig MIPS: Reserve space for relocation table 2016-05-13 14:02:02 +02:00
Kconfig.debug MIPS: CPS: Early debug using an ns16550-compatible UART 2015-11-11 08:34:25 +01:00
Makefile MIPS: Generate relocation table when CONFIG_RELOCATABLE 2016-05-13 14:02:02 +02:00