Changeset f8ddd17 in mainline for kernel/arch/sparc64/src/mm/as.c


Ignore:
Timestamp:
2006-12-09T20:20:50Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b82a13c
Parents:
9ab9c2ec
Message:

Rework support for virtually indexed cache.
Instead of repeatedly flushing the data cache, which was a huge overkill, refuse to create an illegal address alias
in the kernel (again) and allocate appropriate page color in userspace instead. Extend the detection also to
SYS_PHYSMEM_MAP syscall.

Add support for tracking physical memory areas mappable by SYS_PHYSMEM_MAP.

Lots of coding style changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/as.c

    r9ab9c2ec rf8ddd17  
    4949#include <macros.h>
    5050#endif /* CONFIG_TSB */
    51 
    52 #ifdef CONFIG_VIRT_IDX_DCACHE
    53 #include <arch/mm/cache.h>
    54 #endif /* CONFIG_VIRT_IDX_DCACHE */
    5551
    5652/** Architecture dependent address space init. */
     
    163159        dtsb_base_write(tsb_base.value);
    164160#endif
    165 #ifdef CONFIG_VIRT_IDX_DCACHE
    166         if (as->dcache_flush_on_install) {
    167                 /*
    168                  * Some mappings in this address space are illegal address
    169                  * aliases. Upon their creation, the dcache_flush_on_install
    170                  * flag was set.
    171                  *
    172                  * We are now obliged to flush the D-cache in order to guarantee
    173                  * that there will be at most one cache line for each address
    174                  * alias.
    175                  *
    176                  * This flush performs a cleanup after another address space in
    177                  * which the alias might have existed.
    178                  */
    179                 dcache_flush();
    180         }
    181 #endif /* CONFIG_VIRT_IDX_DCACHE */
    182161}
    183162
     
    214193        }
    215194#endif
    216 #ifdef CONFIG_VIRT_IDX_DCACHE
    217         if (as->dcache_flush_on_deinstall) {
    218                 /*
    219                  * Some mappings in this address space are illegal address
    220                  * aliases. Upon their creation, the dcache_flush_on_deinstall
    221                  * flag was set.
    222                  *
    223                  * We are now obliged to flush the D-cache in order to guarantee
    224                  * that there will be at most one cache line for each address
    225                  * alias.
    226                  *
    227                  * This flush performs a cleanup after this address space. It is
    228                  * necessary because other address spaces that contain the same
    229                  * alias are not necessarily aware of the need to carry out the
    230                  * cache flush. The only address spaces that are aware of it are
    231                  * those that created the illegal alias.
    232                  */
    233                 dcache_flush();
    234         }
    235 #endif /* CONFIG_VIRT_IDX_DCACHE */
    236195}
    237196
Note: See TracChangeset for help on using the changeset viewer.