Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e53897e2
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e53897e2
编写于
9月 22, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
上级
3fd07d3b
4881e2cd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
128 addition
and
23 deletion
+128
-23
arch/ia64/hp/sim/simscsi.c
arch/ia64/hp/sim/simscsi.c
+23
-6
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/mca_asm.S
+85
-11
arch/ia64/kernel/mca_drv.c
arch/ia64/kernel/mca_drv.c
+15
-6
include/asm-ia64/mca.h
include/asm-ia64/mca.h
+5
-0
未找到文件。
arch/ia64/hp/sim/simscsi.c
浏览文件 @
e53897e2
...
...
@@ -233,6 +233,23 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
simscsi_readwrite
(
sc
,
mode
,
offset
,
((
sc
->
cmnd
[
7
]
<<
8
)
|
sc
->
cmnd
[
8
])
*
512
);
}
static
void
simscsi_fillresult
(
struct
scsi_cmnd
*
sc
,
char
*
buf
,
unsigned
len
)
{
int
scatterlen
=
sc
->
use_sg
;
struct
scatterlist
*
slp
;
if
(
scatterlen
==
0
)
memcpy
(
sc
->
request_buffer
,
buf
,
len
);
else
for
(
slp
=
(
struct
scatterlist
*
)
sc
->
buffer
;
scatterlen
--
>
0
&&
len
>
0
;
slp
++
)
{
unsigned
thislen
=
min
(
len
,
slp
->
length
);
memcpy
(
page_address
(
slp
->
page
)
+
slp
->
offset
,
buf
,
thislen
);
slp
++
;
len
-=
thislen
;
}
}
static
int
simscsi_queuecommand
(
struct
scsi_cmnd
*
sc
,
void
(
*
done
)(
struct
scsi_cmnd
*
))
{
...
...
@@ -240,6 +257,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
char
fname
[
MAX_ROOT_LEN
+
16
];
size_t
disk_size
;
char
*
buf
;
char
localbuf
[
36
];
#if DEBUG_SIMSCSI
register
long
sp
asm
(
"sp"
);
...
...
@@ -263,7 +281,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
/* disk doesn't exist... */
break
;
}
buf
=
sc
->
request_buffer
;
buf
=
localbuf
;
buf
[
0
]
=
0
;
/* magnetic disk */
buf
[
1
]
=
0
;
/* not a removable medium */
buf
[
2
]
=
2
;
/* SCSI-2 compliant device */
...
...
@@ -273,6 +291,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf
[
6
]
=
0
;
/* reserved */
buf
[
7
]
=
0
;
/* various flags */
memcpy
(
buf
+
8
,
"HP SIMULATED DISK 0.00"
,
28
);
simscsi_fillresult
(
sc
,
buf
,
36
);
sc
->
result
=
GOOD
;
break
;
...
...
@@ -304,16 +323,13 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
simscsi_readwrite10
(
sc
,
SSC_WRITE
);
break
;
case
READ_CAPACITY
:
if
(
desc
[
target_id
]
<
0
||
sc
->
request_bufflen
<
8
)
{
break
;
}
buf
=
sc
->
request_buffer
;
buf
=
localbuf
;
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
;
buf
[
1
]
=
(
disk_size
>>
16
)
&
0xff
;
buf
[
2
]
=
(
disk_size
>>
8
)
&
0xff
;
...
...
@@ -323,13 +339,14 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf
[
5
]
=
0
;
buf
[
6
]
=
2
;
buf
[
7
]
=
0
;
simscsi_fillresult
(
sc
,
buf
,
8
);
sc
->
result
=
GOOD
;
break
;
case
MODE_SENSE
:
case
MODE_SENSE_10
:
/* sd.c uses this to determine whether disk does write-caching. */
memset
(
sc
->
request_buffer
,
0
,
128
);
simscsi_fillresult
(
sc
,
(
char
*
)
empty_zero_page
,
sc
->
request_bufflen
);
sc
->
result
=
GOOD
;
break
;
...
...
arch/ia64/kernel/mca_asm.S
浏览文件 @
e53897e2
...
...
@@ -489,24 +489,27 @@ ia64_state_save:
;;
st8
[
temp1
]=
r17
,
16
//
pal_min_state
st8
[
temp2
]=
r6
,
16
//
prev_IA64_KR_CURRENT
mov
r6
=
IA64_KR
(
CURRENT_STACK
)
;;
st8
[
temp1
]=
r6
,
16
//
prev_IA64_KR_CURRENT_STACK
st8
[
temp2
]=
r0
,
16
//
prev_task
,
starts
off
as
NULL
mov
r6
=
cr
.
ifa
;;
st8
[
temp1
]=
r
0
,
16
//
prev_task
,
starts
off
as
NULL
st8
[
temp2
]=
r
12
,
16
//
cr
.
isr
st8
[
temp1
]=
r
12
,
16
//
cr
.
isr
st8
[
temp2
]=
r
6
,
16
//
cr
.
ifa
mov
r12
=
cr
.
itir
;;
st8
[
temp1
]=
r
6
,
16
//
cr
.
ifa
st8
[
temp2
]=
r1
2
,
16
//
cr
.
itir
st8
[
temp1
]=
r
12
,
16
//
cr
.
itir
st8
[
temp2
]=
r1
1
,
16
//
cr
.
iipa
mov
r12
=
cr
.
iim
;;
st8
[
temp1
]=
r11
,
16
//
cr
.
iipa
st8
[
temp2
]=
r12
,
16
//
cr
.
iim
mov
r6
=
cr
.
iha
st8
[
temp1
]=
r12
,
16
//
cr
.
iim
(
p1
)
mov
r12
=
IA64_MCA_COLD_BOOT
(
p2
)
mov
r12
=
IA64_INIT_WARM_BOOT
mov
r6
=
cr
.
iha
;;
st8
[
temp
1
]=
r6
,
16
//
cr
.
iha
st8
[
temp
2
]=
r12
//
os_status
,
default
is
cold
boot
st8
[
temp
2
]=
r6
,
16
//
cr
.
iha
st8
[
temp
1
]=
r12
//
os_status
,
default
is
cold
boot
mov
r6
=
IA64_MCA_SAME_CONTEXT
;;
st8
[
temp1
]=
r6
//
context
,
default
is
same
context
...
...
@@ -823,9 +826,12 @@ ia64_state_restore:
ld8
r12
=[
temp1
],
16
//
sal_ra
ld8
r9
=[
temp2
],
16
//
sal_gp
;;
ld8
r22
=[
temp1
],
24
//
pal_min_state
,
virtual
.
skip
prev_task
ld8
r22
=[
temp1
],
16
//
pal_min_state
,
virtual
ld8
r21
=[
temp2
],
16
//
prev_IA64_KR_CURRENT
;;
ld8
r16
=[
temp1
],
16
//
prev_IA64_KR_CURRENT_STACK
ld8
r20
=[
temp2
],
16
//
prev_task
;;
ld8
temp3
=[
temp1
],
16
//
cr
.
isr
ld8
temp4
=[
temp2
],
16
//
cr
.
ifa
;;
...
...
@@ -846,6 +852,45 @@ ia64_state_restore:
ld8
r8
=[
temp1
]
//
os_status
ld8
r10
=[
temp2
]
//
context
/
*
Wire
IA64_TR_CURRENT_STACK
to
the
stack
that
we
are
resuming
to
.
To
*
avoid
any
dependencies
on
the
algorithm
in
ia64_switch_to
(),
just
*
purge
any
existing
CURRENT_STACK
mapping
and
insert
the
new
one
.
*
*
r16
contains
prev_IA64_KR_CURRENT_STACK
,
r21
contains
*
prev_IA64_KR_CURRENT
,
these
values
may
have
been
changed
by
the
C
*
code
.
Do
not
use
r8
,
r9
,
r10
,
r22
,
they
contain
values
ready
for
*
the
return
to
SAL
.
*/
mov
r15
=
IA64_KR
(
CURRENT_STACK
)
//
physical
granule
mapped
by
IA64_TR_CURRENT_STACK
;;
shl
r15
=
r15
,
IA64_GRANULE_SHIFT
;;
dep
r15
=-
1
,
r15
,
61
,
3
//
virtual
granule
mov
r18
=
IA64_GRANULE_SHIFT
<<
2
//
for
cr
.
itir
.
ps
;;
ptr.d
r15
,
r18
;;
srlz.d
extr.u
r19
=
r21
,
61
,
3
//
r21
=
prev_IA64_KR_CURRENT
shl
r20
=
r16
,
IA64_GRANULE_SHIFT
//
r16
=
prev_IA64_KR_CURRENT_STACK
movl
r21
=
PAGE_KERNEL
//
page
properties
;;
mov
IA64_KR
(
CURRENT_STACK
)=
r16
cmp.ne
p6
,
p0
=
RGN_KERNEL
,
r19
//
new
stack
is
in
the
kernel
region
?
or
r21
=
r20
,
r21
//
construct
PA
|
page
properties
(
p6
)
br.spnt
1
f
//
the
dreaded
cpu
0
idle
task
in
region
5
:
(
;;
mov
cr
.
itir
=
r18
mov
cr
.
ifa
=
r21
mov
r20
=
IA64_TR_CURRENT_STACK
;;
itr.d
dtr
[
r20
]=
r21
;;
srlz.d
1
:
br.sptk
b0
//
EndStub
//////////////////////////////////////////////////////////////////////
...
...
@@ -982,6 +1027,7 @@ ia64_set_kernel_registers:
add
temp4
=
temp4
,
temp1
//
&
struct
ia64_sal_os_state
.
os_gp
add
r12
=
temp1
,
temp3
//
kernel
stack
pointer
on
MCA
/
INIT
stack
add
r13
=
temp1
,
r3
//
set
current
to
start
of
MCA
/
INIT
stack
add
r20
=
temp1
,
r3
//
physical
start
of
MCA
/
INIT
stack
;;
ld8
r1
=[
temp4
]
//
OS
GP
from
SAL
OS
state
;;
...
...
@@ -991,7 +1037,35 @@ ia64_set_kernel_registers:
;;
mov
IA64_KR
(
CURRENT
)=
r13
//
FIXME
:
do
I
need
to
wire
IA64_KR_CURRENT_STACK
and
IA64_TR_CURRENT_STACK
?
/
*
Wire
IA64_TR_CURRENT_STACK
to
the
MCA
/
INIT
handler
stack
.
To
avoid
*
any
dependencies
on
the
algorithm
in
ia64_switch_to
(),
just
purge
*
any
existing
CURRENT_STACK
mapping
and
insert
the
new
one
.
*/
mov
r16
=
IA64_KR
(
CURRENT_STACK
)
//
physical
granule
mapped
by
IA64_TR_CURRENT_STACK
;;
shl
r16
=
r16
,
IA64_GRANULE_SHIFT
;;
dep
r16
=-
1
,
r16
,
61
,
3
//
virtual
granule
mov
r18
=
IA64_GRANULE_SHIFT
<<
2
//
for
cr
.
itir
.
ps
;;
ptr.d
r16
,
r18
;;
srlz.d
shr.u
r16
=
r20
,
IA64_GRANULE_SHIFT
//
r20
=
physical
start
of
MCA
/
INIT
stack
movl
r21
=
PAGE_KERNEL
//
page
properties
;;
mov
IA64_KR
(
CURRENT_STACK
)=
r16
or
r21
=
r20
,
r21
//
construct
PA
|
page
properties
;;
mov
cr
.
itir
=
r18
mov
cr
.
ifa
=
r13
mov
r20
=
IA64_TR_CURRENT_STACK
;;
itr.d
dtr
[
r20
]=
r21
;;
srlz.d
br.sptk
b0
...
...
arch/ia64/kernel/mca_drv.c
浏览文件 @
e53897e2
...
...
@@ -56,8 +56,9 @@ static struct page *page_isolate[MAX_PAGE_ISOLATE];
static
int
num_page_isolate
=
0
;
typedef
enum
{
ISOLATE_NG
=
0
,
ISOLATE_OK
=
1
ISOLATE_NG
,
ISOLATE_OK
,
ISOLATE_NONE
}
isolate_status_t
;
/*
...
...
@@ -74,7 +75,7 @@ static struct {
* @paddr: poisoned memory location
*
* Return value:
*
ISOLATE_OK / ISOLATE_NG
*
one of isolate_status_t, ISOLATE_OK/NG/NONE.
*/
static
isolate_status_t
...
...
@@ -85,7 +86,10 @@ mca_page_isolate(unsigned long paddr)
/* whether physical address is valid or not */
if
(
!
ia64_phys_addr_valid
(
paddr
))
return
ISOLATE_NG
;
return
ISOLATE_NONE
;
if
(
!
pfn_valid
(
paddr
))
return
ISOLATE_NONE
;
/* convert physical address to physical page number */
p
=
pfn_to_page
(
paddr
>>
PAGE_SHIFT
);
...
...
@@ -122,10 +126,15 @@ mca_handler_bh(unsigned long paddr)
current
->
pid
,
current
->
comm
);
spin_lock
(
&
mca_bh_lock
);
if
(
mca_page_isolate
(
paddr
)
==
ISOLATE_OK
)
{
switch
(
mca_page_isolate
(
paddr
))
{
case
ISOLATE_OK
:
printk
(
KERN_DEBUG
"Page isolation: ( %lx ) success.
\n
"
,
paddr
);
}
else
{
break
;
case
ISOLATE_NG
:
printk
(
KERN_DEBUG
"Page isolation: ( %lx ) failure.
\n
"
,
paddr
);
break
;
default:
break
;
}
spin_unlock
(
&
mca_bh_lock
);
...
...
include/asm-ia64/mca.h
浏览文件 @
e53897e2
...
...
@@ -80,7 +80,12 @@ struct ia64_sal_os_state {
u64
sal_ra
;
/* Return address in SAL, physical */
u64
sal_gp
;
/* GP of the SAL - physical */
pal_min_state_area_t
*
pal_min_state
;
/* from R17. physical in asm, virtual in C */
/* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK).
* Note: if the MCA/INIT recovery code wants to resume to a new context
* then it must change these values to reflect the new kernel stack.
*/
u64
prev_IA64_KR_CURRENT
;
/* previous value of IA64_KR(CURRENT) */
u64
prev_IA64_KR_CURRENT_STACK
;
struct
task_struct
*
prev_task
;
/* previous task, NULL if it is not useful */
/* Some interrupt registers are not saved in minstate, pt_regs or
* switch_stack. Because MCA/INIT can occur when interrupts are
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录