Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7b029d03
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7b029d03
编写于
6月 22, 2009
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
i7core_edac: A few fixes at error injection code
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
f122a892
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
55 addition
and
15 deletion
+55
-15
drivers/edac/i7core_edac.c
drivers/edac/i7core_edac.c
+55
-15
未找到文件。
drivers/edac/i7core_edac.c
浏览文件 @
7b029d03
...
...
@@ -30,6 +30,8 @@
#include "edac_core.h"
/* To use the new pci_[read/write]_config_qword instead of two dword */
#define USE_QWORD 1
/*
* Alter this version for the module when modifications are made
...
...
@@ -639,44 +641,71 @@ static ssize_t i7core_inject_enable_store(struct mem_ctl_info *mci,
/* Sets pvt->inject.dimm mask */
if
(
pvt
->
inject
.
dimm
<
0
)
mask
|=
1
l
<<
41
;
mask
|=
1
L
<<
41
;
else
{
if
(
pvt
->
channel
[
pvt
->
inject
.
channel
].
dimms
>
2
)
mask
|=
(
pvt
->
inject
.
dimm
&
0x3
l
)
<<
35
;
mask
|=
(
pvt
->
inject
.
dimm
&
0x3
L
)
<<
35
;
else
mask
|=
(
pvt
->
inject
.
dimm
&
0x1
l
)
<<
36
;
mask
|=
(
pvt
->
inject
.
dimm
&
0x1
L
)
<<
36
;
}
/* Sets pvt->inject.rank mask */
if
(
pvt
->
inject
.
rank
<
0
)
mask
|=
1
l
<<
40
;
mask
|=
1
L
<<
40
;
else
{
if
(
pvt
->
channel
[
pvt
->
inject
.
channel
].
dimms
>
2
)
mask
|=
(
pvt
->
inject
.
rank
&
0x1
l
)
<<
34
;
mask
|=
(
pvt
->
inject
.
rank
&
0x1
L
)
<<
34
;
else
mask
|=
(
pvt
->
inject
.
rank
&
0x3
l
)
<<
34
;
mask
|=
(
pvt
->
inject
.
rank
&
0x3
L
)
<<
34
;
}
/* Sets pvt->inject.bank mask */
if
(
pvt
->
inject
.
bank
<
0
)
mask
|=
1
l
<<
39
;
mask
|=
1
L
<<
39
;
else
mask
|=
(
pvt
->
inject
.
bank
&
0x15
l
)
<<
30
;
mask
|=
(
pvt
->
inject
.
bank
&
0x15
L
)
<<
30
;
/* Sets pvt->inject.page mask */
if
(
pvt
->
inject
.
page
<
0
)
mask
|=
1
l
<<
38
;
mask
|=
1
L
<<
38
;
else
mask
|=
(
pvt
->
inject
.
page
&
0xffff
l
)
<<
14
;
mask
|=
(
pvt
->
inject
.
page
&
0xffff
L
)
<<
14
;
/* Sets pvt->inject.column mask */
if
(
pvt
->
inject
.
col
<
0
)
mask
|=
1
l
<<
37
;
mask
|=
1
L
<<
37
;
else
mask
|=
(
pvt
->
inject
.
col
&
0x3fff
l
);
mask
|=
(
pvt
->
inject
.
col
&
0x3fff
L
);
#if USE_QWORD
pci_write_config_qword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
,
mask
);
#else
pci_write_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
,
mask
);
pci_write_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
+
4
,
mask
>>
32L
);
#endif
#if 1
#if USE_QWORD
u64
rdmask
;
pci_read_config_qword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
,
&
rdmask
);
debugf0
(
"Inject addr match write 0x%016llx, read: 0x%016llx
\n
"
,
mask
,
rdmask
);
#else
u32
rdmask1
,
rdmask2
;
pci_read_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
,
&
rdmask1
);
pci_read_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ADDR_MATCH
+
4
,
&
rdmask2
);
debugf0
(
"Inject addr match write 0x%016llx, read: 0x%08x%08x
\n
"
,
mask
,
rdmask1
,
rdmask2
);
#endif
#endif
pci_write_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ERROR_MASK
,
pvt
->
inject
.
eccmask
);
...
...
@@ -688,17 +717,18 @@ static ssize_t i7core_inject_enable_store(struct mem_ctl_info *mci,
* bit 4: INJECT_ADDR_PARITY
*/
injectmask
=
(
pvt
->
inject
.
type
&
1
)
&&
(
pvt
->
inject
.
section
&
0x3
)
<<
1
&&
injectmask
=
(
pvt
->
inject
.
type
&
1
)
|
(
pvt
->
inject
.
section
&
0x3
)
<<
1
|
(
pvt
->
inject
.
type
&
0x6
)
<<
(
3
-
1
);
pci_write_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ERROR_MASK
,
injectmask
);
debugf0
(
"Error inject addr match 0x%016llx, ecc 0x%08x, inject 0x%08x
\n
"
,
mask
,
pvt
->
inject
.
eccmask
,
injectmask
);
return
count
;
}
...
...
@@ -706,6 +736,16 @@ static ssize_t i7core_inject_enable_show(struct mem_ctl_info *mci,
char
*
data
)
{
struct
i7core_pvt
*
pvt
=
mci
->
pvt_info
;
u32
injectmask
;
pci_read_config_dword
(
pvt
->
pci_ch
[
pvt
->
inject
.
channel
][
0
],
MC_CHANNEL_ERROR_MASK
,
&
injectmask
);
debugf0
(
"Inject error read: 0x%018x
\n
"
,
injectmask
);
if
(
injectmask
&
0x0c
)
pvt
->
inject
.
enable
=
1
;
return
sprintf
(
data
,
"%d
\n
"
,
pvt
->
inject
.
enable
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录