From patchwork Thu Jan 28 19:46:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Merkey X-Patchwork-Id: 574855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0B264140BA0 for ; Fri, 29 Jan 2016 06:47:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=stpGsZyb; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOsX7-0004sA-IR; Thu, 28 Jan 2016 19:47:09 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOsX6-0004qE-A9 for linux-snps-arc@lists.infradead.org; Thu, 28 Jan 2016 19:47:08 +0000 Received: by mail-oi0-x241.google.com with SMTP id x141so2471941oia.0 for ; Thu, 28 Jan 2016 11:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=/ON6G1CHjK9Kk0LeD7MnNa+vVJS8YXapRU2xGDy0bu0=; b=stpGsZyb98fnzvTQyLLaG30trrJy/3QF4cG9/GnFX+GkY0E5w+TGhtzf2O2OAo6X88 J1NCcDZVd/u8luKe0HWB/WtaCRYnIYjquC9UhgoLHUrk4F98ktGACUh6ygnRQZzp0nBE Ldy/mkY/neLL0+TePCrB3XBlE/P50OcXhO6gl0O307bMnIXdaDl8vYX1Y44CsUnhdY5U iO4qsXWHkMJNYxSbq9RKg9Cl5LkqImad1K8lB5hv8mx+gPlcNOe0NWvrIanojQUJN+PA Y3a1VcAC7Mm/5FtSgTozDh/Thzhp6Yq7RMdUQYUwT9dZUUxDjtHPtwFXdwijSNRLViUv Fuxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/ON6G1CHjK9Kk0LeD7MnNa+vVJS8YXapRU2xGDy0bu0=; b=nD1dzOftcuA2MumjxNuwI7PLviREQSo/MRCSHD2Vpm4vonzXJsi4i8kYMBIs7xqc+k C2J/WHgFmbDwV3Al3FrlPp1VFpve1fkcZpNxkoWLTq57ui3UHGWJk02SGtK4eMIdCMKd Ljy1B7EmVGDAfOBW+xrxoQPjSclZNcldxE5Up5FaO4LNL4Yre02pxY2MTWWLyM16+aUN vvO2IucDnsLmfJyvLfQwLaOCRT4eI7LtawprGb1jNMq/XstY2ga9rN3kkcZsz9N5UKmo 0A60sAoSv5GK30tgoMD+Y1eRNYv+QYORPfUhwHP+J9k3DH2rmIdeK+caUvsKcvOXPqvD tnzQ== X-Gm-Message-State: AG10YOSihmHOSGv1EvzlMcMEt43hQdRkZG+KYtK55k+KtnRAOxC2KocQlr5iO5k1JrhGNQ== X-Received: by 10.202.96.214 with SMTP id u205mr3562228oib.38.1454010407115; Thu, 28 Jan 2016 11:46:47 -0800 (PST) Received: from localhost.Home (97-126-249-174.slkc.qwest.net. [97.126.249.174]) by smtp.googlemail.com with ESMTPSA id e4sm6284707oic.1.2016.01.28.11.46.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 11:46:46 -0800 (PST) From: Jeffrey Merkey To: linux-kernel@vger.kernel.org Subject: [PATCH 11/31] Add debugger entry points for ARC Date: Thu, 28 Jan 2016 12:46:44 -0700 Message-Id: <1454010404-28845-1-git-send-email-jeffmerkey@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_114708_419789_C14F4A9D X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4003:c06:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jeffmerkey[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vgupta@synopsys.com, linux-snps-arc@lists.infradead.org, linux.mdb@gmail.com MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patch series adds an export which can be set by system debuggers to direct the hard lockup and soft lockup detector to trigger a breakpoint exception and enter a debugger if one is active. It is assumed that if someone sets this variable, then an breakpoint handler of some sort will be actively loaded or registered via the notify die handler chain. This addition is extremely useful for debugging hard and soft lockups real time and quickly from a console debugger. Signed-off-by: Jeffrey Merkey Acked-by: Vineet Gupta --- arch/arc/include/asm/kdebug.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arc/include/asm/kdebug.h b/arch/arc/include/asm/kdebug.h index 3fbe6c4..f476ed7 100644 --- a/arch/arc/include/asm/kdebug.h +++ b/arch/arc/include/asm/kdebug.h @@ -16,4 +16,8 @@ enum die_val { DIE_OOPS }; +static inline void arch_breakpoint(void) +{ + __asm__ __volatile__ ("trap_s 0x4\n"); +} #endif