From patchwork Tue Nov 27 17:38:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10701111 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 1BF5614BD for ; Tue, 27 Nov 2018 17:39:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00F962C695 for ; Tue, 27 Nov 2018 17:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E887E2C69B; Tue, 27 Nov 2018 17:39:06 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 8E31A2C69C for ; Tue, 27 Nov 2018 17:39:05 +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=lC5FHyLKLaudj9rIAByCebg7IR5mdPHXW2s0v/kGnzk=; b=SZ08+DeBS2s7T+ x98sCqEZ6LZLWt02a6UhoIFv7hqszGjSNhjSVBUgKaiNU2ccIEAYNVqrj2ZPvuZtKmLD6vLPYsP/L 5yJJuk9KbFU2p94SXoKJG/YNLhdre2lmadQ+UDYrSyFG7PXC06UJm/SEd5YxXmimxWFZneXhwRDq0 a3IQpiIGGsxVZyoRSIRZ8XhIr0uXr4lDTTmq68st0fCU47fA9MHShMhM3iji6j2zV1PYKpBIzCzph hihJ0YX2fYiruIFQXcqTf2ARel2qFaHIKb0X+vj3Lk4xV9TENap0m4lo4Zgh9Bq7giJaZol32HLDb 8dcKnu3QZtc83ly2PYLw==; 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 1gRhKB-0004LZ-JQ; Tue, 27 Nov 2018 17:39:03 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRhK8-0004Ic-JH for linux-arm-kernel@lists.infradead.org; Tue, 27 Nov 2018 17:39:01 +0000 Received: by mail-pg1-x542.google.com with SMTP id d72so8174163pga.9 for ; Tue, 27 Nov 2018 09:38:50 -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=btW4tSDgYVTZG1VgsidJSZkpnvOhOR1OVjsuNy9rgN8=; b=euCgN7jEgQj9BRFsLbvLccqvD7BMHe9oH/vw1fAfkRcsIDTG0H7atf+O3VJgHHf/Ib +0EeiF/ExR8JhzG0aAXqyKgdH6Nf5nT/7EVlTOI3Tc2bZhX3O47+u9FWkaY9wdccnh4z +aK0BhxRON+bYi7HxjEeHzb4905MbKY+2VSSw= 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=btW4tSDgYVTZG1VgsidJSZkpnvOhOR1OVjsuNy9rgN8=; b=H7Mya11W9HsBH/kWUwvsG4/0z+NhWYQUAu8cyS8MVi0tpK2pYyiQ+B1Yg4wulm0k2a PEffzDmOh+Pn0W7MXvj36tnsgyHqKqvTowi/5ovqNrgg8yWXYWmuB8xyJZXbBVAXsSFv OfGCk3ah6gncdLWPk66Wpk+QISR9ptW/PL1UXbPD72PUgbHuG0ZnLlGWtap7yRmDABiO Lhqc11dUTJOIlQnUFvMAZgc+bg+RXMLInS2YqMUfYCN+JZPbW3zQD5i2oOR1BKhYdDeq UujNF7ex15ga/+4p3TioMkbJ4RiANJu5mkensbNH/1v4n0Dlbx3INq32Z7oXSXGeiF0b LAnw== X-Gm-Message-State: AA+aEWYLRf5Z70WR4q//MQN/qnWGvbqG/lRZpKw29iLJy4IycupglskQ IRYqIdWci6yaiARU3uMxdsXtSg== X-Google-Smtp-Source: AFSGD/UVOvmhqSJQV7tD2XVnws13TlcYn7Y2nz8qJVewAZOL0PscKr9j/ccZFuITN4ISEaCxhdCosA== X-Received: by 2002:a63:c141:: with SMTP id p1mr30084699pgi.424.1543340329654; Tue, 27 Nov 2018 09:38:49 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id b185sm4577547pga.85.2018.11.27.09.38.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 09:38:48 -0800 (PST) From: Douglas Anderson To: Jason Wessel , Daniel Thompson Subject: [PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus() Date: Tue, 27 Nov 2018 09:38:35 -0800 Message-Id: <20181127173839.34328-1-dianders@chromium.org> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_093900_632667_5862B9C5 X-CRM114-Status: GOOD ( 14.08 ) 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, Stephen Rothwell , 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 v6: - Moved smp_call_function_single_async() error check to patch 3. Changes in v5: - Add a comment about get_irq_regs(). - get_cpu() => raw_smp_processor_id() in kgdb_roundup_cpus(). - for_each_cpu() => for_each_online_cpu() - Error check smp_call_function_single_async() 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 | 65 ++++++++++++++++++++++++++++++++- kernel/debug/debug_core.h | 1 + kernel/debug/kdb/kdb_bt.c | 11 +++++- kernel/debug/kdb/kdb_debugger.c | 7 ---- 14 files changed, 98 insertions(+), 112 deletions(-)