mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
9d4b52df4b
Rewrite add_sysmem_bank so that it keeps bank order and merges adjacent/overlapping banks. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
39 lines
850 B
C
39 lines
850 B
C
/*
|
|
* 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;
|
|
};
|
|
|
|
/*
|
|
* Bank array is sorted by .start.
|
|
* Banks don't overlap and there's at least one page gap
|
|
* between adjacent bank entries.
|
|
*/
|
|
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 */
|