Changeset 98000fb in mainline for kernel/arch/amd64


Ignore:
Timestamp:
2009-06-03T19:34:45Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
301ff30
Parents:
69e68e3
Message:

remove redundant index_t and count_t types (which were always quite ambiguous and not actually needed)

Location:
kernel/arch/amd64
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/cpu.h

    r69e68e3 r98000fb  
    6565        tss_t *tss;
    6666       
    67         count_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
     67        size_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
    6868} cpu_arch_t;
    6969
  • kernel/arch/amd64/include/mm/page.h

    r69e68e3 r98000fb  
    113113        (write_cr3((uintptr_t) (ptl0)))
    114114#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \
    115         set_pt_addr((pte_t *) (ptl0), (index_t) (i), a)
     115        set_pt_addr((pte_t *) (ptl0), (size_t) (i), a)
    116116#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) \
    117         set_pt_addr((pte_t *) (ptl1), (index_t) (i), a)
     117        set_pt_addr((pte_t *) (ptl1), (size_t) (i), a)
    118118#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) \
    119         set_pt_addr((pte_t *) (ptl2), (index_t) (i), a)
     119        set_pt_addr((pte_t *) (ptl2), (size_t) (i), a)
    120120#define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \
    121         set_pt_addr((pte_t *) (ptl3), (index_t) (i), a)
     121        set_pt_addr((pte_t *) (ptl3), (size_t) (i), a)
    122122
    123123/* Get PTE flags accessors for each level. */
    124124#define GET_PTL1_FLAGS_ARCH(ptl0, i) \
    125         get_pt_flags((pte_t *) (ptl0), (index_t) (i))
     125        get_pt_flags((pte_t *) (ptl0), (size_t) (i))
    126126#define GET_PTL2_FLAGS_ARCH(ptl1, i) \
    127         get_pt_flags((pte_t *) (ptl1), (index_t) (i))
     127        get_pt_flags((pte_t *) (ptl1), (size_t) (i))
    128128#define GET_PTL3_FLAGS_ARCH(ptl2, i) \
    129         get_pt_flags((pte_t *) (ptl2), (index_t) (i))
     129        get_pt_flags((pte_t *) (ptl2), (size_t) (i))
    130130#define GET_FRAME_FLAGS_ARCH(ptl3, i) \
    131         get_pt_flags((pte_t *) (ptl3), (index_t) (i))
     131        get_pt_flags((pte_t *) (ptl3), (size_t) (i))
    132132
    133133/* Set PTE flags accessors for each level. */
    134134#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \
    135         set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x))
     135        set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x))
    136136#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) \
    137         set_pt_flags((pte_t *) (ptl1), (index_t) (i), (x))
     137        set_pt_flags((pte_t *) (ptl1), (size_t) (i), (x))
    138138#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) \
    139         set_pt_flags((pte_t *) (ptl2), (index_t) (i), (x))
     139        set_pt_flags((pte_t *) (ptl2), (size_t) (i), (x))
    140140#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \
    141         set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x))
     141        set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x))
    142142
    143143/* Macros for querying the last-level PTE entries. */
     
    177177#define PFERR_CODE_ID           (1 << 4)
    178178
    179 static inline int get_pt_flags(pte_t *pt, index_t i)
     179static inline int get_pt_flags(pte_t *pt, size_t i)
    180180{
    181181        pte_t *p = &pt[i];
     
    190190}
    191191
    192 static inline void set_pt_addr(pte_t *pt, index_t i, uintptr_t a)
     192static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a)
    193193{
    194194        pte_t *p = &pt[i];
     
    198198}
    199199
    200 static inline void set_pt_flags(pte_t *pt, index_t i, int flags)
     200static inline void set_pt_flags(pte_t *pt, size_t i, int flags)
    201201{
    202202        pte_t *p = &pt[i];
  • kernel/arch/amd64/include/proc/task.h

    r69e68e3 r98000fb  
    4141typedef struct {
    4242        /** I/O Permission bitmap Generation counter. */
    43         count_t iomapver;
     43        size_t iomapver;
    4444        /** I/O Permission bitmap. */
    4545        bitmap_t iomap;
  • kernel/arch/amd64/include/types.h

    r69e68e3 r98000fb  
    4747
    4848typedef uint64_t size_t;
    49 typedef uint64_t count_t;
    50 typedef uint64_t index_t;
    5149
    5250typedef uint64_t uintptr_t;
     
    6159} fncptr_t;
    6260
    63 /**< Formats for uintptr_t, size_t, count_t and index_t */
     61/**< Formats for uintptr_t, size_t */
    6462#define PRIp "llx"
    6563#define PRIs "llu"
    66 #define PRIc "llu"
    67 #define PRIi "llu"
    6864
    6965/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
  • kernel/arch/amd64/src/ddi/ddi.c

    r69e68e3 r98000fb  
    5757int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size)
    5858{
    59         count_t bits;
     59        size_t bits;
    6060       
    6161        bits = ioaddr + size;
     
    9999         * Enable the range and we are done.
    100100         */
    101         bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size);
     101        bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size);
    102102       
    103103        /*
     
    118118void io_perm_bitmap_install(void)
    119119{
    120         count_t bits;
     120        size_t bits;
    121121        ptr_16_64_t cpugdtr;
    122122        descriptor_t *gdt_p;
    123123        tss_descriptor_t *tss_desc;
    124         count_t ver;
     124        size_t ver;
    125125       
    126126        /* First, copy the I/O Permission Bitmap. */
  • kernel/arch/amd64/src/interrupt.c

    r69e68e3 r98000fb  
    102102{
    103103        if (TASK) {
    104                 count_t ver;
     104                size_t ver;
    105105
    106106                spinlock_lock(&TASK->lock);
Note: See TracChangeset for help on using the changeset viewer.