Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159548171
D24757.id71782.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D24757.id71782.diff
View Options
Index: head/sys/amd64/amd64/mp_machdep.c
===================================================================
--- head/sys/amd64/amd64/mp_machdep.c
+++ head/sys/amd64/amd64/mp_machdep.c
@@ -264,8 +264,9 @@
init_ops.start_all_aps();
set_interrupt_apic_ids();
-}
+ acpi_pxm_set_cpu_locality();
+}
/*
* AP CPU's call this to initialize themselves.
Index: head/sys/arm64/arm64/mp_machdep.c
===================================================================
--- head/sys/arm64/arm64/mp_machdep.c
+++ head/sys/arm64/arm64/mp_machdep.c
@@ -535,9 +535,7 @@
acpi_unmap_table(madt);
#if MAXMEMDOM > 1
- /* set proximity info */
acpi_pxm_set_cpu_locality();
- acpi_pxm_free();
#endif
}
#endif
Index: head/sys/dev/acpica/acpi_pxm.c
===================================================================
--- head/sys/dev/acpica/acpi_pxm.c
+++ head/sys/dev/acpica/acpi_pxm.c
@@ -628,7 +628,8 @@
}
/*
- * Setup per-CPU domain IDs from information saved in 'cpus'.
+ * Set up per-CPU domain IDs from information saved in 'cpus' and tear down data
+ * structures allocated by acpi_pxm_init().
*/
void
acpi_pxm_set_cpu_locality(void)
@@ -651,6 +652,10 @@
printf("SRAT: CPU %u has memory domain %d\n", i,
pc->pc_domain);
}
+ /* XXXMJ the page is leaked. */
+ pmap_unmapbios((vm_offset_t)cpus, sizeof(*cpus) * max_cpus);
+ srat_physaddr = 0;
+ cpus = NULL;
}
int
@@ -662,20 +667,6 @@
if (cpu == NULL)
panic("SRAT: CPU with ID %u is not known", apic_id);
return (cpu->domain);
-}
-
-/*
- * Free data structures allocated during acpi_pxm_init.
- */
-void
-acpi_pxm_free(void)
-{
-
- if (srat_physaddr == 0)
- return;
- pmap_unmapbios((vm_offset_t)cpus, sizeof(*cpus) * max_cpus);
- srat_physaddr = 0;
- cpus = NULL;
}
/*
Index: head/sys/dev/acpica/acpivar.h
===================================================================
--- head/sys/dev/acpica/acpivar.h
+++ head/sys/dev/acpica/acpivar.h
@@ -540,7 +540,6 @@
void acpi_pxm_set_mem_locality(void);
void acpi_pxm_set_cpu_locality(void);
int acpi_pxm_get_cpu_locality(int apic_id);
-void acpi_pxm_free(void);
/*
* Map a PXM to a VM domain.
Index: head/sys/i386/i386/mp_machdep.c
===================================================================
--- head/sys/i386/i386/mp_machdep.c
+++ head/sys/i386/i386/mp_machdep.c
@@ -198,6 +198,8 @@
start_all_aps();
set_interrupt_apic_ids();
+
+ acpi_pxm_set_cpu_locality();
}
/*
Index: head/sys/x86/acpica/srat.c
===================================================================
--- head/sys/x86/acpica/srat.c
+++ head/sys/x86/acpica/srat.c
@@ -56,13 +56,4 @@
SYSINIT(parse_acpi_tables, SI_SUB_VM - 1, SI_ORDER_FIRST, parse_acpi_tables,
NULL);
-static void
-srat_set_cpus(void *dummy)
-{
-
- acpi_pxm_set_cpu_locality();
- acpi_pxm_free();
-}
-SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL);
-
#endif /* MAXMEMDOM > 1 */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 16, 2:54 PM (17 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33990440
Default Alt Text
D24757.id71782.diff (2 KB)
Attached To
Mode
D24757: Call acpi_pxm_set_proximity_info() slightly earlier.
Attached
Detach File
Event Timeline
Log In to Comment