@@ -88,7 +88,7 @@ static void alloc_init_l3(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
8888 /* Attach the L2 PTE to this L3 page table */
8989 * l2pte = __pa ((addr_t ) l3pgtable ) & TTB_L2_TABLE_ADDR_MASK ;
9090
91- #ifdef CONFIG_ARM64VT
91+ #ifdef CONFIG_AVZ
9292 if (stage == S1 )
9393 set_pte_table (l2pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
9494 else
@@ -105,7 +105,7 @@ static void alloc_init_l3(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
105105
106106 * l3pte = phys & TTB_L3_PAGE_ADDR_MASK ;
107107
108- #ifdef CONFIG_ARM64VT
108+ #ifdef CONFIG_AVZ
109109 if (stage == S1 )
110110 set_pte_page (l3pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
111111 else
@@ -161,7 +161,7 @@ static void alloc_init_l2(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
161161 /* Attach the L1 PTE to this L2 page table */
162162 * l1pte = __pa ((addr_t ) l2pgtable ) & TTB_L1_TABLE_ADDR_MASK ;
163163
164- #ifdef CONFIG_ARM64VT
164+ #ifdef CONFIG_AVZ
165165 if (stage == S1 )
166166 set_pte_table (l1pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
167167 else
@@ -183,7 +183,7 @@ static void alloc_init_l2(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
183183 if (((addr | next | phys ) & ~BLOCK_2M_MASK ) == 0 ) {
184184 * l2pte = phys & TTB_L2_BLOCK_ADDR_MASK ;
185185
186- #ifdef CONFIG_ARM64VT
186+ #ifdef CONFIG_AVZ
187187 if (stage == S1 )
188188 set_pte_block (l2pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
189189 else
@@ -239,7 +239,7 @@ static void alloc_init_l1(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
239239
240240 /* Attach the L0 PTE to this L1 page table */
241241 * l0pte = __pa ((addr_t ) l1pgtable ) & TTB_L0_TABLE_ADDR_MASK ;
242- #ifdef CONFIG_ARM64VT
242+ #ifdef CONFIG_AVZ
243243 if (stage == S1 )
244244 set_pte_table (l0pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
245245 else
@@ -260,7 +260,7 @@ static void alloc_init_l1(u64 *l0pgtable, addr_t addr, addr_t end, addr_t phys,
260260
261261 if (((addr | next | phys ) & ~BLOCK_1G_MASK ) == 0 ) {
262262 * l1pte = phys & TTB_L1_BLOCK_ADDR_MASK ;
263- #ifdef CONFIG_ARM64VT
263+ #ifdef CONFIG_AVZ
264264 if (stage == S1 )
265265 set_pte_block (l1pte , (nocache ? DCACHE_OFF : DCACHE_WRITEALLOC ));
266266 else
@@ -712,9 +712,6 @@ void __mmu_switch_kernel(void *pgtable_paddr, bool vttbr)
712712 if (vttbr )
713713 __mmu_switch_vttbr (pgtable_paddr );
714714 else
715- #endif
716-
717- #ifdef CONFIG_ARM64VT
718715 __mmu_switch_ttbr0 (pgtable_paddr );
719716#else
720717 __mmu_switch_ttbr1 (pgtable_paddr );
@@ -968,6 +965,7 @@ addr_t virt_to_phys_pt(addr_t vaddr)
968965
969966 l1pte = l1pte_offset (l0pte , vaddr );
970967 BUG_ON (!* l1pte );
968+
971969#elif CONFIG_VA_BITS_39
972970 if (user_space_vaddr (vaddr ))
973971 l1pte = l1pte_offset ((u64 * ) current_pgtable (), vaddr );
@@ -1000,7 +998,6 @@ addr_t virt_to_phys_pt(addr_t vaddr)
1000998
1001999#ifdef CONFIG_AVZ
10021000
1003- #ifdef CONFIG_ARM64VT
10041001/**
10051002 * Perform a mapping of IPA regions to physical regions
10061003 *
@@ -1017,4 +1014,3 @@ void do_ipamap(void *pgtable, ipamap_t ipamap[], int nbelement)
10171014
10181015#endif /* CONFIG_AVZ */
10191016
1020- #endif
0 commit comments