aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2018-08-31 18:28:57 -0400
committerPaul Burton <paul.burton@mips.com>2018-08-31 18:28:57 -0400
commit52c985acf3fe95bd7b842bace8134971f0f431a2 (patch)
treefd4cb4af5da05f0a0c3054105a2e82322dd4984f /arch/mips/kernel
parent4988154211adfd688bf7f3f7eb1691608083a1f9 (diff)
MIPS: Move arch_mem_init() comment near definition
The comment describing arch_mem_init() was separated from the definition of arch_mem_init() by commit a09fc446fb6d ("[MIPS] setup.c: use early_param() for early command line parsing"). Move the comment such that it's next to the definition again for ease of reading. Signed-off-by: Paul Burton <paul.burton@mips.com>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/setup.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index c71d1eb7da59..32fc11d72ad3 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -642,29 +642,6 @@ static void __init bootmem_init(void)
642 642
643#endif /* CONFIG_SGI_IP27 */ 643#endif /* CONFIG_SGI_IP27 */
644 644
645/*
646 * arch_mem_init - initialize memory management subsystem
647 *
648 * o plat_mem_setup() detects the memory configuration and will record detected
649 * memory areas using add_memory_region.
650 *
651 * At this stage the memory configuration of the system is known to the
652 * kernel but generic memory management system is still entirely uninitialized.
653 *
654 * o bootmem_init()
655 * o sparse_init()
656 * o paging_init()
657 * o dma_contiguous_reserve()
658 *
659 * At this stage the bootmem allocator is ready to use.
660 *
661 * NOTE: historically plat_mem_setup did the entire platform initialization.
662 * This was rather impractical because it meant plat_mem_setup had to
663 * get away without any kind of memory allocator. To keep old code from
664 * breaking plat_setup was just renamed to plat_mem_setup and a second platform
665 * initialization hook for anything else was introduced.
666 */
667
668static int usermem __initdata; 645static int usermem __initdata;
669 646
670static int __init early_parse_mem(char *p) 647static int __init early_parse_mem(char *p)
@@ -841,6 +818,28 @@ static void __init request_crashkernel(struct resource *res)
841#define BUILTIN_EXTEND_WITH_PROM \ 818#define BUILTIN_EXTEND_WITH_PROM \
842 IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND) 819 IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND)
843 820
821/*
822 * arch_mem_init - initialize memory management subsystem
823 *
824 * o plat_mem_setup() detects the memory configuration and will record detected
825 * memory areas using add_memory_region.
826 *
827 * At this stage the memory configuration of the system is known to the
828 * kernel but generic memory management system is still entirely uninitialized.
829 *
830 * o bootmem_init()
831 * o sparse_init()
832 * o paging_init()
833 * o dma_contiguous_reserve()
834 *
835 * At this stage the bootmem allocator is ready to use.
836 *
837 * NOTE: historically plat_mem_setup did the entire platform initialization.
838 * This was rather impractical because it meant plat_mem_setup had to
839 * get away without any kind of memory allocator. To keep old code from
840 * breaking plat_setup was just renamed to plat_mem_setup and a second platform
841 * initialization hook for anything else was introduced.
842 */
844static void __init arch_mem_init(char **cmdline_p) 843static void __init arch_mem_init(char **cmdline_p)
845{ 844{
846 struct memblock_region *reg; 845 struct memblock_region *reg;