Changeset fa7d9c4 in mainline


Ignore:
Timestamp:
2006-01-24T20:30:26Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc5412e
Parents:
36b01bb2
Message:

Unlock address space prior TLB shootdown in get_asid() to unify
the locking order among mips32, sparc64 and ia64.

Add ASID_STEALING_ENABLED macro to disable the stealing part on ia64
in a clean way.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/include/mm/asid.h

    r36b01bb2 rfa7d9c4  
    3434typedef __u32 asid_t;
    3535
     36/**
     37 * This macro eliminates the stealing branch of asid_get().
     38 */
     39#define ASID_STEALING_ENABLED   0
     40
    3641/** Number of ia64 RIDs (Region Identifiers) per kernel ASID. */
    3742#define RIDS_PER_ASID           7
     
    3944
    4045/**
    41  * The point is to have ASID_MAX_ARCH big enough
    42  * so that it is never reached and the ASID allocation
    43  * mechanism in asid_get() never resorts to stealing.
     46 * This macro is needed only to compile the kernel.
     47 * On ia64, its value is ignored.
    4448 */
    45 #define ASID_MAX_ARCH           ((asid_t) -1)   /**< This value is never reached. */
     49#define ASID_MAX_ARCH           0
    4650
    4751/**
  • arch/mips32/include/mm/asid.h

    r36b01bb2 rfa7d9c4  
    3232#include <arch/types.h>
    3333
     34#define ASID_STEALING_ENABLED   1
    3435#define ASID_MAX_ARCH   255
    3536
  • arch/sparc64/include/mm/asid.h

    r36b01bb2 rfa7d9c4  
    3737typedef __u16 asid_t;
    3838
     39#define ASID_STEALING_ENABLED   1
    3940#define ASID_MAX_ARCH   0x4095  /* 2^12 - 1 */
    4041
  • genarch/src/mm/asid.c

    r36b01bb2 rfa7d9c4  
    9595        ipl = interrupts_disable();
    9696        spinlock_lock(&asidlock);
    97         if (asids_allocated == ASIDS_ALLOCABLE) {
     97        if (ASID_STEALING_ENABLED && asids_allocated == ASIDS_ALLOCABLE) {
    9898
    9999                /*
     
    122122
    123123                /*
     124                 * Notify the address space from wich the ASID
     125                 * was stolen by invalidating its asid member.
     126                 */
     127                as->asid = ASID_INVALID;
     128                spinlock_unlock(&as->lock);
     129
     130                /*
    124131                 * Get the system rid of the stolen ASID.
    125132                 */
     
    127134                tlb_shootdown_finalize();
    128135                tlb_invalidate_asid(asid);
    129                 as->asid = ASID_INVALID;
    130                
    131                 spinlock_unlock(&as->lock);
    132136        } else {
    133137
Note: See TracChangeset for help on using the changeset viewer.