Changeset 25d7709 in mainline for arch/ia64/src
- Timestamp:
- 2006-03-13T20:08:16Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 631ca4d
- Parents:
- 45d6add
- Location:
- arch/ia64/src
- Files:
-
- 2 edited
-
interrupt.c (modified) (3 diffs)
-
mm/tlb.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/src/interrupt.c
r45d6add r25d7709 109 109 110 110 static char *vector_to_string(__u16 vector); 111 static void dump_interrupted_context( struct exception_regdump *pstate);111 static void dump_interrupted_context(istate_t *istate); 112 112 113 113 char *vector_to_string(__u16 vector) … … 121 121 } 122 122 123 void dump_interrupted_context( struct exception_regdump *pstate)123 void dump_interrupted_context(istate_t *istate) 124 124 { 125 125 char *ifa, *iipa, *iip; 126 126 127 ifa = get_symtab_entry( pstate->cr_ifa);128 iipa = get_symtab_entry( pstate->cr_iipa);129 iip = get_symtab_entry( pstate->cr_iip);127 ifa = get_symtab_entry(istate->cr_ifa); 128 iipa = get_symtab_entry(istate->cr_iipa); 129 iip = get_symtab_entry(istate->cr_iip); 130 130 131 131 putchar('\n'); 132 132 printf("Interrupted context dump:\n"); 133 printf("ar.bsp=%P\tar.bspstore=%P\n", pstate->ar_bsp, pstate->ar_bspstore);134 printf("ar.rnat=%Q\tar.rsc=%Q\n", pstate->ar_rnat, pstate->ar_rsc);135 printf("ar.ifs=%Q\tar.pfs=%Q\n", pstate->ar_ifs, pstate->ar_pfs);136 printf("cr.isr=%Q\tcr.ipsr=%Q\t\n", pstate->cr_isr.value, pstate->cr_ipsr);133 printf("ar.bsp=%P\tar.bspstore=%P\n", istate->ar_bsp, istate->ar_bspstore); 134 printf("ar.rnat=%Q\tar.rsc=%Q\n", istate->ar_rnat, istate->ar_rsc); 135 printf("ar.ifs=%Q\tar.pfs=%Q\n", istate->ar_ifs, istate->ar_pfs); 136 printf("cr.isr=%Q\tcr.ipsr=%Q\t\n", istate->cr_isr.value, istate->cr_ipsr); 137 137 138 printf("cr.iip=%Q, #%d\t(%s)\n", pstate->cr_iip, pstate->cr_isr.ei ,iip ? iip : "?");139 printf("cr.iipa=%Q\t(%s)\n", pstate->cr_iipa, iipa ? iipa : "?");140 printf("cr.ifa=%Q\t(%s)\n", pstate->cr_ifa, ifa ? ifa : "?");141 } 142 143 void general_exception(__u64 vector, struct exception_regdump *pstate)138 printf("cr.iip=%Q, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei ,iip ? iip : "?"); 139 printf("cr.iipa=%Q\t(%s)\n", istate->cr_iipa, iipa ? iipa : "?"); 140 printf("cr.ifa=%Q\t(%s)\n", istate->cr_ifa, ifa ? ifa : "?"); 141 } 142 143 void general_exception(__u64 vector, istate_t *istate) 144 144 { 145 145 char *desc = ""; 146 146 147 dump_interrupted_context( pstate);148 149 switch ( pstate->cr_isr.ge_code) {147 dump_interrupted_context(istate); 148 149 switch (istate->cr_isr.ge_code) { 150 150 case GE_ILLEGALOP: 151 151 desc = "Illegal Operation fault"; … … 175 175 176 176 /** Handle syscall. */ 177 int break_instruction(__u64 vector, struct exception_regdump *pstate)177 int break_instruction(__u64 vector, istate_t *istate) 178 178 { 179 179 /* 180 180 * Move to next instruction after BREAK. 181 181 */ 182 if ( pstate->cr_ipsr.ri == 2) {183 pstate->cr_ipsr.ri = 0;184 pstate->cr_iip += 16;182 if (istate->cr_ipsr.ri == 2) { 183 istate->cr_ipsr.ri = 0; 184 istate->cr_iip += 16; 185 185 } else { 186 pstate->cr_ipsr.ri++;186 istate->cr_ipsr.ri++; 187 187 } 188 188 189 if ( pstate->in0< SYSCALL_END)190 return syscall_table[ pstate->in0](pstate->in1, pstate->in2, pstate->in3);189 if (istate->in3 < SYSCALL_END) 190 return syscall_table[istate->in3](istate->in0, istate->in1, istate->in2); 191 191 else 192 panic("Undefined syscall %d", pstate->in0);192 panic("Undefined syscall %d", istate->in3); 193 193 194 194 return -1; 195 195 } 196 196 197 void universal_handler(__u64 vector, struct exception_regdump *pstate)198 { 199 dump_interrupted_context( pstate);197 void universal_handler(__u64 vector, istate_t *istate) 198 { 199 dump_interrupted_context(istate); 200 200 panic("Interruption: %W (%s)\n", (__u16) vector, vector_to_string(vector)); 201 201 } 202 202 203 void external_interrupt(__u64 vector, struct exception_regdump *pstate)203 void external_interrupt(__u64 vector, istate_t *istate) 204 204 { 205 205 cr_ivr_t ivr; -
arch/ia64/src/mm/tlb.c
r45d6add r25d7709 443 443 * 444 444 * @param vector Interruption vector. 445 * @param pstate Structure with saved interruption state.446 */ 447 void alternate_instruction_tlb_fault(__u64 vector, struct exception_regdump *pstate)445 * @param istate Structure with saved interruption state. 446 */ 447 void alternate_instruction_tlb_fault(__u64 vector, istate_t *istate) 448 448 { 449 449 region_register rr; … … 451 451 pte_t *t; 452 452 453 va = pstate->cr_ifa; /* faulting address */453 va = istate->cr_ifa; /* faulting address */ 454 454 t = page_mapping_find(AS, va); 455 455 if (t) { … … 464 464 */ 465 465 if (!as_page_fault(va)) { 466 panic("%s: va=%P, rid=%d\n", __FUNCTION__, pstate->cr_ifa, rr.map.rid);466 panic("%s: va=%P, rid=%d\n", __FUNCTION__, istate->cr_ifa, rr.map.rid); 467 467 } 468 468 } … … 472 472 * 473 473 * @param vector Interruption vector. 474 * @param pstate Structure with saved interruption state.475 */ 476 void alternate_data_tlb_fault(__u64 vector, struct exception_regdump *pstate)474 * @param istate Structure with saved interruption state. 475 */ 476 void alternate_data_tlb_fault(__u64 vector, istate_t *istate) 477 477 { 478 478 region_register rr; … … 481 481 pte_t *t; 482 482 483 va = pstate->cr_ifa; /* faulting address */483 va = istate->cr_ifa; /* faulting address */ 484 484 rr.word = rr_read(VA2VRN(va)); 485 485 rid = rr.map.rid; … … 507 507 */ 508 508 if (!as_page_fault(va)) { 509 panic("%s: va=%P, rid=%d\n", __FUNCTION__, pstate->cr_ifa, rr.map.rid);509 panic("%s: va=%P, rid=%d\n", __FUNCTION__, istate->cr_ifa, rr.map.rid); 510 510 } 511 511 } … … 517 517 * 518 518 * @param vector Interruption vector. 519 * @param pstate Structure with saved interruption state.520 */ 521 void data_nested_tlb_fault(__u64 vector, struct exception_regdump *pstate)519 * @param istate Structure with saved interruption state. 520 */ 521 void data_nested_tlb_fault(__u64 vector, istate_t *istate) 522 522 { 523 523 panic("%s\n", __FUNCTION__); … … 527 527 * 528 528 * @param vector Interruption vector. 529 * @param pstate Structure with saved interruption state.530 */ 531 void data_dirty_bit_fault(__u64 vector, struct exception_regdump *pstate)529 * @param istate Structure with saved interruption state. 530 */ 531 void data_dirty_bit_fault(__u64 vector, istate_t *istate) 532 532 { 533 533 pte_t *t; 534 534 535 t = page_mapping_find(AS, pstate->cr_ifa);535 t = page_mapping_find(AS, istate->cr_ifa); 536 536 ASSERT(t && t->p); 537 537 if (t && t->p) { … … 548 548 * 549 549 * @param vector Interruption vector. 550 * @param pstate Structure with saved interruption state.551 */ 552 void instruction_access_bit_fault(__u64 vector, struct exception_regdump *pstate)550 * @param istate Structure with saved interruption state. 551 */ 552 void instruction_access_bit_fault(__u64 vector, istate_t *istate) 553 553 { 554 554 pte_t *t; 555 555 556 t = page_mapping_find(AS, pstate->cr_ifa);556 t = page_mapping_find(AS, istate->cr_ifa); 557 557 ASSERT(t && t->p); 558 558 if (t && t->p) { … … 569 569 * 570 570 * @param vector Interruption vector. 571 * @param pstate Structure with saved interruption state.572 */ 573 void data_access_bit_fault(__u64 vector, struct exception_regdump *pstate)571 * @param istate Structure with saved interruption state. 572 */ 573 void data_access_bit_fault(__u64 vector, istate_t *istate) 574 574 { 575 575 pte_t *t; 576 576 577 t = page_mapping_find(AS, pstate->cr_ifa);577 t = page_mapping_find(AS, istate->cr_ifa); 578 578 ASSERT(t && t->p); 579 579 if (t && t->p) { … … 590 590 * 591 591 * @param vector Interruption vector. 592 * @param pstate Structure with saved interruption state.593 */ 594 void page_not_present(__u64 vector, struct exception_regdump *pstate)592 * @param istate Structure with saved interruption state. 593 */ 594 void page_not_present(__u64 vector, istate_t *istate) 595 595 { 596 596 region_register rr; … … 598 598 pte_t *t; 599 599 600 va = pstate->cr_ifa; /* faulting address */600 va = istate->cr_ifa; /* faulting address */ 601 601 t = page_mapping_find(AS, va); 602 602 ASSERT(t); … … 613 613 } else { 614 614 if (!as_page_fault(va)) { 615 panic("%s: va=%P, rid=%d\n", __FUNCTION__, pstate->cr_ifa, rr.map.rid);616 } 617 } 618 } 615 panic("%s: va=%P, rid=%d\n", __FUNCTION__, istate->cr_ifa, rr.map.rid); 616 } 617 } 618 }
Note:
See TracChangeset
for help on using the changeset viewer.
