Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3fccc015
Commit
3fccc015
authored
Oct 23, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all the get_user / put_user related sparse warnings.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
3c5c8f67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
arch/mips/math-emu/cp1emu.c
arch/mips/math-emu/cp1emu.c
+15
-15
No files found.
arch/mips/math-emu/cp1emu.c
View file @
3fccc015
...
@@ -209,7 +209,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -209,7 +209,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
void
*
emulpc
,
*
contpc
;
void
*
emulpc
,
*
contpc
;
unsigned
int
cond
;
unsigned
int
cond
;
if
(
get_user
(
ir
,
(
mips_instruction
*
)
xcp
->
cp0_epc
))
{
if
(
get_user
(
ir
,
(
mips_instruction
__user
*
)
xcp
->
cp0_epc
))
{
fpuemustats
.
errors
++
;
fpuemustats
.
errors
++
;
return
SIGBUS
;
return
SIGBUS
;
}
}
...
@@ -240,7 +240,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -240,7 +240,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
#endif
#endif
return
SIGILL
;
return
SIGILL
;
}
}
if
(
get_user
(
ir
,
(
mips_instruction
*
)
emulpc
))
{
if
(
get_user
(
ir
,
(
mips_instruction
__user
*
)
emulpc
))
{
fpuemustats
.
errors
++
;
fpuemustats
.
errors
++
;
return
SIGBUS
;
return
SIGBUS
;
}
}
...
@@ -258,7 +258,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -258,7 +258,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
switch
(
MIPSInst_OPCODE
(
ir
))
{
switch
(
MIPSInst_OPCODE
(
ir
))
{
#ifndef SINGLE_ONLY_FPU
#ifndef SINGLE_ONLY_FPU
case
ldc1_op
:{
case
ldc1_op
:{
u64
*
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
u64
__user
*
va
=
(
u64
__user
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
MIPSInst_SIMM
(
ir
));
MIPSInst_SIMM
(
ir
));
u64
val
;
u64
val
;
...
@@ -272,7 +272,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -272,7 +272,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
}
}
case
sdc1_op
:{
case
sdc1_op
:{
u64
*
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
u64
__user
*
va
=
(
u64
__user
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
MIPSInst_SIMM
(
ir
));
MIPSInst_SIMM
(
ir
));
u64
val
;
u64
val
;
...
@@ -287,7 +287,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -287,7 +287,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
#endif
#endif
case
lwc1_op
:{
case
lwc1_op
:{
u32
*
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
u32
__user
*
va
=
(
u32
__user
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
MIPSInst_SIMM
(
ir
));
MIPSInst_SIMM
(
ir
));
u32
val
;
u32
val
;
...
@@ -307,7 +307,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -307,7 +307,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
}
}
case
swc1_op
:{
case
swc1_op
:{
u32
*
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
u32
__user
*
va
=
(
u32
__user
*
)
(
xcp
->
regs
[
MIPSInst_RS
(
ir
)]
+
MIPSInst_SIMM
(
ir
));
MIPSInst_SIMM
(
ir
));
u32
val
;
u32
val
;
...
@@ -458,8 +458,8 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
...
@@ -458,8 +458,8 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx)
(
xcp
->
cp0_epc
+
(
xcp
->
cp0_epc
+
(
MIPSInst_SIMM
(
ir
)
<<
2
));
(
MIPSInst_SIMM
(
ir
)
<<
2
));
if
(
get_user
(
ir
,
(
mips_instruction
*
)
if
(
get_user
(
ir
,
(
void
*
)
xcp
->
cp0_epc
))
{
(
mips_instruction
__user
*
)
xcp
->
cp0_epc
))
{
fpuemustats
.
errors
++
;
fpuemustats
.
errors
++
;
return
SIGBUS
;
return
SIGBUS
;
}
}
...
@@ -633,12 +633,12 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
...
@@ -633,12 +633,12 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
ieee754sp
(
*
handler
)
(
ieee754sp
,
ieee754sp
,
ieee754sp
);
ieee754sp
(
*
handler
)
(
ieee754sp
,
ieee754sp
,
ieee754sp
);
ieee754sp
fd
,
fr
,
fs
,
ft
;
ieee754sp
fd
,
fr
,
fs
,
ft
;
u32
*
va
;
u32
__user
*
va
;
u32
val
;
u32
val
;
switch
(
MIPSInst_FUNC
(
ir
))
{
switch
(
MIPSInst_FUNC
(
ir
))
{
case
lwxc1_op
:
case
lwxc1_op
:
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
va
=
(
void
__user
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
fpuemustats
.
loads
++
;
fpuemustats
.
loads
++
;
...
@@ -658,7 +658,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
...
@@ -658,7 +658,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
break
;
break
;
case
swxc1_op
:
case
swxc1_op
:
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
va
=
(
void
__user
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
fpuemustats
.
stores
++
;
fpuemustats
.
stores
++
;
...
@@ -727,12 +727,12 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
...
@@ -727,12 +727,12 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
case
d_fmt
:{
/* 1 */
case
d_fmt
:{
/* 1 */
ieee754dp
(
*
handler
)
(
ieee754dp
,
ieee754dp
,
ieee754dp
);
ieee754dp
(
*
handler
)
(
ieee754dp
,
ieee754dp
,
ieee754dp
);
ieee754dp
fd
,
fr
,
fs
,
ft
;
ieee754dp
fd
,
fr
,
fs
,
ft
;
u64
*
va
;
u64
__user
*
va
;
u64
val
;
u64
val
;
switch
(
MIPSInst_FUNC
(
ir
))
{
switch
(
MIPSInst_FUNC
(
ir
))
{
case
ldxc1_op
:
case
ldxc1_op
:
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
va
=
(
void
__user
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
fpuemustats
.
loads
++
;
fpuemustats
.
loads
++
;
...
@@ -744,7 +744,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
...
@@ -744,7 +744,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx,
break
;
break
;
case
sdxc1_op
:
case
sdxc1_op
:
va
=
(
void
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
va
=
(
void
__user
*
)
(
xcp
->
regs
[
MIPSInst_FR
(
ir
)]
+
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
xcp
->
regs
[
MIPSInst_FT
(
ir
)]);
fpuemustats
.
stores
++
;
fpuemustats
.
stores
++
;
...
@@ -1298,7 +1298,7 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp,
...
@@ -1298,7 +1298,7 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp,
do
{
do
{
prevepc
=
xcp
->
cp0_epc
;
prevepc
=
xcp
->
cp0_epc
;
if
(
get_user
(
insn
,
(
mips_instruction
*
)
xcp
->
cp0_epc
))
{
if
(
get_user
(
insn
,
(
mips_instruction
__user
*
)
xcp
->
cp0_epc
))
{
fpuemustats
.
errors
++
;
fpuemustats
.
errors
++
;
return
SIGBUS
;
return
SIGBUS
;
}
}
...
...
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