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
ba6c5c62
Commit
ba6c5c62
authored
Jul 15, 2009
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i7core_edac: maps all sockets as if ther are one MC controller
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
67166af4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
drivers/edac/i7core_edac.c
drivers/edac/i7core_edac.c
+7
-6
No files found.
drivers/edac/i7core_edac.c
View file @
ba6c5c62
...
...
@@ -409,12 +409,12 @@ static int i7core_get_active_channels(u8 socket, unsigned *channels,
return
0
;
}
static
int
get_dimm_config
(
struct
mem_ctl_info
*
mci
,
u8
socket
)
static
int
get_dimm_config
(
struct
mem_ctl_info
*
mci
,
int
*
csrow
,
u8
socket
)
{
struct
i7core_pvt
*
pvt
=
mci
->
pvt_info
;
struct
csrow_info
*
csr
;
struct
pci_dev
*
pdev
;
int
i
,
j
,
csrow
=
0
;
int
i
,
j
;
unsigned
long
last_page
=
0
;
enum
edac_type
mode
;
enum
mem_type
mtype
;
...
...
@@ -534,7 +534,7 @@ static int get_dimm_config(struct mem_ctl_info *mci, u8 socket)
npages
=
size
<<
(
20
-
PAGE_SHIFT
);
#endif
csr
=
&
mci
->
csrows
[
csrow
];
csr
=
&
mci
->
csrows
[
*
csrow
];
csr
->
first_page
=
last_page
+
1
;
last_page
+=
npages
;
csr
->
last_page
=
last_page
;
...
...
@@ -542,7 +542,7 @@ static int get_dimm_config(struct mem_ctl_info *mci, u8 socket)
csr
->
page_mask
=
0
;
csr
->
grain
=
8
;
csr
->
csrow_idx
=
csrow
;
csr
->
csrow_idx
=
*
csrow
;
csr
->
nr_channels
=
1
;
csr
->
channels
[
0
].
chan_idx
=
i
;
...
...
@@ -565,7 +565,7 @@ static int get_dimm_config(struct mem_ctl_info *mci, u8 socket)
csr
->
edac_mode
=
mode
;
csr
->
mtype
=
mtype
;
csrow
++
;
(
*
csrow
)
++
;
}
pci_read_config_dword
(
pdev
,
MC_SAG_CH_0
,
&
value
[
0
]);
...
...
@@ -1424,6 +1424,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
struct
i7core_pvt
*
pvt
;
int
num_channels
=
0
;
int
num_csrows
=
0
;
int
csrow
=
0
;
int
dev_idx
=
id
->
driver_data
;
int
rc
,
i
;
u8
sockets
;
...
...
@@ -1495,7 +1496,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
/* Get dimm basic config */
for
(
i
=
0
;
i
<
sockets
;
i
++
)
get_dimm_config
(
mci
,
i
);
get_dimm_config
(
mci
,
&
csrow
,
i
);
/* add this new MC control structure to EDAC's list of MCs */
if
(
unlikely
(
edac_mc_add_mc
(
mci
)))
{
...
...
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