From patchwork Mon May 23 14:17:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 68382 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp112221qge; Mon, 23 May 2016 07:19:13 -0700 (PDT) X-Received: by 10.55.27.161 with SMTP id m33mr15933697qkh.124.1464013149343; Mon, 23 May 2016 07:19:09 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x70si30098735qka.109.2016.05.23.07.19.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 07:19:09 -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 1b4qg5-0003Wd-Di; Mon, 23 May 2016 14:17:53 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4qg4-0003VR-Cn for xen-devel@lists.xen.org; Mon, 23 May 2016 14:17:52 +0000 Received: from [85.158.139.211] by server-4.bemta-5.messagelabs.com id 7B/77-17285-F0113475; Mon, 23 May 2016 14:17:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTZdf0Dn cYNEBIYslHxezODB6HN39mymAMYo1My8pvyKBNWP3xb1sBTcFKzZPesTawPiWr4uRi0NIYCOj xMY169kgnNOMEm2b5rF2MXJysAloStz5/IkJxBYRkJa49vkyI0gRs8AcRok1D/4ydzFycAgLx Emc/hQCUsMioCpxbeI5dhCbV8BFYs6662C9EgJyEiePTQabySngKrH9yzlGEFsIqKbj1k72CY zcCxgZVjFqFKcWlaUW6Rqa6iUVZaZnlOQmZuboGhqY6uWmFhcnpqfmJCYV6yXn525iBHqYAQh 2MDZs9zzEKMnBpCTKe3KHU7gQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd7N/M7hQoJFqempFWmZ OcBQg0lLcPAoifAe4gNK8xYXJOYWZ6ZDpE4xKkqJ804D6RMASWSU5sG1wcL7EqOslDAvI9AhQ jwFqUW5mSWo8q8YxTkYlYR5t4BM4cnMK4Gb/gpoMRPQ4ofSDiCLSxIRUlINjAuf/Zm8XOWmX9 aGNtaveqH6v4Lfiz2cmafL9fVVNi/jzKazrystdl6LPe+0bvVXG/7+p0l/LDdUTZeVXKhR8C0 kwLXuyw7Jo3k3X6SU/+EMaos2ayrw+bjuiNjeeVUG1373hRbM6xHmfZplu4glY3HK0RcVX99U +S/5psl/Y6HgJ0YDPedZM5VYijMSDbWYi4oTAef5jmFqAgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1464013068!37465424!3 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34335 invoked from network); 23 May 2016 14:17:51 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-3.tower-206.messagelabs.com with SMTP; 23 May 2016 14:17:51 -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 D99EB59; Mon, 23 May 2016 07:18:12 -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 97DDD3F21A; Mon, 23 May 2016 07:17:49 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 23 May 2016 15:17:23 +0100 Message-Id: <1464013052-32587-7-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464013052-32587-1-git-send-email-julien.grall@arm.com> References: <1464013052-32587-1-git-send-email-julien.grall@arm.com> Cc: sstabellini@kernel.org, wei.liu2@citrix.com, steve.capper@arm.com, andre.przywara@arm.com, Julien Grall , wei.chen@linaro.org Subject: [Xen-devel] [PATCH v2 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 1828ea1..c0325d5 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1205,7 +1205,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__ */