162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _MIPS_SPARSEMEM_H
362306a36Sopenharmony_ci#define _MIPS_SPARSEMEM_H
462306a36Sopenharmony_ci#ifdef CONFIG_SPARSEMEM
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci/*
762306a36Sopenharmony_ci * SECTION_SIZE_BITS		2^N: how big each section will be
862306a36Sopenharmony_ci * MAX_PHYSMEM_BITS		2^N: how much memory we can have in that space
962306a36Sopenharmony_ci */
1062306a36Sopenharmony_ci#if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB)
1162306a36Sopenharmony_ci# define SECTION_SIZE_BITS	29
1262306a36Sopenharmony_ci#else
1362306a36Sopenharmony_ci# define SECTION_SIZE_BITS	28
1462306a36Sopenharmony_ci#endif
1562306a36Sopenharmony_ci#define MAX_PHYSMEM_BITS	48
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#endif /* CONFIG_SPARSEMEM */
1862306a36Sopenharmony_ci#endif /* _MIPS_SPARSEMEM_H */
19