Rev 980 | Rev 1044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 980 | Rev 983 | ||
---|---|---|---|
Line 401... | Line 401... | ||
401 | */ |
401 | */ |
402 | pte = page_mapping_find(as, area->base + i*PAGE_SIZE); |
402 | pte = page_mapping_find(as, area->base + i*PAGE_SIZE); |
403 | if (pte && PTE_VALID(pte)) { |
403 | if (pte && PTE_VALID(pte)) { |
404 | ASSERT(PTE_PRESENT(pte)); |
404 | ASSERT(PTE_PRESENT(pte)); |
405 | frame_free(ADDR2PFN(PTE_GET_FRAME(pte))); |
405 | frame_free(ADDR2PFN(PTE_GET_FRAME(pte))); |
- | 406 | page_mapping_remove(as, area->base + i*PAGE_SIZE); |
|
406 | } |
407 | } |
407 | page_mapping_remove(as, area->base + i*PAGE_SIZE); |
- | |
408 | } |
408 | } |
409 | /* |
409 | /* |
410 | * Invalidate TLB's. |
410 | * Invalidate TLB's. |
411 | */ |
411 | */ |
412 | tlb_shootdown_start(TLB_INVL_PAGES, AS->asid, area->base + pages*PAGE_SIZE, area->size - pages); |
412 | tlb_shootdown_start(TLB_INVL_PAGES, AS->asid, area->base + pages*PAGE_SIZE, area->size - pages); |
413 | tlb_invalidate_pages(AS->asid, area->base + pages*PAGE_SIZE, area->size - pages); |
413 | tlb_invalidate_pages(AS->asid, area->base + pages*PAGE_SIZE, area->size - pages); |
414 | tlb_shootdown_finalize(); |
414 | tlb_shootdown_finalize(); |
415 | } else { |
- | |
416 | /* |
415 | } |
417 | * Growing the area. |
- | |
418 | */ |
416 | |
419 | area->size = size; |
417 | area->size = pages; |
420 | } |
- | |
421 | 418 | ||
422 | spinlock_unlock(&area->lock); |
419 | spinlock_unlock(&area->lock); |
423 | spinlock_unlock(&as->lock); |
420 | spinlock_unlock(&as->lock); |
424 | interrupts_restore(ipl); |
421 | interrupts_restore(ipl); |
425 | 422 |