From cd09ca0b681ca964dcee2c5b72311a33ca6f1cb1 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 16 Dec 2008 19:51:10 +0100 Subject: Replace L4 types and functions with standard types or viengoos functions. hurd/ 2008-12-16 Neal H. Walfield * addr-trans.h: Don't include . Include and . (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 . libhurd-mm/ 2008-12-16 Neal H. Walfield * 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. --- hurd/ChangeLog | 14 ++++++++++++++ hurd/addr-trans.h | 25 +++++++++++++------------ hurd/types.h | 2 -- 3 files changed, 27 insertions(+), 14 deletions(-) (limited to 'hurd') 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 + + * addr-trans.h: Don't include . Include + and . + (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 . + 2008-12-11 Neal H. Walfield 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 +#include #include +#include /* 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 - #include #endif /* _HURD_TYPES_H */ -- cgit v1.2.3