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
4666fd84
Commit
4666fd84
authored
Sep 23, 2002
by
Jeff Dike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UML updates to allow it to build and run as 2.5.38.
parent
f20bf018
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
86 additions
and
22 deletions
+86
-22
arch/um/Makefile
arch/um/Makefile
+15
-12
arch/um/defconfig
arch/um/defconfig
+3
-0
arch/um/kernel/mem.c
arch/um/kernel/mem.c
+1
-1
arch/um/kernel/process_kern.c
arch/um/kernel/process_kern.c
+2
-2
arch/um/kernel/reboot.c
arch/um/kernel/reboot.c
+1
-1
arch/um/kernel/sys_call_table.c
arch/um/kernel/sys_call_table.c
+15
-1
arch/um/vmlinux.lds.S
arch/um/vmlinux.lds.S
+2
-2
include/asm-um/irq.h
include/asm-um/irq.h
+0
-1
include/asm-um/percpu.h
include/asm-um/percpu.h
+2
-2
include/asm-um/pgtable.h
include/asm-um/pgtable.h
+12
-0
include/asm-um/system-i386.h
include/asm-um/system-i386.h
+31
-0
include/asm-um/timex.h
include/asm-um/timex.h
+2
-0
No files found.
arch/um/Makefile
View file @
4666fd84
...
...
@@ -35,9 +35,8 @@ ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
SUBDIRS
+=
$(ARCH_SUBDIRS)
LIBS
+=
$(ARCH_DIR)
/kernel/um.o
\
$(ARCH_DIR)
/drivers/drivers.o
\
$(ARCH_DIR)
/sys-
$(SUBARCH)
/sys.o
$(ARCH_DIR)
/os/os.o
LIBS
+=
$(ARCH_DIR)
/kernel/um.o
$(ARCH_DIR)
/drivers/drivers.o
\
$(ARCH_DIR)
/sys-
$(SUBARCH)
/sys.o
$(ARCH_DIR)
/os/os.o
-L
/usr/lib
-lutil
ifeq
($(CONFIG_PT_PROXY), y)
SUBDIRS
+=
$(ARCH_DIR)
/ptproxy
...
...
@@ -61,9 +60,15 @@ LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
SIZE
=
((
$(CONFIG_NEST_LEVEL)
+
$(CONFIG_KERNEL_HALF_GIGS)
)
*
0x20000000
)
$(ARCH_DIR)/link.ld
:
$(ARCH_DIR)/link.ld.in
m4
-DSTART
=
$$
((
$(TOP_ADDR)
-
$(SIZE)
))
-DELF_ARCH
=
$(ELF_ARCH)
\
-DELF_FORMAT
=
$(ELF_FORMAT)
$<
>
$@
AFLAGS_vmlinux.lds.o
=
-U
$(SUBARCH)
-DSTART
=
$$
((
$(TOP_ADDR)
-
$(SIZE)
))
\
-DELF_ARCH
=
$(ELF_ARCH)
-DELF_FORMAT
=
\"
$(ELF_FORMAT)
\"
LD_vmlinux
=
$(CC)
LDFLAGS_vmlinux
=
$(LINK_PROFILE)
$(LINK_WRAPS)
-static
$(ARCH_DIR)
/main.o
cmd_link_vmlinux
:=
$(CC)
$(LINK_PROFILE)
$(LINK_WRAPS)
-static
\
$(
subst
$(cmd_link_vmlinux)
,
$(LD)
,
)
$(ARCH_DIR)
/main.o vmlinux.o
\
-L
/usr/lib
-lutil
SYMLINK_HEADERS
=
include/asm-um/archparam.h include/asm-um/system.h
\
include/asm-um/sigcontext.h include/asm-um/processor.h
\
...
...
@@ -74,11 +79,9 @@ ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep arch/um/os \
GEN_HEADERS
=
$(ARCH_DIR)
/include/task.h
linux
:
scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) $(ARCH_DIR)/main.o
\
vmlinux $(ARCH_DIR)/link.ld
mv
vmlinux vmlinux.o
$(CC)
-Wl
,-T,
$(ARCH_DIR)
/link.ld
$(LINK_PROFILE)
$(LINK_WRAPS)
\
-o
linux
-static
$(ARCH_DIR)
/main.o vmlinux.o
-L
/usr/lib
-lutil
linux
:
$(ARCH_SYMLINKS) $(GEN_HEADERS) $(SYS_HEADERS) $(ARCH_DIR)/main.o
\
vmlinux
mv
vmlinux linux
USER_CFLAGS
:=
$(
patsubst
-I
%,,
$(CFLAGS)
)
USER_CFLAGS
:=
$(
patsubst
-Derrno
=
kernel_errno,,
$(USER_CFLAGS)
)
...
...
@@ -129,7 +132,7 @@ arch/um/os:
$(ARCH_DIR)/include/task.h
:
$(ARCH_DIR)/util/mk_task
$<
>
$@
$(ARCH_DIR)/util/mk_task
:
$(ARCH_DIR)/util/mk_task_user.c
\
$(ARCH_DIR)/util/mk_task
:
$(
SYS_HEADERS) $(
ARCH_DIR)/util/mk_task_user.c
\
$(ARCH_DIR)/util/mk_task_kern.c
$(MAKE)
$(MFLAGS)
-C
$(ARCH_DIR)
/util all
...
...
arch/um/defconfig
View file @
4666fd84
...
...
@@ -206,6 +206,9 @@ CONFIG_EXT2_FS=y
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_XFS_FS is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
#
# Network File Systems
...
...
arch/um/kernel/mem.c
View file @
4666fd84
...
...
@@ -233,7 +233,7 @@ struct page *arch_validate(struct page *page, int mask, int order)
addr
+=
PAGE_SIZE
;
}
if
(
i
==
(
1
<<
order
))
return
(
page
);
page
=
_
alloc_pages
(
mask
,
order
);
page
=
alloc_pages
(
mask
,
order
);
goto
again
;
}
...
...
arch/um/kernel/process_kern.c
View file @
4666fd84
...
...
@@ -48,7 +48,7 @@ struct task_struct *get_task(int pid, int require)
ret
=
NULL
;
read_lock
(
&
tasklist_lock
);
for_each_
task
(
task
){
for_each_
process
(
task
){
if
(
task
->
pid
==
pid
){
ret
=
task
;
break
;
...
...
@@ -64,7 +64,7 @@ int is_valid_pid(int pid)
struct
task_struct
*
task
;
read_lock
(
&
tasklist_lock
);
for_each_
task
(
task
){
for_each_
process
(
task
){
if
(
task
->
thread
.
extern_pid
==
pid
){
read_unlock
(
&
tasklist_lock
);
return
(
1
);
...
...
arch/um/kernel/reboot.c
View file @
4666fd84
...
...
@@ -15,7 +15,7 @@ static void kill_off_processes(void)
int
me
;
me
=
os_getpid
();
for_each_
task
(
p
){
for_each_
process
(
p
){
if
(
p
->
thread
.
extern_pid
!=
me
)
os_kill_process
(
p
->
thread
.
extern_pid
);
}
...
...
arch/um/kernel/sys_call_table.c
View file @
4666fd84
...
...
@@ -223,6 +223,12 @@ extern syscall_handler_t sys_sendfile64;
extern
syscall_handler_t
sys_futex
;
extern
syscall_handler_t
sys_sched_setaffinity
;
extern
syscall_handler_t
sys_sched_getaffinity
;
extern
syscall_handler_t
sys_io_setup
;
extern
syscall_handler_t
sys_io_destroy
;
extern
syscall_handler_t
sys_io_getevents
;
extern
syscall_handler_t
sys_io_submit
;
extern
syscall_handler_t
sys_io_cancel
;
extern
syscall_handler_t
sys_exit_group
;
#if CONFIG_NFSD
#define NFSSERVCTL sys_nfsserctl
...
...
@@ -234,7 +240,7 @@ extern syscall_handler_t um_mount;
extern
syscall_handler_t
um_time
;
extern
syscall_handler_t
um_stime
;
#define LAST_GENERIC_SYSCALL __NR_
sched_getaffinity
#define LAST_GENERIC_SYSCALL __NR_
exit_group
#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL
#define LAST_SYSCALL LAST_GENERIC_SYSCALL
...
...
@@ -465,6 +471,14 @@ syscall_handler_t *sys_call_table[] = {
[
__NR_futex
]
=
sys_futex
,
[
__NR_sched_setaffinity
]
=
sys_sched_setaffinity
,
[
__NR_sched_getaffinity
]
=
sys_sched_getaffinity
,
[
__NR_io_setup
]
=
sys_io_setup
,
[
__NR_io_destroy
]
=
sys_io_destroy
,
[
__NR_io_getevents
]
=
sys_io_getevents
,
[
__NR_io_submit
]
=
sys_io_submit
,
[
__NR_io_cancel
]
=
sys_io_cancel
,
[
__NR_alloc_hugepages
]
=
sys_ni_syscall
,
[
__NR_free_hugepages
]
=
sys_ni_syscall
,
[
__NR_exit_group
]
=
sys_exit_group
,
ARCH_SYSCALLS
[
LAST_SYSCALL
+
1
...
NR_syscalls
]
=
...
...
arch/um/
link.ld.in
→
arch/um/
vmlinux.lds.S
View file @
4666fd84
OUTPUT_FORMAT(
"ELF_FORMAT"
)
OUTPUT_FORMAT
(
ELF_FORMAT
)
OUTPUT_ARCH
(
ELF_ARCH
)
ENTRY
(
_start
)
jiffies
=
jiffies_64
;
SECTIONS
{
. = START
()
+ SIZEOF_HEADERS;
.
=
START
+
SIZEOF_HEADERS
;
.
=
ALIGN
(
4096
)
;
__binary_start
=
.
;
...
...
include/asm-um/irq.h
View file @
4666fd84
...
...
@@ -6,7 +6,6 @@
*/
struct
task_struct
;
#include "asm/arch/irq.h"
#include "asm/ptrace.h"
#undef NR_IRQS
...
...
include/asm-um/percpu.h
View file @
4666fd84
#ifndef __UM_
CACHEFLUSH
_H
#define __UM_
CACHEFLUSH
_H
#ifndef __UM_
PERCPU
_H
#define __UM_
PERCPU
_H
#include "asm/arch/percpu.h"
...
...
include/asm-um/pgtable.h
View file @
4666fd84
...
...
@@ -358,6 +358,18 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM4G)
typedef
u32
pte_addr_t
;
#endif
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM64G)
typedef
u64
pte_addr_t
;
#endif
#if !defined(CONFIG_HIGHPTE)
typedef
pte_t
*
pte_addr_t
;
#endif
#define update_mmu_cache(vma,address,pte) do ; while (0)
/* Encode and de-code a swap entry */
...
...
include/asm-um/system-i386.h
View file @
4666fd84
...
...
@@ -3,4 +3,35 @@
#include "asm/system-generic.h"
static
inline
unsigned
long
__cmpxchg
(
volatile
void
*
ptr
,
unsigned
long
old
,
unsigned
long
new
,
int
size
)
{
unsigned
long
prev
;
switch
(
size
)
{
case
1
:
__asm__
__volatile__
(
LOCK_PREFIX
"cmpxchgb %b1,%2"
:
"=a"
(
prev
)
:
"q"
(
new
),
"m"
(
*
__xg
(
ptr
)),
"0"
(
old
)
:
"memory"
);
return
prev
;
case
2
:
__asm__
__volatile__
(
LOCK_PREFIX
"cmpxchgw %w1,%2"
:
"=a"
(
prev
)
:
"q"
(
new
),
"m"
(
*
__xg
(
ptr
)),
"0"
(
old
)
:
"memory"
);
return
prev
;
case
4
:
__asm__
__volatile__
(
LOCK_PREFIX
"cmpxchgl %1,%2"
:
"=a"
(
prev
)
:
"q"
(
new
),
"m"
(
*
__xg
(
ptr
)),
"0"
(
old
)
:
"memory"
);
return
prev
;
}
return
old
;
}
#define cmpxchg(ptr,o,n)\
((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\
(unsigned long)(n),sizeof(*(ptr))))
#endif
include/asm-um/timex.h
View file @
4666fd84
...
...
@@ -12,4 +12,6 @@ static inline cycles_t get_cycles (void)
return
0
;
}
#define CLOCK_TICK_RATE (HZ)
#endif
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