Subversion Repositories HelenOS-historic

Rev

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

Rev 749 Rev 753
Line 29... Line 29...
29
#ifndef __ia64_ASID_H__
29
#ifndef __ia64_ASID_H__
30
#define __ia64_ASID_H__
30
#define __ia64_ASID_H__
31
 
31
 
32
#include <arch/types.h>
32
#include <arch/types.h>
33
 
33
 
34
typedef __u32 asid_t;
34
typedef __u16 asid_t;
35
 
35
 
36
/**
36
/**
-
 
37
 * Number of ia64 RIDs (Region Identifiers) per kernel ASID.
-
 
38
 * Note that some architectures may support more bits,
37
 * This macro eliminates the stealing branch of asid_get().
39
 * but those extra bits are not used by the kernel.
38
 */
40
 */
39
#define ASID_STEALING_ENABLED   0
-
 
40
 
-
 
41
/** Number of ia64 RIDs (Region Identifiers) per kernel ASID. */
-
 
42
#define RIDS_PER_ASID       7
41
#define RIDS_PER_ASID       7
43
#define RID_OVERFLOW        16777216    /* 2^24 */
42
#define RID_MAX         262143      /* 2^18 - 1 */
44
 
43
 
45
#define ASID2RID(asid, vrn) (((asid)*RIDS_PER_ASID)+(vrn))
44
#define ASID2RID(asid, vrn) (((asid)*RIDS_PER_ASID)+(vrn))
46
#define RID2ASID(rid)       ((rid)/RIDS_PER_ASID)
45
#define RID2ASID(rid)       ((rid)/RIDS_PER_ASID)
47
 
46
 
48
typedef __u32 rid_t;
47
typedef __u32 rid_t;
49
 
48
 
50
/**
-
 
51
 * This macro is needed only to compile the kernel.
-
 
52
 * On ia64, its value is ignored.
-
 
53
 */
-
 
54
#define ASID_MAX_ARCH       0
-
 
55
 
-
 
56
/**
-
 
57
 * Value used to recognize the situation when all ASIDs were already allocated.
-
 
58
 */
-
 
59
#define ASID_OVERFLOW       (RID_OVERFLOW/RIDS_PER_ASID)
49
#define ASID_MAX_ARCH       (RID_MAX/RIDS_PER_ASID)
60
 
-
 
61
/** On ia64, this is no-op. */
-
 
62
#define asid_put_arch(x)
-
 
63
 
50
 
64
#endif
51
#endif