Changeset 76fca31 in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2008-12-16T19:02:07Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ae4443
Parents:
8fe5980
Message:

kconsole is optional
kernel & uspace framebuffer rewrite with speedups (some things are slightly broken yet)

File:
1 edited

Legend:

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

    r8fe5980 r76fca31  
    147147        AS_KERNEL = as_create(FLAG_AS_KERNEL);
    148148        if (!AS_KERNEL)
    149                 panic("can't create kernel address space\n");
    150        
     149                panic("Cannot create kernel address space\n");
     150       
     151        /* Make sure the kernel address space
     152         * reference count never drops to zero.
     153         */
     154        atomic_set(&AS_KERNEL->refcount, 1);
    151155}
    152156
     
    177181        page_table_create(flags);
    178182#endif
    179 
     183       
    180184        return as;
    181185}
     
    770774 * into private anonymous memory (unless it's already there).
    771775 *
    772  * @param as            Address space.
    773  * @param flags         Flags of the area memory.
    774  * @param address       Address withing the area to be changed.
    775  *
    776  * @return              Zero on success or a value from @ref errno.h on failure.
     776 * @param as      Address space.
     777 * @param flags   Flags of the area memory.
     778 * @param address Address within the area to be changed.
     779 *
     780 * @return Zero on success or a value from @ref errno.h on failure.
     781 *
    777782 */
    778783int as_area_change_flags(as_t *as, int flags, uintptr_t address)
     
    786791        index_t frame_idx;
    787792        count_t used_pages;
    788 
     793       
    789794        /* Flags for the new memory mapping */
    790795        page_flags = area_flags_to_page_flags(flags);
     
    800805        }
    801806
    802         if (area->sh_info || area->backend != &anon_backend) {
     807        if ((area->sh_info) || (area->backend != &anon_backend)) {
    803808                /* Copying shared areas not supported yet */
    804809                /* Copying non-anonymous memory not supported yet */
     
    871876
    872877        tlb_invalidate_pages(as->asid, area->base, area->pages);
     878       
    873879        /*
    874880         * Invalidate potential software translation caches (e.g. TSB on
Note: See TracChangeset for help on using the changeset viewer.