Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp110779imu; Tue, 27 Nov 2018 09:41:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/U04yOosgdLoBCEcW5TEHmvoVIbefH1wq8mQsgz3io5e0T/Qm7N9MHco4HtDq7xOfsxYBoV X-Received: by 2002:a62:1043:: with SMTP id y64mr11149286pfi.78.1543340518330; Tue, 27 Nov 2018 09:41:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543340518; cv=none; d=google.com; s=arc-20160816; b=gJZbWDF2V8a1Ss1J+kyeOwDQl1ZDVa00Xw2m634PPQhk/NZWbPtdodTCVkXgGOX4KS Uawd4LHkUObNMESdetyhDB9wmKSKn2ZWNYRsdXLSmeHJ2V6l1U7Qr0OGQx0H7ApqcuBf ts5mHQiCy0JbFwd4ZA6rkR/EKxxBhAg7bf61Xtb9T2XcIcoyZjhugBiz00EiaDmMwOFR z589QO/96lTS4/tTh5HoKS66ByDpuYZvXXs9o0DzjbMhUkYfltl/cXi1NBcysEMRno+a l1lafYuXqwkQAKrjXhx2FfzBdmFnnlGVmx10ozvAo9Pzo4kiuCnmkI6+0TPUtvXriEtB yO2A== 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=btW4tSDgYVTZG1VgsidJSZkpnvOhOR1OVjsuNy9rgN8=; b=N9hFCtSKnYi0oFPIEJhru11KOVn/eg5VU9h2oZnMgHHf1Jqong8FfEJ68rmHg5zI9Y PPRCWkNKO0cI1fiHu4ixgXp5fT5WTYEv0pflNSVLa+5wl/8Chq2MzFoJaup5GGeuriul o37/89pO5NAqyDpTuEjNTU09qxW6I9WIzBvtqJ63meUUmE6cQelk/tG4RhmfJvaxoXVw lQWs4nZMnki5SBoy1iv2+wJEHqLyfGa0K+i2vUveATKEh+onMO9nq1V1CJ4hKwbcy5U+ h8MtK1zEkwJucEhv/adrme2qSUrAyQMN+Zaem/mo1EmWDpUnwm3ioe0lvsteKe0gKOuF a5wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=euCgN7jE; 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 m76si4392708pfj.48.2018.11.27.09.41.33; Tue, 27 Nov 2018 09:41:58 -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=euCgN7jE; 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 S1731886AbeK1Eh2 (ORCPT + 99 others); Tue, 27 Nov 2018 23:37:28 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35425 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbeK1Eh2 (ORCPT ); Tue, 27 Nov 2018 23:37:28 -0500 Received: by mail-pf1-f195.google.com with SMTP id z9so8744063pfi.2 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=MlC23rsC6RXNXHRxbs3sHlcrGII/vgAgvKTAMviL2Gma/KIju9HPV2UwkmbdQOtH/u 5JatSi0WzuKuZQrZhvjA1l+SW6UoFQO5BRPPBS7wrQAbJoGDMl06Jqb93vNVKL2/0iWo +8/O1t/pKlxf2f+MuVL398hQ09zMABrtcGFVcC1jn3KXMzZJrQJG96SgoUdzGmzOvj5Y wPUQ5TW9AY208mxmB5flu+gzCPq9XJjt3PyTY/AfI7TGwepwl1ZgNlC8vBurN3kQ0biD kZGsXJsgvMzv1MCDp0bKcEG04jjzwFIWC7ibDCfmzZtmA5/KFWU1QqSovRZNwT60Wfoy 8Dpw== X-Gm-Message-State: AA+aEWb50c7AUVyeLN2wvqGypkYsHbnTOQqn4snoHbf2ibvLnt5iMnVw RDIIvzanGw4K9NHDs0dYpRVuVw== 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 Cc: Will Deacon , 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 , Paul Burton , Stephen Rothwell , 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 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 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. 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.rc0.387.gc7a69e6b6c-goog