Changeset 98000fb in mainline for kernel/arch/sparc64
- Timestamp:
- 2009-06-03T19:34:45Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- Location:
- kernel/arch/sparc64
- Files:
-
- 9 edited
-
include/mm/tlb.h (modified) (12 diffs)
-
include/mm/tsb.h (modified) (1 diff)
-
include/types.h (modified) (2 diffs)
-
src/drivers/fhc.c (modified) (1 diff)
-
src/drivers/pci.c (modified) (2 diffs)
-
src/mm/as.c (modified) (2 diffs)
-
src/mm/tlb.c (modified) (7 diffs)
-
src/mm/tsb.c (modified) (4 diffs)
-
src/smp/smp.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/mm/tlb.h
r69e68e3 r98000fb 323 323 * Register. 324 324 */ 325 static inline uint64_t itlb_data_access_read( index_t entry)325 static inline uint64_t itlb_data_access_read(size_t entry) 326 326 { 327 327 itlb_data_access_addr_t reg; … … 337 337 * @param value Value to be written. 338 338 */ 339 static inline void itlb_data_access_write( index_t entry, uint64_t value)339 static inline void itlb_data_access_write(size_t entry, uint64_t value) 340 340 { 341 341 itlb_data_access_addr_t reg; … … 354 354 * Register. 355 355 */ 356 static inline uint64_t dtlb_data_access_read( index_t entry)356 static inline uint64_t dtlb_data_access_read(size_t entry) 357 357 { 358 358 dtlb_data_access_addr_t reg; … … 368 368 * @param value Value to be written. 369 369 */ 370 static inline void dtlb_data_access_write( index_t entry, uint64_t value)370 static inline void dtlb_data_access_write(size_t entry, uint64_t value) 371 371 { 372 372 dtlb_data_access_addr_t reg; … … 384 384 * @return Current value of specified IMMU TLB Tag Read Register. 385 385 */ 386 static inline uint64_t itlb_tag_read_read( index_t entry)386 static inline uint64_t itlb_tag_read_read(size_t entry) 387 387 { 388 388 itlb_tag_read_addr_t tag; … … 399 399 * @return Current value of specified DMMU TLB Tag Read Register. 400 400 */ 401 static inline uint64_t dtlb_tag_read_read( index_t entry)401 static inline uint64_t dtlb_tag_read_read(size_t entry) 402 402 { 403 403 dtlb_tag_read_addr_t tag; … … 419 419 * Register. 420 420 */ 421 static inline uint64_t itlb_data_access_read(int tlb, index_t entry)421 static inline uint64_t itlb_data_access_read(int tlb, size_t entry) 422 422 { 423 423 itlb_data_access_addr_t reg; … … 434 434 * @param value Value to be written. 435 435 */ 436 static inline void itlb_data_access_write(int tlb, index_t entry,436 static inline void itlb_data_access_write(int tlb, size_t entry, 437 437 uint64_t value) 438 438 { … … 454 454 * Register. 455 455 */ 456 static inline uint64_t dtlb_data_access_read(int tlb, index_t entry)456 static inline uint64_t dtlb_data_access_read(int tlb, size_t entry) 457 457 { 458 458 dtlb_data_access_addr_t reg; … … 470 470 * @param value Value to be written. 471 471 */ 472 static inline void dtlb_data_access_write(int tlb, index_t entry,472 static inline void dtlb_data_access_write(int tlb, size_t entry, 473 473 uint64_t value) 474 474 { … … 489 489 * @return Current value of specified IMMU TLB Tag Read Register. 490 490 */ 491 static inline uint64_t itlb_tag_read_read(int tlb, index_t entry)491 static inline uint64_t itlb_tag_read_read(int tlb, size_t entry) 492 492 { 493 493 itlb_tag_read_addr_t tag; … … 506 506 * @return Current value of specified DMMU TLB Tag Read Register. 507 507 */ 508 static inline uint64_t dtlb_tag_read_read(int tlb, index_t entry)508 static inline uint64_t dtlb_tag_read_read(int tlb, size_t entry) 509 509 { 510 510 dtlb_tag_read_addr_t tag; -
kernel/arch/sparc64/include/mm/tsb.h
r69e68e3 r98000fb 161 161 struct pte; 162 162 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);163 extern void tsb_invalidate(struct as *as, uintptr_t page, size_t pages); 164 extern void itsb_pte_copy(struct pte *t, size_t index); 165 extern void dtsb_pte_copy(struct pte *t, size_t index, bool ro); 166 166 167 167 #endif /* !def __ASM__ */ -
kernel/arch/sparc64/include/types.h
r69e68e3 r98000fb 47 47 48 48 typedef uint64_t size_t; 49 typedef uint64_t count_t;50 typedef uint64_t index_t;51 49 52 50 typedef uint64_t uintptr_t; … … 61 59 } fncptr_t; 62 60 63 /**< Formats for uintptr_t, size_t , count_t and index_t*/61 /**< Formats for uintptr_t, size_t */ 64 62 #define PRIp "llx" 65 63 #define PRIs "llu" 66 #define PRIc "llu"67 #define PRIi "llu"68 64 69 65 /**< 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 72 72 return NULL; 73 73 74 count_t regs = prop->size / sizeof(ofw_central_reg_t);74 size_t regs = prop->size / sizeof(ofw_central_reg_t); 75 75 if (regs + 1 < UART_IMAP_REG) 76 76 return NULL; -
kernel/arch/sparc64/src/drivers/pci.c
r69e68e3 r98000fb 92 92 93 93 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); 95 95 96 96 if (regs < SABRE_INTERNAL_REG + 1) … … 139 139 140 140 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); 142 142 143 143 if (regs < PSYCHO_INTERNAL_REG + 1) -
kernel/arch/sparc64/src/mm/as.c
r69e68e3 r98000fb 90 90 * size. 91 91 */ 92 count_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *92 size_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * 93 93 sizeof(tsb_entry_t)) >> FRAME_WIDTH; 94 94 frame_free(KA2PA((uintptr_t) as->arch.itsb)); … … 102 102 { 103 103 #ifdef CONFIG_TSB 104 tsb_invalidate(as, 0, ( count_t) -1);104 tsb_invalidate(as, 0, (size_t) -1); 105 105 #endif 106 106 return 0; -
kernel/arch/sparc64/src/mm/tlb.c
r69e68e3 r98000fb 55 55 #endif 56 56 57 static void dtlb_pte_copy(pte_t *, index_t, bool);58 static void itlb_pte_copy(pte_t *, index_t);57 static void dtlb_pte_copy(pte_t *, size_t, bool); 58 static void itlb_pte_copy(pte_t *, size_t); 59 59 static void do_fast_instruction_access_mmu_miss_fault(istate_t *, const char *); 60 60 static void do_fast_data_access_mmu_miss_fault(istate_t *, tlb_tag_access_reg_t, … … 131 131 * of its w field. 132 132 */ 133 void dtlb_pte_copy(pte_t *t, index_t index, bool ro)133 void dtlb_pte_copy(pte_t *t, size_t index, bool ro) 134 134 { 135 135 tlb_tag_access_reg_t tag; … … 168 168 * @param index Zero if lower 8K-subpage, one if higher 8K-subpage. 169 169 */ 170 void itlb_pte_copy(pte_t *t, index_t index)170 void itlb_pte_copy(pte_t *t, size_t index) 171 171 { 172 172 tlb_tag_access_reg_t tag; … … 201 201 { 202 202 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; 204 204 pte_t *t; 205 205 … … 246 246 uintptr_t page_8k; 247 247 uintptr_t page_16k; 248 index_t index;248 size_t index; 249 249 pte_t *t; 250 250 … … 310 310 { 311 311 uintptr_t page_16k; 312 index_t index;312 size_t index; 313 313 pte_t *t; 314 314 … … 580 580 * @param cnt Number of ITLB and DTLB entries to invalidate. 581 581 */ 582 void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)582 void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt) 583 583 { 584 584 unsigned int i; -
kernel/arch/sparc64/src/mm/tsb.c
r69e68e3 r98000fb 51 51 * @param as Address space. 52 52 * @param page First page to invalidate in TSB. 53 * @param pages Number of pages to invalidate. Value of ( count_t) -1 means the53 * @param pages Number of pages to invalidate. Value of (size_t) -1 means the 54 54 * whole TSB. 55 55 */ 56 void tsb_invalidate(as_t *as, uintptr_t page, count_t pages)56 void tsb_invalidate(as_t *as, uintptr_t page, size_t pages) 57 57 { 58 index_t i0, i; 59 count_t cnt; 58 size_t i0; 59 size_t i; 60 size_t cnt; 60 61 61 62 ASSERT(as->arch.itsb && as->arch.dtsb); … … 64 65 ASSERT(i0 < ITSB_ENTRY_COUNT && i0 < DTSB_ENTRY_COUNT); 65 66 66 if (pages == ( count_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT)67 if (pages == (size_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT) 67 68 cnt = ITSB_ENTRY_COUNT; 68 69 else … … 82 83 * @param index Zero if lower 8K-subpage, one if higher 8K subpage. 83 84 */ 84 void itsb_pte_copy(pte_t *t, index_t index)85 void itsb_pte_copy(pte_t *t, size_t index) 85 86 { 86 87 as_t *as; 87 88 tsb_entry_t *tsb; 88 index_t entry;89 size_t entry; 89 90 90 91 ASSERT(index <= 1); … … 128 129 * @param ro If true, the mapping is copied read-only. 129 130 */ 130 void dtsb_pte_copy(pte_t *t, index_t index, bool ro)131 void dtsb_pte_copy(pte_t *t, size_t index, bool ro) 131 132 { 132 133 as_t *as; 133 134 tsb_entry_t *tsb; 134 index_t entry;135 size_t entry; 135 136 136 137 ASSERT(index <= 1); -
kernel/arch/sparc64/src/smp/smp.c
r69e68e3 r98000fb 62 62 { 63 63 ofw_tree_node_t *node; 64 count_t cnt = 0;64 size_t cnt = 0; 65 65 66 66 if (is_us() || is_us_iii()) {
Note:
See TracChangeset
for help on using the changeset viewer.
