summaryrefslogtreecommitdiff
path: root/arch/xtensa/include/asm/sysmem.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-03-23 03:17:43 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-04-02 01:35:51 +0400
commit9ba067f93f1eec0d241f002812806b873dd4f802 (patch)
tree423c136a38f9290bf8fba0ede928f9bc8e9bc3a8 /arch/xtensa/include/asm/sysmem.h
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/include/asm/sysmem.h')
-rw-r--r--arch/xtensa/include/asm/sysmem.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/xtensa/include/asm/sysmem.h b/arch/xtensa/include/asm/sysmem.h
new file mode 100644
index 000000000000..fe7ad750a158
--- /dev/null
+++ b/arch/xtensa/include/asm/sysmem.h
@@ -0,0 +1,33 @@
+/*
+ * sysmem-related prototypes.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2014 Cadence Design Systems Inc.
+ */
+
+#ifndef _XTENSA_SYSMEM_H
+#define _XTENSA_SYSMEM_H
+
+#define SYSMEM_BANKS_MAX 31
+
+struct meminfo {
+ unsigned long start;
+ unsigned long end;
+};
+
+struct sysmem_info {
+ int nr_banks;
+ struct meminfo bank[SYSMEM_BANKS_MAX];
+};
+
+extern struct sysmem_info sysmem;
+
+int add_sysmem_bank(unsigned long start, unsigned long end);
+int mem_reserve(unsigned long, unsigned long, int);
+void bootmem_init(void);
+void zones_init(void);
+
+#endif /* _XTENSA_SYSMEM_H */