Changeset fc1e4f6 in mainline for generic/src/mm


Ignore:
Timestamp:
2006-01-31T00:44:08Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef67bab
Parents:
6a3c9a7
Message:

Change page_mapping_find/insert interfaces to take as_t * as first argument
and not asid_t as second argument. This change was necessitated by the
removal of mapping array from as_area_t and the fact that an address
space doesn't have an ASID when it is created.

Location:
generic/src/mm
Files:
2 edited

Legend:

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

    r6a3c9a7 rfc1e4f6  
    7777                list_initialize(&as->as_area_head);
    7878
    79                 if (flags & AS_KERNEL)
     79                if (flags & FLAG_AS_KERNEL)
    8080                        as->asid = ASID_KERNEL;
    8181                else
     
    187187         */
    188188       
    189         page_mapping_insert(page, as->asid, frame, get_area_flags(area), (__address) as->ptl0);
     189        page_mapping_insert(as, page, frame, get_area_flags(area), (__address) as->ptl0);
    190190       
    191191        spinlock_unlock(&area->lock);
     
    267267         * inserted into page tables.
    268268         */
    269         page_mapping_insert(page, AS->asid, frame, get_area_flags(area), (__address) AS->ptl0);
     269        page_mapping_insert(AS, page, frame, get_area_flags(area), (__address) AS->ptl0);
    270270       
    271271        spinlock_unlock(&area->lock);
  • generic/src/mm/page.c

    r6a3c9a7 rfc1e4f6  
    3434#include <arch/mm/page.h>
    3535#include <arch/mm/asid.h>
    36 #include <mm/asid.h>
     36#include <mm/as.h>
    3737#include <mm/frame.h>
    3838#include <arch/types.h>
     
    4949{
    5050        page_arch_init();
    51         page_mapping_insert(0x0, 0, 0x0, PAGE_NOT_PRESENT, 0);
     51        page_mapping_insert(AS_KERNEL, 0x0, 0x0, PAGE_NOT_PRESENT, 0);
    5252}
    5353
     
    6969
    7070        for (i = 0; i < cnt; i++)
    71                 page_mapping_insert(s + i*PAGE_SIZE, ASID_KERNEL, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
     71                page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
    7272
    7373}
     
    7878 * using 'flags'. Allocate and setup any missing page tables.
    7979 *
     80 * @param as Address space to wich page belongs. Must be locked prior the call.
    8081 * @param page Virtual address of the page to be mapped.
    81  * @param asid Address space to wich page belongs.
    8282 * @param frame Physical address of memory frame to which the mapping is done.
    8383 * @param flags Flags to be used for mapping.
    8484 * @param root Explicit PTL0 address.
    8585 */
    86 void page_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root)
     86void page_mapping_insert(as_t *as, __address page, __address frame, int flags, __address root)
    8787{
    8888        ASSERT(page_operations);
    8989        ASSERT(page_operations->mapping_insert);
    9090       
    91         page_operations->mapping_insert(page, asid, frame, flags, root);
     91        page_operations->mapping_insert(as, page, frame, flags, root);
    9292}
    9393
     
    9696 * Find mapping for virtual page.
    9797 *
     98 * @param as Address space to wich page belongs must be locked prior the call.
    9899 * @param page Virtual page.
    99  * @param asid Address space to wich page belongs.
    100100 * @param root PTL0 address if non-zero.
    101101 *
    102102 * @return NULL if there is no such mapping; requested mapping otherwise.
    103103 */
    104 pte_t *page_mapping_find(__address page,  asid_t asid, __address root)
     104pte_t *page_mapping_find(as_t *as, __address page, __address root)
    105105{
    106106        ASSERT(page_operations);
    107107        ASSERT(page_operations->mapping_find);
    108108
    109         return page_operations->mapping_find(page, asid, root);
     109        return page_operations->mapping_find(as, page, root);
    110110}
Note: See TracChangeset for help on using the changeset viewer.