Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
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-2.6.23
Commits
e5679882
Commit
e5679882
authored
Nov 30, 2006
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Work around bogus gcc warnings.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
dd6bfd62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
arch/mips/kernel/traps.c
arch/mips/kernel/traps.c
+22
-21
No files found.
arch/mips/kernel/traps.c
View file @
e5679882
...
@@ -399,19 +399,6 @@ asmlinkage void do_be(struct pt_regs *regs)
...
@@ -399,19 +399,6 @@ asmlinkage void do_be(struct pt_regs *regs)
force_sig
(
SIGBUS
,
current
);
force_sig
(
SIGBUS
,
current
);
}
}
static
inline
int
get_insn_opcode
(
struct
pt_regs
*
regs
,
unsigned
int
*
opcode
)
{
unsigned
int
__user
*
epc
;
epc
=
(
unsigned
int
__user
*
)
regs
->
cp0_epc
+
((
regs
->
cp0_cause
&
CAUSEF_BD
)
!=
0
);
if
(
!
get_user
(
*
opcode
,
epc
))
return
0
;
force_sig
(
SIGSEGV
,
current
);
return
1
;
}
/*
/*
* ll/sc emulation
* ll/sc emulation
*/
*/
...
@@ -546,8 +533,8 @@ static inline int simulate_llsc(struct pt_regs *regs)
...
@@ -546,8 +533,8 @@ static inline int simulate_llsc(struct pt_regs *regs)
{
{
unsigned
int
opcode
;
unsigned
int
opcode
;
if
(
unlikely
(
get_insn_opcode
(
regs
,
&
opcode
)))
if
(
get_user
(
opcode
,
(
unsigned
int
__user
*
)
exception_epc
(
regs
)))
return
-
EFAULT
;
goto
out_sigsegv
;
if
((
opcode
&
OPCODE
)
==
LL
)
{
if
((
opcode
&
OPCODE
)
==
LL
)
{
simulate_ll
(
regs
,
opcode
);
simulate_ll
(
regs
,
opcode
);
...
@@ -559,6 +546,10 @@ static inline int simulate_llsc(struct pt_regs *regs)
...
@@ -559,6 +546,10 @@ static inline int simulate_llsc(struct pt_regs *regs)
}
}
return
-
EFAULT
;
/* Strange things going on ... */
return
-
EFAULT
;
/* Strange things going on ... */
out_sigsegv:
force_sig
(
SIGSEGV
,
current
);
return
-
EFAULT
;
}
}
/*
/*
...
@@ -571,8 +562,8 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
...
@@ -571,8 +562,8 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
struct
thread_info
*
ti
=
task_thread_info
(
current
);
struct
thread_info
*
ti
=
task_thread_info
(
current
);
unsigned
int
opcode
;
unsigned
int
opcode
;
if
(
unlikely
(
get_insn_opcode
(
regs
,
&
opcode
)))
if
(
get_user
(
opcode
,
(
unsigned
int
__user
*
)
exception_epc
(
regs
)))
return
-
EFAULT
;
goto
out_sigsegv
;
if
(
unlikely
(
compute_return_epc
(
regs
)))
if
(
unlikely
(
compute_return_epc
(
regs
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -591,6 +582,10 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
...
@@ -591,6 +582,10 @@ static inline int simulate_rdhwr(struct pt_regs *regs)
/* Not ours. */
/* Not ours. */
return
-
EFAULT
;
return
-
EFAULT
;
out_sigsegv:
force_sig
(
SIGSEGV
,
current
);
return
-
EFAULT
;
}
}
asmlinkage
void
do_ov
(
struct
pt_regs
*
regs
)
asmlinkage
void
do_ov
(
struct
pt_regs
*
regs
)
...
@@ -676,8 +671,8 @@ asmlinkage void do_bp(struct pt_regs *regs)
...
@@ -676,8 +671,8 @@ asmlinkage void do_bp(struct pt_regs *regs)
die_if_kernel
(
"Break instruction in kernel code"
,
regs
);
die_if_kernel
(
"Break instruction in kernel code"
,
regs
);
if
(
get_
insn_opcode
(
regs
,
&
opcode
))
if
(
get_
user
(
opcode
,
(
unsigned
int
__user
*
)
exception_epc
(
regs
)
))
return
;
goto
out_sigsegv
;
/*
/*
* There is the ancient bug in the MIPS assemblers that the break
* There is the ancient bug in the MIPS assemblers that the break
...
@@ -710,6 +705,9 @@ asmlinkage void do_bp(struct pt_regs *regs)
...
@@ -710,6 +705,9 @@ asmlinkage void do_bp(struct pt_regs *regs)
default:
default:
force_sig
(
SIGTRAP
,
current
);
force_sig
(
SIGTRAP
,
current
);
}
}
out_sigsegv:
force_sig
(
SIGSEGV
,
current
);
}
}
asmlinkage
void
do_tr
(
struct
pt_regs
*
regs
)
asmlinkage
void
do_tr
(
struct
pt_regs
*
regs
)
...
@@ -719,8 +717,8 @@ asmlinkage void do_tr(struct pt_regs *regs)
...
@@ -719,8 +717,8 @@ asmlinkage void do_tr(struct pt_regs *regs)
die_if_kernel
(
"Trap instruction in kernel code"
,
regs
);
die_if_kernel
(
"Trap instruction in kernel code"
,
regs
);
if
(
get_
insn_opcode
(
regs
,
&
opcode
))
if
(
get_
user
(
opcode
,
(
unsigned
int
__user
*
)
exception_epc
(
regs
)
))
return
;
goto
out_sigsegv
;
/* Immediate versions don't provide a code. */
/* Immediate versions don't provide a code. */
if
(
!
(
opcode
&
OPCODE
))
if
(
!
(
opcode
&
OPCODE
))
...
@@ -747,6 +745,9 @@ asmlinkage void do_tr(struct pt_regs *regs)
...
@@ -747,6 +745,9 @@ asmlinkage void do_tr(struct pt_regs *regs)
default:
default:
force_sig
(
SIGTRAP
,
current
);
force_sig
(
SIGTRAP
,
current
);
}
}
out_sigsegv:
force_sig
(
SIGSEGV
,
current
);
}
}
asmlinkage
void
do_ri
(
struct
pt_regs
*
regs
)
asmlinkage
void
do_ri
(
struct
pt_regs
*
regs
)
...
...
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