From nobody Tue Jul 05 15:08:55 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6FEF1D02463; Tue, 5 Jul 2022 15:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LcmKM59LWz3tYs; Tue, 5 Jul 2022 15:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657033735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCkOJMRkX41UxhygcmN8WHtjAL6kTRci6noq5ROI1hk=; b=EpuQ6LNUrxhsvnb/GXnZZvVbcVH3JZ/sc8EGyHCI2sH6bgO3gaUHrkt8NJS8cnws7tkkAN 9dJQpfeFiYXzGj//vtqSvJ/Xn2mLDj3ioILdgof9bjJGrZ7qJ1GTwrIsXa6/XV9sDZ1hNJ Dw0NnXHHAJO9+mL+YGDbLr9frWGOkSW4H1FjpiBWqRu+6orl4JJEUg2vqwDy9sbBq2aF7k gUVeneIr+IDJJLbfWwPq883Iy3hWjMZn7AgNX1lCqWZi6BagoLOAbMj+i5Vhk5tZEOg3nW eeJskJMLsztFLKvtKBRlgQBvKJWglGj10yJ4PQ+63xsrM7Rk5cecI5DnweWn0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9176027664; Tue, 5 Jul 2022 15:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 265F8tca069898; Tue, 5 Jul 2022 15:08:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 265F8tQa069897; Tue, 5 Jul 2022 15:08:55 GMT (envelope-from git) Date: Tue, 5 Jul 2022 15:08:55 GMT Message-Id: <202207051508.265F8tQa069897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4fffc56c6e4c - main - riscv: implement db_show_mdpcpu() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fffc56c6e4c97aa76b31060e806ccdafb1afacd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657033735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCkOJMRkX41UxhygcmN8WHtjAL6kTRci6noq5ROI1hk=; b=SjAURzPQzW0QJAMGyuHUDatE+tVoc9oxrmdtGSB+Sxwk7694uzBdBJSr1GjiuekynzYAQg LGCoI48WK18iffA3eOHm/sJwt6+v8fLlD3VRYNfBqR8Mr1DYTrv8LPYhiBoetJPD56qmWc zc5cONwGG5aD9fAdUgdIgZtNRX0i93+XBLpYUpXsHsfwmsgebrnBTYhmbKLnPUibCROeIl tX4IpEu+b4LYQsgMxZNxZYXvnogXfbGmwbehJm+PmSpHB5k5QUXznbBV9nhCPkSJOYoXeh yT8/ktJzhLvHjsgcT3LWJ7kItkRlr55GX5z+pdlUABI3egcvmyWrn2iGQKDCOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657033735; a=rsa-sha256; cv=none; b=hIDpW4GQgHbGRhdS1k/XD6sqiSkXCfKCqYKsd7MWhmOWV35TnEj2Fx7P024ZXokfrSnTGp ZRaHN6YNoM5wlzwDqEKpNDUeYFyEP7jap9zZn7W1A8R1F+c8nso6Ia7k9/v4lRXk2IDeCi fnmJDR3u2wVs7cDPwm1azuwYqofPCI09w7zgtz1pOeM0HsA+POsfesoTAUNqkZn281NHJ5 Maj/sk5vA54aWzLkCnwDAsZDZNiYKynM+zljXSVukTXuyJxtSZrEqqW1BTFlJgs0TL3Nsx /QLF59cpTg56uFingmQ6JiaM6bFNDyyE9X9+6IFbBBbzsbSfdIqdG79/hVQl1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4fffc56c6e4c97aa76b31060e806ccdafb1afacd commit 4fffc56c6e4c97aa76b31060e806ccdafb1afacd Author: Mitchell Horne AuthorDate: 2021-10-04 20:47:49 +0000 Commit: Mitchell Horne CommitDate: 2022-07-05 14:51:14 +0000 riscv: implement db_show_mdpcpu() This prints the machine-dependent members of struct pcpu when executing the 'show pcpu' or 'show all pcpu' ddb(4) commands. MFC after: 3 days --- sys/riscv/include/pcpu.h | 1 + sys/riscv/riscv/db_interface.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/riscv/include/pcpu.h b/sys/riscv/include/pcpu.h index af5eb6fd5c41..0165a271250f 100644 --- a/sys/riscv/include/pcpu.h +++ b/sys/riscv/include/pcpu.h @@ -44,6 +44,7 @@ #define ALT_STACK_SIZE 128 +/* Keep in sync with db_show_mdpcpu() */ #define PCPU_MD_FIELDS \ struct pmap *pc_curpmap; /* Currently active pmap */ \ uint32_t pc_pending_ipis; /* IPIs pending to this CPU */ \ diff --git a/sys/riscv/riscv/db_interface.c b/sys/riscv/riscv/db_interface.c index 291fd2c2d8fa..5c959792d368 100644 --- a/sys/riscv/riscv/db_interface.c +++ b/sys/riscv/riscv/db_interface.c @@ -106,6 +106,9 @@ struct db_variable *db_eregs = db_regs + nitems(db_regs); void db_show_mdpcpu(struct pcpu *pc) { + db_printf("curpmap = %p\n", pc->pc_curpmap); + db_printf("pending_ipis = %x\n", pc->pc_pending_ipis); + db_printf("hart = %u\n", pc->pc_hart); } /*