diff --git a/sys/ia64/ia64/exception.S b/sys/ia64/ia64/exception.S index fbbf7b6a2149..2105203245ab 100644 --- a/sys/ia64/ia64/exception.S +++ b/sys/ia64/ia64/exception.S @@ -1151,6 +1151,7 @@ IVT_ENTRY(External_Interrupt, 0x3000) ;; } alloc r14=ar.pfs,0,0,2,0 + cmp4.eq p14,p0=0,r0 ;; 1: { .mii @@ -1178,29 +1179,16 @@ IVT_ENTRY(External_Interrupt, 0x3000) nop 0 } { .mfb - nop 0 + cmp4.eq p14,p0=0,r8 // Return to kernel mode? nop 0 br.sptk 1b // loop for more ;; } 2: -{ .mmi - add r14=16+TF_SPECIAL_IIP,sp - ;; - ld8 r14=[r14] +{ .mbb add out0=16,sp - ;; -} -{ .mii - nop 0 - extr.u r14=r14,61,3 - ;; - cmp.gt p15,p0=5,r14 -} -{ .mfb - nop 0 - nop 0 -(p15) br.call.sptk rp=do_ast +(p14) br.sptk exception_restore + br.call.sptk rp=do_ast ;; } { .mfb diff --git a/sys/ia64/ia64/genassym.c b/sys/ia64/ia64/genassym.c index 0c0ec8160625..9679f3ff7867 100644 --- a/sys/ia64/ia64/genassym.c +++ b/sys/ia64/ia64/genassym.c @@ -112,8 +112,6 @@ ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(TF_SPECIAL_IIP, offsetof(struct trapframe, tf_special.iip)); - ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext)); ASSYM(VM_MAX_ADDRESS, VM_MAX_ADDRESS); diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index e7b5367ab7b4..b43306bd8aa2 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -51,6 +51,7 @@ #include #include +#include #include #include #include @@ -122,7 +123,7 @@ static int adjust_ticks = 0; SYSCTL_INT(_debug, OID_AUTO, clock_adjust_ticks, CTLFLAG_RW, &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); -void +int interrupt(u_int64_t vector, struct trapframe *framep) { struct thread *td; @@ -230,6 +231,7 @@ interrupt(u_int64_t vector, struct trapframe *framep) } atomic_subtract_int(&td->td_intr_nesting_level, 1); + return (TRAPF_USERMODE(framep)); } /* diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 3301f3416218..792742d7b464 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -61,7 +61,7 @@ int ia64_highfp_load(struct thread *); int ia64_highfp_save(struct thread *); void ia64_init(void); void ia64_probe_sapics(void); -void interrupt(uint64_t, struct trapframe *); +int interrupt(uint64_t, struct trapframe *); void map_gateway_page(void); void map_pal_code(void); void map_port_space(void);