From patchwork Tue Nov 27 03:51:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 1003592 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LCRw0cvk"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SstBiiGW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433qbl1GSzz9s55 for ; Tue, 27 Nov 2018 14:52:03 +1100 (AEDT) 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=gjemCsrE81332GM4RLWJqlrOiU4iNBslZFEE7N/pWFI=; b=LCRw0cvk+KbbJx ndHADRkc3Ad6RuOuYUPiB67zaYaJ/txWhPHSPTrTJ4x5Sj8doxDb6edPh3I4Xq/UjjPESGLHdIeL4 7EI1zOMuCrLuf/o8WoaiyvDkW/jGSUwpd34JbdwdWoahmgiOlRi1ckm5TkSppzT97o4yGqC+9lGSE NUhTvY6kaEpTHkC8yq44VQytd3Ta1SNJpih2fSTkGDqFGLX3eG4UzUr7SCllhGSHHa7cE5sURFDo/ +pfFaSt91k8X9p2lPrhm2cj2VY2MqtAxNmu3oifOumRKXVADz/h/R/TmkpDXm5bpgusLTnopy42mM NnCIJiXcg0D7uyHfa8OQ==; 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 1gRUPo-0004P0-DE; Tue, 27 Nov 2018 03:52:00 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRUPl-0004ND-6h for linux-snps-arc@lists.infradead.org; Tue, 27 Nov 2018 03:51:58 +0000 Received: by mail-pf1-x441.google.com with SMTP id b85so7675048pfc.3 for ; Mon, 26 Nov 2018 19:51:46 -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=ckFwfWrXDG7mbBgtIA9ywF+G24oiGIeq/mDuQRgaBZM=; b=SstBiiGWzw5dBJG/3tQu6dyCWZzwOYkKa8t0/fa0w5gcDTZaE47UUcy03dPrz4/uvH mFYss26Ji3dfFsBbZtXM9Fkiw7fyvNZFThjXOqmer3sdiz1pAVn1Ulbd0owmzDDRP5vg d+8ef2cthPwUtXBypN4pDgp8cmiqJR5m56fcE= 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=ckFwfWrXDG7mbBgtIA9ywF+G24oiGIeq/mDuQRgaBZM=; b=AAv6qGvUWO1mpTLXQ/V+KLzlpMdO4TezjB++hZJ4GQGOgnb/miyJ96PMod/SS9t9oi meNicj283gFgEe80w/E/aCIR+SB0g/BarAJ+bcAKbNV4Upvh+8If7JN2E1a0tghipA5A Yq3bO8VtlOMIvVz0w3H+zXt5ZjiyYwgmnn8phNmIH0HoPHHQTOvqXV+1IDQdUwaXod6n Mq0ZMUUZipwOHeM2QqZdRBGZl+Gy1VwGv8ag77jJoPim/WEu5/Cj+I6a8Vxuv7o1QPlO uH/Ij9HpWxQ+/aCVDh54lIolvm4xAUS9UxYJK93RMJAwbOo+WMNoD2CFxNIMpSoCrMuB eipg== X-Gm-Message-State: AA+aEWYq4S7PeX50x78jgN+X8DTC/xt4tm3AeW3g8a6TRcajgywpMaf0 nm6s4lRPuD4MTvIfPTJIyQ95gQ== X-Google-Smtp-Source: AFSGD/V3wZAxhlYGm/KNcJbxWJViWYHfJeGL3B2UeBIJOeAl5ZlvisN4Y0oJyigojv6bCfo+1dgibw== X-Received: by 2002:a63:2946:: with SMTP id p67mr28146422pgp.317.1543290705498; Mon, 26 Nov 2018 19:51:45 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id i4sm2690112pfj.82.2018.11.26.19.51.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 19:51:44 -0800 (PST) From: Douglas Anderson To: Jason Wessel , Daniel Thompson Subject: [PATCH v5 0/4] kgdb: Fix kgdb_roundup_cpus() Date: Mon, 26 Nov 2018 19:51:29 -0800 Message-Id: <20181127035133.225592-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-20181126_195157_285582_355E60A0 X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: -1.7 (-) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-1.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors 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-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 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(-)