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
a52ab562
Commit
a52ab562
authored
Aug 18, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: remove some unnecessary sign extensions
parent
3c3080ab
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
118 deletions
+15
-118
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+7
-7
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+6
-6
arch/ppc64/kernel/sys32.S
arch/ppc64/kernel/sys32.S
+0
-4
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+2
-101
No files found.
arch/ppc64/kernel/misc.S
View file @
a52ab562
...
@@ -505,8 +505,8 @@ _GLOBAL(kernel_thread)
...
@@ -505,8 +505,8 @@ _GLOBAL(kernel_thread)
.
balign
8
.
balign
8
_GLOBAL
(
sys_call_table32
)
_GLOBAL
(
sys_call_table32
)
.
llong
.
sys_ni_syscall
/*
0
-
old
"setup()"
system
call
*/
.
llong
.
sys_ni_syscall
/*
0
-
old
"setup()"
system
call
*/
.
llong
.
sys
32
_exit
.
llong
.
sys_exit
.
llong
.
sys
32
_fork
.
llong
.
sys_fork
.
llong
.
sys_read
.
llong
.
sys_read
.
llong
.
sys_write
.
llong
.
sys_write
.
llong
.
sys32_open
/*
5
*/
.
llong
.
sys32_open
/*
5
*/
...
@@ -591,8 +591,8 @@ _GLOBAL(sys_call_table32)
...
@@ -591,8 +591,8 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_lstat
.
llong
.
sys32_lstat
.
llong
.
sys32_readlink
/*
85
*/
.
llong
.
sys32_readlink
/*
85
*/
.
llong
.
sys_uselib
.
llong
.
sys_uselib
.
llong
.
sys
32
_swapon
.
llong
.
sys_swapon
.
llong
.
sys
32
_reboot
.
llong
.
sys_reboot
.
llong
.
old32_readdir
.
llong
.
old32_readdir
.
llong
.
sys32_mmap
/*
90
*/
.
llong
.
sys32_mmap
/*
90
*/
.
llong
.
sys_munmap
.
llong
.
sys_munmap
...
@@ -624,7 +624,7 @@ _GLOBAL(sys_call_table32)
...
@@ -624,7 +624,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_ipc
.
llong
.
sys32_ipc
.
llong
.
sys_fsync
.
llong
.
sys_fsync
.
llong
.
ppc32_sigreturn
.
llong
.
ppc32_sigreturn
.
llong
.
sys
32
_clone
/*
120
*/
.
llong
.
sys_clone
/*
120
*/
.
llong
.
sys32_setdomainname
.
llong
.
sys32_setdomainname
.
llong
.
ppc64_newuname
.
llong
.
ppc64_newuname
.
llong
.
sys_ni_syscall
/*
old
modify_ldt
syscall
holder
*/
.
llong
.
sys_ni_syscall
/*
old
modify_ldt
syscall
holder
*/
...
@@ -638,7 +638,7 @@ _GLOBAL(sys_call_table32)
...
@@ -638,7 +638,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_quotactl
.
llong
.
sys_quotactl
.
llong
.
sys32_getpgid
.
llong
.
sys32_getpgid
.
llong
.
sys_fchdir
.
llong
.
sys_fchdir
.
llong
.
sys
32
_bdflush
.
llong
.
sys_bdflush
.
llong
.
sys32_sysfs
/*
135
*/
.
llong
.
sys32_sysfs
/*
135
*/
.
llong
.
sys32_personality
.
llong
.
sys32_personality
.
llong
.
sys_ni_syscall
/*
for
afs_syscall
*/
.
llong
.
sys_ni_syscall
/*
for
afs_syscall
*/
...
@@ -693,7 +693,7 @@ _GLOBAL(sys_call_table32)
...
@@ -693,7 +693,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_sendfile
.
llong
.
sys32_sendfile
.
llong
.
sys_ni_syscall
/*
streams1
*/
.
llong
.
sys_ni_syscall
/*
streams1
*/
.
llong
.
sys_ni_syscall
/*
streams2
*/
.
llong
.
sys_ni_syscall
/*
streams2
*/
.
llong
.
sys
32
_vfork
.
llong
.
sys_vfork
.
llong
.
sys32_getrlimit
/*
190
*/
.
llong
.
sys32_getrlimit
/*
190
*/
.
llong
.
sys32_readahead
.
llong
.
sys32_readahead
.
llong
.
sys_ni_syscall
/*
192
-
reserved
-
mmap2
*/
.
llong
.
sys_ni_syscall
/*
192
-
reserved
-
mmap2
*/
...
...
arch/ppc64/kernel/process.c
View file @
a52ab562
...
@@ -259,19 +259,19 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
...
@@ -259,19 +259,19 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
return
put_user
(
val
,
(
unsigned
int
*
)
adr
);
return
put_user
(
val
,
(
unsigned
int
*
)
adr
);
}
}
int
sys_clone
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_clone
(
unsigned
long
clone_flags
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
struct
pt_regs
*
regs
)
u32
p6
,
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
if
(
regs
->
msr
&
MSR_FP
)
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
giveup_fpu
(
current
);
p
=
do_fork
(
p1
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
);
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
int
sys_fork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_fork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
...
@@ -283,7 +283,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
...
@@ -283,7 +283,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
int
sys_vfork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
int
sys_vfork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
...
...
arch/ppc64/kernel/sys32.S
View file @
a52ab562
...
@@ -44,10 +44,6 @@ _GLOBAL(sys32_getsockopt)
...
@@ -44,10 +44,6 @@ _GLOBAL(sys32_getsockopt)
clrldi
r7
,
r7
,
32
/*
int
*
optlen
parm
*/
clrldi
r7
,
r7
,
32
/*
int
*
optlen
parm
*/
b
.
sys_getsockopt
b
.
sys_getsockopt
_GLOBAL
(
sys32_bdflush
)
extsw
r4
,
r4
/*
sign
extend
long
data
parm
*/
b
.
sys_bdflush
_GLOBAL
(
sys32_mmap2
)
_GLOBAL
(
sys32_mmap2
)
clrldi
r7
,
r7
,
32
/*
unsigned
long
fd
parm
*/
clrldi
r7
,
r7
,
32
/*
unsigned
long
fd
parm
*/
extsw
r8
,
r8
/*
off_t
offset
*/
extsw
r8
,
r8
/*
off_t
offset
*/
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
a52ab562
...
@@ -67,21 +67,6 @@
...
@@ -67,21 +67,6 @@
#include <asm/ppc32.h>
#include <asm/ppc32.h>
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
extern
unsigned
long
wall_jiffies
;
#define USEC_PER_SEC (1000000)
/*
* These are the flags in the MSR that the user is allowed to change
* by modifying the saved value of the MSR on the stack. SE and BE
* should not be in this list since gdb may want to change these. I.e,
* you should be able to step out of a signal handler to see what
* instruction executes next after the signal handler completes.
* Alternately, if you stepped into a signal handler, you should be
* able to continue 'til the next breakpoint from within the signal
* handler, even if the handler returns.
*/
#define MSR_USERCHANGE (MSR_FE0 | MSR_FE1)
extern
asmlinkage
long
sys_utime
(
char
*
filename
,
struct
utimbuf
*
times
);
extern
asmlinkage
long
sys_utime
(
char
*
filename
,
struct
utimbuf
*
times
);
struct
utimbuf32
{
struct
utimbuf32
{
...
@@ -1432,15 +1417,10 @@ asmlinkage long sys32_delete_module(const char *name_user)
...
@@ -1432,15 +1417,10 @@ asmlinkage long sys32_delete_module(const char *name_user)
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
/* Note: it is necessary to treat which as an unsigned int,
asmlinkage
long
sys32_query_module
(
const
char
*
name_user
,
int
which
,
char
*
buf
,
size_t
bufsize
,
size_t
*
ret
)
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_query_module
(
const
char
*
name_user
,
u32
which
,
char
*
buf
,
size_t
bufsize
,
size_t
*
ret
)
{
{
/* Let the program know about the new interface. Not that it'll do them much good. */
/* Let the program know about the new interface. Not that it'll do them much good. */
if
(
(
int
)
which
==
0
)
if
(
which
==
0
)
return
0
;
return
0
;
return
-
ENOSYS
;
return
-
ENOSYS
;
...
@@ -3766,19 +3746,6 @@ asmlinkage long sys32_access(const char * filename, u32 mode)
...
@@ -3766,19 +3746,6 @@ asmlinkage long sys32_access(const char * filename, u32 mode)
}
}
extern
asmlinkage
int
sys_clone
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, p7, and regs as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_clone
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_clone
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
asmlinkage
long
sys_creat
(
const
char
*
pathname
,
int
mode
);
extern
asmlinkage
long
sys_creat
(
const
char
*
pathname
,
int
mode
);
/* Note: it is necessary to treat mode as an unsigned int,
/* Note: it is necessary to treat mode as an unsigned int,
...
@@ -3792,19 +3759,6 @@ asmlinkage long sys32_creat(const char * pathname, u32 mode)
...
@@ -3792,19 +3759,6 @@ asmlinkage long sys32_creat(const char * pathname, u32 mode)
}
}
extern
asmlinkage
long
sys_exit
(
int
error_code
);
/* Note: it is necessary to treat error_code as an unsigned int,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_exit
(
u32
error_code
)
{
return
sys_exit
((
int
)
error_code
);
}
extern
asmlinkage
long
sys_wait4
(
pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
,
struct
rusage
*
ru
);
extern
asmlinkage
long
sys_wait4
(
pid_t
pid
,
unsigned
int
*
stat_addr
,
int
options
,
struct
rusage
*
ru
);
/* Note: it is necessary to treat pid and options as unsigned ints,
/* Note: it is necessary to treat pid and options as unsigned ints,
...
@@ -3847,19 +3801,6 @@ asmlinkage long sys32_waitpid(u32 pid, unsigned int * stat_addr, u32 options)
...
@@ -3847,19 +3801,6 @@ asmlinkage long sys32_waitpid(u32 pid, unsigned int * stat_addr, u32 options)
}
}
extern
asmlinkage
int
sys_fork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, and p6 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_fork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_fork
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
asmlinkage
long
sys_getgroups
(
int
gidsetsize
,
gid_t
*
grouplist
);
extern
asmlinkage
long
sys_getgroups
(
int
gidsetsize
,
gid_t
*
grouplist
);
/* Note: it is necessary to treat gidsetsize as an unsigned int,
/* Note: it is necessary to treat gidsetsize as an unsigned int,
...
@@ -4004,20 +3945,6 @@ asmlinkage long sys32_readlink(const char * path, char * buf, u32 bufsiz)
...
@@ -4004,20 +3945,6 @@ asmlinkage long sys32_readlink(const char * path, char * buf, u32 bufsiz)
return
sys_readlink
(
path
,
buf
,
(
int
)
bufsiz
);
return
sys_readlink
(
path
,
buf
,
(
int
)
bufsiz
);
}
}
extern
asmlinkage
long
sys_reboot
(
int
magic1
,
int
magic2
,
unsigned
int
cmd
,
void
*
arg
);
/* Note: it is necessary to treat magic1 and magic2 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_reboot
(
u32
magic1
,
u32
magic2
,
unsigned
int
cmd
,
void
*
arg
)
{
return
sys_reboot
((
int
)
magic1
,
(
int
)
magic2
,
cmd
,
arg
);
}
extern
asmlinkage
long
sys_sched_get_priority_max
(
int
policy
);
extern
asmlinkage
long
sys_sched_get_priority_max
(
int
policy
);
/* Note: it is necessary to treat option as an unsigned int,
/* Note: it is necessary to treat option as an unsigned int,
...
@@ -4174,19 +4101,6 @@ asmlinkage long sys32_ssetmask(u32 newmask)
...
@@ -4174,19 +4101,6 @@ asmlinkage long sys32_ssetmask(u32 newmask)
}
}
extern
asmlinkage
long
sys_swapon
(
const
char
*
specialfile
,
int
swap_flags
);
/* Note: it is necessary to treat swap_flags as an unsigned int,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
long
sys32_swapon
(
const
char
*
specialfile
,
u32
swap_flags
)
{
return
sys_swapon
(
specialfile
,
(
int
)
swap_flags
);
}
extern
asmlinkage
long
sys_syslog
(
int
type
,
char
*
buf
,
int
len
);
extern
asmlinkage
long
sys_syslog
(
int
type
,
char
*
buf
,
int
len
);
/* Note: it is necessary to treat type and len as an unsigned int,
/* Note: it is necessary to treat type and len as an unsigned int,
...
@@ -4226,19 +4140,6 @@ asmlinkage long sys32_umount(char * name, u32 flags)
...
@@ -4226,19 +4140,6 @@ asmlinkage long sys32_umount(char * name, u32 flags)
}
}
extern
asmlinkage
int
sys_vfork
(
int
p1
,
int
p2
,
int
p3
,
int
p4
,
int
p5
,
int
p6
,
struct
pt_regs
*
regs
);
/* Note: it is necessary to treat p1, p2, p3, p4, p5, and p6 as unsigned ints,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
asmlinkage
int
sys32_vfork
(
u32
p1
,
u32
p2
,
u32
p3
,
u32
p4
,
u32
p5
,
u32
p6
,
struct
pt_regs
*
regs
)
{
return
sys_vfork
((
int
)
p1
,
(
int
)
p2
,
(
int
)
p3
,
(
int
)
p4
,
(
int
)
p5
,
(
int
)
p6
,
regs
);
}
extern
ssize_t
sys_pread64
(
unsigned
int
fd
,
char
*
buf
,
size_t
count
,
extern
ssize_t
sys_pread64
(
unsigned
int
fd
,
char
*
buf
,
size_t
count
,
loff_t
pos
);
loff_t
pos
);
...
...
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