summaryrefslogtreecommitdiff
path: root/arch/mips/bcm63xx/dev-spi.c
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2021-03-02 12:04:05 +0200
committerBorislav Petkov <bp@suse.de>2021-03-23 17:13:17 +0100
commita799c2bd29d19c565f37fa038b31a0a1d44d0e4d (patch)
tree4f83ab3aa674911e59615c5378f46b8c6c68c224 /arch/mips/bcm63xx/dev-spi.c
parente14cfb3bdd0f82147d09e9f46bedda6302f28ee1 (diff)
x86/setup: Consolidate early memory reservations
The early reservations of memory areas used by the firmware, bootloader, kernel text and data are spread over setup_arch(). Moreover, some of them happen *after* memblock allocations, e.g trim_platform_memory_ranges() and trim_low_memory_range() are called after reserve_real_mode() that allocates memory. There was no corruption of these memory regions because memblock always allocates memory either from the end of memory (in top-down mode) or above the kernel image (in bottom-up mode). However, the bottom up mode is going to be updated to span the entire memory [1] to avoid limitations caused by KASLR. Consolidate early memory reservations in a dedicated function to improve robustness against future changes. Having the early reservations in one place also makes it clearer what memory must be reserved before memblock allocations are allowed. Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Baoquan He <bhe@redhat.com> Acked-by: Borislav Petkov <bp@suse.de> Acked-by: David Hildenbrand <david@redhat.com> Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-guro@fb.com Link: https://lkml.kernel.org/r/20210302100406.22059-2-rppt@kernel.org
Diffstat (limited to 'arch/mips/bcm63xx/dev-spi.c')
0 files changed, 0 insertions, 0 deletions