From patchwork Thu May 5 16:34:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 67221 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp844759qge; Thu, 5 May 2016 09:36:00 -0700 (PDT) X-Received: by 10.140.19.174 with SMTP id 43mr15139051qgh.44.1462466153447; Thu, 05 May 2016 09:35:53 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id q17si6565600qki.22.2016.05.05.09.35.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 May 2016 09:35:53 -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 1ayMEh-0001s3-J4; Thu, 05 May 2016 16:34:47 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayMEf-0001lL-KD for xen-devel@lists.xen.org; Thu, 05 May 2016 16:34:45 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 7A/4B-09532-5267B275; Thu, 05 May 2016 16:34:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTVe1TDv cYNU7RoslHxezODB6HN39mymAMYo1My8pvyKBNWNv/0uWgicCFT1rLjM3ME7k62Lk4hAS2Mgo sXPpMTYI5zSjxLm9b9i7GDk52AQ0Je58/sQEYosISEtc+3yZEaSIWaCZUWL6otdsIAlhgUiJH 6eegBWxCKhKHH+7mxXE5hVwkdhx8ySYLSEgJ3Hy2GQwm1PAVWLp+ZUsILYQUM3JHZPYJjByL2 BkWMWoXpxaVJZapGukl1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kR6GEGINjBuOy v0yFGSQ4mJVHe7Ura4UJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeFeWAOUEi1LTUyvSMnOAoQaT luDgURLhXQGS5i0uSMwtzkyHSJ1iVJQS510LkhAASWSU5sG1wcL7EqOslDAvI9AhQjwFqUW5m SWo8q8YxTkYlYR5t4NM4cnMK4Gb/gpoMRPQ4vdzNUEWlyQipKQaGDdpJISc6lne2edlwrTB2H aLfax5tsXPcwFTIl2yXl3h481YbHluq42tVdZljT0JsTZxIfw3Ds6bvpjv/nKNnqJLfbWLVVW qVhdPfng4ZI9Pb8WX+hrPnQlpX1vdDbm7nKMYJ2p8ezaFfV1mug0nx/+4d0/7liQs1zUWzF9y xFKWYVVVoU+pEktxRqKhFnNRcSIABiWfmGoCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1462466084!12896895!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.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30321 invoked from network); 5 May 2016 16:34:44 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-7.tower-21.messagelabs.com with SMTP; 5 May 2016 16:34:44 -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 A671C49; Thu, 5 May 2016 09:34:48 -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 3F8AD3F252; Thu, 5 May 2016 09:34:40 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 5 May 2016 17:34:16 +0100 Message-Id: <1462466065-30212-8-git-send-email-julien.grall@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462466065-30212-1-git-send-email-julien.grall@arm.com> References: <1462466065-30212-1-git-send-email-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org, wei.chen@arm.com, steve.capper@arm.com Subject: [Xen-devel] [RFC 07/16] 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 --- 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__ */