Changeset c72dc15 in mainline
- Timestamp:
- 2011-12-14T23:57:25Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b71e84d
- Parents:
- 1b478f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/page_pt.c
r1b478f6 rc72dc15 39 39 #include <mm/page.h> 40 40 #include <mm/frame.h> 41 #include <mm/km.h> 41 42 #include <mm/as.h> 42 43 #include <arch/mm/page.h> … … 153 154 154 155 /* 155 * Second, free all empty tables along the way from PTL3 down to PTL0 .156 * 156 * Second, free all empty tables along the way from PTL3 down to PTL0 157 * except those needed for sharing the kernel non-identity mappings. 157 158 */ 158 159 … … 171 172 /* 172 173 * PTL3 is empty. 173 * Release the frame and remove PTL3 pointer from preceding table. 174 * 175 */ 176 frame_free(KA2PA((uintptr_t) ptl3)); 174 * Release the frame and remove PTL3 pointer from the parent 175 * table. 176 */ 177 177 #if (PTL2_ENTRIES != 0) 178 178 memsetb(&ptl2[PTL2_INDEX(page)], sizeof(pte_t), 0); … … 180 180 memsetb(&ptl1[PTL1_INDEX(page)], sizeof(pte_t), 0); 181 181 #else 182 if (km_is_non_identity(page)) 183 return; 184 182 185 memsetb(&ptl0[PTL0_INDEX(page)], sizeof(pte_t), 0); 183 186 #endif 187 frame_free(KA2PA((uintptr_t) ptl3)); 184 188 } else { 185 189 /* … … 204 208 /* 205 209 * PTL2 is empty. 206 * Release the frame and remove PTL2 pointer from preceding table. 207 * 208 */ 209 frame_free(KA2PA((uintptr_t) ptl2)); 210 * Release the frame and remove PTL2 pointer from the parent 211 * table. 212 */ 210 213 #if (PTL1_ENTRIES != 0) 211 214 memsetb(&ptl1[PTL1_INDEX(page)], sizeof(pte_t), 0); 212 215 #else 216 if (km_is_non_identity(page)) 217 return; 218 213 219 memsetb(&ptl0[PTL0_INDEX(page)], sizeof(pte_t), 0); 214 220 #endif 221 frame_free(KA2PA((uintptr_t) ptl2)); 215 222 } else { 216 223 /* … … 236 243 /* 237 244 * PTL1 is empty. 238 * Release the frame and remove PTL1 pointer from preceding table. 239 * 240 */ 245 * Release the frame and remove PTL1 pointer from the parent 246 * table. 247 */ 248 if (km_is_non_identity(page)) 249 return; 250 251 memsetb(&ptl0[PTL0_INDEX(page)], sizeof(pte_t), 0); 241 252 frame_free(KA2PA((uintptr_t) ptl1)); 242 memsetb(&ptl0[PTL0_INDEX(page)], sizeof(pte_t), 0);243 253 } 244 254 #endif /* PTL1_ENTRIES != 0 */
Note:
See TracChangeset
for help on using the changeset viewer.