diff options
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 44f385a3eb3f..2ba1530d1ce1 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -176,14 +176,35 @@ void adjust_cr(unsigned long mask, unsigned long set) | |||
176 | } | 176 | } |
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | #define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_WRITE | ||
180 | #define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_XN|PMD_SECT_AP_WRITE | ||
181 | |||
179 | static struct mem_type mem_types[] = { | 182 | static struct mem_type mem_types[] = { |
180 | [MT_DEVICE] = { | 183 | [MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */ |
181 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 184 | .prot_pte = PROT_PTE_DEVICE, |
182 | L_PTE_WRITE, | 185 | .prot_l1 = PMD_TYPE_TABLE, |
183 | .prot_l1 = PMD_TYPE_TABLE, | 186 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_UNCACHED, |
184 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_UNCACHED | | 187 | .domain = DOMAIN_IO, |
185 | PMD_SECT_AP_WRITE, | 188 | }, |
186 | .domain = DOMAIN_IO, | 189 | [MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */ |
190 | .prot_pte = PROT_PTE_DEVICE, | ||
191 | .prot_pte_ext = PTE_EXT_TEX(2), | ||
192 | .prot_l1 = PMD_TYPE_TABLE, | ||
193 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_TEX(2), | ||
194 | .domain = DOMAIN_IO, | ||
195 | }, | ||
196 | [MT_DEVICE_CACHED] = { /* ioremap_cached */ | ||
197 | .prot_pte = PROT_PTE_DEVICE | L_PTE_CACHEABLE | L_PTE_BUFFERABLE, | ||
198 | .prot_l1 = PMD_TYPE_TABLE, | ||
199 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB, | ||
200 | .domain = DOMAIN_IO, | ||
201 | }, | ||
202 | [MT_DEVICE_IXP2000] = { /* IXP2400 requires XCB=101 for on-chip I/O */ | ||
203 | .prot_pte = PROT_PTE_DEVICE, | ||
204 | .prot_l1 = PMD_TYPE_TABLE, | ||
205 | .prot_sect = PROT_SECT_DEVICE | PMD_SECT_BUFFERABLE | | ||
206 | PMD_SECT_TEX(1), | ||
207 | .domain = DOMAIN_IO, | ||
187 | }, | 208 | }, |
188 | [MT_CACHECLEAN] = { | 209 | [MT_CACHECLEAN] = { |
189 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | 210 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, |
@@ -213,21 +234,6 @@ static struct mem_type mem_types[] = { | |||
213 | .prot_sect = PMD_TYPE_SECT, | 234 | .prot_sect = PMD_TYPE_SECT, |
214 | .domain = DOMAIN_KERNEL, | 235 | .domain = DOMAIN_KERNEL, |
215 | }, | 236 | }, |
216 | [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ | ||
217 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | ||
218 | L_PTE_WRITE, | ||
219 | .prot_l1 = PMD_TYPE_TABLE, | ||
220 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_UNCACHED | | ||
221 | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | | ||
222 | PMD_SECT_TEX(1), | ||
223 | .domain = DOMAIN_IO, | ||
224 | }, | ||
225 | [MT_NONSHARED_DEVICE] = { | ||
226 | .prot_l1 = PMD_TYPE_TABLE, | ||
227 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_NONSHARED_DEV | | ||
228 | PMD_SECT_AP_WRITE, | ||
229 | .domain = DOMAIN_IO, | ||
230 | } | ||
231 | }; | 237 | }; |
232 | 238 | ||
233 | const struct mem_type *get_mem_type(unsigned int type) | 239 | const struct mem_type *get_mem_type(unsigned int type) |