Changeset 7c98874 in mainline
- Timestamp:
- 2009-01-31T12:37:31Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 896ad9f
- Parents:
- ee79df74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/mm/tlb.c
ree79df74 r7c98874 152 152 bool found = false; 153 153 154 /* Find unused or colliding 155 PTE in PTEG */ 154 /* Find unused or colliding PTE in PTEG */ 156 155 for (i = 0; i < 8; i++) { 157 if ((!phte[base + i].v) || ((phte[base + i].vsid == vsid) && 158 (phte[base + i].api == api))) { 156 if ((!phte[base + i].v) || 157 ((phte[base + i].vsid == vsid) 158 && (phte[base + i].api == api) 159 && (phte[base + i].h == 0))) { 159 160 found = true; 160 161 break; … … 166 167 uint32_t base2 = (~hash & 0x3ff) << 3; 167 168 168 /* Find unused or colliding 169 PTE in PTEG */ 169 /* Find unused or colliding PTE in PTEG */ 170 170 for (i = 0; i < 8; i++) { 171 171 if ((!phte[base2 + i].v) || 172 ((phte[base2 + i].vsid == vsid) && 173 (phte[base2 + i].api == api))) { 172 ((phte[base2 + i].vsid == vsid) 173 && (phte[base2 + i].api == api) 174 && (phte[base2 + i].h == 1))) { 174 175 found = true; 175 176 base = base2; … … 179 180 } 180 181 181 if (!found) { 182 // TODO: A/C precedence groups 182 if (!found) 183 183 i = page % 8; 184 } 185 } 184 } 185 186 186 187 187 188 phte[base + i].v = 1; … … 223 224 bool found = false; 224 225 225 /* Find unused or colliding 226 PTE in PTEG */ 226 /* Find unused or colliding PTE in PTEG */ 227 227 for (i = 0; i < 8; i++) { 228 228 if ((!phte_physical[base + i].v) || 229 ((phte_physical[base + i].vsid == vsid) && 230 (phte_physical[base + i].api == api))) { 229 ((phte_physical[base + i].vsid == vsid) 230 && (phte_physical[base + i].api == api) 231 && (phte_physical[base + i].h == 0))) { 231 232 found = true; 232 233 break; … … 238 239 uint32_t base2 = (~hash & 0x3ff) << 3; 239 240 240 /* Find unused or colliding 241 PTE in PTEG */ 241 /* Find unused or colliding PTE in PTEG */ 242 242 for (i = 0; i < 8; i++) { 243 243 if ((!phte_physical[base2 + i].v) || 244 ((phte_physical[base2 + i].vsid == vsid) && 245 (phte_physical[base2 + i].api == api))) { 244 ((phte_physical[base2 + i].vsid == vsid) 245 && (phte_physical[base2 + i].api == api) 246 && (phte_physical[base2 + i].h == 1))) { 246 247 found = true; 247 248 base = base2; … … 252 253 253 254 if (!found) { 254 // TODO: A/C precedence groups255 255 i = page % 8; 256 base = base2; 257 h = 1; 256 258 } 257 259 }
Note:
See TracChangeset
for help on using the changeset viewer.