1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef ASMARM_SPARSEMEM_H 3*4882a593Smuzhiyun #define ASMARM_SPARSEMEM_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <asm/memory.h> 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun /* 8*4882a593Smuzhiyun * Two definitions are required for sparsemem: 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * MAX_PHYSMEM_BITS: The number of physical address bits required 11*4882a593Smuzhiyun * to address the last byte of memory. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * SECTION_SIZE_BITS: The number of physical address bits to cover 14*4882a593Smuzhiyun * the maximum amount of memory in a section. 15*4882a593Smuzhiyun * 16*4882a593Smuzhiyun * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000, 17*4882a593Smuzhiyun * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26. 18*4882a593Smuzhiyun * 19*4882a593Smuzhiyun * These can be overridden in your mach/memory.h. 20*4882a593Smuzhiyun */ 21*4882a593Smuzhiyun #if !defined(MAX_PHYSMEM_BITS) || !defined(SECTION_SIZE_BITS) 22*4882a593Smuzhiyun #define MAX_PHYSMEM_BITS 36 23*4882a593Smuzhiyun #define SECTION_SIZE_BITS 28 24*4882a593Smuzhiyun #endif 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #endif 27