Changeset 8e7c9fe in mainline for kernel/generic/src/mm/backend_anon.c


Ignore:
Timestamp:
2014-09-12T03:45:25Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c53b58e
Parents:
3eb0c85 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_anon.c

    r3eb0c85 r8e7c9fe  
    7676        .page_fault = anon_page_fault,
    7777        .frame_free = anon_frame_free,
     78
     79        .create_shared_data = NULL,
     80        .destroy_shared_data = NULL
    7881};
    7982
     
    190193                return AS_PF_FAULT;
    191194
    192         if (area->sh_info) {
     195        mutex_lock(&area->sh_info->lock);
     196        if (area->sh_info->shared) {
    193197                btree_node_t *leaf;
    194198               
     
    200204                 * mapping, a new frame is allocated and the mapping is created.
    201205                 */
    202                 mutex_lock(&area->sh_info->lock);
    203206                frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
    204207                    upage - area->base, &leaf);
     
    232235                }
    233236                frame_reference_add(ADDR2PFN(frame));
    234                 mutex_unlock(&area->sh_info->lock);
    235237        } else {
    236238
     
    254256                         * Reserve the memory for this page now.
    255257                         */
    256                         if (!reserve_try_alloc(1))
     258                        if (!reserve_try_alloc(1)) {
     259                                mutex_unlock(&area->sh_info->lock);
    257260                                return AS_PF_SILENT;
     261                        }
    258262                }
    259263
     
    262266                km_temporary_page_put(kpage);
    263267        }
     268        mutex_unlock(&area->sh_info->lock);
    264269       
    265270        /*
Note: See TracChangeset for help on using the changeset viewer.