Rev 869 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 869 | Rev 901 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #ifndef __ASM__ |
32 | #ifndef __ASM__ |
33 | 33 | ||
34 | #include <arch/types.h> |
34 | #include <arch/types.h> |
35 | 35 | ||
36 | typedef __u16 asid_t; |
36 | typedef __u16 asid_t; |
- | 37 | typedef __u32 rid_t; |
|
- | 38 | ||
- | 39 | #endif /* __ASM__ */ |
|
37 | 40 | ||
38 | /** |
41 | /** |
39 | * Number of ia64 RIDs (Region Identifiers) per kernel ASID. |
42 | * Number of ia64 RIDs (Region Identifiers) per kernel ASID. |
40 | * Note that some architectures may support more bits, |
43 | * Note that some architectures may support more bits, |
41 | * but those extra bits are not used by the kernel. |
44 | * but those extra bits are not used by the kernel. |
42 | */ |
45 | */ |
43 | #endif |
- | |
44 | - | ||
45 | #define RIDS_PER_ASID 7 |
46 | #define RIDS_PER_ASID 7 |
- | 47 | ||
46 | #define RID_MAX 262143 /* 2^18 - 1 */ |
48 | #define RID_MAX 262143 /* 2^18 - 1 */ |
- | 49 | #define RID_KERNEL 0 |
|
- | 50 | #define RID_INVALID 1 |
|
47 | 51 | ||
48 | #define ASID2RID(asid, vrn) (((asid)*RIDS_PER_ASID)+(vrn)) |
52 | #define ASID2RID(asid, vrn) (((asid)>RIDS_PER_ASID)?(((asid)*RIDS_PER_ASID)+(vrn)):(asid)) |
49 | #define RID2ASID(rid) ((rid)/RIDS_PER_ASID) |
53 | #define RID2ASID(rid) ((rid)/RIDS_PER_ASID) |
50 | 54 | ||
51 | #ifndef __ASM__ |
- | |
52 | - | ||
53 | - | ||
54 | typedef __u32 rid_t; |
- | |
55 | - | ||
56 | #endif |
- | |
57 | - | ||
58 | #define ASID_MAX_ARCH (RID_MAX/RIDS_PER_ASID) |
55 | #define ASID_MAX_ARCH (RID_MAX/RIDS_PER_ASID) |
59 | 56 | ||
60 | #endif |
57 | #endif |