.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * VM ops |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Copyright (C) 2006 Atmark Techno, Inc. |
---|
7 | 8 | * Changes for MMU support: |
---|
8 | 9 | * Copyright (C) 2007 Xilinx, Inc. All rights reserved. |
---|
9 | | - * |
---|
10 | | - * This file is subject to the terms and conditions of the GNU General Public |
---|
11 | | - * License. See the file "COPYING" in the main directory of this archive |
---|
12 | | - * for more details. |
---|
13 | 10 | */ |
---|
14 | 11 | |
---|
15 | 12 | #ifndef _ASM_MICROBLAZE_PAGE_H |
---|
.. | .. |
---|
90 | 87 | typedef struct { unsigned long pgprot; } pgprot_t; |
---|
91 | 88 | /* FIXME this can depend on linux kernel version */ |
---|
92 | 89 | # ifdef CONFIG_MMU |
---|
93 | | -typedef struct { unsigned long pmd; } pmd_t; |
---|
94 | 90 | typedef struct { unsigned long pgd; } pgd_t; |
---|
95 | 91 | # else /* CONFIG_MMU */ |
---|
96 | 92 | typedef struct { unsigned long ste[64]; } pmd_t; |
---|
.. | .. |
---|
103 | 99 | # define pgprot_val(x) ((x).pgprot) |
---|
104 | 100 | |
---|
105 | 101 | # ifdef CONFIG_MMU |
---|
106 | | -# define pmd_val(x) ((x).pmd) |
---|
107 | 102 | # define pgd_val(x) ((x).pgd) |
---|
108 | 103 | # else /* CONFIG_MMU */ |
---|
109 | 104 | # define pmd_val(x) ((x).ste[0]) |
---|
.. | .. |
---|
112 | 107 | # endif /* CONFIG_MMU */ |
---|
113 | 108 | |
---|
114 | 109 | # define __pte(x) ((pte_t) { (x) }) |
---|
115 | | -# define __pmd(x) ((pmd_t) { (x) }) |
---|
116 | 110 | # define __pgd(x) ((pgd_t) { (x) }) |
---|
117 | 111 | # define __pgprot(x) ((pgprot_t) { (x) }) |
---|
118 | 112 | |
---|
.. | .. |
---|
168 | 162 | # define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) |
---|
169 | 163 | # else /* CONFIG_MMU */ |
---|
170 | 164 | # define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT) |
---|
171 | | -# define pfn_valid(pfn) ((pfn) < (max_mapnr + ARCH_PFN_OFFSET)) |
---|
| 165 | +# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \ |
---|
| 166 | + (pfn) < (max_mapnr + ARCH_PFN_OFFSET)) |
---|
172 | 167 | # endif /* CONFIG_MMU */ |
---|
173 | 168 | |
---|
174 | 169 | # endif /* __ASSEMBLY__ */ |
---|
.. | .. |
---|
200 | 195 | |
---|
201 | 196 | #ifdef CONFIG_MMU |
---|
202 | 197 | |
---|
203 | | -#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
---|
204 | | - VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
---|
205 | 198 | #endif /* CONFIG_MMU */ |
---|
206 | 199 | |
---|
207 | 200 | #endif /* __KERNEL__ */ |
---|