From patchwork Mon Nov 12 18:26:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10679127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C0EC109C for ; Mon, 12 Nov 2018 18:27:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 152112A435 for ; Mon, 12 Nov 2018 18:27:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08A2D2A439; Mon, 12 Nov 2018 18:27:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B5582A435 for ; Mon, 12 Nov 2018 18:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=oRoCb4pRXZhkVnihd2h+PPFD2nfrZvxyQfoJR89YYEs=; b=tIyqAfHQ+d9qi6 9doDHKcZptk64G6F5jgtezIFN4fzNiV2fbc92LY9Gwke9qMuV7mVLId+xbZlV0ScoI1/NtmmQXACR yJXU+nn3mBUwLCfv3Dle0BzKCtN0ELHeYv7nSOXAaALSbWOw/aIsM+4wZdsvYoQbcKzgHSc4BMfWH vhJGE77BXL96S1jz0QqrHi0INHyOKneOEryqweLj+B8+cKZ2KDM7TEiJ/tTsd2pNmu5Zfef44J7tr /PWULqXr2o5yJN/WJa8Qf1ZnQ6H5hoXB2vvtK+s8tRQxdZ+WlZQDYXZDgJNRke/o4UXQWkoZMGtA2 dnw/ZRNxYLRJKp0SaAtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMGvp-00086v-Vb; Mon, 12 Nov 2018 18:27:29 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMGvn-00084d-I0 for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 18:27:29 +0000 Received: by mail-pg1-x543.google.com with SMTP id 70so4424759pgh.8 for ; Mon, 12 Nov 2018 10:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z+fNEzOvGtu7UZFhCEIQ8uoVjOxFwpPILN5pzazqNYk=; b=eXr6js0mdxBQXDsYoP+dpGM05tDLjEqyHTGRhiOIULp8cnhmCXXktIgW8uezqg9ePK wVabda9zlcNHOXnd4xrUL7y/qGPvD3LORin0hioaX/oYI39lrop8fAjEQALwFCK9UNaM Enw29nwR5bw1mTGJXMldXQvFe9C5yvoDao0KM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z+fNEzOvGtu7UZFhCEIQ8uoVjOxFwpPILN5pzazqNYk=; b=nHfMiWZlRzUweqgEDFaNgNoywEt1kJ9mRjIGHNX5RmOzp+V9x5Udimf9adCMa5dWNq w5AT/oyP+ffcbUKyCwUEOp2USe+r65FyFNvIHfOc9sWIsr3wZbYJwbaOrfxwbSWfP+vj Etg8f0tK0dIjD2i1m2SK1MCwEsCmJQ/JBrnvjWACD2uvHV/MK5mxaig0abTH5Bn+0GOa 6Sr0Vm2cGAOouyxMJTX4/Pwu1CzxfF5SweLMnn4U+zp6/CWob+BVTXYX7SW3TbNTHBZ9 u01D1H9iaNIv48oyneXaAC7nzhp3gL7XTVotdb8Coj7fWZXhq2WyrDWiaPhc5QgNfJPC frDQ== X-Gm-Message-State: AGRZ1gLWNjiykGMgpZpwR1xqq6YzKJwHJ1AXdZd+jpCJHSgR4MJExVCy 8wAQQnjti1F7/9UlyMhZ8UmKBQ== X-Google-Smtp-Source: AJdET5e5/WkAuI8mTOdhvf1T6zEObtJHy7y0EHk3Q6guTcO9BgOxiHnQib5SZuhWLZjVMV7KN5Oidg== X-Received: by 2002:a63:24c2:: with SMTP id k185mr1679288pgk.406.1542047236123; Mon, 12 Nov 2018 10:27:16 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id o86-v6sm18813100pfk.8.2018.11.12.10.27.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 10:27:15 -0800 (PST) From: Douglas Anderson To: Jason Wessel , Daniel Thompson Subject: [PATCH v4 0/4] kgdb: Fix kgdb_roundup_cpus() Date: Mon, 12 Nov 2018 10:26:54 -0800 Message-Id: <20181112182659.245726-1-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_102727_597573_918F8080 X-CRM114-Status: GOOD ( 13.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mips@linux-mips.org, Michal Hocko , Catalin Marinas , linux-sh@vger.kernel.org, Peter Zijlstra , kgdb-bugreport@lists.sourceforge.net, Will Deacon , linux-kernel@vger.kernel.org, Rich Felker , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Yoshinori Sato , linux-hexagon@vger.kernel.org, x86@kernel.org, Russell King , Ingo Molnar , James Hogan , linux-snps-arc@lists.infradead.org, Huang Ying , Mike Rapoport , Borislav Petkov , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Vineet Gupta , Douglas Anderson , Ralf Baechle , Richard Kuo , Paul Burton , Benjamin Herrenschmidt , Michael Ellerman , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series was originally part of the series ("serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb") but it made sense to split it up. It's believed that dropping into kgdb should be more robust once these patches are applied. Changes in v4: - Removed smp_mb() calls. - Also clear out .debuggerinfo. - Also clear out .debuggerinfo and .task for the master. - Remove clearing out in kdb_stub for offline CPUs; it's now redundant. Changes in v3: - No separate init call. - Don't round up the CPU that is doing the rounding up. - Add "#ifdef CONFIG_SMP" to match the rest of the file. - Updated desc saying we don't solve the "failed to roundup" case. - Document the ignored parameter. - Don't round up a CPU that failed rounding up before new for v3. - Don't back trace on a cpu that didn't round up new for v3. Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Don't round up a CPU that failed rounding up before kdb: Don't back trace on a cpu that didn't round up arch/arc/kernel/kgdb.c | 10 ++---- arch/arm/kernel/kgdb.c | 12 ------- arch/arm64/kernel/kgdb.c | 12 ------- arch/hexagon/kernel/kgdb.c | 32 ------------------- arch/mips/kernel/kgdb.c | 9 +----- arch/powerpc/kernel/kgdb.c | 6 ++-- arch/sh/kernel/kgdb.c | 12 ------- arch/sparc/kernel/smp_64.c | 2 +- arch/x86/kernel/kgdb.c | 9 ++---- include/linux/kgdb.h | 22 ++++++++----- kernel/debug/debug_core.c | 56 ++++++++++++++++++++++++++++++++- kernel/debug/debug_core.h | 1 + kernel/debug/kdb/kdb_bt.c | 11 ++++++- kernel/debug/kdb/kdb_debugger.c | 7 ----- 14 files changed, 89 insertions(+), 112 deletions(-)