Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
bfc32ad0
Commit
bfc32ad0
authored
Sep 15, 2009
by
Michal Simek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
microblaze: Don't be noisy when userspace causes hardware exceptions
Signed-off-by:
Michal Simek
<
monstr@monstr.eu
>
parent
7ba3fe55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
arch/microblaze/kernel/exceptions.c
arch/microblaze/kernel/exceptions.c
+20
-11
No files found.
arch/microblaze/kernel/exceptions.c
View file @
bfc32ad0
...
...
@@ -72,7 +72,8 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
#endif
#if 0
printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n",
printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x " \
"ESR=%08x\n",
type, user_mode(regs) ? "user" : "kernel", fsr,
(unsigned int) regs->pc, (unsigned int) regs->esr);
#endif
...
...
@@ -80,42 +81,50 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
switch
(
type
&
0x1F
)
{
case
MICROBLAZE_ILL_OPCODE_EXCEPTION
:
if
(
user_mode
(
regs
))
{
printk
(
KERN_WARNING
"Illegal opcode exception in user mode.
\n
"
);
pr_debug
(
KERN_WARNING
"Illegal opcode exception "
\
"in user mode.
\n
"
);
_exception
(
SIGILL
,
regs
,
ILL_ILLOPC
,
addr
);
return
;
}
printk
(
KERN_WARNING
"Illegal opcode exception in kernel mode.
\n
"
);
printk
(
KERN_WARNING
"Illegal opcode exception "
\
"in kernel mode.
\n
"
);
die
(
"opcode exception"
,
regs
,
SIGBUS
);
break
;
case
MICROBLAZE_IBUS_EXCEPTION
:
if
(
user_mode
(
regs
))
{
printk
(
KERN_WARNING
"Instruction bus error exception in user mode.
\n
"
);
pr_debug
(
KERN_WARNING
"Instruction bus error "
\
"exception in user mode.
\n
"
);
_exception
(
SIGBUS
,
regs
,
BUS_ADRERR
,
addr
);
return
;
}
printk
(
KERN_WARNING
"Instruction bus error exception in kernel mode.
\n
"
);
printk
(
KERN_WARNING
"Instruction bus error exception "
\
"in kernel mode.
\n
"
);
die
(
"bus exception"
,
regs
,
SIGBUS
);
break
;
case
MICROBLAZE_DBUS_EXCEPTION
:
if
(
user_mode
(
regs
))
{
printk
(
KERN_WARNING
"Data bus error exception in user mode.
\n
"
);
pr_debug
(
KERN_WARNING
"Data bus error exception "
\
"in user mode.
\n
"
);
_exception
(
SIGBUS
,
regs
,
BUS_ADRERR
,
addr
);
return
;
}
printk
(
KERN_WARNING
"Data bus error exception in kernel mode.
\n
"
);
printk
(
KERN_WARNING
"Data bus error exception "
\
"in kernel mode.
\n
"
);
die
(
"bus exception"
,
regs
,
SIGBUS
);
break
;
case
MICROBLAZE_DIV_ZERO_EXCEPTION
:
if
(
user_mode
(
regs
))
{
printk
(
KERN_WARNING
"Divide by zero exception in user mode
\n
"
);
pr_debug
(
KERN_WARNING
"Divide by zero exception "
\
"in user mode
\n
"
);
_exception
(
SIGILL
,
regs
,
ILL_ILLOPC
,
addr
);
return
;
}
printk
(
KERN_WARNING
"Divide by zero exception in kernel mode.
\n
"
);
printk
(
KERN_WARNING
"Divide by zero exception "
\
"in kernel mode.
\n
"
);
die
(
"Divide by exception"
,
regs
,
SIGBUS
);
break
;
case
MICROBLAZE_FPU_EXCEPTION
:
pr
intk
(
KERN_WARNING
"FPU exception
\n
"
);
pr
_debug
(
KERN_WARNING
"FPU exception
\n
"
);
/* IEEE FP exception */
/* I removed fsr variable and use code var for storing fsr */
if
(
fsr
&
FSR_IO
)
...
...
@@ -133,7 +142,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
#ifdef CONFIG_MMU
case
MICROBLAZE_PRIVILEGED_EXCEPTION
:
pr
intk
(
KERN_WARNING
"Privileged exception
\n
"
);
pr
_debug
(
KERN_WARNING
"Privileged exception
\n
"
);
/* "brk r0,r0" - used as debug breakpoint */
if
(
get_user
(
code
,
(
unsigned
long
*
)
regs
->
pc
)
==
0
&&
code
==
0x980c0000
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment