diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-10-27 01:04:51 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-27 02:25:20 +0300 |
commit | a811c05c16b53ff89e9cfc029ec77a0aae846881 (patch) | |
tree | 7b40710862cf4cb980051450606a0d04ec34cd92 /arch/nios2/kernel/setup.c | |
parent | 6072cf567a2be7f13fb3522156409ca0e7a27ff9 (diff) | |
download | linux-a811c05c16b53ff89e9cfc029ec77a0aae846881.tar.xz |
nios2: use generic early_init_dt_add_memory_arch
All we have to do is to enable memblock, the generic FDT code will take
care of the rest.
Link: http://lkml.kernel.org/r/1533326330-31677-4-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rob Herring <robh@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/nios2/kernel/setup.c')
-rw-r--r-- | arch/nios2/kernel/setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index 926a02b17b31..0946840ac3cd 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c @@ -17,6 +17,7 @@ #include <linux/sched/task.h> #include <linux/console.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/initrd.h> #include <linux/of_fdt.h> #include <linux/screen_info.h> @@ -147,6 +148,7 @@ void __init setup_arch(char **cmdline_p) console_verbose(); + memory_size = memblock_phys_mem_size(); memory_start = PAGE_ALIGN((unsigned long)__pa(_end)); memory_end = (unsigned long) CONFIG_NIOS2_MEM_BASE + memory_size; |