Linux-libre 4.14.145-gnu
[librecmc/linux-libre.git] / arch / arm64 / include / asm / stage2_pgtable-nopmd.h
1 /*
2  * Copyright (C) 2016 - ARM Ltd
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  */
16
17 #ifndef __ARM64_S2_PGTABLE_NOPMD_H_
18 #define __ARM64_S2_PGTABLE_NOPMD_H_
19
20 #include <asm/stage2_pgtable-nopud.h>
21
22 #define __S2_PGTABLE_PMD_FOLDED
23
24 #define S2_PMD_SHIFT            S2_PUD_SHIFT
25 #define S2_PTRS_PER_PMD         1
26 #define S2_PMD_SIZE             (1UL << S2_PMD_SHIFT)
27 #define S2_PMD_MASK             (~(S2_PMD_SIZE-1))
28
29 #define stage2_pud_none(pud)                    (0)
30 #define stage2_pud_present(pud)                 (1)
31 #define stage2_pud_clear(pud)                   do { } while (0)
32 #define stage2_pud_populate(pud, pmd)           do { } while (0)
33 #define stage2_pmd_offset(pud, address)         ((pmd_t *)(pud))
34
35 #define stage2_pmd_free(pmd)                    do { } while (0)
36
37 #define stage2_pmd_addr_end(addr, end)          (end)
38
39 #define stage2_pud_huge(pud)                    (0)
40 #define stage2_pmd_table_empty(pmdp)            (0)
41
42 #endif