From patchwork Thu Jun 11 15:29:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 6589291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E501E9F2F4 for ; Thu, 11 Jun 2015 15:33:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D515202E9 for ; Thu, 11 Jun 2015 15:33:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4BB7220272 for ; Thu, 11 Jun 2015 15:33:34 +0000 (UTC) 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 1Z34Re-0005dj-1Y; Thu, 11 Jun 2015 15:31:06 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z34Qb-00045G-Im for linux-arm-kernel@lists.infradead.org; Thu, 11 Jun 2015 15:30:02 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-28.uk.mimecast.lan; Thu, 11 Jun 2015 16:29:38 +0100 Received: from e103592.cambridge.arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Jun 2015 16:29:38 +0100 From: Dave Martin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/10] arm64/debug: Eliminate magic number from ESR template definition Date: Thu, 11 Jun 2015 16:29:18 +0100 Message-Id: <1434036566-9848-5-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434036566-9848-1-git-send-email-Dave.Martin@arm.com> References: <1434036566-9848-1-git-send-email-Dave.Martin@arm.com> X-OriginalArrivalTime: 11 Jun 2015 15:29:38.0475 (UTC) FILETIME=[6DCB17B0:01D0A45B] X-MC-Unique: rPLJ09JDQhOlWHiV0Ry0NQ-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150611_083002_020123_F5736C1F X-CRM114-Status: UNSURE ( 6.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: Mark Rutland , Catalin Marinas , Lorenzo Pieralisi , Will Deacon X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP has perfectly good constants for defining ESR values already. Let's use them. Signed-off-by: Dave Martin --- arch/arm64/include/asm/debug-monitors.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h index ab7d5a8..ff09058 100644 --- a/arch/arm64/include/asm/debug-monitors.h +++ b/arch/arm64/include/asm/debug-monitors.h @@ -18,6 +18,7 @@ #ifdef __KERNEL__ +#include #include /* Low-level stepping controls. */ @@ -45,7 +46,8 @@ /* * ESR values expected for dynamic and compile time BRK instruction */ -#define DBG_ESR_VAL_BRK(x) (0xf2000000 | ((x) & 0xffff)) +#define DBG_ESR_VAL_BRK(x) \ + ((ESR_ELx_EC_BRK64 << ESR_ELx_EC_SHIFT) | ESR_ELx_IL | ((x) & 0xffff)) /* * #imm16 values used for BRK instruction generation