Changeset ee289cf0 in mainline
- Timestamp:
- 2006-08-18T10:44:47Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f47fd19
- Parents:
- f9a56c0
- Location:
- kernel/arch/ia64/src/mm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/tlb.c
rf9a56c0 ree289cf0 27 27 */ 28 28 29 29 /** @addtogroup ia64mm 30 30 * @{ 31 31 */ … … 57 57 void tlb_invalidate_all(void) 58 58 { 59 60 61 59 ipl_t ipl; 60 uintptr_t adr; 61 uint32_t count1, count2, stride1, stride2; 62 62 63 int i,j;63 int i, j; 64 64 65 66 67 68 69 65 adr = PAL_PTCE_INFO_BASE(); 66 count1 = PAL_PTCE_INFO_COUNT1(); 67 count2 = PAL_PTCE_INFO_COUNT2(); 68 stride1 = PAL_PTCE_INFO_STRIDE1(); 69 stride2 = PAL_PTCE_INFO_STRIDE2(); 70 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 71 ipl = interrupts_disable(); 72 73 for(i = 0; i < count1; i++) { 74 for(j = 0; j < count2; j++) { 75 __asm__ volatile ( 76 "ptc.e %0 ;;" 77 : 78 : "r" (adr) 79 ); 80 adr += stride2; 81 } 82 adr += stride1; 83 } 84 85 interrupts_restore(ipl); 86 87 srlz_d(); 88 srlz_i(); 89 89 #ifdef CONFIG_VHPT 90 90 vhpt_invalidate_all(); 91 91 #endif 92 92 } … … 133 133 134 134 switch (b) { 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 135 case 0: /*cnt 1-3*/ 136 ps = PAGE_WIDTH; 137 break; 138 case 1: /*cnt 4-15*/ 139 /*cnt=((cnt-1)/4)+1;*/ 140 ps = PAGE_WIDTH+2; 141 va &= ~((1<<ps)-1); 142 break; 143 case 2: /*cnt 16-63*/ 144 /*cnt=((cnt-1)/16)+1;*/ 145 ps = PAGE_WIDTH+4; 146 va &= ~((1<<ps)-1); 147 break; 148 case 3: /*cnt 64-255*/ 149 /*cnt=((cnt-1)/64)+1;*/ 150 ps = PAGE_WIDTH+6; 151 va &= ~((1<<ps)-1); 152 break; 153 case 4: /*cnt 256-1023*/ 154 /*cnt=((cnt-1)/256)+1;*/ 155 ps = PAGE_WIDTH+8; 156 va &= ~((1<<ps)-1); 157 break; 158 case 5: /*cnt 1024-4095*/ 159 /*cnt=((cnt-1)/1024)+1;*/ 160 ps = PAGE_WIDTH+10; 161 va &= ~((1<<ps)-1); 162 break; 163 case 6: /*cnt 4096-16383*/ 164 /*cnt=((cnt-1)/4096)+1;*/ 165 ps = PAGE_WIDTH+12; 166 va &= ~((1<<ps)-1); 167 break; 168 case 7: /*cnt 16384-65535*/ 169 case 8: /*cnt 65536-(256K-1)*/ 170 /*cnt=((cnt-1)/16384)+1;*/ 171 ps = PAGE_WIDTH+14; 172 va &= ~((1<<ps)-1); 173 break; 174 default: 175 /*cnt=((cnt-1)/(16384*16))+1;*/ 176 ps=PAGE_WIDTH+18; 177 va&=~((1<<ps)-1); 178 break; 179 179 } 180 180 /*cnt+=(page!=va);*/ … … 686 686 } 687 687 688 /** @} 689 */ 690 688 /** @} 689 */ -
kernel/arch/ia64/src/mm/vhpt.c
rf9a56c0 ree289cf0 27 27 */ 28 28 29 29 /** @addtogroup ia64mm 30 30 * @{ 31 31 */ … … 93 93 } 94 94 95 96 97 /** @} 95 /** @} 98 96 */ 99
Note:
See TracChangeset
for help on using the changeset viewer.