Subversion Repositories HelenOS

Rev

Rev 1954 | Rev 2009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1954 Rev 2007
Line 548... Line 548...
548
 * @param acc_size Expected size of the source area.
548
 * @param acc_size Expected size of the source area.
549
 * @param dst_as Pointer to destination address space.
549
 * @param dst_as Pointer to destination address space.
550
 * @param dst_base Target base address.
550
 * @param dst_base Target base address.
551
 * @param dst_flags_mask Destination address space area flags mask.
551
 * @param dst_flags_mask Destination address space area flags mask.
552
 *
552
 *
553
 * @return Zero on success or ENOENT if there is no such task or
553
 * @return Zero on success or ENOENT if there is no such task or if there is no
554
 *     if there is no such address space area,
554
 * such address space area, EPERM if there was a problem in accepting the area
555
 *     EPERM if there was a problem in accepting the area or
555
 * or ENOMEM if there was a problem in allocating destination address space
556
 *     ENOMEM if there was a problem in allocating destination
556
 * area. ENOTSUP is returned if the address space area backend does not support
557
 *     address space area. ENOTSUP is returned if an attempt
557
 * sharing. It can be also returned if the architecture uses virtually indexed
558
 *     to share non-anonymous address space area is detected.
558
 * caches and the source and destination areas start at pages with different
-
 
559
 * page colors.
559
 */
560
 */
560
int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
561
int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
561
          as_t *dst_as, uintptr_t dst_base, int dst_flags_mask)
562
          as_t *dst_as, uintptr_t dst_base, int dst_flags_mask)
562
{
563
{
563
    ipl_t ipl;
564
    ipl_t ipl;
Line 578... Line 579...
578
        mutex_unlock(&src_as->lock);
579
        mutex_unlock(&src_as->lock);
579
        interrupts_restore(ipl);
580
        interrupts_restore(ipl);
580
        return ENOENT;
581
        return ENOENT;
581
    }
582
    }
582
   
583
   
-
 
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
 
583
    if (!src_area->backend || !src_area->backend->share) {
598
    if (!src_area->backend || !src_area->backend->share) {
584
        /*
599
        /*
585
         * There is no backend or the backend does not
600
         * There is no backend or the backend does not
586
         * know how to share the area.
601
         * know how to share the area.
587
         */
602
         */