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
c0f869ff
Commit
c0f869ff
authored
Dec 16, 2002
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: More 2.5.51/2.5.52 sync up.
parent
815ab107
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
115 additions
and
108 deletions
+115
-108
Makefile
Makefile
+1
-1
arch/ia64/Makefile
arch/ia64/Makefile
+1
-3
arch/ia64/boot/Makefile
arch/ia64/boot/Makefile
+1
-1
arch/ia64/kernel/entry.S
arch/ia64/kernel/entry.S
+6
-4
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/palinfo.c
+17
-20
arch/ia64/kernel/process.c
arch/ia64/kernel/process.c
+35
-37
arch/ia64/kernel/ptrace.c
arch/ia64/kernel/ptrace.c
+2
-2
arch/ia64/kernel/signal.c
arch/ia64/kernel/signal.c
+39
-35
arch/ia64/kernel/sys_ia64.c
arch/ia64/kernel/sys_ia64.c
+1
-0
arch/ia64/mm/fault.c
arch/ia64/mm/fault.c
+6
-4
include/asm-ia64/bitops.h
include/asm-ia64/bitops.h
+1
-0
include/asm-ia64/thread_info.h
include/asm-ia64/thread_info.h
+3
-0
include/asm-ia64/unistd.h
include/asm-ia64/unistd.h
+2
-1
No files found.
Makefile
View file @
c0f869ff
...
...
@@ -854,7 +854,7 @@ endif # ifdef include_config
# FIXME Should go into a make.lib or something
# ===========================================================================
a_flags
=
-Wp
,-MD,
$(depfile)
$(AFLAGS)
$(NOSTDINC_FLAGS)
\
a_flags
=
-Wp
,-MD,
$(depfile)
$(AFLAGS)
$(
AFLAGS_KERNEL)
$(
NOSTDINC_FLAGS)
\
$(modkern_aflags)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$
(
*
F
)
.o
)
quiet_cmd_as_s_S
=
CPP
$@
...
...
arch/ia64/Makefile
View file @
c0f869ff
...
...
@@ -41,8 +41,6 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ arch/ia64/hp/common/ arch/ia64/hp
core-$(CONFIG_IA64_HP_ZX1)
+=
arch
/ia64/dig/
core-$(CONFIG_IA64_SGI_SN)
+=
arch
/ia64/sn/kernel/
\
arch
/ia64/sn/io/
\
arch
/ia64/sn/io/sn2/
\
arch
/ia64/sn/io/sn2/pcibr/
\
arch
/ia64/sn/kernel/sn2/
drivers-$(CONFIG_PCI)
+=
arch
/ia64/pci/
drivers-$(CONFIG_IA64_HP_SIM)
+=
arch
/ia64/hp/sim/
...
...
@@ -67,7 +65,7 @@ CLEAN_FILES += include/asm-ia64/offsets.h vmlinux.gz bootloader
prepare
:
include/asm-ia64/offsets.h
boot
:
boot
:
lib/lib.a vmlinux
$(
call
makeboot,
$@
)
include/asm-ia64/offsets.h
:
include/asm include/linux/version.h include/config/MARKER
...
...
arch/ia64/boot/Makefile
View file @
c0f869ff
...
...
@@ -15,7 +15,7 @@ targets-$(CONFIG_IA64_GENERIC) += bootloader
EXTRA_TARGETS
+=
$(
sort
$
(
targets-y
))
quiet_cmd_cptotop
=
LN
$@
cmd_cptotop
=
ln
$<
$@
cmd_cptotop
=
ln
-f
$<
$@
vmlinux.gz
:
$(obj)/vmlinux.gz $(targets-y)
$(
call
cmd,cptotop
)
...
...
arch/ia64/kernel/entry.S
View file @
c0f869ff
...
...
@@ -91,11 +91,12 @@ ENTRY(ia64_execve)
END
(
ia64_execve
)
/*
*
sys_clone2
(
u64
flags
,
u64
ustack_base
,
u64
ustack_size
,
u64
user_tid
,
u64
tls
)
*
sys_clone2
(
u64
flags
,
u64
ustack_base
,
u64
ustack_size
,
u64
child_tidptr
,
u64
parent_tidptr
,
*
u64
tls
)
*/
GLOBAL_ENTRY
(
sys_clone2
)
.
prologue
ASM_UNW_PRLG_RP
|
ASM_UNW_PRLG_PFS
,
ASM_UNW_PRLG_GRSAVE
(
2
)
alloc
r16
=
ar
.
pfs
,
5
,
2
,
5
,
0
alloc
r16
=
ar
.
pfs
,
6
,
2
,
6
,
0
DO_SAVE_SWITCH_STACK
adds
r2
=
PT
(
R16
)+
IA64_SWITCH_STACK_SIZE
+
16
,
sp
mov
loc0
=
rp
...
...
@@ -104,9 +105,10 @@ GLOBAL_ENTRY(sys_clone2)
mov
out1
=
in1
mov
out3
=
in2
tbit.nz
p6
,
p0
=
in0
,
CLONE_SETTLS_BIT
mov
out4
=
in3
//
valid
only
w
/
CLONE_SETTID
and
/
or
CLONE
_CLEARTID
mov
out4
=
in3
//
child_tidptr
:
valid
only
w
/
CLONE_CHILD_SETTID
or
CLONE_CHILD
_CLEARTID
;;
(
p6
)
st8
[
r2
]=
in4
//
store
TLS
in
r13
(
tp
)
(
p6
)
st8
[
r2
]=
in5
//
store
TLS
in
r16
for
copy_thread
()
mov
out5
=
in4
//
parent_tidptr
:
valid
only
w
/
CLONE_PARENT_SETTID
adds
out2
=
IA64_SWITCH_STACK_SIZE
+
16
,
sp
//
out2
=
&
regs
dep
out0
=
0
,
in0
,
CLONE_IDLETASK_BIT
,
1
//
out0
=
clone_flags
&
~
CLONE_IDLETASK
br.call.sptk.many
rp
=
do_fork
...
...
arch/ia64/kernel/palinfo.c
View file @
c0f869ff
...
...
@@ -101,25 +101,14 @@ static const char *rse_hints[]={
#define RSE_HINTS_COUNT (sizeof(rse_hints)/sizeof(const char *))
/*
* The current revision of the Volume 2 (July 2000) of
* IA-64 Architecture Software Developer's Manual is wrong.
* Table 4-10 has invalid information concerning the ma field:
* Correct table is:
* bit 0 - 001 - UC
* bit 4 - 100 - UC
* bit 5 - 101 - UCE
* bit 6 - 110 - WC
* bit 7 - 111 - NatPage
*/
static
const
char
*
mem_attrib
[]
=
{
"W
rite Back (WB)
"
,
/* 000 */
"
Uncacheable (UC)
"
,
/* 001 */
"
Reserved"
,
/* 010 */
"
Reserved"
,
/* 011 */
"U
ncacheable (UC)
"
,
/* 100 */
"U
ncacheable Exported (UCE)"
,
/* 101 */
"W
rite Coalescing (WC)"
,
/* 110 */
"W
B
"
,
/* 000 */
"
SW
"
,
/* 001 */
"
010"
,
/* 010 */
"
011"
,
/* 011 */
"U
C
"
,
/* 100 */
"U
CE"
,
/* 101 */
"W
C"
,
/* 110 */
"NaTPage"
/* 111 */
};
...
...
@@ -315,6 +304,7 @@ vm_info(char *page)
pal_vm_info_2_u_t
vm_info_2
;
pal_tc_info_u_t
tc_info
;
ia64_ptce_info_t
ptce
;
const
char
*
sep
;
int
i
,
j
;
s64
status
;
...
...
@@ -339,7 +329,14 @@ vm_info(char *page)
if
(
ia64_pal_mem_attrib
(
&
attrib
)
!=
0
)
return
0
;
p
+=
sprintf
(
p
,
"Supported memory attributes : %s
\n
"
,
mem_attrib
[
attrib
&
0x7
]);
p
+=
sprintf
(
p
,
"Supported memory attributes : "
);
sep
=
""
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
attrib
&
(
1
<<
i
))
{
p
+=
sprintf
(
p
,
"%s%s
\n
"
,
sep
,
mem_attrib
[
i
]);
sep
=
", "
;
}
}
if
((
status
=
ia64_pal_vm_page_size
(
&
tr_pages
,
&
vw_pages
))
!=
0
)
{
printk
(
"ia64_pal_vm_page_size=%ld
\n
"
,
status
);
...
...
arch/ia64/kernel/process.c
View file @
c0f869ff
...
...
@@ -383,31 +383,6 @@ copy_thread (int nr, unsigned long clone_flags,
return
retval
;
}
void
do_copy_regs
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
do_copy_task_regs
(
current
,
info
,
arg
);
}
void
do_dump_fpu
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
do_dump_task_fpu
(
current
,
info
,
arg
);
}
void
ia64_elf_core_copy_regs
(
struct
pt_regs
*
pt
,
elf_gregset_t
dst
)
{
unw_init_running
(
do_copy_regs
,
dst
);
}
int
dump_fpu
(
struct
pt_regs
*
pt
,
elf_fpregset_t
dst
)
{
unw_init_running
(
do_dump_fpu
,
dst
);
return
1
;
/* f0-f31 are always valid so we always return 1 */
}
static
void
do_copy_task_regs
(
struct
task_struct
*
task
,
struct
unw_frame_info
*
info
,
void
*
arg
)
{
...
...
@@ -499,38 +474,61 @@ do_dump_task_fpu (struct task_struct *task, struct unw_frame_info *info, void *a
memcpy
(
dst
+
32
,
task
->
thread
.
fph
,
96
*
16
);
}
int
dump_task_regs
(
struct
task_struct
*
task
,
elf_gregset_t
*
regs
)
void
do_copy_regs
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
do_copy_task_regs
(
current
,
info
,
arg
);
}
void
do_dump_fpu
(
struct
unw_frame_info
*
info
,
void
*
arg
)
{
do_dump_task_fpu
(
current
,
info
,
arg
);
}
int
dump_task_regs
(
struct
task_struct
*
task
,
elf_gregset_t
*
regs
)
{
struct
unw_frame_info
tcore_info
;
if
(
current
==
task
)
{
if
(
current
==
task
)
{
unw_init_running
(
do_copy_regs
,
regs
);
}
else
{
}
else
{
memset
(
&
tcore_info
,
0
,
sizeof
(
tcore_info
));
unw_init_from_blocked_task
(
&
tcore_info
,
task
);
do_copy_task_regs
(
task
,
&
tcore_info
,
regs
);
}
return
1
;
}
int
dump_task_fpu
(
struct
task_struct
*
task
,
elf_fpregset_t
*
dst
)
void
ia64_elf_core_copy_regs
(
struct
pt_regs
*
pt
,
elf_gregset_t
dst
)
{
unw_init_running
(
do_copy_regs
,
dst
);
}
int
dump_task_fpu
(
struct
task_struct
*
task
,
elf_fpregset_t
*
dst
)
{
struct
unw_frame_info
tcore_info
;
if
(
current
==
task
)
{
if
(
current
==
task
)
{
unw_init_running
(
do_dump_fpu
,
dst
);
}
else
{
}
else
{
memset
(
&
tcore_info
,
0
,
sizeof
(
tcore_info
));
unw_init_from_blocked_task
(
&
tcore_info
,
task
);
do_dump_task_fpu
(
task
,
&
tcore_info
,
dst
);
}
return
1
;
}
int
dump_fpu
(
struct
pt_regs
*
pt
,
elf_fpregset_t
dst
)
{
unw_init_running
(
do_dump_fpu
,
dst
);
return
1
;
/* f0-f31 are always valid so we always return 1 */
}
asmlinkage
long
sys_execve
(
char
*
filename
,
char
**
argv
,
char
**
envp
,
struct
pt_regs
*
regs
)
{
...
...
arch/ia64/kernel/ptrace.c
View file @
c0f869ff
...
...
@@ -493,7 +493,7 @@ collect_task (struct task_list **listp, struct task_struct *p, int make_writable
/* oops, can't collect more: finish at least what we collected so far... */
return
;
task_lock
(
p
);
get_task_struct
(
p
);
e
->
task
=
p
;
e
->
next
=
*
listp
;
*
listp
=
e
;
...
...
@@ -505,7 +505,7 @@ finish_task (struct task_list *list, int make_writable)
struct
task_list
*
next
=
list
->
next
;
sync_user_rbs_one_thread
(
list
->
task
,
make_writable
);
task_unlock
(
list
->
task
);
put_task_struct
(
list
->
task
);
kfree
(
list
);
return
next
;
}
...
...
arch/ia64/kernel/signal.c
View file @
c0f869ff
...
...
@@ -385,15 +385,14 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
frame
=
(
void
*
)
scr
->
pt
.
r12
;
tramp_addr
=
GATE_ADDR
+
(
ia64_sigtramp
-
__start_gate_section
);
if
(
ka
->
sa
.
sa_flags
&
SA_ONSTACK
)
{
/*
* We need to check the memory and register stacks separately, because
* they're switched separately (memory stack is switched in the kernel,
* register stack is switched in the signal trampoline).
*/
if
(
!
on_sig_stack
((
unsigned
long
)
frame
))
if
((
ka
->
sa
.
sa_flags
&
SA_ONSTACK
)
&&
sas_ss_flags
((
unsigned
long
)
frame
)
==
0
)
{
frame
=
(
void
*
)
((
current
->
sas_ss_sp
+
current
->
sas_ss_size
)
&
~
(
STACK_ALIGN
-
1
));
/*
* We need to check for the register stack being on the signal stack
* separately, because it's switched separately (memory stack is switched
* in the kernel, register stack is switched in the signal trampoline).
*/
if
(
!
rbs_on_sig_stack
(
scr
->
pt
.
ar_bspstore
))
new_rbs
=
(
current
->
sas_ss_sp
+
sizeof
(
long
)
-
1
)
&
~
(
sizeof
(
long
)
-
1
);
}
...
...
@@ -453,13 +452,11 @@ static long
handle_signal
(
unsigned
long
sig
,
struct
k_sigaction
*
ka
,
siginfo_t
*
info
,
sigset_t
*
oldset
,
struct
sigscratch
*
scr
)
{
#ifdef CONFIG_IA32_SUPPORT
if
(
IS_IA32_PROCESS
(
&
scr
->
pt
))
{
/* send signal to IA-32 process */
if
(
!
ia32_setup_frame1
(
sig
,
ka
,
info
,
oldset
,
&
scr
->
pt
))
return
0
;
}
else
#endif
/* send signal to IA-64 process */
if
(
!
setup_frame
(
sig
,
ka
,
info
,
oldset
,
scr
))
return
0
;
...
...
@@ -490,6 +487,7 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
siginfo_t
info
;
long
restart
=
in_syscall
;
long
errno
=
scr
->
pt
.
r8
;
# define ERR_CODE(c) (IS_IA32_PROCESS(&scr->pt) ? -(c) : (c))
/*
* In the ia64_leave_kernel code path, we want the common case to go fast, which
...
...
@@ -502,7 +500,6 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
if
(
!
oldset
)
oldset
=
&
current
->
blocked
;
#ifdef CONFIG_IA32_SUPPORT
if
(
IS_IA32_PROCESS
(
&
scr
->
pt
))
{
if
(
in_syscall
)
{
if
(
errno
>=
0
)
...
...
@@ -510,9 +507,7 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
else
errno
=
-
errno
;
}
}
else
#endif
if
(
scr
->
pt
.
r10
!=
-
1
)
}
else
if
(
scr
->
pt
.
r10
!=
-
1
)
/*
* A system calls has to be restarted only if one of the error codes
* ERESTARTNOHAND, ERESTARTSYS, or ERESTARTNOINTR is returned. If r10
...
...
@@ -531,25 +526,25 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
if
(
restart
)
{
switch
(
errno
)
{
case
ERESTART_RESTARTBLOCK
:
printk
(
"ERESTART_RESTARTBLOCK: ignoring
\n
"
);
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
case
ERESTARTNOHAND
:
scr
->
pt
.
r8
=
ERR_CODE
(
EINTR
);
/* note: scr->pt.r10 is already -1 */
break
;
case
ERESTARTSYS
:
if
((
ka
->
sa
.
sa_flags
&
SA_RESTART
)
==
0
)
{
case
ERESTARTNOHAND
:
#ifdef CONFIG_IA32_SUPPORT
if
(
IS_IA32_PROCESS
(
&
scr
->
pt
))
scr
->
pt
.
r8
=
-
EINTR
;
else
#endif
scr
->
pt
.
r8
=
EINTR
;
scr
->
pt
.
r8
=
ERR_CODE
(
EINTR
);
/* note: scr->pt.r10 is already -1 */
break
;
}
case
ERESTARTNOINTR
:
#ifdef CONFIG_IA32_SUPPORT
if
(
IS_IA32_PROCESS
(
&
scr
->
pt
))
{
scr
->
pt
.
r8
=
scr
->
pt
.
r1
;
scr
->
pt
.
cr_iip
-=
2
;
}
else
#endif
ia64_decrement_ip
(
&
scr
->
pt
);
}
}
...
...
@@ -565,19 +560,28 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
/* Did we come from a system call? */
if
(
restart
)
{
/* Restart the system call - no handlers present */
if
(
errno
==
ERESTARTNOHAND
||
errno
==
ERESTARTSYS
||
errno
==
ERESTARTNOINTR
)
{
#ifdef CONFIG_IA32_SUPPORT
if
(
errno
==
ERESTARTNOHAND
||
errno
==
ERESTARTSYS
||
errno
==
ERESTARTNOINTR
||
errno
==
ERESTART_RESTARTBLOCK
)
{
if
(
IS_IA32_PROCESS
(
&
scr
->
pt
))
{
scr
->
pt
.
r8
=
scr
->
pt
.
r1
;
scr
->
pt
.
cr_iip
-=
2
;
}
else
#endif
if
(
errno
==
ERESTART_RESTARTBLOCK
)
{
scr
->
pt
.
r8
=
0
;
/* x86 version of __NR_restart_syscall */
scr
->
pt
.
cr_iip
-=
2
;
}
}
else
{
/*
* Note: the syscall number is in r15 which is saved in pt_regs so
* all we need to do here is adjust ip so that the "break"
*
instruction gets re-executed.
* Note: the syscall number is in r15 which is saved in
* pt_regs so all we need to do here is adjust ip so that
* the "break"
instruction gets re-executed.
*/
ia64_decrement_ip
(
&
scr
->
pt
);
if
(
errno
==
ERESTART_RESTARTBLOCK
)
{
printk
(
"ERESTART_RESTARTBLOCK: restarting at %lx
\n
"
,
scr
->
pt
.
cr_iip
);
scr
->
pt
.
r15
=
__NR_restart_syscall
;
}
}
}
}
return
0
;
...
...
arch/ia64/kernel/sys_ia64.c
View file @
c0f869ff
...
...
@@ -12,6 +12,7 @@
#include <linux/hugetlb.h>
#include <linux/mman.h>
#include <linux/sched.h>
#include <linux/shm.h>
#include <linux/file.h>
/* doh, must come after sched.h... */
#include <linux/smp.h>
#include <linux/smp_lock.h>
...
...
arch/ia64/mm/fault.c
View file @
c0f869ff
...
...
@@ -96,13 +96,13 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
* fault.
*/
switch
(
handle_mm_fault
(
mm
,
vma
,
address
,
(
mask
&
VM_WRITE
)
!=
0
))
{
case
1
:
case
VM_FAULT_MINOR
:
++
current
->
min_flt
;
break
;
case
2
:
case
VM_FAULT_MAJOR
:
++
current
->
maj_flt
;
break
;
case
0
:
case
VM_FAULT_SIGBUS
:
/*
* We ran out of memory, or some other thing happened
* to us that made us unable to handle the page fault
...
...
@@ -110,8 +110,10 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
*/
signal
=
SIGBUS
;
goto
bad_area
;
default
:
case
VM_FAULT_OOM
:
goto
out_of_memory
;
default:
BUG
();
}
up_read
(
&
mm
->
mmap_sem
);
return
;
...
...
include/asm-ia64/bitops.h
View file @
c0f869ff
...
...
@@ -9,6 +9,7 @@
* scheduler patch
*/
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/intrinsics.h>
...
...
include/asm-ia64/thread_info.h
View file @
c0f869ff
...
...
@@ -43,6 +43,9 @@ struct thread_info {
.cpu = 0, \
.addr_limit = KERNEL_DS, \
.preempt_count = 0, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
/* how to get the thread information struct from C */
...
...
include/asm-ia64/unistd.h
View file @
c0f869ff
...
...
@@ -235,7 +235,8 @@
#define __NR_epoll_create 1243
#define __NR_epoll_ctl 1244
#define __NR_epoll_wait 1245
#define __NR_semtimedop 1246
#define __NR_restart_syscall 1246
#define __NR_semtimedop 1247
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
...
...
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