Changeset 98000fb in mainline for kernel/arch/mips32


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/mips32
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/include/arch.h

    r69e68e3 r98000fb  
    4343#include <typedefs.h>
    4444
    45 extern count_t cpu_count;
     45extern size_t cpu_count;
    4646
    4747typedef struct {
  • kernel/arch/mips32/include/debugger.h

    r69e68e3 r98000fb  
    5454        unative_t nextinstruction;  /**< Original instruction following break */
    5555        int flags;        /**< Flags regarding breakpoint */
    56         count_t counter;
     56        size_t counter;
    5757        void (*bkfunc)(void *b, istate_t *istate);
    5858} bpinfo_t;
  • kernel/arch/mips32/include/mm/page.h

    r69e68e3 r98000fb  
    113113/* Get PTE flags accessors for each level. */
    114114#define GET_PTL1_FLAGS_ARCH(ptl0, i) \
    115         get_pt_flags((pte_t *) (ptl0), (index_t) (i))
     115        get_pt_flags((pte_t *) (ptl0), (size_t) (i))
    116116#define GET_PTL2_FLAGS_ARCH(ptl1, i) \
    117117        PAGE_PRESENT
     
    119119        PAGE_PRESENT
    120120#define GET_FRAME_FLAGS_ARCH(ptl3, i) \
    121         get_pt_flags((pte_t *) (ptl3), (index_t) (i))
     121        get_pt_flags((pte_t *) (ptl3), (size_t) (i))
    122122
    123123/* Set PTE flags accessors for each level. */
    124124#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \
    125         set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x))
     125        set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x))
    126126#define SET_PTL2_FLAGS_ARCH(ptl1, i, x)
    127127#define SET_PTL3_FLAGS_ARCH(ptl2, i, x)
    128128#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \
    129         set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x))
     129        set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x))
    130130
    131131/* Last-level info macros. */
     
    141141#include <arch/exception.h>
    142142
    143 static inline int get_pt_flags(pte_t *pt, index_t i)
     143static inline int get_pt_flags(pte_t *pt, size_t i)
    144144{
    145145        pte_t *p = &pt[i];
     
    154154}
    155155
    156 static inline void set_pt_flags(pte_t *pt, index_t i, int flags)
     156static inline void set_pt_flags(pte_t *pt, size_t i, int flags)
    157157{
    158158        pte_t *p = &pt[i];
  • kernel/arch/mips32/include/types.h

    r69e68e3 r98000fb  
    4747
    4848typedef uint32_t size_t;
    49 typedef uint32_t count_t;
    50 typedef uint32_t index_t;
    5149
    5250typedef uint32_t uintptr_t;
     
    6361#define PRIp "x"        /**< Format for uintptr_t. */
    6462#define PRIs "u"        /**< Format for size_t. */
    65 #define PRIc "u"        /**< Format for count_t. */
    66 #define PRIi "u"        /**< Format for index_t. */
    6763
    6864#define PRId8 "d"       /**< Format for int8_t. */
  • kernel/arch/mips32/src/mips32.c

    r69e68e3 r98000fb  
    7777uintptr_t supervisor_sp __attribute__ ((section (".text")));
    7878
    79 count_t cpu_count = 0;
     79size_t cpu_count = 0;
    8080
    8181/** Performs mips32-specific initialization before main_bsp() is called. */
     
    8585        init.cnt = bootinfo->cnt;
    8686       
    87         count_t i;
     87        size_t i;
    8888        for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
    8989                init.tasks[i].addr = bootinfo->tasks[i].addr;
  • kernel/arch/mips32/src/mm/frame.c

    r69e68e3 r98000fb  
    6363} phys_region_t;
    6464
    65 static count_t phys_regions_count = 0;
     65static size_t phys_regions_count = 0;
    6666static phys_region_t phys_regions[MAX_REGIONS];
    6767
     
    120120        /* Init tasks */
    121121        bool safe = true;
    122         count_t i;
     122        size_t i;
    123123        for (i = 0; i < init.cnt; i++)
    124124                if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE,
     
    175175        cp0_entry_hi_write(0);
    176176
    177         count_t i;
     177        size_t i;
    178178        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    179179                cp0_index_write(i);
     
    252252        printf("---------- ----------\n");
    253253       
    254         count_t i;
     254        size_t i;
    255255        for (i = 0; i < phys_regions_count; i++) {
    256256                printf("%#010x %10u\n",
  • kernel/arch/mips32/src/mm/tlb.c

    r69e68e3 r98000fb  
    561561 * @param cnt           Number of entries to invalidate.
    562562 */
    563 void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)
     563void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt)
    564564{
    565565        unsigned int i;
Note: See TracChangeset for help on using the changeset viewer.