Subversion Repositories HelenOS-historic

Rev

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

Rev 753 Rev 869
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#ifndef __ia64_ASID_H__
29
#ifndef __ia64_ASID_H__
30
#define __ia64_ASID_H__
30
#define __ia64_ASID_H__
31
 
31
 
-
 
32
#ifndef __ASM__
-
 
33
 
32
#include <arch/types.h>
34
#include <arch/types.h>
33
 
35
 
34
typedef __u16 asid_t;
36
typedef __u16 asid_t;
35
 
37
 
36
/**
38
/**
37
 * Number of ia64 RIDs (Region Identifiers) per kernel ASID.
39
 * Number of ia64 RIDs (Region Identifiers) per kernel ASID.
38
 * Note that some architectures may support more bits,
40
 * Note that some architectures may support more bits,
39
 * but those extra bits are not used by the kernel.
41
 * but those extra bits are not used by the kernel.
40
 */
42
 */
-
 
43
#endif 
-
 
44
 
41
#define RIDS_PER_ASID       7
45
#define RIDS_PER_ASID       7
42
#define RID_MAX         262143      /* 2^18 - 1 */
46
#define RID_MAX         262143      /* 2^18 - 1 */
43
 
47
 
44
#define ASID2RID(asid, vrn) (((asid)*RIDS_PER_ASID)+(vrn))
48
#define ASID2RID(asid, vrn) (((asid)*RIDS_PER_ASID)+(vrn))
45
#define RID2ASID(rid)       ((rid)/RIDS_PER_ASID)
49
#define RID2ASID(rid)       ((rid)/RIDS_PER_ASID)
46
 
50
 
-
 
51
#ifndef __ASM__
-
 
52
 
-
 
53
 
47
typedef __u32 rid_t;
54
typedef __u32 rid_t;
48
 
55
 
-
 
56
#endif
-
 
57
 
49
#define ASID_MAX_ARCH       (RID_MAX/RIDS_PER_ASID)
58
#define ASID_MAX_ARCH       (RID_MAX/RIDS_PER_ASID)
50
 
59
 
51
#endif
60
#endif