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
e6bcc52f
Commit
e6bcc52f
authored
Dec 28, 2002
by
Jeff Dike
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://jdike.stearns.org:5000/updates-2.5
into uml.karaya.com:/home/jdike/linux/2.5/uml-2.5
parents
adaf480d
170f6c8f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
12 deletions
+33
-12
arch/um/kernel/signal_kern.c
arch/um/kernel/signal_kern.c
+8
-0
arch/um/kernel/sys_call_table.c
arch/um/kernel/sys_call_table.c
+3
-1
arch/um/kernel/syscall_kern.c
arch/um/kernel/syscall_kern.c
+5
-1
arch/um/uml.lds.S
arch/um/uml.lds.S
+10
-1
include/asm-um/pgtable.h
include/asm-um/pgtable.h
+3
-3
include/asm-um/thread_info.h
include/asm-um/thread_info.h
+4
-6
No files found.
arch/um/kernel/signal_kern.c
View file @
e6bcc52f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include "linux/binfmts.h"
#include "linux/binfmts.h"
#include "asm/signal.h"
#include "asm/signal.h"
#include "asm/uaccess.h"
#include "asm/uaccess.h"
#include "asm/unistd.h"
#include "user_util.h"
#include "user_util.h"
#include "kern_util.h"
#include "kern_util.h"
#include "signal_kern.h"
#include "signal_kern.h"
...
@@ -70,6 +71,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
...
@@ -70,6 +71,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
ret
=
0
;
ret
=
0
;
switch
(
error
){
switch
(
error
){
case
-
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
case
-
ERESTARTNOHAND
:
case
-
ERESTARTNOHAND
:
ret
=
-
EINTR
;
ret
=
-
EINTR
;
break
;
break
;
...
@@ -161,6 +165,10 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
...
@@ -161,6 +165,10 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
PT_REGS_ORIG_SYSCALL
(
regs
)
=
PT_REGS_SYSCALL_NR
(
regs
);
PT_REGS_ORIG_SYSCALL
(
regs
)
=
PT_REGS_SYSCALL_NR
(
regs
);
PT_REGS_RESTART_SYSCALL
(
regs
);
PT_REGS_RESTART_SYSCALL
(
regs
);
}
}
else
if
(
PT_REGS_SYSCALL_RET
(
regs
)
==
-
ERESTART_RESTARTBLOCK
){
PT_REGS_SYSCALL_RET
(
regs
)
=
__NR_restart_syscall
;
PT_REGS_RESTART_SYSCALL
(
regs
);
}
}
}
/* This closes a way to execute a system call on the host. If
/* This closes a way to execute a system call on the host. If
...
...
arch/um/kernel/sys_call_table.c
View file @
e6bcc52f
...
@@ -8,10 +8,12 @@
...
@@ -8,10 +8,12 @@
#include "linux/version.h"
#include "linux/version.h"
#include "linux/sys.h"
#include "linux/sys.h"
#include "linux/swap.h"
#include "linux/swap.h"
#include "linux/sysctl.h"
#include "asm/signal.h"
#include "asm/signal.h"
#include "sysdep/syscalls.h"
#include "sysdep/syscalls.h"
#include "kern_util.h"
#include "kern_util.h"
extern
syscall_handler_t
sys_restart_syscall
;
extern
syscall_handler_t
sys_ni_syscall
;
extern
syscall_handler_t
sys_ni_syscall
;
extern
syscall_handler_t
sys_exit
;
extern
syscall_handler_t
sys_exit
;
extern
syscall_handler_t
sys_fork
;
extern
syscall_handler_t
sys_fork
;
...
@@ -253,7 +255,7 @@ extern syscall_handler_t um_stime;
...
@@ -253,7 +255,7 @@ extern syscall_handler_t um_stime;
#endif
#endif
syscall_handler_t
*
sys_call_table
[]
=
{
syscall_handler_t
*
sys_call_table
[]
=
{
[
0
]
=
sys_ni
_syscall
,
[
__NR_restart_syscall
]
=
sys_restart
_syscall
,
[
__NR_exit
]
=
sys_exit
,
[
__NR_exit
]
=
sys_exit
,
[
__NR_fork
]
=
sys_fork
,
[
__NR_fork
]
=
sys_fork
,
[
__NR_read
]
=
(
syscall_handler_t
*
)
sys_read
,
[
__NR_read
]
=
(
syscall_handler_t
*
)
sys_read
,
...
...
arch/um/kernel/syscall_kern.c
View file @
e6bcc52f
...
@@ -187,7 +187,11 @@ int sys_ipc (uint call, int first, int second,
...
@@ -187,7 +187,11 @@ int sys_ipc (uint call, int first, int second,
switch
(
call
)
{
switch
(
call
)
{
case
SEMOP
:
case
SEMOP
:
return
sys_semop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
);
return
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
NULL
);
case
SEMTIMEDOP
:
return
sys_semtimedop
(
first
,
(
struct
sembuf
*
)
ptr
,
second
,
(
const
struct
timespec
*
)
fifth
);
case
SEMGET
:
case
SEMGET
:
return
sys_semget
(
first
,
second
,
third
);
return
sys_semget
(
first
,
second
,
third
);
case
SEMCTL
:
{
case
SEMCTL
:
{
...
...
arch/um/uml.lds.S
View file @
e6bcc52f
...
@@ -59,18 +59,27 @@ SECTIONS
...
@@ -59,18 +59,27 @@ SECTIONS
__uml_setup_start
=
.
;
__uml_setup_start
=
.
;
.
uml.setup.init
:
{
*(
.
uml
.
setup
.
init
)
}
.
uml.setup.init
:
{
*(
.
uml
.
setup
.
init
)
}
__uml_setup_end
=
.
;
__uml_setup_end
=
.
;
__uml_help_start
=
.
;
__uml_help_start
=
.
;
.
uml.help.init
:
{
*(
.
uml
.
help
.
init
)
}
.
uml.help.init
:
{
*(
.
uml
.
help
.
init
)
}
__uml_help_end
=
.
;
__uml_help_end
=
.
;
__uml_postsetup_start
=
.
;
__uml_postsetup_start
=
.
;
.
uml.postsetup.init
:
{
*(
.
uml
.
postsetup
.
init
)
}
.
uml.postsetup.init
:
{
*(
.
uml
.
postsetup
.
init
)
}
__uml_postsetup_end
=
.
;
__uml_postsetup_end
=
.
;
__setup_start
=
.
;
__setup_start
=
.
;
.
init.setup
:
{
*(
.
init
.
setup
)
}
.
init.setup
:
{
*(
.
init
.
setup
)
}
__setup_end
=
.
;
__setup_end
=
.
;
__start___param
=
.
;
__param
:
{
*(
__param
)
}
__stop___param
=
.
;
__per_cpu_start
=
.
;
__per_cpu_start
=
.
;
.
data.percpu
:
{
*(
.
data
.
percpu
)
}
.
data.percpu
:
{
*(
.
data
.
percpu
)
}
__per_cpu_end
=
.
;
__per_cpu_end
=
.
;
__initcall_start
=
.
;
__initcall_start
=
.
;
.
initcall.init
:
{
.
initcall.init
:
{
*(.
initcall1.init
)
*(.
initcall1.init
)
...
...
include/asm-um/pgtable.h
View file @
e6bcc52f
...
@@ -373,15 +373,15 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
...
@@ -373,15 +373,15 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
}
}
/* Find an entry in the third-level page table.. */
/* Find an entry in the third-level page table.. */
#define __pte_offset(address) ((
address
>> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define __pte_offset(address) ((
(address)
>> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define pte_offset_kernel(dir, address) \
#define pte_offset_kernel(dir, address) \
((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address))
((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address))
#define pte_offset_map(dir, address) \
#define pte_offset_map(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + __pte_offset(address))
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + __pte_offset(address))
#define pte_offset_map_nested(dir, address) \
#define pte_offset_map_nested(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + __pte_offset(address))
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + __pte_offset(address))
#define pte_unmap(pte) kunmap_atomic(
pte
, KM_PTE0)
#define pte_unmap(pte) kunmap_atomic(
(pte)
, KM_PTE0)
#define pte_unmap_nested(pte) kunmap_atomic(
pte
, KM_PTE1)
#define pte_unmap_nested(pte) kunmap_atomic(
(pte)
, KM_PTE1)
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM4G)
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM4G)
typedef
u32
pte_addr_t
;
typedef
u32
pte_addr_t
;
...
...
include/asm-um/thread_info.h
View file @
e6bcc52f
...
@@ -20,14 +20,9 @@ struct thread_info {
...
@@ -20,14 +20,9 @@ struct thread_info {
mm_segment_t
addr_limit
;
/* thread address space:
mm_segment_t
addr_limit
;
/* thread address space:
0-0xBFFFFFFF for user
0-0xBFFFFFFF for user
0-0xFFFFFFFF for kernel */
0-0xFFFFFFFF for kernel */
struct
restart_block
restart_block
;
};
};
/*
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
#define INIT_THREAD_INFO(tsk) \
#define INIT_THREAD_INFO(tsk) \
{ \
{ \
task: &tsk, \
task: &tsk, \
...
@@ -36,6 +31,9 @@ struct thread_info {
...
@@ -36,6 +31,9 @@ struct thread_info {
cpu: 0, \
cpu: 0, \
preempt_count: 1, \
preempt_count: 1, \
addr_limit: KERNEL_DS, \
addr_limit: KERNEL_DS, \
restart_block: { \
fn: do_no_restart_syscall, \
}, \
}
}
#define init_thread_info (init_thread_union.thread_info)
#define init_thread_info (init_thread_union.thread_info)
...
...
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