smp: Dynamically allocate the stoppcbs array
This avoids bloating the kernel image when MAXCPU is large. A follow-up patch for kgdb and other kernel debuggers is needed since the stoppcbs symbol is now a pointer. Bump __FreeBSD_version so that debuggers can use osreldate to figure out how to handle stoppcbs. PR: 269572 MFC after: never Reviewed by: mjg, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39806
This commit is contained in:
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
/* used to hold the AP's until we are ready to release them */
|
||||
struct mtx ap_boot_mtx;
|
||||
struct pcb stoppcbs[MAXCPU];
|
||||
|
||||
/* # of Applications processors */
|
||||
volatile int mp_naps;
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#include <machine/frame.h>
|
||||
#include <machine/psl.h>
|
||||
|
||||
#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid]
|
||||
|
||||
extern void kdb_cpu_clear_singlestep(void);
|
||||
extern void kdb_cpu_set_singlestep(void);
|
||||
boolean_t kdb_cpu_pc_is_singlestep(db_addr_t);
|
||||
|
||||
@@ -29,7 +29,4 @@ void ipi_selected(cpuset_t cpus, u_int ipi);
|
||||
void platform_mp_setmaxid(void);
|
||||
void platform_mp_start_ap(void);
|
||||
|
||||
/* global data in mp_machdep.c */
|
||||
extern struct pcb stoppcbs[];
|
||||
|
||||
#endif /* !_MACHINE_SMP_H_ */
|
||||
|
||||
Reference in New Issue
Block a user