summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-12-16 19:51:10 +0100
committerNeal H. Walfield <neal@gnu.org>2008-12-16 20:01:35 +0100
commitcd09ca0b681ca964dcee2c5b72311a33ca6f1cb1 (patch)
tree9a94d60155ba9f8400ae15fcbf88376a03030358 /hurd
parent465d6fa4fcf836482088e5e263fc26da03feff44 (diff)
Replace L4 types and functions with standard types or viengoos
functions. hurd/ 2008-12-16 Neal H. Walfield <neal@gnu.org> * addr-trans.h: Don't include <l4/types.h>. Include <stdint.h> and <hurd/math.h>. (struct cap_addr_trans): Replace l4 types with standard types. (CAP_ADDR_TRANS_GUARD): Likewise. (CAP_ADDR_TRANS_SET_GUARD_SUBPAGE): Use vg_msb, not l4_msb. (CAP_ADDR_TRANS_VALID): Replace l4 types with standard types. Use vg_msb, not l4_msb. * t-addr.c (main): Replace use of l4_msb64 with vg_msg64 and l4_lsb64 with vg_lsg64. * types.h: Don't include <l4/types.h>. libhurd-mm/ 2008-12-16 Neal H. Walfield <neal@gnu.org> * anonymous.c (anonymous_pager_alloc): Replace use of l4_msb with vg_msb. * as-build.c (as_build): Replace use of l4_msb64 with vg_msb64. * as-dump.c (print_nr): Replace use of l4_int64_t with int64_t. * as-lookup.c (as_lookup_rel_internal): Replace use of l4_word_t with uintptr_t and l4_uint64_t with uint64_t. * as.h (as_alloc): Replace use of l4_uint64_t with uint64_t. (as_alloc_at): Likewise. (as_free): Likewise. (AS_CHECK_SHADOW): Replace use of l4_word_t with uintptr_t. (as_walk): Likewise. * as.c (struct region): Replace use of l4_uint64_t with uint64_t. (free_space_split): Likewise. (as_alloc): Likewise. (as_alloc_at): Likewise. (as_free): Likewise. (as_init): Likewise. (as_alloc_slow): Replace use of l4_word_t with uintptr_t. (as_init): Likewise. (as_walk): Likewise. (as_alloc): Replace use of l4_lsb64 with vg_lsb64. (as_init): Likewise.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/ChangeLog14
-rw-r--r--hurd/addr-trans.h25
-rw-r--r--hurd/types.h2
3 files changed, 27 insertions, 14 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 3c74c1c..5b1920c 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,3 +1,17 @@
+2008-12-16 Neal H. Walfield <neal@gnu.org>
+
+ * addr-trans.h: Don't include <l4/types.h>. Include <stdint.h>
+ and <hurd/math.h>.
+ (struct cap_addr_trans): Replace l4 types with standard types.
+ (CAP_ADDR_TRANS_GUARD): Likewise.
+ (CAP_ADDR_TRANS_SET_GUARD_SUBPAGE): Use vg_msb, not l4_msb.
+ (CAP_ADDR_TRANS_VALID): Replace l4 types with standard types. Use
+ vg_msb, not l4_msb.
+ * t-addr.c (main): Replace use of l4_msb64 with vg_msg64 and
+ l4_lsb64 with vg_lsg64.
+
+ * types.h: Don't include <l4/types.h>.
+
2008-12-11 Neal H. Walfield <neal@gnu.org>
Adapt RPC interfaces according to changes in IPC semantics.
diff --git a/hurd/addr-trans.h b/hurd/addr-trans.h
index 9313684..e7695e9 100644
--- a/hurd/addr-trans.h
+++ b/hurd/addr-trans.h
@@ -21,8 +21,9 @@
#ifndef _HURD_ADDR_TRANS_H
#define _HURD_ADDR_TRANS_H
-#include <l4/types.h>
+#include <stdint.h>
#include <hurd/stddef.h>
+#include <hurd/math.h>
/* Capabilities have two primary functions: they designate objects and
they participate in address translation. This structure controls
@@ -52,17 +53,17 @@ struct cap_addr_trans
only valid offset is 0) and 21 possible guard bits. If
SUBPAGES_LOG2 is 0, there are 256 subpages, 8 subpage bits and a
maximum of 21-8=15 guard bits. */
- l4_uint32_t guard_subpage: CAP_ADDR_TRANS_GUARD_SUBPAGE_BITS;
+ uint32_t guard_subpage: CAP_ADDR_TRANS_GUARD_SUBPAGE_BITS;
/* The log2 of the subpages. The size of a subpage is thus 2^(8 -
SUBPAGES_LOG2). Values of SUBPAGES_LOG2 other than 0 are only
allowed for cap pages. */
- l4_uint32_t subpages_log2: CAP_ADDR_TRANS_SUBPAGES_BITS;
+ uint32_t subpages_log2: CAP_ADDR_TRANS_SUBPAGES_BITS;
/* Number of significant guard bits. The value of the GUARD is zero
extended if GDEPTH is greater than the number of available guard
bits. */
- l4_uint32_t gdepth: CAP_ADDR_TRANS_GDEPTH_BITS;
+ uint32_t gdepth: CAP_ADDR_TRANS_GDEPTH_BITS;
};
- l4_uint32_t raw;
+ uint32_t raw;
};
};
@@ -103,8 +104,8 @@ struct cap_addr_trans
/* The value of the guard. */
#define CAP_ADDR_TRANS_GUARD(cap_addr_trans_) \
- ((l4_uint64_t) ((cap_addr_trans_).guard_subpage \
- >> (cap_addr_trans_).subpages_log2))
+ ((uint64_t) ((cap_addr_trans_).guard_subpage \
+ >> (cap_addr_trans_).subpages_log2))
#define CATSGST_(test_, format, args...) \
if (! (test_)) \
@@ -123,7 +124,7 @@ struct cap_addr_trans
"subpages_ (%d) must be at least 1\n", (subpages_)); \
CATSGST_ (((subpages_) & ((subpages_) - 1)) == 0, \
"SUBPAGES_ (%d) must be a power of 2\n", (subpages_)); \
- int subpages_log2_ = l4_msb ((subpages_)) - 1; \
+ int subpages_log2_ = vg_msb ((subpages_)) - 1; \
CATSGST_ (subpages_log2_ <= 8, \
"maximum subpages is 256 (%d)\n", (subpages_)); \
CATSGST_ (0 <= (subpage_) && (subpage_) < (subpages_), \
@@ -131,7 +132,7 @@ struct cap_addr_trans
(subpage_), (subpages_)); \
\
/* The number of required guard bits. */ \
- int gbits_ = l4_msb64 ((guard_)); \
+ int gbits_ = vg_msb64 ((guard_)); \
CATSGST_ (gbits_ <= (gdepth_), \
"Significant guard bits (%d) must be less than depth (%d)\n", \
gbits_, (gdepth_)); \
@@ -172,16 +173,16 @@ struct cap_addr_trans
/* Returns whether the capability address CAP_ADDR_TRANS is well-formed. */
#define CAP_ADDR_TRANS_VALID(cap_addr_trans) \
({ bool r_ = true; \
- CATSGST_ (CAP_ADDR_TRANS_GUARD_BITS (cap_addr_trans) <= L4_WORDSIZE, \
+ CATSGST_ (CAP_ADDR_TRANS_GUARD_BITS (cap_addr_trans) <= WORDSIZE, \
"Invalid guard depth (%d)", \
CAP_ADDR_TRANS_GUARD_BITS (cap_addr_trans)); \
CATSGST_ (CAP_ADDR_TRANS_SUBPAGES_LOG2 (cap_addr_trans) <= 8, \
"Invalid number of subpages (%d)", \
CAP_ADDR_TRANS_SUBPAGES (cap_addr_trans)); \
- CATSGST_ (l4_msb (CAP_ADDR_TRANS_GUARD (cap_addr_trans)) \
+ CATSGST_ (vg_msb (CAP_ADDR_TRANS_GUARD (cap_addr_trans)) \
<= CAP_ADDR_TRANS_GUARD_BITS (cap_addr_trans), \
"Significant guard bits (%d) exceeds guard depth (%d)", \
- l4_msb (CAP_ADDR_TRANS_GUARD (cap_addr_trans)), \
+ vg_msb (CAP_ADDR_TRANS_GUARD (cap_addr_trans)), \
CAP_ADDR_TRANS_GUARD_BITS (cap_addr_trans)); \
r_; \
})
diff --git a/hurd/types.h b/hurd/types.h
index abaddb7..fefe928 100644
--- a/hurd/types.h
+++ b/hurd/types.h
@@ -22,8 +22,6 @@
#ifndef _HURD_TYPES_H
#define _HURD_TYPES_H 1
-#include <l4/types.h>
-
#include <hurd/addr.h>
#endif /* _HURD_TYPES_H */