blob: b0686ca3d8bfd7aa569597ef171b1ee36a2381ac [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Chad Reeseb1c231f2006-05-30 17:16:49 -07002#ifndef _MIPS_SPARSEMEM_H
3#define _MIPS_SPARSEMEM_H
4#ifdef CONFIG_SPARSEMEM
5
6/*
7 * SECTION_SIZE_BITS 2^N: how big each section will be
8 * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space
9 */
David Daneyaa1762f2012-10-17 00:48:10 +020010#if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB)
David Daney85f993b2012-05-04 11:09:35 -070011# define SECTION_SIZE_BITS 29
12#else
13# define SECTION_SIZE_BITS 28
14#endif
Huacai Chenc4617312014-06-26 11:41:28 +080015#define MAX_PHYSMEM_BITS 48
Chad Reeseb1c231f2006-05-30 17:16:49 -070016
17#endif /* CONFIG_SPARSEMEM */
18#endif /* _MIPS_SPARSEMEM_H */