From patchwork Wed Jun 22 11:15:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 70632 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2492704qgy; Wed, 22 Jun 2016 04:17:51 -0700 (PDT) X-Received: by 10.233.237.129 with SMTP id c123mr36061899qkg.136.1466594264858; Wed, 22 Jun 2016 04:17:44 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r135si5627982qke.168.2016.06.22.04.17.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2016 04:17:44 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFg8I-0002Hl-CH; Wed, 22 Jun 2016 11:15:46 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFg8H-0002Fv-BI for xen-devel@lists.xen.org; Wed, 22 Jun 2016 11:15:45 +0000 Received: from [193.109.254.147] by server-14.bemta-14.messagelabs.com id 2B/F8-27600-0637A675; Wed, 22 Jun 2016 11:15:44 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRWlGSWpSXmKPExsVysyfVTTehOCv c4OUUFoslHxezODB6HN39mymAMYo1My8pvyKBNWNm70v2gpuCFfPPtjE3ML7l62Lk4hAS2MQo ca//CBOEc5pR4uLZi4xdjJwcbAKaEnc+f2ICsUUEpCWufb4MFmcWcJB48/EeC4gtLBAn0bSxE 8xmEVCVmHLgFJjNK+AiseHoAbBeCQE5iZPHJrOC2JwCrhInj04GmyMEVHP7wB7WCYzcCxgZVj GqF6cWlaUW6ZrpJRVlpmeU5CZm5ugaGpro5aYWFyemp+YkJhXrJefnbmIE+pcBCHYw/p3gfIh RkoNJSZRXXjkrXIgvKT+lMiOxOCO+qDQntfgQowwHh5IE7748oJxgUWp6akVaZg4w0GDSEhw8 SiK8P0HSvMUFibnFmekQqVOMilLivAdAEgIgiYzSPLg2WHBfYpSVEuZlBDpEiKcgtSg3swRV/ hWjOAejkjAvez7QFJ7MvBK46a+AFjMBLV7Wnw6yuCQRISXVwLhyXvPq3ewzK4taP01sV42a8o b5bFwlo80Ex+uTNrZN3ua99vvB4zyeJ7L4E85s4g+P6uf83XVCZY1uxSupmSk5Ea/6tsy7WuP e//Awo/gJ46vTeHS49qrpF63iDGBsbT3xY+OfCUfczD63npMsPC9X8lfrv22L7o3ZfFKhLbLP VBYZ2X9SWa/EUpyRaKjFXFScCADSMiUoaQIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1466594143!49256234!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45667 invoked from network); 22 Jun 2016 11:15:43 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-13.tower-27.messagelabs.com with SMTP; 22 Jun 2016 11:15:43 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1944D3B0; Wed, 22 Jun 2016 04:16:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.215.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 805463F213; Wed, 22 Jun 2016 04:15:42 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 22 Jun 2016 12:15:21 +0100 Message-Id: <1466594130-19251-7-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466594130-19251-1-git-send-email-julien.grall@arm.com> References: <1466594130-19251-1-git-send-email-julien.grall@arm.com> Cc: Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH v4 06/15] xen/arm: arm64: Move the define BRK_BUG_FRAME into a separate header X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" New immediates will be defined in the future. To keep track of the immediates allocated, gather all of them in a separate header. Also rename BRK_BUG_FRAME to BKR_BUG_FRAME_IMM. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Changes in v2: - Add Stefano's reviewed-by --- xen/arch/arm/traps.c | 2 +- xen/include/asm-arm/arm64/brk.h | 26 ++++++++++++++++++++++++++ xen/include/asm-arm/arm64/bug.h | 5 ++--- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 xen/include/asm-arm/arm64/brk.h diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 44926ca..7dd13b5 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1203,7 +1203,7 @@ static void do_trap_brk(struct cpu_user_regs *regs, const union hsr hsr) switch (hsr.brk.comment) { - case BRK_BUG_FRAME: + case BRK_BUG_FRAME_IMM: if ( do_bug_frame(regs, regs->pc) ) goto die; diff --git a/xen/include/asm-arm/arm64/brk.h b/xen/include/asm-arm/arm64/brk.h new file mode 100644 index 0000000..7867b07 --- /dev/null +++ b/xen/include/asm-arm/arm64/brk.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2016 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARM_ARM64_BRK +#define __ASM_ARM_ARM64_BRK + +/* + * #imm16 values used for BRK instruction generation + * 0x001: xen-mode BUG() and WARN() traps + */ +#define BRK_BUG_FRAME_IMM 1 + +#endif /* !__ASM_ARM_ARM64_BRK */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/include/asm-arm/arm64/bug.h b/xen/include/asm-arm/arm64/bug.h index 42b0e4f..59f664d 100644 --- a/xen/include/asm-arm/arm64/bug.h +++ b/xen/include/asm-arm/arm64/bug.h @@ -2,9 +2,8 @@ #define __ARM_ARM64_BUG_H__ #include +#include -#define BRK_BUG_FRAME 1 - -#define BUG_INSTR "brk " __stringify(BRK_BUG_FRAME) +#define BUG_INSTR "brk " __stringify(BRK_BUG_FRAME_IMM) #endif /* __ARM_ARM64_BUG_H__ */