Changeset f1d1f5d3 in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2006-09-17T20:10:10Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
57da95c
Parents:
06e1e95
Message:

Fix bug in mm/as.c:

  • as_area_destroy() should not work with AS but as

sparc64 work:

  • start implementing TSB support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r06e1e95 rf1d1f5d3  
    360360                                        i = (start_free - b) >> PAGE_WIDTH;
    361361                                        if (!used_space_remove(area, start_free, c - i))
    362                                                 panic("Could not remove used space.");
     362                                                panic("Could not remove used space.\n");
    363363                                } else {
    364364                                        /*
     
    390390                tlb_invalidate_pages(AS->asid, area->base + pages*PAGE_SIZE, area->pages - pages);
    391391                tlb_shootdown_finalize();
     392               
     393                /*
     394                 * Invalidate software translation caches (e.g. TSB on sparc64).
     395                 */
     396                as_invalidate_translation_cache(as, area->base + pages*PAGE_SIZE, area->pages - pages);
    392397        } else {
    393398                /*
     
    441446         * Start TLB shootdown sequence.
    442447         */
    443         tlb_shootdown_start(TLB_INVL_PAGES, AS->asid, area->base, area->pages);
     448        tlb_shootdown_start(TLB_INVL_PAGES, as->asid, area->base, area->pages);
    444449
    445450        /*
     
    464469                                                b + j*PAGE_SIZE, PTE_GET_FRAME(pte));
    465470                                }
    466                                 page_mapping_remove(as, b + j*PAGE_SIZE);
     471                                page_mapping_remove(as, b + j*PAGE_SIZE);                               
    467472                                page_table_unlock(as, false);
    468473                        }
     
    473478         * Finish TLB shootdown sequence.
    474479         */
    475         tlb_invalidate_pages(AS->asid, area->base, area->pages);
     480        tlb_invalidate_pages(as->asid, area->base, area->pages);
    476481        tlb_shootdown_finalize();
     482       
     483        /*
     484         * Invalidate potential software translation caches (e.g. TSB on sparc64).
     485         */
     486        as_invalidate_translation_cache(as, area->base, area->pages);
    477487       
    478488        btree_destroy(&area->used_space);
     
    488498         * Remove the empty area from address space.
    489499         */
    490         btree_remove(&AS->as_area_btree, base, NULL);
     500        btree_remove(&as->as_area_btree, base, NULL);
    491501       
    492502        free(area);
    493503       
    494         mutex_unlock(&AS->lock);
     504        mutex_unlock(&as->lock);
    495505        interrupts_restore(ipl);
    496506        return 0;
Note: See TracChangeset for help on using the changeset viewer.