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
aa34464e
Commit
aa34464e
authored
Feb 11, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Sync up with 2.5.60.
parent
9433c0da
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
63 additions
and
67 deletions
+63
-67
Documentation/ia64/fsys.txt
Documentation/ia64/fsys.txt
+3
-3
arch/ia64/Makefile
arch/ia64/Makefile
+1
-1
arch/ia64/hp/sim/simscsi.c
arch/ia64/hp/sim/simscsi.c
+15
-14
arch/ia64/kernel/acpi.c
arch/ia64/kernel/acpi.c
+1
-1
arch/ia64/kernel/entry.S
arch/ia64/kernel/entry.S
+1
-1
arch/ia64/kernel/init_task.c
arch/ia64/kernel/init_task.c
+1
-0
arch/ia64/kernel/ptrace.c
arch/ia64/kernel/ptrace.c
+5
-12
arch/ia64/kernel/setup.c
arch/ia64/kernel/setup.c
+2
-2
arch/ia64/kernel/signal.c
arch/ia64/kernel/signal.c
+1
-1
arch/ia64/kernel/time.c
arch/ia64/kernel/time.c
+25
-20
include/asm-ia64/processor.h
include/asm-ia64/processor.h
+5
-9
include/asm-ia64/ptrace.h
include/asm-ia64/ptrace.h
+2
-2
include/asm-ia64/unistd.h
include/asm-ia64/unistd.h
+1
-1
No files found.
Documentation/ia64/fsys.txt
View file @
aa34464e
...
...
@@ -4,7 +4,7 @@
-----------------------------------
Started: 13-Jan-2003
Last update:
24-Jan
-2003
Last update:
11-Feb
-2003
David Mosberger-Tang
<davidm@hpl.hp.com>
...
...
@@ -42,9 +42,9 @@ In contrast, fsys-mode has the following special properties:
can disable interrupts and avoid all other interruption-sources
to avoid preemption)
- neither the memory
nor the register
stack can be trusted while
- neither the memory
-stack nor the register-
stack can be trusted while
in fsys-mode (they point to the user-level stacks, which may
be invalid)
be invalid
, or completely bogus addresses
)
In summary, fsys-mode is much more similar to running in user-mode
than it is to running in kernel-mode. Of course, given that the
...
...
arch/ia64/Makefile
View file @
aa34464e
...
...
@@ -63,7 +63,7 @@ tools := arch/ia64/tools
.PHONY
:
boot compressed include/asm-ia64/offsets.h
all
:
vmlinux
all
:
prepare
vmlinux
compressed
:
vmlinux.gz
...
...
arch/ia64/hp/sim/simscsi.c
View file @
aa34464e
...
...
@@ -156,7 +156,7 @@ simscsi_readwrite (Scsi_Cmnd *sc, int mode, unsigned long offset, unsigned long
if
(
sc
->
request_bufflen
<
req
.
len
)
return
;
stat
.
fd
=
desc
[
sc
->
target
];
stat
.
fd
=
desc
[
sc
->
device
->
id
];
if
(
DBG
)
printk
(
"simscsi_%s @ %lx (off %lx)
\n
"
,
mode
==
SSC_READ
?
"read"
:
"write"
,
req
.
addr
,
offset
);
...
...
@@ -178,7 +178,7 @@ simscsi_sg_readwrite (Scsi_Cmnd *sc, int mode, unsigned long offset)
struct
disk_stat
stat
;
struct
disk_req
req
;
stat
.
fd
=
desc
[
sc
->
target
];
stat
.
fd
=
desc
[
sc
->
device
->
id
];
while
(
list_len
)
{
req
.
addr
=
__pa
(
page_address
(
sl
->
page
)
+
sl
->
offset
);
...
...
@@ -259,6 +259,7 @@ simscsi_readwrite10 (Scsi_Cmnd *sc, int mode)
int
simscsi_queuecommand
(
Scsi_Cmnd
*
sc
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
unsigned
int
target_id
=
sc
->
device
->
id
;
char
fname
[
MAX_ROOT_LEN
+
16
];
size_t
disk_size
;
char
*
buf
;
...
...
@@ -267,21 +268,21 @@ simscsi_queuecommand (Scsi_Cmnd *sc, void (*done)(Scsi_Cmnd *))
if
(
DBG
)
printk
(
"simscsi_queuecommand: target=%d,cmnd=%u,sc=%lu,sp=%lx,done=%p
\n
"
,
sc
->
target
,
sc
->
cmnd
[
0
],
sc
->
serial_number
,
sp
,
done
);
target_id
,
sc
->
cmnd
[
0
],
sc
->
serial_number
,
sp
,
done
);
#endif
sc
->
result
=
DID_BAD_TARGET
<<
16
;
sc
->
scsi_done
=
done
;
if
(
sc
->
target
<=
15
&&
sc
->
lun
==
0
)
{
if
(
target_id
<=
15
&&
sc
->
device
->
lun
==
0
)
{
switch
(
sc
->
cmnd
[
0
])
{
case
INQUIRY
:
if
(
sc
->
request_bufflen
<
35
)
{
break
;
}
sprintf
(
fname
,
"%s%c"
,
simscsi_root
,
'a'
+
sc
->
target
);
desc
[
sc
->
target
]
=
ia64_ssc
(
__pa
(
fname
),
SSC_READ_ACCESS
|
SSC_WRITE_ACCESS
,
0
,
0
,
SSC_OPEN
);
if
(
desc
[
sc
->
target
]
<
0
)
{
sprintf
(
fname
,
"%s%c"
,
simscsi_root
,
'a'
+
target_id
);
desc
[
target_id
]
=
ia64_ssc
(
__pa
(
fname
),
SSC_READ_ACCESS
|
SSC_WRITE_ACCESS
,
0
,
0
,
SSC_OPEN
);
if
(
desc
[
target_id
]
<
0
)
{
/* disk doesn't exist... */
break
;
}
...
...
@@ -303,37 +304,37 @@ simscsi_queuecommand (Scsi_Cmnd *sc, void (*done)(Scsi_Cmnd *))
break
;
case
READ_6
:
if
(
desc
[
sc
->
target
]
<
0
)
if
(
desc
[
target_id
]
<
0
)
break
;
simscsi_readwrite6
(
sc
,
SSC_READ
);
break
;
case
READ_10
:
if
(
desc
[
sc
->
target
]
<
0
)
if
(
desc
[
target_id
]
<
0
)
break
;
simscsi_readwrite10
(
sc
,
SSC_READ
);
break
;
case
WRITE_6
:
if
(
desc
[
sc
->
target
]
<
0
)
if
(
desc
[
target_id
]
<
0
)
break
;
simscsi_readwrite6
(
sc
,
SSC_WRITE
);
break
;
case
WRITE_10
:
if
(
desc
[
sc
->
target
]
<
0
)
if
(
desc
[
target_id
]
<
0
)
break
;
simscsi_readwrite10
(
sc
,
SSC_WRITE
);
break
;
case
READ_CAPACITY
:
if
(
desc
[
sc
->
target
]
<
0
||
sc
->
request_bufflen
<
8
)
{
if
(
desc
[
target_id
]
<
0
||
sc
->
request_bufflen
<
8
)
{
break
;
}
buf
=
sc
->
request_buffer
;
disk_size
=
simscsi_get_disk_size
(
desc
[
sc
->
target
]);
disk_size
=
simscsi_get_disk_size
(
desc
[
target_id
]);
/* pretend to be a 1GB disk (partition table contains real stuff): */
buf
[
0
]
=
(
disk_size
>>
24
)
&
0xff
;
...
...
arch/ia64/kernel/acpi.c
View file @
aa34464e
...
...
@@ -741,7 +741,7 @@ acpi_parse_spcr (unsigned long phys_addr, unsigned long size)
int
__init
acpi_boot_init
(
char
*
cmdline
)
acpi_boot_init
(
void
)
{
/*
...
...
arch/ia64/kernel/entry.S
View file @
aa34464e
...
...
@@ -1244,7 +1244,7 @@ sys_call_table:
data8
sys_sched_setaffinity
data8
sys_sched_getaffinity
data8
sys_set_tid_address
data8
ia64_ni_syscall
data8
sys_fadvise64
data8
ia64_ni_syscall
//
1235
data8
sys_exit_group
data8
sys_lookup_dcookie
...
...
arch/ia64/kernel/init_task.c
View file @
aa34464e
...
...
@@ -17,6 +17,7 @@
static
struct
fs_struct
init_fs
=
INIT_FS
;
static
struct
files_struct
init_files
=
INIT_FILES
;
static
struct
signal_struct
init_signals
=
INIT_SIGNALS
(
init_signals
);
static
struct
sighand_struct
init_sighand
=
INIT_SIGHAND
(
init_sighand
);
struct
mm_struct
init_mm
=
INIT_MM
(
init_mm
);
/*
...
...
arch/ia64/kernel/ptrace.c
View file @
aa34464e
/*
* Kernel support for the ptrace() and syscall tracing interfaces.
*
* Copyright (C) 1999-200
2
Hewlett-Packard Co
* Copyright (C) 1999-200
3
Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*
* Derived from the x86 and Alpha versions. Most of the code in here
...
...
@@ -1235,19 +1235,12 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
ret
=
0
;
goto
out_tsk
;
case
PTRACE_GETSIGINFO
:
ret
=
-
EIO
;
if
(
!
access_ok
(
VERIFY_WRITE
,
data
,
sizeof
(
siginfo_t
))
||
!
child
->
thread
.
siginfo
)
goto
out_tsk
;
ret
=
copy_siginfo_to_user
((
siginfo_t
*
)
data
,
child
->
thread
.
siginfo
);
case
PTRACE_OLD_GETSIGINFO
:
/* for backwards-compatibility */
ret
=
ptrace_request
(
child
,
PTRACE_GETSIGINFO
,
addr
,
data
);
goto
out_tsk
;
case
PTRACE_SETSIGINFO
:
ret
=
-
EIO
;
if
(
!
access_ok
(
VERIFY_READ
,
data
,
sizeof
(
siginfo_t
))
||
child
->
thread
.
siginfo
==
0
)
goto
out_tsk
;
ret
=
copy_siginfo_from_user
(
child
->
thread
.
siginfo
,
(
siginfo_t
*
)
data
);
case
PTRACE_OLD_SETSIGINFO
:
/* for backwards-compatibility */
ret
=
ptrace_request
(
child
,
PTRACE_SETSIGINFO
,
addr
,
data
);
goto
out_tsk
;
case
PTRACE_SYSCALL
:
/* continue and stop at next (return from) syscall */
...
...
arch/ia64/kernel/setup.c
View file @
aa34464e
...
...
@@ -363,7 +363,7 @@ setup_arch (char **cmdline_p)
#ifdef CONFIG_ACPI_BOOT
/* Initialize the ACPI boot-time table parser */
acpi_table_init
(
*
cmdline_p
);
acpi_table_init
();
# ifdef CONFIG_ACPI_NUMA
acpi_numa_init
();
# endif
...
...
@@ -422,7 +422,7 @@ setup_arch (char **cmdline_p)
cpu_init
();
/* initialize the bootstrap CPU */
#ifdef CONFIG_ACPI_BOOT
acpi_boot_init
(
*
cmdline_p
);
acpi_boot_init
();
#endif
#ifdef CONFIG_SERIAL_HCDP
if
(
efi
.
hcdp
)
{
...
...
arch/ia64/kernel/signal.c
View file @
aa34464e
...
...
@@ -534,7 +534,7 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
if
(
signr
<=
0
)
break
;
ka
=
&
current
->
sig
->
action
[
signr
-
1
];
ka
=
&
current
->
sig
hand
->
action
[
signr
-
1
];
if
(
restart
)
{
switch
(
errno
)
{
...
...
arch/ia64/kernel/time.c
View file @
aa34464e
...
...
@@ -25,7 +25,7 @@
#include <asm/system.h>
extern
unsigned
long
wall_jiffies
;
extern
unsigned
long
last_
time
_offset
;
extern
unsigned
long
last_
nsec
_offset
;
u64
jiffies_64
;
...
...
@@ -74,13 +74,13 @@ gettimeoffset (void)
-
(
lost
+
1
)
*
cpu_data
(
time_keeper_id
)
->
itm_delta
);
now
=
ia64_get_itc
();
if
(
(
long
)
(
now
-
last_tick
)
<
0
)
{
if
(
unlikely
((
long
)
(
now
-
last_tick
)
<
0
)
)
{
printk
(
KERN_ERR
"CPU %d: now < last_tick (now=0x%lx,last_tick=0x%lx)!
\n
"
,
smp_processor_id
(),
now
,
last_tick
);
return
last_
time
_offset
;
return
last_
nsec
_offset
;
}
elapsed_cycles
=
now
-
last_tick
;
return
(
elapsed_cycles
*
local_cpu_data
->
usec_per_cyc
)
>>
IA64_U
SEC_PER_CYC_SHIFT
;
return
(
elapsed_cycles
*
local_cpu_data
->
nsec_per_cyc
)
>>
IA64_N
SEC_PER_CYC_SHIFT
;
}
void
...
...
@@ -115,30 +115,35 @@ do_settimeofday (struct timeval *tv)
void
do_gettimeofday
(
struct
timeval
*
tv
)
{
unsigned
long
seq
,
usec
,
sec
,
old
;
unsigned
long
seq
,
nsec
,
usec
,
sec
,
old
;
do
{
while
(
1
)
{
seq
=
read_seqbegin
(
&
xtime_lock
);
usec
=
gettimeoffset
();
nsec
=
gettimeoffset
();
/*
* Ensure time never goes backwards, even when ITC on
*
different CPUs are
not perfectly synchronized.
* Ensure time never goes backwards, even when ITC on
different CPUs are
* not perfectly synchronized.
*/
do
{
old
=
last_time_offset
;
if
(
usec
<=
old
)
{
u
sec
=
old
;
break
;
}
}
while
(
cmpxchg
(
&
last_time_offset
,
old
,
usec
)
!=
old
)
;
old
=
last_nsec_offset
;
if
(
unlikely
(
nsec
<=
old
))
/* someone else has seen a newer time-offset; use that one instead */
n
sec
=
old
;
else
if
(
unlikely
(
cmpxchg
(
&
last_nsec_offset
,
old
,
nsec
)
!=
old
))
/* someone else beat us to updating last_nsec_offset; try again */
continue
;
sec
=
xtime
.
tv_sec
;
usec
+=
xtime
.
tv_nsec
/
1000
;
}
while
(
read_seqend
(
&
xtime_lock
,
seq
));
nsec
+=
xtime
.
tv_nsec
;
if
(
likely
(
!
read_seqretry
(
&
xtime_lock
,
seq
)))
break
;
}
usec
=
nsec
/
1000
;
while
(
u
sec
>=
1000000
)
{
while
(
u
nlikely
(
usec
>=
1000000
)
)
{
usec
-=
1000000
;
++
sec
;
}
...
...
@@ -278,7 +283,7 @@ ia64_init_itm (void)
local_cpu_data
->
proc_freq
=
(
platform_base_freq
*
proc_ratio
.
num
)
/
proc_ratio
.
den
;
local_cpu_data
->
itc_freq
=
itc_freq
;
local_cpu_data
->
cyc_per_usec
=
(
itc_freq
+
500000
)
/
1000000
;
local_cpu_data
->
usec_per_cyc
=
((
1000000UL
<<
IA64_U
SEC_PER_CYC_SHIFT
)
local_cpu_data
->
nsec_per_cyc
=
((
1000000000UL
<<
IA64_N
SEC_PER_CYC_SHIFT
)
+
itc_freq
/
2
)
/
itc_freq
;
/* Setup the CPU local timer tick */
...
...
include/asm-ia64/processor.h
View file @
aa34464e
...
...
@@ -68,11 +68,11 @@
/*
* This shift should be large enough to be able to represent
*
1000000/itc_freq with good accuracy while being small enough to fit
*
1000000<<IA64_USEC_PER_CYC_SHIFT in 64 bits
.
* This shift should be large enough to be able to represent
1000000000/itc_freq with good
*
accuracy while being small enough to fit 10*1000000000<<IA64_NSEC_PER_CYC_SHIFT in 64 bits
*
(this will give enough slack to represent 10 seconds worth of time as a scaled number)
.
*/
#define IA64_
USEC_PER_CYC_SHIFT 41
#define IA64_
NSEC_PER_CYC_SHIFT 30
#ifndef __ASSEMBLY__
...
...
@@ -161,7 +161,7 @@ struct cpuinfo_ia64 {
__u64
itc_freq
;
/* frequency of ITC counter */
__u64
proc_freq
;
/* frequency of processor */
__u64
cyc_per_usec
;
/* itc_freq/1000000 */
__u64
usec_per_cyc
;
/* 2^IA64_USEC_PER_CYC_SHIFT*1000000
/itc_freq */
__u64
nsec_per_cyc
;
/* (1000000000<<IA64_NSEC_PER_CYC_SHIFT)
/itc_freq */
__u64
unimpl_va_mask
;
/* mask of unimplemented virtual address bits (from PAL) */
__u64
unimpl_pa_mask
;
/* mask of unimplemented physical address bits (from PAL) */
__u64
ptce_base
;
...
...
@@ -220,8 +220,6 @@ typedef struct {
(int *) (addr)); \
})
struct
siginfo
;
struct
thread_struct
{
__u32
flags
;
/* various thread flags (see IA64_THREAD_*) */
/* writing on_ustack is performance-critical, so it's worth spending 8 bits on it... */
...
...
@@ -230,7 +228,6 @@ struct thread_struct {
__u64
ksp
;
/* kernel stack pointer */
__u64
map_base
;
/* base address for get_unmapped_area() */
__u64
task_size
;
/* limit for task size */
struct
siginfo
*
siginfo
;
/* current siginfo struct for ptrace() */
int
last_fph_cpu
;
/* CPU that may hold the contents of f32-f127 */
#ifdef CONFIG_IA32_SUPPORT
...
...
@@ -284,7 +281,6 @@ struct thread_struct {
.ksp = 0, \
.map_base = DEFAULT_MAP_BASE, \
.task_size = DEFAULT_TASK_SIZE, \
.siginfo = 0, \
.last_fph_cpu = 0, \
INIT_THREAD_IA32 \
INIT_THREAD_PM \
...
...
include/asm-ia64/ptrace.h
View file @
aa34464e
...
...
@@ -289,8 +289,8 @@ struct pt_all_user_regs {
* not overlap with any of the number assigned in <linux/ptrace.h>.
*/
#define PTRACE_SINGLEBLOCK 12
/* resume execution until next branch */
#define PTRACE_
GETSIGINFO 13
/* get child's siginfo structure
*/
#define PTRACE_
SETSIGINFO 14
/* set child's siginfo structure
*/
#define PTRACE_
OLD_GETSIGINFO 13
/* (replaced by PTRACE_GETSIGINFO in <linux/ptrace.h>)
*/
#define PTRACE_
OLD_SETSIGINFO 14
/* (replaced by PTRACE_SETSIGINFO in <linux/ptrace.h>)
*/
#define PTRACE_GETREGS 18
/* get all registers (pt_all_user_regs) in one shot */
#define PTRACE_SETREGS 19
/* set all registers (pt_all_user_regs) in one shot */
...
...
include/asm-ia64/unistd.h
View file @
aa34464e
...
...
@@ -223,7 +223,7 @@
#define __NR_sched_setaffinity 1231
#define __NR_sched_getaffinity 1232
#define __NR_set_tid_address 1233
/* 1234 available for reuse */
#define __NR_fadvise64 1234
/* 1235 available for reuse */
#define __NR_exit_group 1236
#define __NR_lookup_dcookie 1237
...
...
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