Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 740 → Rev 741

/kernel/trunk/genarch/src/mm/asid.c
94,7 → 94,7
ipl = interrupts_disable();
spinlock_lock(&asidlock);
if (asids_allocated == ASIDS_ALLOCABLE) {
if (ASID_STEALING_ENABLED && asids_allocated == ASIDS_ALLOCABLE) {
 
/*
* All ASIDs are already allocated.
121,14 → 121,18
ASSERT(asid != ASID_INVALID);
 
/*
* Notify the address space from wich the ASID
* was stolen by invalidating its asid member.
*/
as->asid = ASID_INVALID;
spinlock_unlock(&as->lock);
 
/*
* Get the system rid of the stolen ASID.
*/
tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0);
tlb_shootdown_finalize();
tlb_invalidate_asid(asid);
as->asid = ASID_INVALID;
spinlock_unlock(&as->lock);
} else {
 
/*
/kernel/trunk/arch/sparc64/include/mm/asid.h
36,6 → 36,7
*/
typedef __u16 asid_t;
 
#define ASID_STEALING_ENABLED 1
#define ASID_MAX_ARCH 0x4095 /* 2^12 - 1 */
 
#endif
/kernel/trunk/arch/ia64/include/mm/asid.h
33,16 → 33,20
 
typedef __u32 asid_t;
 
/**
* This macro eliminates the stealing branch of asid_get().
*/
#define ASID_STEALING_ENABLED 0
 
/** Number of ia64 RIDs (Region Identifiers) per kernel ASID. */
#define RIDS_PER_ASID 7
#define RID_OVERFLOW 16777216 /* 2^24 */
 
/**
* The point is to have ASID_MAX_ARCH big enough
* so that it is never reached and the ASID allocation
* mechanism in asid_get() never resorts to stealing.
* This macro is needed only to compile the kernel.
* On ia64, its value is ignored.
*/
#define ASID_MAX_ARCH ((asid_t) -1) /**< This value is never reached. */
#define ASID_MAX_ARCH 0
 
/**
* Value used to recognize the situation when all ASIDs were already allocated.
/kernel/trunk/arch/mips32/include/mm/asid.h
31,6 → 31,7
 
#include <arch/types.h>
 
#define ASID_STEALING_ENABLED 1
#define ASID_MAX_ARCH 255
 
typedef __u8 asid_t;