18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _MIPS_SPARSEMEM_H 38c2ecf20Sopenharmony_ci#define _MIPS_SPARSEMEM_H 48c2ecf20Sopenharmony_ci#ifdef CONFIG_SPARSEMEM 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* 78c2ecf20Sopenharmony_ci * SECTION_SIZE_BITS 2^N: how big each section will be 88c2ecf20Sopenharmony_ci * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB) 118c2ecf20Sopenharmony_ci# define SECTION_SIZE_BITS 29 128c2ecf20Sopenharmony_ci#else 138c2ecf20Sopenharmony_ci# define SECTION_SIZE_BITS 28 148c2ecf20Sopenharmony_ci#endif 158c2ecf20Sopenharmony_ci#define MAX_PHYSMEM_BITS 48 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#endif /* CONFIG_SPARSEMEM */ 188c2ecf20Sopenharmony_ci#endif /* _MIPS_SPARSEMEM_H */ 19