svn commit: r335648 - head/sys/powerpc/include
Justin Hibbits
jhibbits at FreeBSD.org
Mon Jun 25 22:05:35 UTC 2018
Author: jhibbits
Date: Mon Jun 25 22:05:33 2018
New Revision: 335648
URL: https://svnweb.freebsd.org/changeset/base/335648
Log:
Expose stopped cpu contexts to ddb on PowerPC
Summary: In r220638, stoppcbs started being tracked. This never got exposed to
ddb though, so kdb_thr_ctx() didn't know how to look them up.
This allows switching to threads on stopped CPUs in kdb.
Submitted by: Brandon Bergren <git_bdragon.rkt0.net>
Differential Revision: https://reviews.freebsd.org/D15986
Modified:
head/sys/powerpc/include/kdb.h
head/sys/powerpc/include/smp.h
Modified: head/sys/powerpc/include/kdb.h
==============================================================================
--- head/sys/powerpc/include/kdb.h Mon Jun 25 21:54:39 2018 (r335647)
+++ head/sys/powerpc/include/kdb.h Mon Jun 25 22:05:33 2018 (r335648)
@@ -40,6 +40,8 @@
void kdb_cpu_clear_singlestep(void);
void kdb_cpu_set_singlestep(void);
+#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid]
+
static __inline void
kdb_cpu_sync_icache(unsigned char *addr, size_t size)
{
Modified: head/sys/powerpc/include/smp.h
==============================================================================
--- head/sys/powerpc/include/smp.h Mon Jun 25 21:54:39 2018 (r335647)
+++ head/sys/powerpc/include/smp.h Mon Jun 25 22:05:33 2018 (r335648)
@@ -42,6 +42,7 @@
#ifndef LOCORE
+#include <machine/pcb.h>
#include <sys/_cpuset.h>
void ipi_all_but_self(int ipi);
@@ -58,6 +59,8 @@ void cpudep_ap_early_bootstrap(void);
uintptr_t cpudep_ap_bootstrap(void);
void cpudep_ap_setup(void);
void machdep_ap_bootstrap(void);
+
+extern struct pcb stoppcbs[];
#endif /* !LOCORE */
#endif /* _KERNEL */
More information about the svn-src-all
mailing list