Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156716695
D3297.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
968 B
Referenced Files
None
Subscribers
None
D3297.id.diff
View Options
Index: head/sys/arm64/arm64/mp_machdep.c
===================================================================
--- head/sys/arm64/arm64/mp_machdep.c
+++ head/sys/arm64/arm64/mp_machdep.c
@@ -352,7 +352,6 @@
if (id == 0)
return (1);
- CPU_SET(id, &all_cpus);
pcpup = &__pcpu[id];
pcpu_init(pcpup, id, sizeof(struct pcpu));
@@ -371,8 +370,17 @@
pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry);
err = psci_cpu_on(target_cpu, pa, id);
- if (err != PSCI_RETVAL_SUCCESS)
- printf("Failed to start CPU %u\n", id);
+ if (err != PSCI_RETVAL_SUCCESS) {
+ /* Panic here if INVARIANTS are enabled */
+ KASSERT(0, ("Failed to start CPU %u (%lx)\n", id, target_cpu));
+
+ pcpu_destroy(pcpup);
+ kmem_free(kernel_arena, (vm_offset_t)dpcpu[id - 1], DPCPU_SIZE);
+ dpcpu[id - 1] = NULL;
+ /* Notify the user that the CPU failed to start */
+ printf("Failed to start CPU %u (%lx)\n", id, target_cpu);
+ } else
+ CPU_SET(id, &all_cpus);
return (1);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 9:06 PM (11 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33153050
Default Alt Text
D3297.id.diff (968 B)
Attached To
Mode
D3297: Release memory for CPUs that fail to init on ARM64
Attached
Detach File
Event Timeline
Log In to Comment