2019-06-03 13:44:50 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 19:49:27 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_SPARSEMEM_H
|
|
|
|
#define __ASM_SPARSEMEM_H
|
|
|
|
|
2017-12-14 01:07:16 +08:00
|
|
|
#define MAX_PHYSMEM_BITS CONFIG_ARM64_PA_BITS
|
2021-01-21 13:29:13 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Section size must be at least 512MB for 64K base
|
|
|
|
* page size config. Otherwise it will be less than
|
2023-03-15 19:31:33 +08:00
|
|
|
* MAX_ORDER and the build process will fail.
|
2021-01-21 13:29:13 +08:00
|
|
|
*/
|
|
|
|
#ifdef CONFIG_ARM64_64K_PAGES
|
|
|
|
#define SECTION_SIZE_BITS 29
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Section size must be at least 128MB for 4K base
|
|
|
|
* page size config. Otherwise PMD based huge page
|
|
|
|
* entries could not be created for vmemmap mappings.
|
|
|
|
* 16K follows 4K for simplicity.
|
|
|
|
*/
|
|
|
|
#define SECTION_SIZE_BITS 27
|
|
|
|
#endif /* CONFIG_ARM64_64K_PAGES */
|
|
|
|
|
2012-03-05 19:49:27 +08:00
|
|
|
#endif
|