Page MenuHomeFreeBSD

D39806.1794804432.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D39806.1794804432.diff

diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -411,6 +411,9 @@
}
#endif
+ stoppcbs = mallocarray(mp_ncpus, sizeof(struct pcb), M_DEVBUF,
+ M_WAITOK | M_ZERO);
+
/* start each AP */
domain = 0;
for (cpu = 1; cpu < mp_ncpus; cpu++) {
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -383,6 +383,9 @@
outb(CMOS_REG, BIOS_RESET);
mpbiosreason = inb(CMOS_DATA);
+ stoppcbs = mallocarray(mp_ncpus, sizeof(struct pcb), M_DEVBUF,
+ M_WAITOK | M_ZERO);
+
/* take advantage of the P==V mapping for PTD[0] for AP boot */
/* start each AP */
diff --git a/sys/x86/include/x86_smp.h b/sys/x86/include/x86_smp.h
--- a/sys/x86/include/x86_smp.h
+++ b/sys/x86/include/x86_smp.h
@@ -30,7 +30,7 @@
/* global data in mp_x86.c */
extern int mp_naps;
extern int boot_cpu_id;
-extern struct pcb stoppcbs[];
+extern struct pcb *stoppcbs;
extern int cpu_apic_ids[];
extern int bootAP;
extern void *dpcpu;
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -99,7 +99,7 @@
void *bootstacks[MAXCPU];
void *dpcpu;
-struct pcb stoppcbs[MAXCPU];
+struct pcb *stoppcbs;
struct susppcb **susppcbs;
#ifdef COUNT_IPIS

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 16, 4:47 AM (5 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41760746
Default Alt Text
D39806.1794804432.diff (1 KB)

Event Timeline