|
@@ -232,12 +232,16 @@ __setup("noalign", noalign_setup);
|
|
|
#endif /* ifdef CONFIG_CPU_CP15 / else */
|
|
#endif /* ifdef CONFIG_CPU_CP15 / else */
|
|
|
|
|
|
|
|
#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN
|
|
#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN
|
|
|
|
|
+#define PROT_PTE_S2_DEVICE PROT_PTE_DEVICE
|
|
|
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
|
|
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
|
|
|
|
|
|
|
|
static struct mem_type mem_types[] = {
|
|
static struct mem_type mem_types[] = {
|
|
|
[MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */
|
|
[MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */
|
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
|
|
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
|
|
|
L_PTE_SHARED,
|
|
L_PTE_SHARED,
|
|
|
|
|
+ .prot_pte_s2 = s2_policy(PROT_PTE_S2_DEVICE) |
|
|
|
|
|
+ s2_policy(L_PTE_S2_MT_DEV_SHARED) |
|
|
|
|
|
+ L_PTE_SHARED,
|
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
.prot_l1 = PMD_TYPE_TABLE,
|
|
|
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_S,
|
|
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_S,
|
|
|
.domain = DOMAIN_IO,
|
|
.domain = DOMAIN_IO,
|
|
@@ -508,7 +512,8 @@ static void __init build_mem_type_table(void)
|
|
|
cp = &cache_policies[cachepolicy];
|
|
cp = &cache_policies[cachepolicy];
|
|
|
vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
|
|
vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
|
|
|
s2_pgprot = cp->pte_s2;
|
|
s2_pgprot = cp->pte_s2;
|
|
|
- hyp_device_pgprot = s2_device_pgprot = mem_types[MT_DEVICE].prot_pte;
|
|
|
|
|
|
|
+ hyp_device_pgprot = mem_types[MT_DEVICE].prot_pte;
|
|
|
|
|
+ s2_device_pgprot = mem_types[MT_DEVICE].prot_pte_s2;
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* ARMv6 and above have extended page tables.
|
|
* ARMv6 and above have extended page tables.
|