Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142727092
D15560.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
943 B
Referenced Files
None
Subscribers
None
D15560.id.diff
View Options
Index: sys/dev/cpuctl/cpuctl.c
===================================================================
--- sys/dev/cpuctl/cpuctl.c
+++ sys/dev/cpuctl/cpuctl.c
@@ -405,10 +405,11 @@
}
static int
-update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td)
+update_amd(int cpu __unused, cpuctl_update_args_t *args, struct thread *td)
{
+ cpuset_t cpus;
void *ptr;
- int ret;
+ int i, ret;
if (args->size == 0 || args->data == NULL) {
DPRINTF("[cpuctl,%d]: zero-sized firmware image", __LINE__);
@@ -431,7 +432,21 @@
ret = EFAULT;
goto fail;
}
- smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, ptr);
+
+ /*
+ * Update microcode on each physical CPU.
+ */
+#ifdef SMP
+ CPU_ZERO(&cpus);
+ CPU_FOREACH(i) {
+ if (!CPU_ISSET(i, &logical_cpus_mask))
+ CPU_SET(i, &cpus);
+ }
+#else
+ CPU_FILL(&cpus);
+ (void)i;
+#endif
+ smp_rendezvous_cpus(cpus, NULL, amd_ucode_wrmsr, NULL, ptr);
ret = 0;
fail:
free(ptr, M_CPUCTL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 6:25 PM (13 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27888462
Default Alt Text
D15560.id.diff (943 B)
Attached To
Mode
D15560: Use a spin lock to serialize updates on AMD CPUs.
Attached
Detach File
Event Timeline
Log In to Comment