Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105740648
D10536.id27829.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10536.id27829.diff
View Options
Index: sys/x86/x86/mca.c
===================================================================
--- sys/x86/x86/mca.c
+++ sys/x86/x86/mca.c
@@ -653,7 +653,7 @@
* count of the number of valid MC records found.
*/
static int
-mca_scan(enum scan_mode mode)
+mca_scan(enum scan_mode mode, int *recoverablep)
{
struct mca_record rec;
uint64_t mcg_cap, ucmask;
@@ -704,7 +704,9 @@
}
if (mode == POLLED)
mca_fill_freelist();
- return (mode == MCE ? recoverable : count);
+ if (recoverablep != NULL)
+ *recoverablep = recoverable;
+ return (count);
}
/*
@@ -726,7 +728,7 @@
CPU_FOREACH(cpu) {
sched_bind(td, cpu);
thread_unlock(td);
- count += mca_scan(POLLED);
+ count += mca_scan(POLLED, NULL);
thread_lock(td);
sched_unbind(td);
}
@@ -1150,7 +1152,7 @@
mca_intr(void)
{
uint64_t mcg_status;
- int old_count, recoverable;
+ int recoverable, count;
if (!(cpu_feature & CPUID_MCA)) {
/*
@@ -1164,8 +1166,7 @@
}
/* Scan the banks and check for any non-recoverable errors. */
- old_count = mca_count;
- recoverable = mca_scan(MCE);
+ count = mca_scan(MCE, &recoverable);
mcg_status = rdmsr(MSR_MCG_STATUS);
if (!(mcg_status & MCG_STATUS_RIPV))
recoverable = 0;
@@ -1177,7 +1178,7 @@
* on all CPUs, but only certain CPUs will find a valid
* bank to log.
*/
- while (mca_count == old_count)
+ while (count == 0)
cpu_spinwait();
panic("Unrecoverable machine check exception");
@@ -1199,7 +1200,7 @@
* Serialize MCA bank scanning to prevent collisions from
* sibling threads.
*/
- count = mca_scan(CMCI);
+ count = mca_scan(CMCI, NULL);
/* If we found anything, log them to the console. */
if (count != 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 11:40 PM (12 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15536416
Default Alt Text
D10536.id27829.diff (1 KB)
Attached To
Mode
D10536: x86 MCA: Fix a deadlock in MCA exception processing
Attached
Detach File
Event Timeline
Log In to Comment