case 36: if (notify_die(DIE_SS, "ss", &regs, vector, vector, SIGTRAP) == NOTIFY_STOP) return; siginfo.si_code = TRAP_TRACE; ifa = 0; break; } 
case 36: siginfo.si_code = TRAP_TRACE; ifa = 0; break; } if (notify_die(DIE_FAULT, "ia64_fault", &regs, vector, siginfo.si_code, SIGTRAP) == NOTIFY_STOP) return; 
ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,	    unsigned long iim, unsigned long itir, long arg5, long arg6,	    long arg7, struct pt_regs regs){	unsigned long code, error = isr, iip;	struct siginfo siginfo;	char buf[128];	int result, sig;	static const char *reason[] = {		"IA-64 Illegal Operation fault",		"IA-64 Privileged Operation fault",		"IA-64 Privileged Register fault",		"IA-64 Reserved Register/Field fault",		"Disabled Instruction Set Transition fault",		"Unknown fault 5", "Unknown fault 6", "Unknown fault 7", "Illegal Hazard fault",		"Unknown fault 9", "Unknown fault 10", "Unknown fault 11", "Unknown fault 12",		"Unknown fault 13", "Unknown fault 14", "Unknown fault 15"	};	if ((isr & IA64_ISR_NA) && ((isr & IA64_ISR_CODE_MASK) == IA64_ISR_CODE_LFETCH)) {		/*		 * This fault was due to lfetch.fault, set "ed" bit in the psr to cancel		 * the lfetch.		 */		ia64_psr(&regs)->ed = 1;		return;	}	iip = regs.cr_iip + ia64_psr(&regs)->ri;	switch (vector) {	      case 24: /* General Exception */		code = (isr >> 4) & 0xf;		sprintf(buf, "General Exception: %s%s", reason[code],			(code == 3) ? ((isr & (1UL << 37))				       ? " (RSE access)" : " (data access)") : "");		if (code == 8) {# ifdef CONFIG_IA64_PRINT_HAZARDS			printk("%s[%d]: possible hazard @ ip=%016lx (pr = %016lx)\n",			       current->comm, current->pid,			       regs.cr_iip + ia64_psr(&regs)->ri, regs.pr);# endif			return;		}		break;	      case 25: /* Disabled FP-Register */		if (isr & 2) {			disabled_fph_fault(&regs);			return;		}		sprintf(buf, "Disabled FPL fault---not supposed to happen!");		break;	      case 26: /* NaT Consumption */		if (user_mode(&regs)) {			void __user *addr;			if (((isr >> 4) & 0xf) == 2) {				/* NaT page consumption */				sig = SIGSEGV;				code = SEGV_ACCERR;				addr = (void __user *) ifa;			} else {				/* register NaT consumption */				sig = SIGILL;				code = ILL_ILLOPN;				addr = (void __user *) (regs.cr_iip							+ ia64_psr(&regs)->ri);			}			siginfo.si_signo = sig;			siginfo.si_code = code;			siginfo.si_errno = 0;			siginfo.si_addr = addr;			siginfo.si_imm = vector;			siginfo.si_flags = __ISR_VALID;			siginfo.si_isr = isr;			force_sig_info(sig, &siginfo, current);			return;		} else if (ia64_done_with_exception(&regs))			return;		sprintf(buf, "NaT consumption");		break;	      case 31: /* Unsupported Data Reference */		if (user_mode(&regs)) {			siginfo.si_signo = SIGILL;			siginfo.si_code = ILL_ILLOPN;			siginfo.si_errno = 0;			siginfo.si_addr = (void __user *) iip;			siginfo.si_imm = vector;			siginfo.si_flags = __ISR_VALID;			siginfo.si_isr = isr;			force_sig_info(SIGILL, &siginfo, current);			return;		}		sprintf(buf, "Unsupported data reference");		break;	      case 29: /* Debug */	      case 35: /* Taken Branch Trap */	      case 36: /* Single Step Trap */		if (fsys_mode(current, &regs)) {			extern char __kernel_syscall_via_break[];			/*			 * Got a trap in fsys-mode: Taken Branch Trap and Single Step trap			 * need special handling; Debug trap is not supposed to happen.			 */			if (unlikely(vector == 29)) {				die("Got debug trap in fsys-mode---not supposed to happen!",				    &regs, 0);				return;			}			/* re-do the system call via break 0x100000: */			regs.cr_iip = (unsigned long) __kernel_syscall_via_break;			ia64_psr(&regs)->ri = 0;			ia64_psr(&regs)->cpl = 3;			return;		}		switch (vector) {		      case 29:			siginfo.si_code = TRAP_HWBKPT;#ifdef CONFIG_ITANIUM			/*			 * Erratum 10 (IFA may contain incorrect address) now has			 * "NoFix" status.  There are no plans for fixing this.			 */			if (ia64_psr(&regs)->is == 0)			  ifa = regs.cr_iip;#endif			break;		      case 35: siginfo.si_code = TRAP_BRANCH; ifa = 0; break;		      case 36:			      if (notify_die(DIE_SS, "ss", &regs, vector,					     vector, SIGTRAP) == NOTIFY_STOP)				      return;			      siginfo.si_code = TRAP_TRACE; ifa = 0; break;		}		siginfo.si_signo = SIGTRAP;		siginfo.si_errno = 0;		siginfo.si_addr  = (void __user *) ifa;		siginfo.si_imm   = 0;		siginfo.si_flags = __ISR_VALID;		siginfo.si_isr   = isr;		force_sig_info(SIGTRAP, &siginfo, current);		return;	      case 32: /* fp fault */	      case 33: /* fp trap */		result = handle_fpu_swa((vector == 32) ? 1 : 0, &regs, isr);		if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {			siginfo.si_signo = SIGFPE;			siginfo.si_errno = 0;			siginfo.si_code = FPE_FLTINV;			siginfo.si_addr = (void __user *) iip;			siginfo.si_flags = __ISR_VALID;			siginfo.si_isr = isr;			siginfo.si_imm = 0;			force_sig_info(SIGFPE, &siginfo, current);		}		return;	      case 34:		if (isr & 0x2) {			/* Lower-Privilege Transfer Trap */			/*			 * Just clear PSR.lp and then return immediately: all the			 * interesting work (e.g., signal delivery is done in the kernel			 * exit path).			 */			ia64_psr(&regs)->lp = 0;			return;		} else {			/* Unimplemented Instr. Address Trap */			if (user_mode(&regs)) {				siginfo.si_signo = SIGILL;				siginfo.si_code = ILL_BADIADDR;				siginfo.si_errno = 0;				siginfo.si_flags = 0;				siginfo.si_isr = 0;				siginfo.si_imm = 0;				siginfo.si_addr = (void __user *) iip;				force_sig_info(SIGILL, &siginfo, current);				return;			}			sprintf(buf, "Unimplemented Instruction Address fault");		}		break;	      case 45:#ifdef CONFIG_IA32_SUPPORT		if (ia32_exception(&regs, isr) == 0)			return;#endif		printk(KERN_ERR "Unexpected IA-32 exception (Trap 45)\n");		printk(KERN_ERR "  iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx\n",		       iip, ifa, isr);		force_sig(SIGSEGV, current);		break;	      case 46:#ifdef CONFIG_IA32_SUPPORT		if (ia32_intercept(&regs, isr) == 0)			return;#endif		printk(KERN_ERR "Unexpected IA-32 intercept trap (Trap 46)\n");		printk(KERN_ERR "  iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n",		       iip, ifa, isr, iim);		force_sig(SIGSEGV, current);		return;	      case 47:		sprintf(buf, "IA-32 Interruption Fault (int 0x%lx)", isr >> 16);		break;	      default:		sprintf(buf, "Fault %lu", vector);		break;	}	die_if_kernel(buf, &regs, error);	force_sig(SIGILL, current);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9138d581b0ef855c0314c41c14852a7231b9941c/traps.c/buggy/arch/ia64/kernel/traps.c