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
321ece4d
Commit
321ece4d
authored
Oct 08, 2009
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i7core_edac: Fix ringbuffer maxsize
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
6e103be1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
drivers/edac/i7core_edac.c
drivers/edac/i7core_edac.c
+6
-6
No files found.
drivers/edac/i7core_edac.c
View file @
321ece4d
...
...
@@ -1631,14 +1631,14 @@ static void i7core_check_error(struct mem_ctl_info *mci)
* loosing an error.
*/
smp_rmb
();
count
=
(
pvt
->
mce_out
+
sizeof
(
mce_entry
)
-
pvt
->
mce_in
)
%
sizeof
(
mce_entry
)
;
count
=
(
pvt
->
mce_out
+
MCE_LOG_LEN
-
pvt
->
mce_in
)
%
MCE_LOG_LEN
;
if
(
!
count
)
return
;
m
=
pvt
->
mce_outentry
;
if
(
pvt
->
mce_in
+
count
>
sizeof
(
mce_entry
)
)
{
unsigned
l
=
sizeof
(
mce_entry
)
-
pvt
->
mce_in
;
if
(
pvt
->
mce_in
+
count
>
MCE_LOG_LEN
)
{
unsigned
l
=
MCE_LOG_LEN
-
pvt
->
mce_in
;
memcpy
(
m
,
&
pvt
->
mce_entry
[
pvt
->
mce_in
],
sizeof
(
*
m
)
*
l
);
smp_wmb
();
...
...
@@ -1702,7 +1702,7 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
return
0
;
smp_rmb
();
if
((
pvt
->
mce_out
+
1
)
%
sizeof
(
mce_entry
)
==
pvt
->
mce_in
)
{
if
((
pvt
->
mce_out
+
1
)
%
MCE_LOG_LEN
==
pvt
->
mce_in
)
{
smp_wmb
();
pvt
->
mce_overrun
++
;
return
0
;
...
...
@@ -1711,7 +1711,7 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
/* Copy memory error at the ringbuffer */
memcpy
(
&
pvt
->
mce_entry
[
pvt
->
mce_out
],
mce
,
sizeof
(
*
mce
));
smp_wmb
();
pvt
->
mce_out
=
(
pvt
->
mce_out
+
1
)
%
sizeof
(
mce_entry
)
;
pvt
->
mce_out
=
(
pvt
->
mce_out
+
1
)
%
MCE_LOG_LEN
;
/* Handle fatal errors immediately */
if
(
mce
->
mcgstatus
&
1
)
...
...
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