Changes in kernel/arch/sparc64/src/mm/sun4v/as.c [8c2214e:ba50a34] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4v/as.c
r8c2214e rba50a34 1 1 /* 2 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2009 Pavel Rimsky4 3 * All rights reserved. 5 4 * … … 35 34 36 35 #include <arch/mm/as.h> 37 #include <arch/mm/pagesize.h>38 36 #include <arch/mm/tlb.h> 39 37 #include <genarch/mm/page_ht.h> … … 41 39 #include <debug.h> 42 40 #include <config.h> 43 #include <arch/sun4v/hypercall.h>44 41 45 42 #ifdef CONFIG_TSB … … 89 86 { 90 87 #ifdef CONFIG_TSB 91 size_t cnt = (TSB_ENTRY_COUNT * sizeof(tsb_entry_t)) >> FRAME_WIDTH;88 count_t cnt = (TSB_ENTRY_COUNT * sizeof(tsb_entry_t)) >> FRAME_WIDTH; 92 89 frame_free((uintptr_t) as->arch.tsb_description.tsb_base); 93 90 return cnt; … … 115 112 { 116 113 mmu_secondary_context_write(as->asid); 117 #ifdef CONFIG_TSB118 uintptr_t base = ALIGN_DOWN(config.base, 1 << KERNEL_PAGE_WIDTH);119 120 ASSERT(as->arch.tsb_description.tsb_base);121 uintptr_t tsb = PA2KA(as->arch.tsb_description.tsb_base);122 123 if (!overlaps(tsb, 8 * MMU_PAGE_SIZE, base, 1 << KERNEL_PAGE_WIDTH)) {124 /*125 * TSBs were allocated from memory not covered126 * by the locked 4M kernel DTLB entry. We need127 * to map both TSBs explicitly.128 */129 mmu_demap_page(tsb, 0, MMU_FLAG_DTLB);130 dtlb_insert_mapping(tsb, KA2PA(tsb), PAGESIZE_64K, true, true);131 }132 133 __hypercall_fast2(MMU_TSB_CTXNON0, 1, KA2PA(&(as->arch.tsb_description)));134 135 #endif136 114 } 137 115 … … 156 134 uintptr_t base = ALIGN_DOWN(config.base, 1 << KERNEL_PAGE_WIDTH); 157 135 158 ASSERT(as->arch. tsb_description.tsb_base);136 ASSERT(as->arch.itsb && as->arch.dtsb); 159 137 160 uintptr_t tsb = PA2KA(as->arch.tsb_description.tsb_base);138 uintptr_t tsb = (uintptr_t) as->arch.itsb; 161 139 162 140 if (!overlaps(tsb, 8 * MMU_PAGE_SIZE, base, 1 << KERNEL_PAGE_WIDTH)) { … … 166 144 * to demap the entry installed by as_install_arch(). 167 145 */ 168 __hypercall_fast3(MMU_UNMAP_PERM_ADDR, tsb, 0, MMU_FLAG_DTLB);146 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, tsb); 169 147 } 170 148 #endif
Note:
See TracChangeset
for help on using the changeset viewer.