Changeset 482826d in mainline for genarch/src


Ignore:
Timestamp:
2006-05-31T16:23:19Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39031cc
Parents:
343fc179
Message:

Function for destroying address space for which there is no other reference in the kernel.

Location:
genarch/src/mm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/mm/as_ht.c

    r343fc179 r482826d  
    4343
    4444static pte_t *ht_create(int flags);
     45static void ht_destroy(pte_t *page_table);
    4546
    4647static void ht_lock(as_t *as, bool lock);
     
    4950as_operations_t as_ht_operations = {
    5051        .page_table_create = ht_create,
     52        .page_table_destroy = ht_destroy,
    5153        .page_table_lock = ht_lock,
    5254        .page_table_unlock = ht_unlock,
     
    7072        }
    7173        return NULL;
     74}
     75
     76/** Destroy page table.
     77 *
     78 * Actually do nothing as the global page hash table is used.
     79 *
     80 * @param page_table This parameter is ignored.
     81 */
     82void ht_destroy(pte_t *page_table)
     83{
     84        /* No-op. */
    7285}
    7386
  • genarch/src/mm/as_pt.c

    r343fc179 r482826d  
    4545
    4646static pte_t *ptl0_create(int flags);
     47static void ptl0_destroy(pte_t *page_table);
    4748
    4849static void pt_lock(as_t *as, bool lock);
     
    5152as_operations_t as_pt_operations = {
    5253        .page_table_create = ptl0_create,
     54        .page_table_destroy = ptl0_destroy,
    5355        .page_table_lock = pt_lock,
    5456        .page_table_unlock = pt_unlock
     
    9597}
    9698
     99/** Destroy page table.
     100 *
     101 * Destroy PTL0, other levels are expected to be already deallocated.
     102 *
     103 * @param page_table Physical address of PTL0.
     104 */
     105void ptl0_destroy(pte_t *page_table)
     106{
     107        frame_free(ADDR2PFN((__address) page_table));
     108}
     109
    97110/** Lock page tables.
    98111 *
Note: See TracChangeset for help on using the changeset viewer.