Changeset d0485c6 in mainline for kernel/generic/src


Ignore:
Timestamp:
2006-12-01T22:10:40Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d76996
Parents:
7bf7ef7
Message:

Introduce page colors. So far, only sparc64 uses correct page color bits. Other architectures have a dummy define
specifying zero bits for a page color.

There is a new check of page color in as_area_share(). Because of lack of support for this in the userspace, the
check has been #ifef'ed out.

File:
1 edited

Legend:

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

    r7bf7ef7 rd0485c6  
    551551 * @param dst_flags_mask Destination address space area flags mask.
    552552 *
    553  * @return Zero on success or ENOENT if there is no such task or
    554  *         if there is no such address space area,
    555  *         EPERM if there was a problem in accepting the area or
    556  *         ENOMEM if there was a problem in allocating destination
    557  *         address space area. ENOTSUP is returned if an attempt
    558  *         to share non-anonymous address space area is detected.
     553 * @return Zero on success or ENOENT if there is no such task or if there is no
     554 * such address space area, EPERM if there was a problem in accepting the area
     555 * or ENOMEM if there was a problem in allocating destination address space
     556 * area. ENOTSUP is returned if the address space area backend does not support
     557 * sharing. It can be also returned if the architecture uses virtually indexed
     558 * caches and the source and destination areas start at pages with different
     559 * page colors.
    559560 */
    560561int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
     
    581582        }
    582583       
     584#if 0   /* disable the check for now */
     585#ifdef CONFIG_VIRT_IDX_CACHE
     586        if (PAGE_COLOR(src_area->base) != PAGE_COLOR(dst_base)) {
     587                /*
     588                 * Refuse to create illegal address alias.
     589                 */
     590                mutex_unlock(&src_area->lock);
     591                mutex_unlock(&src_as->lock);
     592                interrupts_restore(ipl);
     593                return ENOTSUP;
     594        }
     595#endif /* CONFIG_VIRT_IDX_CACHE */
     596#endif
     597
    583598        if (!src_area->backend || !src_area->backend->share) {
    584599                /*
Note: See TracChangeset for help on using the changeset viewer.