Changeset ef67bab in mainline for genarch/src/mm/page_ht.c


Ignore:
Timestamp:
2006-02-01T00:02:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
071a8ae6
Parents:
fc1e4f6
Message:

Memory management work.
Remove the last (i.e. 'root') argument from page_mapping_insert() and page_mapping_find().
Page table address is now extracted from the first (i.e. 'as') argument.
Add a lot of infrastructure to make the above possible.
sparc64 is now broken, most likely because of insufficient identity mapping of physical memory.

File:
1 edited

Legend:

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

    rfc1e4f6 ref67bab  
    3939#include <arch.h>
    4040#include <debug.h>
     41#include <memstr.h>
    4142
    4243/**
    43  * This lock protects the page hash table. Note that software must
    44  * be still careful about ordering of writes to ensure consistent
    45  * view of the page hash table for hardware helpers such as VHPT
    46  * walker on ia64.
     44 * This lock protects the page hash table.
    4745 */
    4846SPINLOCK_INITIALIZE(page_ht_lock);
     
    5452pte_t *page_ht = NULL;
    5553
    56 static void ht_mapping_insert(as_t *as, __address page, __address frame, int flags, __address root);
    57 static pte_t *ht_mapping_find(as_t *as, __address page, __address root);
     54static void ht_mapping_insert(as_t *as, __address page, __address frame, int flags);
     55static pte_t *ht_mapping_find(as_t *as, __address page);
    5856
    5957page_operations_t page_ht_operations = {
    6058        .mapping_insert = ht_mapping_insert,
    61         .mapping_find = ht_mapping_find
     59        .mapping_find = ht_mapping_find,
    6260};
    6361
     
    6563 *
    6664 * Map virtual address 'page' to physical address 'frame'
    67  * using 'flags'. In order not to disturb hardware searching,
    68  * new mappings are appended to the end of the collision
    69  * chain.
     65 * using 'flags'.
    7066 *
    71  * @param as Address space to which page belongs. Must be locked prior the call.
     67 * The address space must be locked and interruptsmust be disabled.
     68 *
     69 * @param as Address space to which page belongs.
    7270 * @param page Virtual address of the page to be mapped.
    7371 * @param frame Physical address of memory frame to which the mapping is done.
    7472 * @param flags Flags to be used for mapping.
    75  * @param root Ignored.
    7673 */
    77 void ht_mapping_insert(as_t *as, __address page, __address frame, int flags, __address root)
     74void ht_mapping_insert(as_t *as, __address page, __address frame, int flags)
    7875{
    7976        pte_t *t, *u;
     
    122119 * Find mapping for virtual page.
    123120 *
    124  * Interrupts must be disabled.
     121 * The address space must be locked and interrupts must be disabled.
    125122 *
    126  * @param as Address space to wich page belongs. Must be locked prior the call.
     123 * @param as Address space to wich page belongs.
    127124 * @param page Virtual page.
    128  * @param root Ignored.
    129125 *
    130126 * @return NULL if there is no such mapping; requested mapping otherwise.
    131127 */
    132 pte_t *ht_mapping_find(as_t *as, __address page, __address root)
     128pte_t *ht_mapping_find(as_t *as, __address page)
    133129{
    134130        pte_t *t;
Note: See TracChangeset for help on using the changeset viewer.