Skip to content

Commit

Permalink
risc-v: simplify definitions
Browse files Browse the repository at this point in the history
Remove indirection and stick to one name.

Signed-off-by: Axel Heider <axelheider@gmx.de>
  • Loading branch information
axel-h committed Jun 7, 2023
1 parent fcc89cc commit 0a63bfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/arch/riscv/arch/object/structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ typedef pte_t pde_t;
#define PTE_PTR(r) ((pte_t *)(r))
#define PTE_REF(p) ((word_t)(p))

#define PT_SIZE_BITS 12
#define PT_PTR(r) ((pte_t *)(r))
#define PT_REF(p) ((word_t)(p))

Expand Down Expand Up @@ -94,10 +93,11 @@ static inline word_t CONST cap_get_archCapSizeBits(cap_t cap)

switch (ctag) {
case cap_frame_cap:
/* ToDo: could simply use seL4_PageBits here? */
return pageBitsForSize(cap_frame_cap_get_capFSize(cap));

case cap_page_table_cap:
return PT_SIZE_BITS;
return seL4_PageTableBits;

case cap_asid_control_cap:
return 0;
Expand Down

0 comments on commit 0a63bfe

Please sign in to comment.