aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/microblaze/kernel/exceptions.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c
index b98ee8d0c1cd..7dd4d127fce8 100644
--- a/arch/microblaze/kernel/exceptions.c
+++ b/arch/microblaze/kernel/exceptions.c
@@ -86,8 +86,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
86 switch (type & 0x1F) { 86 switch (type & 0x1F) {
87 case MICROBLAZE_ILL_OPCODE_EXCEPTION: 87 case MICROBLAZE_ILL_OPCODE_EXCEPTION:
88 if (user_mode(regs)) { 88 if (user_mode(regs)) {
89 pr_debug(KERN_WARNING "Illegal opcode exception " \ 89 pr_debug("Illegal opcode exception in user mode\n");
90 "in user mode.\n");
91 _exception(SIGILL, regs, ILL_ILLOPC, addr); 90 _exception(SIGILL, regs, ILL_ILLOPC, addr);
92 return; 91 return;
93 } 92 }
@@ -97,8 +96,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
97 break; 96 break;
98 case MICROBLAZE_IBUS_EXCEPTION: 97 case MICROBLAZE_IBUS_EXCEPTION:
99 if (user_mode(regs)) { 98 if (user_mode(regs)) {
100 pr_debug(KERN_WARNING "Instruction bus error " \ 99 pr_debug("Instruction bus error exception in user mode\n");
101 "exception in user mode.\n");
102 _exception(SIGBUS, regs, BUS_ADRERR, addr); 100 _exception(SIGBUS, regs, BUS_ADRERR, addr);
103 return; 101 return;
104 } 102 }
@@ -108,8 +106,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
108 break; 106 break;
109 case MICROBLAZE_DBUS_EXCEPTION: 107 case MICROBLAZE_DBUS_EXCEPTION:
110 if (user_mode(regs)) { 108 if (user_mode(regs)) {
111 pr_debug(KERN_WARNING "Data bus error exception " \ 109 pr_debug("Data bus error exception in user mode\n");
112 "in user mode.\n");
113 _exception(SIGBUS, regs, BUS_ADRERR, addr); 110 _exception(SIGBUS, regs, BUS_ADRERR, addr);
114 return; 111 return;
115 } 112 }
@@ -119,8 +116,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
119 break; 116 break;
120 case MICROBLAZE_DIV_ZERO_EXCEPTION: 117 case MICROBLAZE_DIV_ZERO_EXCEPTION:
121 if (user_mode(regs)) { 118 if (user_mode(regs)) {
122 pr_debug(KERN_WARNING "Divide by zero exception " \ 119 pr_debug("Divide by zero exception in user mode\n");
123 "in user mode\n");
124 _exception(SIGILL, regs, FPE_INTDIV, addr); 120 _exception(SIGILL, regs, FPE_INTDIV, addr);
125 return; 121 return;
126 } 122 }
@@ -129,7 +125,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
129 die("Divide by zero exception", regs, SIGBUS); 125 die("Divide by zero exception", regs, SIGBUS);
130 break; 126 break;
131 case MICROBLAZE_FPU_EXCEPTION: 127 case MICROBLAZE_FPU_EXCEPTION:
132 pr_debug(KERN_WARNING "FPU exception\n"); 128 pr_debug("FPU exception\n");
133 /* IEEE FP exception */ 129 /* IEEE FP exception */
134 /* I removed fsr variable and use code var for storing fsr */ 130 /* I removed fsr variable and use code var for storing fsr */
135 if (fsr & FSR_IO) 131 if (fsr & FSR_IO)
@@ -147,7 +143,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
147 143
148#ifdef CONFIG_MMU 144#ifdef CONFIG_MMU
149 case MICROBLAZE_PRIVILEGED_EXCEPTION: 145 case MICROBLAZE_PRIVILEGED_EXCEPTION:
150 pr_debug(KERN_WARNING "Privileged exception\n"); 146 pr_debug("Privileged exception\n");
151 /* "brk r0,r0" - used as debug breakpoint - old toolchain */ 147 /* "brk r0,r0" - used as debug breakpoint - old toolchain */
152 if (get_user(code, (unsigned long *)regs->pc) == 0 148 if (get_user(code, (unsigned long *)regs->pc) == 0
153 && code == 0x980c0000) { 149 && code == 0x980c0000) {