[xtensa-cvscommit] linux/include/asm-xtensa ptrace.h,1.6,1.7
Brought to you by:
zankel
|
From: <joe...@us...> - 2003-01-30 23:55:32
|
Update of /cvsroot/xtensa/linux/include/asm-xtensa In directory sc8-pr-cvs1:/tmp/cvs-serv30731/include/asm-xtensa Modified Files: ptrace.h Log Message: Fixed a bug that hangs the kernel. We were improperly handling double exceptions that occurred during the handling of a window underflow exception. Index: ptrace.h =================================================================== RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/ptrace.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ptrace.h 28 Jan 2003 23:52:23 -0000 1.6 --- ptrace.h 30 Jan 2003 23:55:27 -0000 1.7 *************** *** 30,34 **** /* 3 x 64-entries x 4-byte tables follow from TABLE_OFS. */ ! /* Exception causes/codes?: */ #define EXC_CODE_USER 0x000 #define EXC_CODE_KERNEL 0x040 --- 30,34 ---- /* 3 x 64-entries x 4-byte tables follow from TABLE_OFS. */ ! /* Offsets within exception_handlers[] */ #define EXC_CODE_USER 0x000 #define EXC_CODE_KERNEL 0x040 *************** *** 36,49 **** #define EXC_CODE_UNHANDLED 0x100 ! /* Exception types: */ /*unhandled quickspill*/ ! #define EXCTYPE_USER 0 /* 0 0 */ ! #define EXCTYPE_USER_UNHANDLED 1 /* 1 0 */ ! #define EXCTYPE_KERNEL 2 /* 0 1 */ ! #define EXCTYPE_KERNEL_UNHANDLED 3 /* 1 1 */ ! #define EXCTYPE_DOUBLE_WIND_USER 4 /* 0 0 */ ! #define EXCTYPE_DOUBLE_WIND_KERNEL 8 /* 0 0 */ /* Bits: */ #define EXCTYPE_UNHANDLED_SHIFT 0 #define EXCTYPE_QUICKSPILL_SHIFT 1 --- 36,77 ---- #define EXC_CODE_UNHANDLED 0x100 ! /* Exception types: */ ! ! /* Double exceptions in window vectors need different treatment of ! WINDOWBASE that double exceptions that occur outside of window ! vectors. ! ! PS distinguishes between user and kernel, so we don't need to here. ! However, we do so to simplify the determination of whether we need ! to spill everything (user, quickspill=0) or not (kernel, ! quickspill=1). ! ! XTFIXME: For safety, we don't distinguish between double exceptions ! that occurred from user mode (i.e., PS.UM = 1, PS.EXCM = 1; e.g., ! window exceptions) and from kernel mode (i.e., PS.UM = 0, PS.EXCM = ! 1). Since we don't switch stacks on kernel mode, I think it will ! be safe to do a quick spill on the *_DOUBLE_KERNEL and ! *_DOUBLE_WIND_KERNEL cases. Try it. :) You just need to set the ! quickspill bits below... ! ! unhandled exception -------+ ! user or kernel exception -----+ | ! double exception ---+ | | ! double exception in window vector -+ | | | ! | | | | ! V V V V */ ! #define EXCTYPE_USER 0 /* 0 0 0 0 */ ! #define EXCTYPE_USER_UNHANDLED 1 /* 0 0 0 1 */ ! #define EXCTYPE_KERNEL 2 /* 0 0 1 0 */ ! #define EXCTYPE_KERNEL_UNHANDLED 3 /* 0 0 1 1 */ ! #define EXCTYPE_DOUBLE_USER 4 /* 0 1 0 0 */ ! #define EXCTYPE_DOUBLE_KERNEL 4 /* 0 1 0 0 */ ! #define EXCTYPE_DOUBLE_WIND_USER 12 /* 1 1 0 0 */ ! #define EXCTYPE_DOUBLE_WIND_KERNEL 12 /* 1 1 0 0 */ /* Bits: */ #define EXCTYPE_UNHANDLED_SHIFT 0 #define EXCTYPE_QUICKSPILL_SHIFT 1 + #define EXCTYPE_DOUBLE_SHIFT 2 + #define EXCTYPE_DOUBLE_WIND_SHIFT 3 *************** *** 100,105 **** unsigned vpri; unsigned wmask; ! unsigned wb; /* WINDOWBASE */ ! unsigned ws; /* WINDOWSTART */ unsigned reserved0; /*??? cpenable ???*/ unsigned reserved1; --- 128,133 ---- unsigned vpri; unsigned wmask; ! unsigned wb; ! unsigned ws; unsigned reserved0; /*??? cpenable ???*/ unsigned reserved1; |