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


Ignore:
Timestamp:
2007-03-27T23:40:25Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
399ece9
Parents:
8d37a06
Message:

The Ultimate Solution To Illegal Virtual Aliases.
It is better to avoid them completely than to fight them.
Switch the sparc64 port to 16K pages. The TLBs and TSBs
continue to operate with 8K pages only. Page tables and
other generic parts operate with 16K pages.

Because the MMU doesn't support 16K directly, each 16K
page is emulated by a pair of 8K pages. With 16K pages,
illegal aliases cannot be created in 16K D-cache.

File:
1 edited

Legend:

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

    r8d37a06 r2057572  
    614614 * or ENOMEM if there was a problem in allocating destination address space
    615615 * area. ENOTSUP is returned if the address space area backend does not support
    616  * sharing or if the kernel detects an attempt to create an illegal address
    617  * alias.
     616 * sharing.
    618617 */
    619618int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
     
    667666                return EPERM;
    668667        }
    669 
    670 #ifdef CONFIG_VIRT_IDX_DCACHE
    671         if (!(dst_flags_mask & AS_AREA_EXEC)) {
    672                 if (PAGE_COLOR(src_area->base) != PAGE_COLOR(dst_base)) {
    673                         /*
    674                          * Refuse to create an illegal address alias.
    675                          */
    676                         mutex_unlock(&src_area->lock);
    677                         mutex_unlock(&src_as->lock);
    678                         interrupts_restore(ipl);
    679                         return ENOTSUP;
    680                 }
    681         }
    682 #endif /* CONFIG_VIRT_IDX_DCACHE */
    683668
    684669        /*
     
    902887                         * ASID.
    903888                         */
    904                          ASSERT(old_as->asid != ASID_INVALID);
    905                          list_append(&old_as->inactive_as_with_asid_link,
    906                              &inactive_as_with_asid_head);
     889                        ASSERT(old_as->asid != ASID_INVALID);
     890                        list_append(&old_as->inactive_as_with_asid_link,
     891                            &inactive_as_with_asid_head);
    907892                }
    908893                mutex_unlock(&old_as->lock);
Note: See TracChangeset for help on using the changeset viewer.