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: 10679123 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 AC923109C for ; Mon, 12 Nov 2018 18:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 967802A435 for ; Mon, 12 Nov 2018 18:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 890722A439; Mon, 12 Nov 2018 18:27:18 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 718162A435 for ; Mon, 12 Nov 2018 18:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729730AbeKMEVl (ORCPT ); Mon, 12 Nov 2018 23:21:41 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42264 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729704AbeKMEVk (ORCPT ); Mon, 12 Nov 2018 23:21:40 -0500 Received: by mail-pg1-f193.google.com with SMTP id d72so987051pga.9 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=cWldEN8RCnMz8o2SWT+9wUqsii1pGeps4HUo2CBE4g0W9jUFjuC5kv4GSNAUj2Fwjh L23pNPFKd/98gMb37h84ltB9fplOFWRR09vg6WEXD2Y8hdp1AUjAgd+JJYssSPj9WYUZ p7MHsXirQWVLgU7crmObuiMdwsg1sXJVFzB1lDVB4jy0F9AVwLS0K+JJcFCIYrfYaMiH zw14OO+ymNTcXjDoIhBOdebscD+u8dM9IJzFs1vhLj+OV1mc402frRPXL0tprfBRMayS AjKPc706bu7A+uP/QfKiIDWK5Bpkx/W9WgJtHPieT3gddBBq0n8oPSfz+j3xZRBSgCz3 qS6w== X-Gm-Message-State: AGRZ1gJ1X4aN37jVAQ3lhxsSxFhcq6r18xoamfkg2PEwIXFH7TiCiif5 /u1uxdFYEUtlAIggMozdI/5yfg== 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 Cc: kgdb-bugreport@lists.sourceforge.net, Peter Zijlstra , Douglas Anderson , linux-mips@linux-mips.org, linux-sh@vger.kernel.org, Borislav Petkov , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, Catalin Marinas , James Hogan , linux-hexagon@vger.kernel.org, x86@kernel.org, Vineet Gupta , Thomas Gleixner , Michal Hocko , Ralf Baechle , linux-snps-arc@lists.infradead.org, Andrew Morton , "H. Peter Anvin" , Yoshinori Sato , Benjamin Herrenschmidt , Will Deacon , Paul Burton , Ingo Molnar , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Huang Ying , "David S. Miller" , Rich Felker , Michael Ellerman , Mike Rapoport , Paul Mackerras , Richard Kuo , linuxppc-dev@lists.ozlabs.org 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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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(-)