Changeset fc1e4f6 in mainline for generic/src/mm/page.c


Ignore:
Timestamp:
2006-01-31T00:44:08Z (19 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.