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
Kirill Smelkov
linux
Commits
8db4d061
Commit
8db4d061
authored
Feb 22, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.davemloft.net:/disk1/BK/sparc-2.6
into kernel.bkbits.net:/home/davem/sparc-2.6
parents
b457c5cd
5d12615b
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
85 additions
and
82 deletions
+85
-82
arch/alpha/kernel/osf_sys.c
arch/alpha/kernel/osf_sys.c
+1
-1
arch/arm/kernel/sys_arm.c
arch/arm/kernel/sys_arm.c
+2
-2
arch/arm26/kernel/sys_arm.c
arch/arm26/kernel/sys_arm.c
+2
-2
arch/cris/kernel/sys_cris.c
arch/cris/kernel/sys_cris.c
+1
-1
arch/h8300/kernel/sys_h8300.c
arch/h8300/kernel/sys_h8300.c
+1
-1
arch/i386/kernel/sys_i386.c
arch/i386/kernel/sys_i386.c
+2
-2
arch/ia64/ia32/sys_ia32.c
arch/ia64/ia32/sys_ia32.c
+1
-1
arch/ia64/kernel/sys_ia64.c
arch/ia64/kernel/sys_ia64.c
+1
-1
arch/ia64/sn/io/machvec/pci_dma.c
arch/ia64/sn/io/machvec/pci_dma.c
+33
-39
arch/m68k/kernel/sys_m68k.c
arch/m68k/kernel/sys_m68k.c
+1
-1
arch/mips/kernel/linux32.c
arch/mips/kernel/linux32.c
+1
-1
arch/mips/kernel/syscall.c
arch/mips/kernel/syscall.c
+2
-2
arch/mips/kernel/sysirix.c
arch/mips/kernel/sysirix.c
+1
-1
arch/parisc/kernel/sys_parisc.c
arch/parisc/kernel/sys_parisc.c
+1
-1
arch/ppc/kernel/syscalls.c
arch/ppc/kernel/syscalls.c
+1
-1
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+1
-1
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/syscalls.c
+2
-2
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.c
+1
-1
arch/s390/kernel/sys_s390.c
arch/s390/kernel/sys_s390.c
+1
-1
arch/sh/kernel/sys_sh.c
arch/sh/kernel/sys_sh.c
+2
-2
arch/sparc/kernel/sys_sparc.c
arch/sparc/kernel/sys_sparc.c
+2
-2
arch/sparc/kernel/sys_sunos.c
arch/sparc/kernel/sys_sunos.c
+2
-2
arch/sparc64/kernel/sys_sparc.c
arch/sparc64/kernel/sys_sparc.c
+1
-1
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+1
-1
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/sys_sunos32.c
+2
-2
arch/um/kernel/syscall_kern.c
arch/um/kernel/syscall_kern.c
+2
-2
arch/v850/kernel/syscalls.c
arch/v850/kernel/syscalls.c
+2
-2
arch/x86_64/ia32/ipc32.c
arch/x86_64/ia32/ipc32.c
+1
-1
arch/x86_64/kernel/sys_x86_64.c
arch/x86_64/kernel/sys_x86_64.c
+2
-2
include/asm-ia64/tlb.h
include/asm-ia64/tlb.h
+1
-0
include/linux/shm.h
include/linux/shm.h
+10
-1
ipc/shm.c
ipc/shm.c
+1
-1
kernel/sys.c
kernel/sys.c
+0
-1
No files found.
arch/alpha/kernel/osf_sys.c
View file @
8db4d061
...
@@ -464,7 +464,7 @@ osf_shmat(int shmid, void *shmaddr, int shmflg)
...
@@ -464,7 +464,7 @@ osf_shmat(int shmid, void *shmaddr, int shmflg)
unsigned
long
raddr
;
unsigned
long
raddr
;
long
err
;
long
err
;
err
=
sys
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
);
err
=
do
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
);
/*
/*
* This works because all user-level addresses are
* This works because all user-level addresses are
...
...
arch/arm/kernel/sys_arm.c
View file @
8db4d061
...
@@ -210,7 +210,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
...
@@ -210,7 +210,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
*
)
third
);
return
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -218,7 +218,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
...
@@ -218,7 +218,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
return
sys
_shmat
(
first
,
(
char
*
)
ptr
,
return
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
...
...
arch/arm26/kernel/sys_arm.c
View file @
8db4d061
...
@@ -211,7 +211,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
...
@@ -211,7 +211,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
*
)
third
);
return
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -219,7 +219,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
...
@@ -219,7 +219,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr,
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
return
sys
_shmat
(
first
,
(
char
*
)
ptr
,
return
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
...
...
arch/cris/kernel/sys_cris.c
View file @
8db4d061
...
@@ -155,7 +155,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -155,7 +155,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
case
SHMAT
:
{
case
SHMAT
:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
return
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
...
...
arch/h8300/kernel/sys_h8300.c
View file @
8db4d061
...
@@ -240,7 +240,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -240,7 +240,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
arch/i386/kernel/sys_i386.c
View file @
8db4d061
...
@@ -186,7 +186,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -186,7 +186,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
return
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
...
@@ -195,7 +195,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -195,7 +195,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
/* The "(ulong *) third" is valid _only_ because of the kernel segment thing */
/* The "(ulong *) third" is valid _only_ because of the kernel segment thing */
return
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
*
)
third
);
return
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
return
sys_shmdt
((
char
__user
*
)
ptr
);
return
sys_shmdt
((
char
__user
*
)
ptr
);
...
...
arch/ia64/ia32/sys_ia32.c
View file @
8db4d061
...
@@ -1447,7 +1447,7 @@ shmat32 (int first, int second, int third, int version, void *uptr)
...
@@ -1447,7 +1447,7 @@ shmat32 (int first, int second, int third, int version, void *uptr)
if
(
version
==
1
)
if
(
version
==
1
)
return
-
EINVAL
;
/* iBCS2 emulator entry point: unsupported */
return
-
EINVAL
;
/* iBCS2 emulator entry point: unsupported */
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
return
put_user
(
raddr
,
uaddr
);
return
put_user
(
raddr
,
uaddr
);
...
...
arch/ia64/kernel/sys_ia64.c
View file @
8db4d061
...
@@ -98,7 +98,7 @@ ia64_shmat (int shmid, void *shmaddr, int shmflg)
...
@@ -98,7 +98,7 @@ ia64_shmat (int shmid, void *shmaddr, int shmflg)
unsigned
long
raddr
;
unsigned
long
raddr
;
int
retval
;
int
retval
;
retval
=
sys
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
);
retval
=
do
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
);
if
(
retval
<
0
)
if
(
retval
<
0
)
return
retval
;
return
retval
;
...
...
arch/ia64/sn/io/machvec/pci_dma.c
View file @
8db4d061
...
@@ -225,13 +225,13 @@ sn_pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr
...
@@ -225,13 +225,13 @@ sn_pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr
int
int
sn_pci_map_sg
(
struct
pci_dev
*
hwdev
,
struct
scatterlist
*
sg
,
int
nents
,
int
direction
)
sn_pci_map_sg
(
struct
pci_dev
*
hwdev
,
struct
scatterlist
*
sg
,
int
nents
,
int
direction
)
{
{
int
i
;
int
i
;
vertex_hdl_t
vhdl
;
vertex_hdl_t
vhdl
;
unsigned
long
phys_addr
;
unsigned
long
phys_addr
;
struct
sn_device_sysdata
*
device_sysdata
;
struct
sn_device_sysdata
*
device_sysdata
;
pcibr_dmamap_t
dma_map
;
pcibr_dmamap_t
dma_map
;
struct
scatterlist
*
saved_sg
=
sg
;
struct
scatterlist
*
saved_sg
=
sg
;
unsigned
dma_flag
;
/* can't go anywhere w/o a direction in life */
/* can't go anywhere w/o a direction in life */
if
(
direction
==
PCI_DMA_NONE
)
if
(
direction
==
PCI_DMA_NONE
)
...
@@ -243,34 +243,33 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
...
@@ -243,34 +243,33 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
device_sysdata
=
SN_DEVICE_SYSDATA
(
hwdev
);
device_sysdata
=
SN_DEVICE_SYSDATA
(
hwdev
);
vhdl
=
device_sysdata
->
vhdl
;
vhdl
=
device_sysdata
->
vhdl
;
/*
* 64 bit DMA mask can use direct translations
* PCI only
* 32 bit DMA mask might be able to use direct, otherwise use dma map
* PCI-X
* only 64 bit DMA mask supported; both direct and dma map will fail
*/
if
(
hwdev
->
dma_mask
==
~
0UL
)
dma_flag
=
PCIIO_DMA_DATA
|
PCIIO_DMA_A64
;
else
dma_flag
=
PCIIO_DMA_DATA
;
/*
/*
* Setup a DMA address for each entry in the
* Setup a DMA address for each entry in the
* scatterlist.
* scatterlist.
*/
*/
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
for
(
i
=
0
;
i
<
nents
;
i
++
,
sg
++
)
{
phys_addr
=
__pa
((
unsigned
long
)
page_address
(
sg
->
page
)
+
sg
->
offset
);
phys_addr
=
__pa
((
unsigned
long
)
page_address
(
sg
->
page
)
+
sg
->
offset
);
/*
* Handle 32-63 bit cards via direct mapping
*/
if
(
IS_PCI32G
(
hwdev
))
{
sg
->
dma_address
=
pcibr_dmatrans_addr
(
vhdl
,
NULL
,
phys_addr
,
sg
->
dma_address
=
pcibr_dmatrans_addr
(
vhdl
,
NULL
,
phys_addr
,
sg
->
length
,
PCIIO_DMA_DATA
);
sg
->
length
,
dma_flag
);
sg
->
dma_length
=
sg
->
length
;
/*
* See if we got a direct map entry
*/
if
(
sg
->
dma_address
)
{
if
(
sg
->
dma_address
)
{
sg
->
dma_length
=
sg
->
length
;
continue
;
continue
;
}
}
}
dma_map
=
pcibr_dmamap_alloc
(
vhdl
,
NULL
,
sg
->
length
,
PCIIO_DMA_DATA
|
MINIMAL_ATE_FLAG
(
phys_addr
,
sg
->
length
));
/*
* It is a 32 bit card and we cannot do direct mapping,
* so we use an ATE.
*/
dma_map
=
pcibr_dmamap_alloc
(
vhdl
,
NULL
,
sg
->
length
,
PCIIO_DMA_DATA
);
if
(
!
dma_map
)
{
if
(
!
dma_map
)
{
printk
(
KERN_ERR
"sn_pci_map_sg: Unable to allocate "
printk
(
KERN_ERR
"sn_pci_map_sg: Unable to allocate "
"anymore 32 bit page map entries.
\n
"
);
"anymore 32 bit page map entries.
\n
"
);
...
@@ -356,38 +355,33 @@ sn_pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
...
@@ -356,38 +355,33 @@ sn_pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
unsigned
long
phys_addr
;
unsigned
long
phys_addr
;
struct
sn_device_sysdata
*
device_sysdata
;
struct
sn_device_sysdata
*
device_sysdata
;
pcibr_dmamap_t
dma_map
=
NULL
;
pcibr_dmamap_t
dma_map
=
NULL
;
unsigned
dma_flag
;
if
(
direction
==
PCI_DMA_NONE
)
if
(
direction
==
PCI_DMA_NONE
)
BUG
();
BUG
();
/* SN cannot support DMA addresses smaller than 32 bits. */
if
(
IS_PCI32L
(
hwdev
))
return
0
;
/*
/*
* find vertex for the device
* find vertex for the device
*/
*/
device_sysdata
=
SN_DEVICE_SYSDATA
(
hwdev
);
device_sysdata
=
SN_DEVICE_SYSDATA
(
hwdev
);
vhdl
=
device_sysdata
->
vhdl
;
vhdl
=
device_sysdata
->
vhdl
;
/*
* Call our dmamap interface
*/
dma_addr
=
0
;
phys_addr
=
__pa
(
ptr
);
phys_addr
=
__pa
(
ptr
);
/*
/*
* Devices that support 32 bit to 63 bit DMA addresses get
* 64 bit DMA mask can use direct translations
* 32 bit DMA addresses.
* PCI only
*
* 32 bit DMA mask might be able to use direct, otherwise use dma map
* First try to get a 32 bit direct map register.
* PCI-X
*/
* only 64 bit DMA mask supported; both direct and dma map will fail
if
(
IS_PCI32G
(
hwdev
))
{
*/
dma_addr
=
pcibr_dmatrans_addr
(
vhdl
,
NULL
,
phys_addr
,
size
,
if
(
hwdev
->
dma_mask
==
~
0UL
)
PCIIO_DMA_DATA
);
dma_flag
=
PCIIO_DMA_DATA
|
PCIIO_DMA_A64
;
else
dma_flag
=
PCIIO_DMA_DATA
;
dma_addr
=
pcibr_dmatrans_addr
(
vhdl
,
NULL
,
phys_addr
,
size
,
dma_flag
);
if
(
dma_addr
)
if
(
dma_addr
)
return
dma_addr
;
return
dma_addr
;
}
/*
/*
* It's a 32 bit card and we cannot do direct mapping so
* It's a 32 bit card and we cannot do direct mapping so
...
...
arch/m68k/kernel/sys_m68k.c
View file @
8db4d061
...
@@ -241,7 +241,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -241,7 +241,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
arch/mips/kernel/linux32.c
View file @
8db4d061
...
@@ -1460,7 +1460,7 @@ do_sys32_shmat (int first, int second, int third, int version, void *uptr)
...
@@ -1460,7 +1460,7 @@ do_sys32_shmat (int first, int second, int third, int version, void *uptr)
if
(
version
==
1
)
if
(
version
==
1
)
return
err
;
return
err
;
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
err
=
put_user
(
raddr
,
uaddr
);
err
=
put_user
(
raddr
,
uaddr
);
...
...
arch/mips/kernel/syscall.c
View file @
8db4d061
...
@@ -342,7 +342,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -342,7 +342,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
*
)
third
);
return
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -350,7 +350,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
...
@@ -350,7 +350,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
return
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
return
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
return
sys_shmdt
((
char
*
)
ptr
);
return
sys_shmdt
((
char
*
)
ptr
);
...
...
arch/mips/kernel/sysirix.c
View file @
8db4d061
...
@@ -968,7 +968,7 @@ asmlinkage int irix_shmsys(int opcode, unsigned long arg0, unsigned long arg1,
...
@@ -968,7 +968,7 @@ asmlinkage int irix_shmsys(int opcode, unsigned long arg0, unsigned long arg1,
{
{
switch
(
opcode
)
{
switch
(
opcode
)
{
case
0
:
case
0
:
return
sys
_shmat
((
int
)
arg0
,
(
char
*
)
arg1
,
(
int
)
arg2
,
return
do
_shmat
((
int
)
arg0
,
(
char
*
)
arg1
,
(
int
)
arg2
,
(
unsigned
long
*
)
arg3
);
(
unsigned
long
*
)
arg3
);
case
1
:
case
1
:
return
sys_shmctl
((
int
)
arg0
,
(
int
)
arg1
,
(
struct
shmid_ds
*
)
arg2
);
return
sys_shmctl
((
int
)
arg0
,
(
int
)
arg1
,
(
struct
shmid_ds
*
)
arg2
);
...
...
arch/parisc/kernel/sys_parisc.c
View file @
8db4d061
...
@@ -173,7 +173,7 @@ long sys_shmat_wrapper(int shmid, char *shmaddr, int shmflag)
...
@@ -173,7 +173,7 @@ long sys_shmat_wrapper(int shmid, char *shmaddr, int shmflag)
unsigned
long
raddr
;
unsigned
long
raddr
;
int
r
;
int
r
;
r
=
sys
_shmat
(
shmid
,
shmaddr
,
shmflag
,
&
raddr
);
r
=
do
_shmat
(
shmid
,
shmaddr
,
shmflag
,
&
raddr
);
if
(
r
<
0
)
if
(
r
<
0
)
return
r
;
return
r
;
return
raddr
;
return
raddr
;
...
...
arch/ppc/kernel/syscalls.c
View file @
8db4d061
...
@@ -119,7 +119,7 @@ sys_ipc (uint call, int first, int second, int third, void __user *ptr, long fif
...
@@ -119,7 +119,7 @@ sys_ipc (uint call, int first, int second, int third, void __user *ptr, long fif
if
((
ret
=
verify_area
(
VERIFY_WRITE
,
(
ulong
__user
*
)
third
,
if
((
ret
=
verify_area
(
VERIFY_WRITE
,
(
ulong
__user
*
)
third
,
sizeof
(
ulong
))))
sizeof
(
ulong
))))
break
;
break
;
ret
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
break
;
break
;
ret
=
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
ret
=
put_user
(
raddr
,
(
ulong
__user
*
)
third
);
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
8db4d061
...
@@ -1649,7 +1649,7 @@ do_sys32_shmat(int first, int second, int third, int version, void *uptr)
...
@@ -1649,7 +1649,7 @@ do_sys32_shmat(int first, int second, int third, int version, void *uptr)
if
(
version
==
1
)
if
(
version
==
1
)
return
err
;
return
err
;
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
err
=
put_user
(
raddr
,
uaddr
);
err
=
put_user
(
raddr
,
uaddr
);
...
...
arch/ppc64/kernel/syscalls.c
View file @
8db4d061
...
@@ -122,7 +122,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
...
@@ -122,7 +122,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
break
;
break
;
ret
=
put_user
(
raddr
,
(
ulong
*
)
third
);
ret
=
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -132,7 +132,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
...
@@ -132,7 +132,7 @@ sys_ipc (uint call, int first, int second, long third, void *ptr, long fifth)
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
break
;
break
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
(
ulong
*
)
third
);
break
;
break
;
}
}
...
...
arch/s390/kernel/compat_linux.c
View file @
8db4d061
...
@@ -721,7 +721,7 @@ static int do_sys32_shmat (int first, int second, int third, int version, void *
...
@@ -721,7 +721,7 @@ static int do_sys32_shmat (int first, int second, int third, int version, void *
if
(
version
==
1
)
if
(
version
==
1
)
goto
out
;
goto
out
;
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
err
=
put_user
(
raddr
,
uaddr
);
err
=
put_user
(
raddr
,
uaddr
);
...
...
arch/s390/kernel/sys_s390.c
View file @
8db4d061
...
@@ -225,7 +225,7 @@ asmlinkage __SYS_RETTYPE sys_ipc (uint call, int first, int second,
...
@@ -225,7 +225,7 @@ asmlinkage __SYS_RETTYPE sys_ipc (uint call, int first, int second,
case
SHMAT
:
{
case
SHMAT
:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
*
)
third
);
return
put_user
(
raddr
,
(
ulong
*
)
third
);
...
...
arch/sh/kernel/sys_sh.c
View file @
8db4d061
...
@@ -200,7 +200,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
...
@@ -200,7 +200,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
ret
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -209,7 +209,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
...
@@ -209,7 +209,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
return
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
return
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
*
)
third
);
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
...
...
arch/sparc/kernel/sys_sparc.c
View file @
8db4d061
...
@@ -185,7 +185,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
...
@@ -185,7 +185,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
switch
(
version
)
{
switch
(
version
)
{
case
0
:
default
:
{
case
0
:
default
:
{
ulong
raddr
;
ulong
raddr
;
err
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
err
=
-
EFAULT
;
err
=
-
EFAULT
;
...
@@ -195,7 +195,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
...
@@ -195,7 +195,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
goto
out
;
goto
out
;
}
}
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
err
=
sys
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
__user
*
)
third
);
err
=
do
_shmat
(
first
,
(
char
__user
*
)
ptr
,
second
,
(
ulong
__user
*
)
third
);
goto
out
;
goto
out
;
}
}
case
SHMDT
:
case
SHMDT
:
...
...
arch/sparc/kernel/sys_sunos.c
View file @
8db4d061
...
@@ -1006,8 +1006,8 @@ asmlinkage int sunos_shmsys(int op, unsigned long arg1, unsigned long arg2,
...
@@ -1006,8 +1006,8 @@ asmlinkage int sunos_shmsys(int op, unsigned long arg1, unsigned long arg2,
switch
(
op
)
{
switch
(
op
)
{
case
0
:
case
0
:
/*
sys
_shmat(): attach a shared memory area */
/*
do
_shmat(): attach a shared memory area */
rval
=
sys
_shmat
((
int
)
arg1
,(
char
*
)
arg2
,(
int
)
arg3
,
&
raddr
);
rval
=
do
_shmat
((
int
)
arg1
,(
char
*
)
arg2
,(
int
)
arg3
,
&
raddr
);
if
(
!
rval
)
if
(
!
rval
)
rval
=
(
int
)
raddr
;
rval
=
(
int
)
raddr
;
break
;
break
;
...
...
arch/sparc64/kernel/sys_sparc.c
View file @
8db4d061
...
@@ -254,7 +254,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
...
@@ -254,7 +254,7 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
switch
(
call
)
{
switch
(
call
)
{
case
SHMAT
:
{
case
SHMAT
:
{
ulong
raddr
;
ulong
raddr
;
err
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
!
err
)
{
if
(
!
err
)
{
if
(
put_user
(
raddr
,
(
ulong
__user
*
)
third
))
if
(
put_user
(
raddr
,
(
ulong
__user
*
)
third
))
err
=
-
EFAULT
;
err
=
-
EFAULT
;
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
8db4d061
...
@@ -642,7 +642,7 @@ static int do_sys32_shmat (int first, int second, int third, int version, void *
...
@@ -642,7 +642,7 @@ static int do_sys32_shmat (int first, int second, int third, int version, void *
if
(
version
==
1
)
if
(
version
==
1
)
goto
out
;
goto
out
;
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
err
=
put_user
(
raddr
,
uaddr
);
err
=
put_user
(
raddr
,
uaddr
);
...
...
arch/sparc64/kernel/sys_sunos32.c
View file @
8db4d061
...
@@ -1139,8 +1139,8 @@ asmlinkage int sunos_shmsys(int op, u32 arg1, u32 arg2, u32 arg3)
...
@@ -1139,8 +1139,8 @@ asmlinkage int sunos_shmsys(int op, u32 arg1, u32 arg2, u32 arg3)
switch
(
op
)
{
switch
(
op
)
{
case
0
:
case
0
:
/*
sys
_shmat(): attach a shared memory area */
/*
do
_shmat(): attach a shared memory area */
rval
=
sys
_shmat
((
int
)
arg1
,(
char
*
)
A
(
arg2
),(
int
)
arg3
,
&
raddr
);
rval
=
do
_shmat
((
int
)
arg1
,(
char
*
)
A
(
arg2
),(
int
)
arg3
,
&
raddr
);
if
(
!
rval
)
if
(
!
rval
)
rval
=
(
int
)
raddr
;
rval
=
(
int
)
raddr
;
break
;
break
;
...
...
arch/um/kernel/syscall_kern.c
View file @
8db4d061
...
@@ -235,7 +235,7 @@ int sys_ipc (uint call, int first, int second,
...
@@ -235,7 +235,7 @@ int sys_ipc (uint call, int first, int second,
switch
(
version
)
{
switch
(
version
)
{
default:
{
default:
{
ulong
raddr
;
ulong
raddr
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
return
put_user
(
raddr
,
(
ulong
*
)
third
);
return
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -243,7 +243,7 @@ int sys_ipc (uint call, int first, int second,
...
@@ -243,7 +243,7 @@ int sys_ipc (uint call, int first, int second,
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
return
-
EINVAL
;
return
-
EINVAL
;
return
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
return
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
}
}
case
SHMDT
:
case
SHMDT
:
return
sys_shmdt
((
char
*
)
ptr
);
return
sys_shmdt
((
char
*
)
ptr
);
...
...
arch/v850/kernel/syscalls.c
View file @
8db4d061
...
@@ -106,7 +106,7 @@ sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
...
@@ -106,7 +106,7 @@ sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
if
((
ret
=
verify_area
(
VERIFY_WRITE
,
(
ulong
*
)
third
,
if
((
ret
=
verify_area
(
VERIFY_WRITE
,
(
ulong
*
)
third
,
sizeof
(
ulong
))))
sizeof
(
ulong
))))
break
;
break
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
&
raddr
);
if
(
ret
)
if
(
ret
)
break
;
break
;
ret
=
put_user
(
raddr
,
(
ulong
*
)
third
);
ret
=
put_user
(
raddr
,
(
ulong
*
)
third
);
...
@@ -115,7 +115,7 @@ sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
...
@@ -115,7 +115,7 @@ sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
case
1
:
/* iBCS2 emulator entry point */
case
1
:
/* iBCS2 emulator entry point */
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
if
(
!
segment_eq
(
get_fs
(),
get_ds
()))
break
;
break
;
ret
=
sys
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
ret
=
do
_shmat
(
first
,
(
char
*
)
ptr
,
second
,
(
ulong
*
)
third
);
(
ulong
*
)
third
);
break
;
break
;
}
}
...
...
arch/x86_64/ia32/ipc32.c
View file @
8db4d061
...
@@ -457,7 +457,7 @@ shmat32 (int first, int second, int third, int version, void *uptr)
...
@@ -457,7 +457,7 @@ shmat32 (int first, int second, int third, int version, void *uptr)
if
(
version
==
1
)
if
(
version
==
1
)
return
-
EINVAL
;
/* iBCS2 emulator entry point: unsupported */
return
-
EINVAL
;
/* iBCS2 emulator entry point: unsupported */
err
=
sys
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
err
=
do
_shmat
(
first
,
uptr
,
second
,
&
raddr
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
return
put_user
(
raddr
,
uaddr
);
return
put_user
(
raddr
,
uaddr
);
...
...
arch/x86_64/kernel/sys_x86_64.c
View file @
8db4d061
...
@@ -155,7 +155,7 @@ asmlinkage long sys_uname(struct new_utsname * name)
...
@@ -155,7 +155,7 @@ asmlinkage long sys_uname(struct new_utsname * name)
asmlinkage
long
wrap_sys_shmat
(
int
shmid
,
char
*
shmaddr
,
int
shmflg
)
asmlinkage
long
wrap_sys_shmat
(
int
shmid
,
char
*
shmaddr
,
int
shmflg
)
{
{
unsigned
long
raddr
;
unsigned
long
raddr
;
return
sys
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
)
?:
(
long
)
raddr
;
return
do
_shmat
(
shmid
,
shmaddr
,
shmflg
,
&
raddr
)
?:
(
long
)
raddr
;
}
}
asmlinkage
long
sys_time64
(
long
*
tloc
)
asmlinkage
long
sys_time64
(
long
*
tloc
)
...
...
include/asm-ia64/tlb.h
View file @
8db4d061
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/swap.h>
#include <asm/pgalloc.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
...
...
include/linux/shm.h
View file @
8db4d061
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#define _LINUX_SHM_H_
#define _LINUX_SHM_H_
#include <linux/ipc.h>
#include <linux/ipc.h>
#include <linux/errno.h>
#include <asm/page.h>
#include <asm/page.h>
/*
/*
...
@@ -90,7 +91,15 @@ struct shmid_kernel /* private to the kernel */
...
@@ -90,7 +91,15 @@ struct shmid_kernel /* private to the kernel */
#define SHM_LOCKED 02000
/* segment will not be swapped */
#define SHM_LOCKED 02000
/* segment will not be swapped */
#define SHM_HUGETLB 04000
/* segment will use huge TLB pages */
#define SHM_HUGETLB 04000
/* segment will use huge TLB pages */
long
sys_shmat
(
int
shmid
,
char
__user
*
shmaddr
,
int
shmflg
,
unsigned
long
*
addr
);
#ifdef CONFIG_SYSVIPC
long
do_shmat
(
int
shmid
,
char
__user
*
shmaddr
,
int
shmflg
,
unsigned
long
*
addr
);
#else
static
inline
long
do_shmat
(
int
shmid
,
char
__user
*
shmaddr
,
int
shmflg
,
unsigned
long
*
addr
)
{
return
-
ENOSYS
;
}
#endif
asmlinkage
long
sys_shmget
(
key_t
key
,
size_t
size
,
int
flag
);
asmlinkage
long
sys_shmget
(
key_t
key
,
size_t
size
,
int
flag
);
asmlinkage
long
sys_shmdt
(
char
__user
*
shmaddr
);
asmlinkage
long
sys_shmdt
(
char
__user
*
shmaddr
);
asmlinkage
long
sys_shmctl
(
int
shmid
,
int
cmd
,
struct
shmid_ds
__user
*
buf
);
asmlinkage
long
sys_shmctl
(
int
shmid
,
int
cmd
,
struct
shmid_ds
__user
*
buf
);
...
...
ipc/shm.c
View file @
8db4d061
...
@@ -635,7 +635,7 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds __user *buf)
...
@@ -635,7 +635,7 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds __user *buf)
* "raddr" thing points to kernel space, and there has to be a wrapper around
* "raddr" thing points to kernel space, and there has to be a wrapper around
* this.
* this.
*/
*/
asmlinkage
long
sys
_shmat
(
int
shmid
,
char
__user
*
shmaddr
,
int
shmflg
,
ulong
*
raddr
)
long
do
_shmat
(
int
shmid
,
char
__user
*
shmaddr
,
int
shmflg
,
ulong
*
raddr
)
{
{
struct
shmid_kernel
*
shp
;
struct
shmid_kernel
*
shp
;
unsigned
long
addr
;
unsigned
long
addr
;
...
...
kernel/sys.c
View file @
8db4d061
...
@@ -258,7 +258,6 @@ cond_syscall(sys_msgsnd)
...
@@ -258,7 +258,6 @@ cond_syscall(sys_msgsnd)
cond_syscall
(
sys_msgrcv
)
cond_syscall
(
sys_msgrcv
)
cond_syscall
(
sys_msgctl
)
cond_syscall
(
sys_msgctl
)
cond_syscall
(
sys_shmget
)
cond_syscall
(
sys_shmget
)
cond_syscall
(
sys_shmat
)
cond_syscall
(
sys_shmdt
)
cond_syscall
(
sys_shmdt
)
cond_syscall
(
sys_shmctl
)
cond_syscall
(
sys_shmctl
)
...
...
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