[ARM] rationalize memory configuration code some more
Currently there are two instances of struct meminfo: one in kernel/setup.c marked __initdata, and another in mm/init.c with permanent storage. Let's keep only the later to directly populate the permanent version from arm_add_memory(). Also move common validation tests between the MMU and non-MMU cases into arm_add_memory() to remove some duplication. Protection against overflowing the membank array is also moved in there in order to cover the kernel cmdline parsing path as well. Signed-off-by:Nicolas Pitre <nico@marvell.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
Showing
- arch/arm/include/asm/setup.h 4 additions, 2 deletionsarch/arm/include/asm/setup.h
- arch/arm/kernel/setup.c 21 additions, 16 deletionsarch/arm/kernel/setup.c
- arch/arm/mm/init.c 6 additions, 6 deletionsarch/arm/mm/init.c
- arch/arm/mm/mm.h 1 addition, 1 deletionarch/arm/mm/mm.h
- arch/arm/mm/mmu.c 11 additions, 18 deletionsarch/arm/mm/mmu.c
- arch/arm/mm/nommu.c 2 additions, 16 deletionsarch/arm/mm/nommu.c
Loading
Please register or sign in to comment