Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9027286imu; Tue, 4 Dec 2018 19:41:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/V/UhkYi4I/HUpj58asAN8TZOnVEWzSfNl/CzJC1BuREFzGoFK70duRsmIrhfIatYY0K/s9 X-Received: by 2002:a17:902:142:: with SMTP id 60mr23343850plb.330.1543981275963; Tue, 04 Dec 2018 19:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543981275; cv=none; d=google.com; s=arc-20160816; b=lO/WKsBVKstGmYkyIc3dHPyQmWjI9GpkN0ZkeTrLp3r9Mbu7a3SjjiRy7M2HSPUx/I 9Z/8rZHHo0zIUrVYYdwAAAEugIuKhjS4CSKs1y+GUdGZYxeEdXfRsUWfC8n/VbMQ/SUw XvnvEVNxOtWLD1gEei/KBr9Ulcz1BZPcDdTysJTKp5GFnei4fAXVgsH64Ey7mtQUmy+F I8mq3z4zbc/jyX50vR8sgjypuP2Nukl03ym4E1KLLrllSR7nES4wBn54+RlUMBI8n7uH g1nGut5tA4im584ODekv26e3aRHWUArSF+b7Mlm7NcpKetNPDJXwKuwfSK9bXYuXaeP7 k+wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=z/GbV0bSeaz7chU5sXMqG6QAgF9+DILZOJ/C236ktZg=; b=tXUN1amsQVFpTi8/+RGSI65nNwXdg9L7DbTuww8M3Ng4tYqRPY+f93ALVnUH/NE5n5 y7IYo4t6xV/IEBAHdxcDDMJto27gL3ptq4LC8RHo21QdJcuULWCN0nSVOakKNz1rzG9S 4FDAEQ/GkC55wGU7lag+1oEeU77VEeID7whJe+Lmc5JobBsTBCAZwsE1HVZJzPdUgHDu WTZdVbCj+GeM6lsWdBLFJWamYXDLQ1eycpZyI3HpcG3G0pLViWGInGF1q4RKyyvyHkBy KKBxIpMmVofxztl3/i4DvyarmkYvTQZUxeHyDvnA6OrWFBhCMy80bshYnEiGCbmtFcAE Ctug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K585Xp8M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si20781712pla.20.2018.12.04.19.41.00; Tue, 04 Dec 2018 19:41:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K585Xp8M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbeLEDip (ORCPT + 99 others); Tue, 4 Dec 2018 22:38:45 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38161 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbeLEDip (ORCPT ); Tue, 4 Dec 2018 22:38:45 -0500 Received: by mail-pl1-f195.google.com with SMTP id e5so9357668plb.5 for ; Tue, 04 Dec 2018 19:38:43 -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/GbV0bSeaz7chU5sXMqG6QAgF9+DILZOJ/C236ktZg=; b=K585Xp8M4Mj3zup8T9K9CnKl4VOlIafuSOnnvbxKM8V1kf46nuvqH1uHEdwKMYinkL nyfz+MfsRT7pb38WKSqQ/Jk7I/DULvv9yF0M7LkRKGDDWZ9oi6UUcmWJH3T+uL0b3ZdR FPnt5zmTvnBxRjwpKdeCnBD5Sb+wD7OSc94lU= 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/GbV0bSeaz7chU5sXMqG6QAgF9+DILZOJ/C236ktZg=; b=i4TYpJju+KMZ1mI7Rtj9wK0G3UJmPWIVgCkGYlZj1rKgp80hrI6MbcWE/fYSdcU6Ms E/MC6dnY9tjK9UAety0GTEVSRS30WPlgkb6b3kqDTs0pB1r3CZZexUlKBOmaQGcFKkrN 4mfKH3LYAAgwgA97cBANTB+BUCM6bA+cayJgRIAWCQYF9VK4JrzyYRhhMkezMVcIYw2i O+EJpF+sF0Llrzj2yTHr1UKH1kYh0GZDxsvtWeJGTsG/+PhOePvP5hH68saQVIbxXoE2 PlMy8GPGtW6q3+kSeGwfaICOyfuKPsN7Ge3EhK0mNH44M5I+BcB6N1OkrqULvo5RBRAu RfGg== X-Gm-Message-State: AA+aEWYwApkxWDjvT8GLd7/GOyvvxNF3T+G2YiZnvD7uGWKUrcu/sNTj WXVIjjRl4Jxt0sKi9gN7h4FA2ICX2lk= X-Received: by 2002:a17:902:e012:: with SMTP id ca18mr22658609plb.218.1543981123446; Tue, 04 Dec 2018 19:38:43 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id z62sm26456939pfl.33.2018.12.04.19.38.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 19:38:42 -0800 (PST) From: Douglas Anderson To: Jason Wessel , Daniel Thompson Cc: Will Deacon , kgdb-bugreport@lists.sourceforge.net, Peter Zijlstra , Douglas Anderson , 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 , 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 , linux-mips@vger.kernel.org, Paul Mackerras , Richard Kuo , linuxppc-dev@lists.ozlabs.org Subject: [REPOST PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus() Date: Tue, 4 Dec 2018 19:38:24 -0800 Message-Id: <20181205033828.6156-1-dianders@chromium.org> X-Mailer: git-send-email 2.20.0.rc1.387.gf8505762e3-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Repost of v6 adds CC's and also tags already received. 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(-) -- 2.20.0.rc1.387.gf8505762e3-goog