Changeset f5935ed in mainline


Ignore:
Timestamp:
2006-02-06T15:09:58Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
021d471
Parents:
c7ec94a4
Message:

Use hash_table_get_instance instead of list_get_instance.
Rename page_operations to page_mapping_operations.
Rename page_pt_operations to pt_mapping_operations.
Rename page_ht_operations to ht_mapping_operations.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/mm/page.c

    rc7ec94a4 rf5935ed  
    4444
    4545        if (config.cpu_active == 1) {
    46                 page_operations = &page_pt_operations;
     46                page_mapping_operations = &pt_mapping_operations;
    4747       
    4848                /*
  • arch/ia32/src/mm/page.c

    rc7ec94a4 rf5935ed  
    4848
    4949        if (config.cpu_active == 1) {
    50                 page_operations = &page_pt_operations;
     50                page_mapping_operations = &pt_mapping_operations;
    5151       
    5252                /*
  • arch/ia64/src/mm/page.c

    rc7ec94a4 rf5935ed  
    4848void page_arch_init(void)
    4949{
    50         page_operations = &page_ht_operations;
     50        page_mapping_operations = &ht_mapping_operations;
    5151        pk_disable();
    5252        set_environment();
  • arch/mips32/src/mm/page.c

    rc7ec94a4 rf5935ed  
    3333void page_arch_init(void)
    3434{
    35         page_operations = &page_pt_operations;
     35        page_mapping_operations = &pt_mapping_operations;
    3636}
  • arch/ppc32/src/mm/page.c

    rc7ec94a4 rf5935ed  
    3636void page_arch_init(void)
    3737{
    38         page_operations = &page_pt_operations;
     38        page_mapping_operations = &pt_mapping_operations;
    3939}
  • arch/sparc64/src/mm/frame.c

    rc7ec94a4 rf5935ed  
    3434{
    3535        /*
    36          * Workaround to prevent slab allocator from allocating fram 0,
    37          * which is not, at that time, mapped.
     36         * Workaround to prevent slab allocator from allocating frame 0,
     37         * which is not mapped by OFW.
    3838         */
    3939        frame_region_not_free(0, FRAME_SIZE);
  • arch/sparc64/src/mm/page.c

    rc7ec94a4 rf5935ed  
    3232void page_arch_init(void)
    3333{
    34         page_operations = &page_ht_operations;
     34        page_mapping_operations = &ht_mapping_operations;
    3535}
  • genarch/include/mm/page_ht.h

    rc7ec94a4 rf5935ed  
    5858};
    5959
    60 extern page_operations_t page_ht_operations;
     60extern page_mapping_operations_t ht_mapping_operations;
    6161extern spinlock_t page_ht_lock;
    62 
    6362extern hash_table_t page_ht;
    6463extern hash_table_operations_t ht_operations;
  • genarch/include/mm/page_pt.h

    rc7ec94a4 rf5935ed  
    8585#define SET_FRAME_FLAGS(ptl3, i, x)     SET_FRAME_FLAGS_ARCH(ptl3, i, x)
    8686
    87 extern page_operations_t page_pt_operations;
     87extern page_mapping_operations_t pt_mapping_operations;
    8888
    8989extern void page_mapping_insert_pt(as_t *as, __address page, __address frame, int flags);
  • genarch/src/mm/page_ht.c

    rc7ec94a4 rf5935ed  
    6868};
    6969
    70 page_operations_t page_ht_operations = {
     70/** Page mapping operations for page hash table architectures. */
     71page_mapping_operations_t ht_mapping_operations = {
    7172        .mapping_insert = ht_mapping_insert,
    7273        .mapping_find = ht_mapping_find
     
    120121         * Convert item to PTE.
    121122         */
    122         t = list_get_instance(item, pte_t, link);
     123        t = hash_table_get_instance(item, pte_t, link);
    123124
    124125        if (keys == PAGE_HT_KEYS) {
     
    142143         * Convert item to PTE.
    143144         */
    144         t = list_get_instance(item, pte_t, link);
     145        t = hash_table_get_instance(item, pte_t, link);
    145146
    146147        free(t);
     
    200201        hlp = hash_table_find(&page_ht, key);
    201202        if (hlp)
    202                 t = list_get_instance(hlp, pte_t, link);
     203                t = hash_table_get_instance(hlp, pte_t, link);
    203204
    204205        spinlock_unlock(&page_ht_lock);
  • genarch/src/mm/page_pt.c

    rc7ec94a4 rf5935ed  
    4141static pte_t *pt_mapping_find(as_t *as, __address page);
    4242
    43 page_operations_t page_pt_operations = {
     43page_mapping_operations_t pt_mapping_operations = {
    4444        .mapping_insert = pt_mapping_insert,
    4545        .mapping_find = pt_mapping_find
  • generic/include/adt/hash_table.h

    rc7ec94a4 rf5935ed  
    6767};
    6868
    69 #define hash_table_get_instance(item,type,member)       list_get_instance((item),(type),(member))
     69#define hash_table_get_instance(item, type, member)     list_get_instance((item), type, member)
    7070
    7171extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op);
  • generic/include/mm/page.h

    rc7ec94a4 rf5935ed  
    6161
    6262/** Operations to manipulate page mappings. */
    63 struct page_operations {
     63struct page_mapping_operations {
    6464        void (* mapping_insert)(as_t *as, __address page, __address frame, int flags);
    6565        pte_t *(* mapping_find)(as_t *as, __address page);
    6666};
    67 typedef struct page_operations page_operations_t;
     67typedef struct page_mapping_operations page_mapping_operations_t;
    6868
    69 extern page_operations_t *page_operations;
     69extern page_mapping_operations_t *page_mapping_operations;
    7070
    7171extern void page_init(void);
  • generic/src/mm/page.c

    rc7ec94a4 rf5935ed  
    4444
    4545/** Virtual operations for page subsystem. */
    46 page_operations_t *page_operations = NULL;
     46page_mapping_operations_t *page_mapping_operations = NULL;
    4747
    4848void page_init(void)
     
    8686void page_mapping_insert(as_t *as, __address page, __address frame, int flags)
    8787{
    88         ASSERT(page_operations);
    89         ASSERT(page_operations->mapping_insert);
     88        ASSERT(page_mapping_operations);
     89        ASSERT(page_mapping_operations->mapping_insert);
    9090       
    91         page_operations->mapping_insert(as, page, frame, flags);
     91        page_mapping_operations->mapping_insert(as, page, frame, flags);
    9292}
    9393
     
    105105pte_t *page_mapping_find(as_t *as, __address page)
    106106{
    107         ASSERT(page_operations);
    108         ASSERT(page_operations->mapping_find);
     107        ASSERT(page_mapping_operations);
     108        ASSERT(page_mapping_operations->mapping_find);
    109109
    110         return page_operations->mapping_find(as, page);
     110        return page_mapping_operations->mapping_find(as, page);
    111111}
Note: See TracChangeset for help on using the changeset viewer.