Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139611450
D20201.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
D20201.diff
View Options
Index: head/sys/dev/cpuctl/cpuctl.c
===================================================================
--- head/sys/dev/cpuctl/cpuctl.c
+++ head/sys/dev/cpuctl/cpuctl.c
@@ -330,9 +330,26 @@
return (ret);
}
+struct ucode_update_data {
+ void *ptr;
+ int cpu;
+ int ret;
+};
+
+static void
+ucode_intel_load_rv(void *arg)
+{
+ struct ucode_update_data *d;
+
+ d = arg;
+ if (PCPU_GET(cpuid) == d->cpu)
+ d->ret = ucode_intel_load(d->ptr, true, NULL, NULL);
+}
+
static int
update_intel(int cpu, cpuctl_update_args_t *args, struct thread *td)
{
+ struct ucode_update_data d;
void *ptr;
int is_bound, oldcpu, ret;
@@ -360,12 +377,11 @@
oldcpu = td->td_oncpu;
is_bound = cpu_sched_is_bound(td);
set_cpu(cpu, td);
- critical_enter();
-
- ret = ucode_intel_load(ptr, true, NULL, NULL);
-
- critical_exit();
+ d.ptr = ptr;
+ d.cpu = cpu;
+ smp_rendezvous(NULL, ucode_intel_load_rv, NULL, &d);
restore_cpu(oldcpu, is_bound, td);
+ ret = d.ret;
/*
* Replace any existing update. This ensures that the new update
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 15, 3:29 AM (4 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26974370
Default Alt Text
D20201.diff (1 KB)
Attached To
Mode
D20201: Put other CPUs into tight loop when updating microcode from loaded OS.
Attached
Detach File
Event Timeline
Log In to Comment