| Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| Chad Reese | b1c231f | 2006-05-30 17:16:49 -0700 | [diff] [blame] | 2 | #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 Daney | aa1762f | 2012-10-17 00:48:10 +0200 | [diff] [blame] | 10 | #if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB) |
| David Daney | 85f993b | 2012-05-04 11:09:35 -0700 | [diff] [blame] | 11 | # define SECTION_SIZE_BITS 29 |
| 12 | #else |
| 13 | # define SECTION_SIZE_BITS 28 |
| 14 | #endif |
| Huacai Chen | c461731 | 2014-06-26 11:41:28 +0800 | [diff] [blame] | 15 | #define MAX_PHYSMEM_BITS 48 |
| Chad Reese | b1c231f | 2006-05-30 17:16:49 -0700 | [diff] [blame] | 16 | |
| 17 | #endif /* CONFIG_SPARSEMEM */ |
| 18 | #endif /* _MIPS_SPARSEMEM_H */ |