Date: Mon, 25 Jun 2018 22:05:34 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335648 - head/sys/powerpc/include Message-ID: <201806252205.w5PM5YZI053813@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806252205.w5PM5YZI053813>