From owner-svn-src-all@freebsd.org Mon Jun 25 22:05:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38DD7102270F; Mon, 25 Jun 2018 22:05:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D97E8703F3; Mon, 25 Jun 2018 22:05:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2012309E; Mon, 25 Jun 2018 22:05:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PM5YG2053815; Mon, 25 Jun 2018 22:05:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PM5YZI053813; Mon, 25 Jun 2018 22:05:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201806252205.w5PM5YZI053813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 25 Jun 2018 22:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335648 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 335648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 22:05:35 -0000 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 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 #include 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 */