Changeset 98000fb in mainline for kernel/arch/sparc64


Ignore:
Timestamp:
2009-06-03T19:34:45Z (17 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/sparc64
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/mm/tlb.h

    r69e68e3 r98000fb  
    323323 *                      Register.
    324324 */
    325 static inline uint64_t itlb_data_access_read(index_t entry)
     325static inline uint64_t itlb_data_access_read(size_t entry)
    326326{
    327327        itlb_data_access_addr_t reg;
     
    337337 * @param value         Value to be written.
    338338 */
    339 static inline void itlb_data_access_write(index_t entry, uint64_t value)
     339static inline void itlb_data_access_write(size_t entry, uint64_t value)
    340340{
    341341        itlb_data_access_addr_t reg;
     
    354354 *                      Register.
    355355 */
    356 static inline uint64_t dtlb_data_access_read(index_t entry)
     356static inline uint64_t dtlb_data_access_read(size_t entry)
    357357{
    358358        dtlb_data_access_addr_t reg;
     
    368368 * @param value         Value to be written.
    369369 */
    370 static inline void dtlb_data_access_write(index_t entry, uint64_t value)
     370static inline void dtlb_data_access_write(size_t entry, uint64_t value)
    371371{
    372372        dtlb_data_access_addr_t reg;
     
    384384 * @return              Current value of specified IMMU TLB Tag Read Register.
    385385 */
    386 static inline uint64_t itlb_tag_read_read(index_t entry)
     386static inline uint64_t itlb_tag_read_read(size_t entry)
    387387{
    388388        itlb_tag_read_addr_t tag;
     
    399399 * @return              Current value of specified DMMU TLB Tag Read Register.
    400400 */
    401 static inline uint64_t dtlb_tag_read_read(index_t entry)
     401static inline uint64_t dtlb_tag_read_read(size_t entry)
    402402{
    403403        dtlb_tag_read_addr_t tag;
     
    419419 *                      Register.
    420420 */
    421 static inline uint64_t itlb_data_access_read(int tlb, index_t entry)
     421static inline uint64_t itlb_data_access_read(int tlb, size_t entry)
    422422{
    423423        itlb_data_access_addr_t reg;
     
    434434 * @param value         Value to be written.
    435435 */
    436 static inline void itlb_data_access_write(int tlb, index_t entry,
     436static inline void itlb_data_access_write(int tlb, size_t entry,
    437437        uint64_t value)
    438438{
     
    454454 *                      Register.
    455455 */
    456 static inline uint64_t dtlb_data_access_read(int tlb, index_t entry)
     456static inline uint64_t dtlb_data_access_read(int tlb, size_t entry)
    457457{
    458458        dtlb_data_access_addr_t reg;
     
    470470 * @param value         Value to be written.
    471471 */
    472 static inline void dtlb_data_access_write(int tlb, index_t entry,
     472static inline void dtlb_data_access_write(int tlb, size_t entry,
    473473        uint64_t value)
    474474{
     
    489489 * @return              Current value of specified IMMU TLB Tag Read Register.
    490490 */
    491 static inline uint64_t itlb_tag_read_read(int tlb, index_t entry)
     491static inline uint64_t itlb_tag_read_read(int tlb, size_t entry)
    492492{
    493493        itlb_tag_read_addr_t tag;
     
    506506 * @return              Current value of specified DMMU TLB Tag Read Register.
    507507 */
    508 static inline uint64_t dtlb_tag_read_read(int tlb, index_t entry)
     508static inline uint64_t dtlb_tag_read_read(int tlb, size_t entry)
    509509{
    510510        dtlb_tag_read_addr_t tag;
  • kernel/arch/sparc64/include/mm/tsb.h

    r69e68e3 r98000fb  
    161161struct pte;
    162162
    163 extern void tsb_invalidate(struct as *as, uintptr_t page, count_t pages);
    164 extern void itsb_pte_copy(struct pte *t, index_t index);
    165 extern void dtsb_pte_copy(struct pte *t, index_t index, bool ro);
     163extern void tsb_invalidate(struct as *as, uintptr_t page, size_t pages);
     164extern void itsb_pte_copy(struct pte *t, size_t index);
     165extern void dtsb_pte_copy(struct pte *t, size_t index, bool ro);
    166166
    167167#endif /* !def __ASM__ */
  • kernel/arch/sparc64/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/sparc64/src/drivers/fhc.c

    r69e68e3 r98000fb  
    7272                return NULL;
    7373               
    74         count_t regs = prop->size / sizeof(ofw_central_reg_t);
     74        size_t regs = prop->size / sizeof(ofw_central_reg_t);
    7575        if (regs + 1 < UART_IMAP_REG)
    7676                return NULL;
  • kernel/arch/sparc64/src/drivers/pci.c

    r69e68e3 r98000fb  
    9292
    9393        ofw_upa_reg_t *reg = prop->value;
    94         count_t regs = prop->size / sizeof(ofw_upa_reg_t);
     94        size_t regs = prop->size / sizeof(ofw_upa_reg_t);
    9595
    9696        if (regs < SABRE_INTERNAL_REG + 1)
     
    139139
    140140        ofw_upa_reg_t *reg = prop->value;
    141         count_t regs = prop->size / sizeof(ofw_upa_reg_t);
     141        size_t regs = prop->size / sizeof(ofw_upa_reg_t);
    142142
    143143        if (regs < PSYCHO_INTERNAL_REG + 1)
  • kernel/arch/sparc64/src/mm/as.c

    r69e68e3 r98000fb  
    9090         * size.
    9191         */
    92         count_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
     92        size_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
    9393            sizeof(tsb_entry_t)) >> FRAME_WIDTH;
    9494        frame_free(KA2PA((uintptr_t) as->arch.itsb));
     
    102102{
    103103#ifdef CONFIG_TSB
    104         tsb_invalidate(as, 0, (count_t) -1);
     104        tsb_invalidate(as, 0, (size_t) -1);
    105105#endif
    106106        return 0;
  • kernel/arch/sparc64/src/mm/tlb.c

    r69e68e3 r98000fb  
    5555#endif
    5656
    57 static void dtlb_pte_copy(pte_t *, index_t, bool);
    58 static void itlb_pte_copy(pte_t *, index_t);
     57static void dtlb_pte_copy(pte_t *, size_t, bool);
     58static void itlb_pte_copy(pte_t *, size_t);
    5959static void do_fast_instruction_access_mmu_miss_fault(istate_t *, const char *);
    6060static void do_fast_data_access_mmu_miss_fault(istate_t *, tlb_tag_access_reg_t,
     
    131131 *                      of its w field.
    132132 */
    133 void dtlb_pte_copy(pte_t *t, index_t index, bool ro)
     133void dtlb_pte_copy(pte_t *t, size_t index, bool ro)
    134134{
    135135        tlb_tag_access_reg_t tag;
     
    168168 * @param index         Zero if lower 8K-subpage, one if higher 8K-subpage.
    169169 */
    170 void itlb_pte_copy(pte_t *t, index_t index)
     170void itlb_pte_copy(pte_t *t, size_t index)
    171171{
    172172        tlb_tag_access_reg_t tag;
     
    201201{
    202202        uintptr_t page_16k = ALIGN_DOWN(istate->tpc, PAGE_SIZE);
    203         index_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE;
     203        size_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE;
    204204        pte_t *t;
    205205
     
    246246        uintptr_t page_8k;
    247247        uintptr_t page_16k;
    248         index_t index;
     248        size_t index;
    249249        pte_t *t;
    250250
     
    310310{
    311311        uintptr_t page_16k;
    312         index_t index;
     312        size_t index;
    313313        pte_t *t;
    314314
     
    580580 * @param cnt           Number of ITLB and DTLB entries to invalidate.
    581581 */
    582 void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)
     582void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt)
    583583{
    584584        unsigned int i;
  • kernel/arch/sparc64/src/mm/tsb.c

    r69e68e3 r98000fb  
    5151 * @param as Address space.
    5252 * @param page First page to invalidate in TSB.
    53  * @param pages Number of pages to invalidate. Value of (count_t) -1 means the
     53 * @param pages Number of pages to invalidate. Value of (size_t) -1 means the
    5454 *      whole TSB.
    5555 */
    56 void tsb_invalidate(as_t *as, uintptr_t page, count_t pages)
     56void tsb_invalidate(as_t *as, uintptr_t page, size_t pages)
    5757{
    58         index_t i0, i;
    59         count_t cnt;
     58        size_t i0;
     59        size_t i;
     60        size_t cnt;
    6061       
    6162        ASSERT(as->arch.itsb && as->arch.dtsb);
     
    6465        ASSERT(i0 < ITSB_ENTRY_COUNT && i0 < DTSB_ENTRY_COUNT);
    6566
    66         if (pages == (count_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT)
     67        if (pages == (size_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT)
    6768                cnt = ITSB_ENTRY_COUNT;
    6869        else
     
    8283 * @param index Zero if lower 8K-subpage, one if higher 8K subpage.
    8384 */
    84 void itsb_pte_copy(pte_t *t, index_t index)
     85void itsb_pte_copy(pte_t *t, size_t index)
    8586{
    8687        as_t *as;
    8788        tsb_entry_t *tsb;
    88         index_t entry;
     89        size_t entry;
    8990
    9091        ASSERT(index <= 1);
     
    128129 * @param ro    If true, the mapping is copied read-only.
    129130 */
    130 void dtsb_pte_copy(pte_t *t, index_t index, bool ro)
     131void dtsb_pte_copy(pte_t *t, size_t index, bool ro)
    131132{
    132133        as_t *as;
    133134        tsb_entry_t *tsb;
    134         index_t entry;
     135        size_t entry;
    135136       
    136137        ASSERT(index <= 1);
  • kernel/arch/sparc64/src/smp/smp.c

    r69e68e3 r98000fb  
    6262{
    6363        ofw_tree_node_t *node;
    64         count_t cnt = 0;
     64        size_t cnt = 0;
    6565       
    6666        if (is_us() || is_us_iii()) {
Note: See TracChangeset for help on using the changeset viewer.