aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/mm
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-03-22 19:17:43 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-04-01 17:35:51 -0400
commit9ba067f93f1eec0d241f002812806b873dd4f802 (patch)
tree423c136a38f9290bf8fba0ede928f9bc8e9bc3a8 /arch/xtensa/mm
parent25df8198f4b257cf6db4d4f000c53accfa9c28f8 (diff)
xtensa: split bootparam and kernel meminfo
Bootparam meminfo is a bootloader ABI, kernel meminfo is for the kernel bookkeeping, keep them separate. Kernel doesn't care of memory region types, so drop the type field and don't pass it to add_sysmem_bank. Move kernel sysmem structures and prototypes to asm/sysmem.h and sysmem variable and add_sysmem_bank to mm/init.c Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/mm')
-rw-r--r--arch/xtensa/mm/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index aff108df92d3..4f78264e8bd8 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -27,6 +27,23 @@
27#include <asm/bootparam.h> 27#include <asm/bootparam.h>
28#include <asm/page.h> 28#include <asm/page.h>
29#include <asm/sections.h> 29#include <asm/sections.h>
30#include <asm/sysmem.h>
31
32struct sysmem_info sysmem __initdata;
33
34int __init add_sysmem_bank(unsigned long start, unsigned long end)
35{
36 if (sysmem.nr_banks >= SYSMEM_BANKS_MAX) {
37 pr_warn("Ignoring memory bank 0x%08lx size %ldKB\n",
38 start, end - start);
39 return -EINVAL;
40 }
41 sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(start);
42 sysmem.bank[sysmem.nr_banks].end = end & PAGE_MASK;
43 sysmem.nr_banks++;
44
45 return 0;
46}
30 47
31/* 48/*
32 * mem_reserve(start, end, must_exist) 49 * mem_reserve(start, end, must_exist)