From patchwork Thu Jan 28 19:47: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: 574872 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 01B8F14032F for ; Fri, 29 Jan 2016 07:31:28 +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=caxpi/08; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id C6FC41A1A7E for ; Fri, 29 Jan 2016 07:31:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=caxpi/08; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-oi0-x242.google.com (mail-oi0-x242.google.com [IPv6:2607:f8b0:4003:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 5188B1A0201 for ; Fri, 29 Jan 2016 06:47:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=caxpi/08; dkim-atps=neutral Received: by mail-oi0-x242.google.com with SMTP id x141so2473327oia.0 for ; Thu, 28 Jan 2016 11:47:50 -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=u4FwRYl3ujs5pC92QilhrlKrjtsWf6ePmBeCF1rWgI8=; b=caxpi/08mXlyQ++8cIwVYkwKuM/QomvzYKIEHJrcbvSUbm5HE8K6dRaybRfRpWCq0K ayFoAlt3esaKLaviht73/0sb6GFTJk/KUUseeKQpboyVwjWxf/4nSRoXXV3h8i6NkSCQ GXJ6kLiH6209I3RNBGeonB5lPLvErKcJHWjSxHHJtbzViJDJPdbRTNCm/RBPm9bn0xBY YPMxKcEYyaCfyuUJeo7PDrlZOf/CHqCBQ4gG//2NmxX4j4FF21fqiUtCTDQ6MbDBQqYF 7bAOEQGKKXnWPTrX59fGb6VzjR9c+klZaDTZJ06Y4mmDsTa7W5CWTJxswPkBPcKCtnnw 03PQ== 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=u4FwRYl3ujs5pC92QilhrlKrjtsWf6ePmBeCF1rWgI8=; b=VVXQmAZvOjwtg8DxsKjI+9GbiVINN9t3o7V7I7Zhsjf6Iwj9i9nIYZ7N8yFzfZbbG0 lgUq6Ful6zliF3aBlpJWb93XijeZSz6N3d3s8exNQlYnNg8BlNv8IoZLh0x5zusIuSZf DBP/KRnnC7houHMsAYSdjDPUhY5tsH1uXu7nxlPhcNe4GJh8LvFDaA+vOp92kTL89oXh HLrLZ2hKZi1TVMELRjWBMaPm1tLFir4Yu8u6lCqah8kfZMzplkHQe/OwPCLTShBBz2/P gNsLxKna9tr8x31ttzjIVz2bDEsfGntHef8Y+jEiPfMilQr5vulg/DrQZ7wHvbiCIKLN X3fA== X-Gm-Message-State: AG10YOTcdC4abu3uMReRJT5DQFCblcf/IvF4y/OoHUyqQshU2hqXwakdcwYpIzcvEMgFbg== X-Received: by 10.202.180.66 with SMTP id d63mr3522835oif.137.1454010468089; Thu, 28 Jan 2016 11:47:48 -0800 (PST) Received: from localhost.Home (97-126-249-174.slkc.qwest.net. [97.126.249.174]) by smtp.googlemail.com with ESMTPSA id j201sm6207809oih.19.2016.01.28.11.47.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 11:47:47 -0800 (PST) From: Jeffrey Merkey To: linux-kernel@vger.kernel.org Subject: [PATCH 29/31] Add debugger entry points for POWERPC Date: Thu, 28 Jan 2016 12:47:44 -0700 Message-Id: <1454010464-29609-1-git-send-email-jeffmerkey@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Mailman-Approved-At: Fri, 29 Jan 2016 07:30:11 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux.mdb@gmail.com, paulus@samba.org, linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- arch/powerpc/include/asm/kdebug.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/kdebug.h b/arch/powerpc/include/asm/kdebug.h index ae6d206..54f5ca8 100644 --- a/arch/powerpc/include/asm/kdebug.h +++ b/arch/powerpc/include/asm/kdebug.h @@ -11,5 +11,10 @@ enum die_val { DIE_SSTEP, }; +static inline void arch_breakpoint(void) +{ + asm(".long 0x7d821008"); /* twge r2, r2 */ +} + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_KDEBUG_H */