From patchwork Wed Oct 31 18:12:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149865 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7128280ljp; Wed, 31 Oct 2018 11:17:07 -0700 (PDT) X-Google-Smtp-Source: AJdET5eyDZvvK/sO8wY+FQMhtdJOfsK9qXfAoR1QOI+RVvv91jca4CKODdZXuPY2ohqiquA9B5yg X-Received: by 2002:a25:cfcc:: with SMTP id f195-v6mr4371461ybg.20.1541009827264; Wed, 31 Oct 2018 11:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009827; cv=none; d=google.com; s=arc-20160816; b=Q2StiSPPQqmqFl+PpxCjKFUU+8fmslOnz5RihKHHfpb4U4EBp3K3Y4Z6M/z9mK4bDg UWNUBki7dmy8A+IhRHJEn+LF7bH5k/9XyvSHr6/NEk7dhvhGmnKn27/9grpZpKcdxoPP hH15Wu9Y+4IaVDW5HS/0Tgp+aFcXK6e6OVCkOA47gZqUG9D0aQYej8WcTT1TUp7/QADV VilxGLuXN1AL48isbvDYpJOxTKcv2eMyJ2zaMpOaiO9Ho7SbN8H7vfpbwLUxwD4yEeKI Ia7TuU76khQpFO6aWQBcYequX+TjZ93Q3ChPtd6x6z0HNmbROyctMQ7JxD7dN+RcwEA7 7JCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=SJcumdK+MJPHUxUn+NawH8CTPaHFqCcp8rBSB5S7Y3U=; b=ESkLLpxX0zRhkD/vuHzbGnEypMQ7pa43jnE5cIiBTAiU5YT9r9s4ncqiRfrCywdzqp PMl/jlZqGa2obCYH+vwZre0YFXlzpdqjpfHm30tz0MLdMw1aAIPRLMD1SpCzu8GFgzWg taB922CQApVuNWi5GKAj6e+xLgI/CZBIWxZw0vXwomw07zApNgbKxUDB1GwFE+cjPQ2A YZ0KzDtilH9VxwRZYaDnBp/2s6NPS24EtPLcxHy7GPrTxYq20VukBD5QYnv/M4Gf3yGa w24OI28YdQzsFsH5slILMDJVNKHAq/ZIR7MrV/q9gui0w/gZ7ONH4wmggJJYQ9XNx58G CwBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id b8-v6si11880154ybj.220.2018.10.31.11.17.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:17:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzd-0004N3-19; Wed, 31 Oct 2018 18:13:25 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzb-0004Mk-GR for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:23 +0000 X-Inumbo-ID: a650aeaa-dd38-11e8-b27b-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id a650aeaa-dd38-11e8-b27b-12d6303a7972; Wed, 31 Oct 2018 18:13:21 +0000 (UTC) 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 099771596; Wed, 31 Oct 2018 11:13:21 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E3F53F6A8; Wed, 31 Oct 2018 11:13:19 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:53 +0000 Message-Id: <20181031181313.8028-2-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 01/21] xen/arm: traps: Constify show_*, do_unexpected_trap and do_bug_frame parameters X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Those helpers are not meant to modify most of the parameters. So constify them. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Constify more parameters. --- xen/arch/arm/traps.c | 26 +++++++++++++------------- xen/include/asm-arm/bug.h | 2 +- xen/include/asm-arm/processor.h | 7 ++++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 51d2e42c77..e8fa760607 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -787,8 +787,8 @@ static const char *mode_string(uint32_t cpsr) return mode_strings[mode] ? : "Unknown"; } -static void show_registers_32(struct cpu_user_regs *regs, - struct reg_ctxt *ctxt, +static void show_registers_32(const struct cpu_user_regs *regs, + const struct reg_ctxt *ctxt, int guest_mode, const struct vcpu *v) { @@ -864,8 +864,8 @@ static void show_registers_32(struct cpu_user_regs *regs, } #ifdef CONFIG_ARM_64 -static void show_registers_64(struct cpu_user_regs *regs, - struct reg_ctxt *ctxt, +static void show_registers_64(const struct cpu_user_regs *regs, + const struct reg_ctxt *ctxt, int guest_mode, const struct vcpu *v) { @@ -925,8 +925,8 @@ static void show_registers_64(struct cpu_user_regs *regs, } #endif -static void _show_registers(struct cpu_user_regs *regs, - struct reg_ctxt *ctxt, +static void _show_registers(const struct cpu_user_regs *regs, + const struct reg_ctxt *ctxt, int guest_mode, const struct vcpu *v) { @@ -981,7 +981,7 @@ static void _show_registers(struct cpu_user_regs *regs, printk("\n"); } -void show_registers(struct cpu_user_regs *regs) +void show_registers(const struct cpu_user_regs *regs) { struct reg_ctxt ctxt; ctxt.sctlr_el1 = READ_SYSREG(SCTLR_EL1); @@ -1027,7 +1027,7 @@ void vcpu_show_registers(const struct vcpu *v) _show_registers(&v->arch.cpu_info->guest_cpu_user_regs, &ctxt, 1, v); } -static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs) +static void show_guest_stack(struct vcpu *v, const struct cpu_user_regs *regs) { int i; vaddr_t sp; @@ -1161,7 +1161,7 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs) */ #define STACK_FRAME_BASE(fp) ((register_t*)(fp)) #endif -static void show_trace(struct cpu_user_regs *regs) +static void show_trace(const struct cpu_user_regs *regs) { register_t *frame, next, addr, low, high; @@ -1196,7 +1196,7 @@ static void show_trace(struct cpu_user_regs *regs) printk("\n"); } -void show_stack(struct cpu_user_regs *regs) +void show_stack(const struct cpu_user_regs *regs) { register_t *stack = STACK_BEFORE_EXCEPTION(regs), addr; int i; @@ -1223,7 +1223,7 @@ void show_stack(struct cpu_user_regs *regs) show_trace(regs); } -void show_execution_state(struct cpu_user_regs *regs) +void show_execution_state(const struct cpu_user_regs *regs) { show_registers(regs); show_stack(regs); @@ -1249,14 +1249,14 @@ void vcpu_show_execution_state(struct vcpu *v) vcpu_unpause(v); } -void do_unexpected_trap(const char *msg, struct cpu_user_regs *regs) +void do_unexpected_trap(const char *msg, const struct cpu_user_regs *regs) { printk("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); show_execution_state(regs); panic("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); } -int do_bug_frame(struct cpu_user_regs *regs, vaddr_t pc) +int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc) { const struct bug_frame *bug = NULL; const char *prefix = "", *filename, *predicate; diff --git a/xen/include/asm-arm/bug.h b/xen/include/asm-arm/bug.h index 4704e2d858..90a59c972b 100644 --- a/xen/include/asm-arm/bug.h +++ b/xen/include/asm-arm/bug.h @@ -77,7 +77,7 @@ extern const struct bug_frame __start_bug_frames[], __stop_bug_frames_1[], __stop_bug_frames_2[]; -int do_bug_frame(struct cpu_user_regs *regs, vaddr_t pc); +int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); #endif /* __ARM_BUG_H__ */ /* diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 8016cf306f..fcdc0f6375 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -793,8 +793,8 @@ void init_traps(void); void panic_PAR(uint64_t par); -void show_execution_state(struct cpu_user_regs *regs); -void show_registers(struct cpu_user_regs *regs); +void show_execution_state(const struct cpu_user_regs *regs); +void show_registers(const struct cpu_user_regs *regs); //#define dump_execution_state() run_in_exception_handler(show_execution_state) #define dump_execution_state() WARN() @@ -804,7 +804,8 @@ void show_registers(struct cpu_user_regs *regs); #define cpu_to_core(_cpu) (0) #define cpu_to_socket(_cpu) (0) -void noreturn do_unexpected_trap(const char *msg, struct cpu_user_regs *regs); +void noreturn do_unexpected_trap(const char *msg, + const struct cpu_user_regs *regs); struct vcpu; void vcpu_regs_hyp_to_user(const struct vcpu *vcpu, From patchwork Wed Oct 31 18:12:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149863 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7128009ljp; Wed, 31 Oct 2018 11:16:54 -0700 (PDT) X-Google-Smtp-Source: AJdET5dqWCL68c0TNrN18sXePxERHjVbtxVEK3JCG02NNj5WTEsfuqjRsBHBR7IOASJn7b2oAkgL X-Received: by 2002:a25:aea5:: with SMTP id b37-v6mr4192930ybj.302.1541009814858; Wed, 31 Oct 2018 11:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009814; cv=none; d=google.com; s=arc-20160816; b=skcUBaNIkHtc8ioljO8k9nM1ksnx6sQz+BRIjGB38r4LduiUVRK1QZ9RV/ZirgkMwx JzbyHLz4qrh4UlhaPTwAo97avq5VyfsUQiTEakqCm9o5SdnaZ4orJqogFRCKSBm79iYY lg5s90N+94QvVMYDS6vllZvoqGTBDkj/Yp+dsKR8b58dlw+UCNCG11kxsV/+2blatj7A 28ToMW+ViIIwhIG5/pwEVWc79Tahm+yLGafvSzn77TZmPsgLWnOOWSs53nHMJInB8xVe wFWPvm1PJNgdupmm26fHP6b5q4zUSAjXcQySYUKdzcRpmHpKFUMK3HdCjNse6U0LRS2Q eZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=wkyyfD7/LhEEjcS3oz6vJ2lqAZqI1awc/mbLQwCz/ew=; b=x3A0k/Uo7CzRZq3m1wRDkAUlEpZ1GTWB07sGglBXezPWZF46n3Ub9pYNRuuDij5fzT RsqIFfhO/p4GNLZjYNBWkFpINbaxg4cjoTxGZMXvy9/76lLGJeJBrgF5YqERu0qLqeAv mJjTwt9ePPn+/Oa1k/c2GK8+Tx0UqidBiUwKQJlfYTIdduOULDSwiS6GhEgDeDj19p8p j7QQ7xMMDHkIvHmo2ZHUYbgCFyyBVUhxhehm9h5lXBR48GJMDGS5dX9wNTN2zLSYDFF7 OP1L+3hAxf2Hn14Pj5yPk6V9TyIzEAjbmFjYKp4n0vAkiQoB2s5tq8Zblldv0saJSqGv YWVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id q125-v6si6463845ywq.248.2018.10.31.11.16.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzc-0004Mx-MH; Wed, 31 Oct 2018 18:13:24 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzb-0004Mi-G0 for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:23 +0000 X-Inumbo-ID: a707c1e4-dd38-11e8-8aed-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id a707c1e4-dd38-11e8-8aed-12d6303a7972; Wed, 31 Oct 2018 18:13:22 +0000 (UTC) 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 31F5A80D; Wed, 31 Oct 2018 11:13:22 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 46AAD3F6A8; Wed, 31 Oct 2018 11:13:21 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:54 +0000 Message-Id: <20181031181313.8028-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 02/21] xen/arm: regs: Convert guest_mode to a static inline helper X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the same time, switch the parameter guest_mode from int to bool Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add andrii's reviewed-by --- xen/arch/arm/traps.c | 6 +++--- xen/include/asm-arm/regs.h | 22 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index e8fa760607..b9323672fc 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -789,7 +789,7 @@ static const char *mode_string(uint32_t cpsr) static void show_registers_32(const struct cpu_user_regs *regs, const struct reg_ctxt *ctxt, - int guest_mode, + bool guest_mode, const struct vcpu *v) { @@ -866,7 +866,7 @@ static void show_registers_32(const struct cpu_user_regs *regs, #ifdef CONFIG_ARM_64 static void show_registers_64(const struct cpu_user_regs *regs, const struct reg_ctxt *ctxt, - int guest_mode, + bool guest_mode, const struct vcpu *v) { @@ -927,7 +927,7 @@ static void show_registers_64(const struct cpu_user_regs *regs, static void _show_registers(const struct cpu_user_regs *regs, const struct reg_ctxt *ctxt, - int guest_mode, + bool guest_mode, const struct vcpu *v) { print_xen_info(); diff --git a/xen/include/asm-arm/regs.h b/xen/include/asm-arm/regs.h index 2440edb29a..ddc6eba9ce 100644 --- a/xen/include/asm-arm/regs.h +++ b/xen/include/asm-arm/regs.h @@ -5,8 +5,10 @@ #ifndef __ASSEMBLY__ +#include #include #include +#include #include #define psr_mode(psr,m) (((psr) & PSR_MODE_MASK) == m) @@ -37,16 +39,16 @@ (psr_mode((r)->cpsr,PSR_MODE_EL0t) || usr_mode(r)) #endif -#define guest_mode(r) \ -({ \ - unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); \ - /* Frame pointer must point into current CPU stack. */ \ - ASSERT(diff < STACK_SIZE); \ - /* If not a guest frame, it must be a hypervisor frame. */ \ - ASSERT((diff == 0) || hyp_mode(r)); \ - /* Return TRUE if it's a guest frame. */ \ - (diff == 0); \ -}) +static inline bool guest_mode(const struct cpu_user_regs *r) +{ + unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); + /* Frame pointer must point into current CPU stack. */ + ASSERT(diff < STACK_SIZE); + /* If not a guest frame, it must be a hypervisor frame. */ + ASSERT((diff == 0) || hyp_mode(r)); + /* Return TRUE if it's a guest frame. */ + return (diff == 0); +} #define return_reg(v) ((v)->arch.cpu_info->guest_cpu_user_regs.r0) From patchwork Wed Oct 31 18:12:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149859 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127106ljp; Wed, 31 Oct 2018 11:16:04 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+Fyx3CJyFMfcO+BlMuEtVe3j2I4lS6fdZlwo+yR8PvMon7AZUa41MtaAFCQcWpljB1zDe X-Received: by 2002:a81:430e:: with SMTP id q14-v6mr4260443ywa.227.1541009764824; Wed, 31 Oct 2018 11:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009764; cv=none; d=google.com; s=arc-20160816; b=cVeXiOvkCJySEouKbVEeKp4L81BwpnYPGrlbX8sq1NsfnVxWdIvnjPjYuB+aWDL7ih H3mPHiQ1d5JRo1Ch2NblOoDghCatownLX5ycCIwgSbku1ONz5/WIIaEzVoglVD241ESy 2DR9uX7iNUQql4hoMnBwCJ7eqWTG8zWRWqP4N1vKBG6J5nwskwSxGaJkygPGMZxEmQjj G5AaA+jdyhuD6oyCtPz+gcYEY5ZZ/R5S72MVev9jUYz6B5VXyF4q924Mh7xi5DLFxpqM e8MFJ8/3QSQaJbZYIFz7d2owBuBUSV4XSxAqy/adA4hgcPnESuqxHlt6POOe61aQ8215 6taA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=s99kAo6YX9LsFHB7wATX4iEsL+qjqc33KkaraOWPsjY=; b=kQObFJov32zT4veGqqe1NHPe9/vwSIf6mYz51ytXzUSPFic9eXGQw/FjAObm96f/kw SpUHeay8bndBIhsYFiW9c+NkuDyjIsj8R4BVLQ48wCkLg0JP9MwyWv1mxl9KJojpjXD5 Zo1H0Nr+omR7EXFOnUbQM1Bxe02hvUyYyI51rRJU3Q+yqQwlNvhDLZoswFm85ftq4aFQ GvoGVv3xTEIOV53ZxBmzS5HxPMLhGvufrBBBP2PCtGpa5izS7tHYiVclOpEG2LXEGQZL EJK1dUZmgXO8a0+cTdBLvOBQWqm2WK1U4r6SdiCvfAwrIF/uW1gDbgIJn/eYGUOsfOBO q3bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g198-v6si7488230yba.382.2018.10.31.11.16.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuze-0004NY-I2; Wed, 31 Oct 2018 18:13:26 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzd-0004N7-85 for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:25 +0000 X-Inumbo-ID: a7c78288-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id a7c78288-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:23 +0000 (UTC) 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 7D3C31596; Wed, 31 Oct 2018 11:13:23 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6EFE33F73F; Wed, 31 Oct 2018 11:13:22 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:55 +0000 Message-Id: <20181031181313.8028-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 03/21] xen/arm: Remove __init from prototype X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" In Xen, it is common to add __init to the declaration and not the prototype. Remove the few __init on some prototypes which allows to avoid the inclusion of init.h in headers. With these changes, init.h is now required to be included on some c files. Also, add __init where it was missing in declaration. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Remove __init in asm-arm/iommu.h prototypes --- xen/arch/arm/acpi/lib.c | 1 + xen/arch/arm/bootfdt.c | 2 +- xen/arch/arm/cpuerrata.c | 1 + xen/arch/arm/device.c | 1 + xen/arch/arm/psci.c | 1 + xen/include/asm-arm/acpi.h | 7 +++---- xen/include/asm-arm/alternative.h | 3 +-- xen/include/asm-arm/device.h | 10 ++++------ xen/include/asm-arm/iommu.h | 4 ++-- xen/include/asm-arm/platform.h | 7 +++---- xen/include/asm-arm/setup.h | 6 +++--- xen/include/xen/device_tree.h | 5 ++--- 12 files changed, 23 insertions(+), 25 deletions(-) diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c index ada5298a38..4fc6e17322 100644 --- a/xen/arch/arm/acpi/lib.c +++ b/xen/arch/arm/acpi/lib.c @@ -22,6 +22,7 @@ */ #include +#include #include char *__acpi_map_table(paddr_t phys, unsigned long size) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 8eba42c7b9..44af11c0fd 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -349,7 +349,7 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t paddr) return fdt_totalsize(fdt); } -const char *boot_fdt_cmdline(const void *fdt) +const __init char *boot_fdt_cmdline(const void *fdt) { int node; const struct fdt_property *prop; diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 97a118293b..adf88e7bdc 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index a0072c1563..70cd6c1a19 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -19,6 +19,7 @@ #include #include +#include #include extern const struct device_desc _sdevice[], _edevice[]; diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index a93121f43b..d23cb8e76e 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h index c183b6bb6e..feec4fb0ac 100644 --- a/xen/include/asm-arm/acpi.h +++ b/xen/include/asm-arm/acpi.h @@ -23,7 +23,6 @@ #ifndef _ASM_ARM_ACPI_H #define _ASM_ARM_ACPI_H -#include #include #include @@ -43,9 +42,9 @@ typedef enum { TBL_MMAX, } EFI_MEM_RES; -bool __init acpi_psci_present(void); -bool __init acpi_psci_hvc_present(void); -void __init acpi_smp_init_cpus(void); +bool acpi_psci_present(void); +bool acpi_psci_hvc_present(void); +void acpi_smp_init_cpus(void); /* * This function returns the offset of a given ACPI/EFI table in the allocated diff --git a/xen/include/asm-arm/alternative.h b/xen/include/asm-arm/alternative.h index 9b4b02811b..dedb6dd001 100644 --- a/xen/include/asm-arm/alternative.h +++ b/xen/include/asm-arm/alternative.h @@ -7,7 +7,6 @@ #ifndef __ASSEMBLY__ -#include #include #include @@ -28,7 +27,7 @@ typedef void (*alternative_cb_t)(const struct alt_instr *alt, const uint32_t *origptr, uint32_t *updptr, int nr_inst); -void __init apply_alternatives_all(void); +void apply_alternatives_all(void); int apply_alternatives(const struct alt_instr *start, const struct alt_instr *end); #define ALTINSTR_ENTRY(feature, cb) \ diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index 6734ae8efd..63a0f3631d 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_DEVICE_H #define __ASM_ARM_DEVICE_H -#include - enum device_type { DEV_DT, @@ -68,8 +66,8 @@ struct acpi_device_desc { * * Return 0 on success. */ -int __init acpi_device_init(enum device_class class, - const void *data, int class_type); +int acpi_device_init(enum device_class class, + const void *data, int class_type); /** * device_init - Initialize a device @@ -79,8 +77,8 @@ int __init acpi_device_init(enum device_class class, * * Return 0 on success. */ -int __init device_init(struct dt_device_node *dev, enum device_class class, - const void *data); +int device_init(struct dt_device_node *dev, enum device_class class, + const void *data); /** * device_get_type - Get the type of the device diff --git a/xen/include/asm-arm/iommu.h b/xen/include/asm-arm/iommu.h index f6df32f860..90cd011d35 100644 --- a/xen/include/asm-arm/iommu.h +++ b/xen/include/asm-arm/iommu.h @@ -24,9 +24,9 @@ struct arch_iommu #define iommu_use_hap_pt(d) (has_iommu_pt(d)) const struct iommu_ops *iommu_get_ops(void); -void __init iommu_set_ops(const struct iommu_ops *ops); +void iommu_set_ops(const struct iommu_ops *ops); -int __init iommu_hardware_setup(void); +int iommu_hardware_setup(void); #endif /* __ARCH_ARM_IOMMU_H__ */ diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h index 2591d7bb03..bf9258156c 100644 --- a/xen/include/asm-arm/platform.h +++ b/xen/include/asm-arm/platform.h @@ -1,7 +1,6 @@ #ifndef __ASM_ARM_PLATFORM_H #define __ASM_ARM_PLATFORM_H -#include #include #include #include @@ -46,9 +45,9 @@ struct platform_desc { */ #define PLATFORM_QUIRK_GIC_64K_STRIDE (1 << 0) -void __init platform_init(void); -int __init platform_init_time(void); -int __init platform_specific_mapping(struct domain *d); +void platform_init(void); +int platform_init_time(void); +int platform_specific_mapping(struct domain *d); #ifdef CONFIG_ARM_32 int platform_smp_init(void); int platform_cpu_up(int cpu); diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h index 0cc3330807..5f41ba0cba 100644 --- a/xen/include/asm-arm/setup.h +++ b/xen/include/asm-arm/setup.h @@ -74,14 +74,14 @@ void discard_initial_modules(void); void dt_unreserved_regions(paddr_t s, paddr_t e, void (*cb)(paddr_t, paddr_t), int first); -size_t __init boot_fdt_info(const void *fdt, paddr_t paddr); -const char __init *boot_fdt_cmdline(const void *fdt); +size_t boot_fdt_info(const void *fdt, paddr_t paddr); +const char *boot_fdt_cmdline(const void *fdt); struct bootmodule *add_boot_module(bootmodule_kind kind, paddr_t start, paddr_t size, const char *cmdline); struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); -const char * __init boot_module_kind_as_string(bootmodule_kind kind); +const char *boot_module_kind_as_string(bootmodule_kind kind); #endif /* diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 91fa0b6f61..7408a6c48c 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -169,7 +168,7 @@ int device_tree_for_each_node(const void *fdt, * Create a hierarchical device tree for the host DTB to be able * to retrieve parents. */ -void __init dt_unflatten_host_device_tree(void); +void dt_unflatten_host_device_tree(void); /** * IRQ translation callback @@ -204,7 +203,7 @@ extern const struct dt_device_node *dt_interrupt_controller; * * If found, return the interrupt controller device node. */ -struct dt_device_node * __init +struct dt_device_node * dt_find_interrupt_controller(const struct dt_device_match *matches); #define dt_prop_cmp(s1, s2) strcmp((s1), (s2)) From patchwork Wed Oct 31 18:12:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149861 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127280ljp; Wed, 31 Oct 2018 11:16:15 -0700 (PDT) X-Google-Smtp-Source: AJdET5dhw4H76DP40dkuviUSWf1GvaY+3vs+ot1DtQLfJJWSNhLKVHy6qBaYjHSpFOfFCbqysLhr X-Received: by 2002:a81:32d3:: with SMTP id y202-v6mr4199343ywy.55.1541009775199; Wed, 31 Oct 2018 11:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009775; cv=none; d=google.com; s=arc-20160816; b=OW+1GXCZtCmzgTWZeAGRzIgGvs4JIot0ALCyZhQZ2ttGA40SnkL9FP6drP+CpG9Sm/ knMYvjJT+cHw9LsX8jMkd4BFFo6VY9a1rlaa8Kyy/ehwBG9cS8Bh3wqvko2nGeDQ3W2O 3NUE0wTJkIcQfevYWIBhJDLsetOswlHh+pKFvo4Za1eUQmPzqbSYs//DU3BYstdhC2Xk 4W45nMYiVQfTF1EaJGwjkbls7Z/D4yn/jPYAiPZILdYLaBpw0JthxM9u97cLa16lT3Yt lPO8FUw0RCynbeGHonqB1mEK13QjGz7P8+TWTFX+bB4rALo+D2CMrXsGcGQin4EeYe0c jdfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=Mb1LpLKhCKPpfEkySOTXVBBPMJXTlWVlhLPvTWo+5UE=; b=bxwIlb7CuaweJ5ADam58+sLIj6w5A+jfhCIVyoMBCD0w95zNXr61vJU3dEoEqFwIbp JU94Ctz/y7LzjXbqXWXd/nHoaREV03Vmhtb2sIKzeScPBZzwkmmv3z5HgpfGosrtuqLT H6bN9tBzVQqITSNEFbvMyCG073t8/tn0003WOiToU4tmgw9Ng8v/nqnX1DO3g7jbqy32 2B51qi5t53VzJ2CMEcHNMecvZu2H3zW+CaPqk7sPxnjKHi3S6BEunT7dZUWrOmoTQRxw 4ovUzhQnY9XrTnJvB1/K8LP5e3c4Dj6ybKn0OVoTcj0HtthKapjZigu4PMwoei9pozFQ JY9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id s5-v6si16976166ywe.116.2018.10.31.11.16.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuze-0004Nf-So; Wed, 31 Oct 2018 18:13:26 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzd-0004NO-NN for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:25 +0000 X-Inumbo-ID: a88fb602-dd38-11e8-adaf-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id a88fb602-dd38-11e8-adaf-12d6303a7972; Wed, 31 Oct 2018 18:13:25 +0000 (UTC) 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 A5CAC80D; Wed, 31 Oct 2018 11:13:24 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA7683F6A8; Wed, 31 Oct 2018 11:13:23 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:56 +0000 Message-Id: <20181031181313.8028-5-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 04/21] xen/arm: bugs: Move do_bug_frame to traps.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" do_bug_frame is only necessary when trapping. This allows to remove processor.h include. However, time.h was missing an include resulting to compilation error if processor.h is removed from bug.h. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Rebase - Add Andrii's reviewed-by --- xen/arch/arm/arm32/traps.c | 1 + xen/include/asm-arm/bug.h | 4 ---- xen/include/asm-arm/time.h | 2 ++ xen/include/asm-arm/traps.h | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c index 4f27543dec..76f714a168 100644 --- a/xen/arch/arm/arm32/traps.c +++ b/xen/arch/arm/arm32/traps.c @@ -22,6 +22,7 @@ #include #include +#include void do_trap_reset(struct cpu_user_regs *regs) { diff --git a/xen/include/asm-arm/bug.h b/xen/include/asm-arm/bug.h index 90a59c972b..36c803357c 100644 --- a/xen/include/asm-arm/bug.h +++ b/xen/include/asm-arm/bug.h @@ -1,8 +1,6 @@ #ifndef __ARM_BUG_H__ #define __ARM_BUG_H__ -#include - #if defined(CONFIG_ARM_32) # include #elif defined(CONFIG_ARM_64) @@ -77,8 +75,6 @@ extern const struct bug_frame __start_bug_frames[], __stop_bug_frames_1[], __stop_bug_frames_2[]; -int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); - #endif /* __ARM_BUG_H__ */ /* * Local variables: diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h index 19a4515e72..ea88e76304 100644 --- a/xen/include/asm-arm/time.h +++ b/xen/include/asm-arm/time.h @@ -1,6 +1,8 @@ #ifndef __ARM_TIME_H__ #define __ARM_TIME_H__ +#include + #define DT_MATCH_TIMER \ DT_MATCH_COMPATIBLE("arm,armv7-timer"), \ DT_MATCH_COMPATIBLE("arm,armv8-timer") diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h index 70b52d1d16..d30ee1e01e 100644 --- a/xen/include/asm-arm/traps.h +++ b/xen/include/asm-arm/traps.h @@ -43,6 +43,8 @@ void do_cp(struct cpu_user_regs *regs, const union hsr hsr); void do_trap_smc(struct cpu_user_regs *regs, const union hsr hsr); void do_trap_hvc_smccc(struct cpu_user_regs *regs); +int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); + #endif /* __ASM_ARM_TRAPS__ */ /* * Local variables: From patchwork Wed Oct 31 18:12:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149866 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7128462ljp; Wed, 31 Oct 2018 11:17:16 -0700 (PDT) X-Google-Smtp-Source: AJdET5cDYnDcmzSlms/H5R/lnnKyQeotbvsLtyLr3jiAKBLDuRB6OP263JjVFz1Ifspxl919zVxa X-Received: by 2002:a0d:ce42:: with SMTP id q63-v6mr4186551ywd.369.1541009836660; Wed, 31 Oct 2018 11:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009836; cv=none; d=google.com; s=arc-20160816; b=xVD7KjyRA7/yoBApRDACEMb1AWN/juctZd5voZi6xTmryDcf4S5jpZxE436TYi8w8s Box1sLgkfP2HLnEN2ge9USMfBmsenfoUZE5GbS5Z0deOKvbSD6gR5V4QuUtY67Rm7P23 IPc10muR7W9mMag1sBt7CGbGOEnWokvm7Fk1hXmB5pwnAIAytyFLT55SFlj6b7iP8R0v qZY0+zlfk0olaktCqKg0elK9ljYLA2/nxn5V6Og1idwPxvZ3NyfVByhRKViWJUeccke9 BuUjs9RW8w4l2wxVE/APmdiZRslXPQH6cPdpGY+S1hcrUAEcLyYbMYHOdlu6CqhjrIDX EchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=apc32KwqbL/MeQnBUDUUyqLAflyY0HQpK1wp6z6vQvs=; b=ru24+LS6Dnefw8XGOzlybLdEarVzVg7ySERsQ3QN39Ms3FTKEPcFHBLMvwCqbZRVGL OdyxVX4Ums+8SrqbjVkR/gHRLl/6Nz50Jban+oHzEHVaumsje9wUlHDvknHRdXThqtqV BvKc747IopJ2+MzZpZLCWSrzT2X0fe+MkHva2wxc50GywDqVDGWqjverjeaFgjzLJnnv 9If25pHTbW+yoIoIjLDoRmeaCWilT9PbgI7hVaLaW/0tnJrIwZKf5ZrntGPCt3MWwoNM DcRxtQ95sopY9m5sZ37F/9mpCMxsRtAPSldvo2caOVsDlYYvcPyWlp3gVF/7+G/0joz7 985g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g12-v6si13082352ybf.292.2018.10.31.11.17.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:17:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzh-0004OO-7e; Wed, 31 Oct 2018 18:13:29 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzf-0004Nq-NM for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:27 +0000 X-Inumbo-ID: a95a28de-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id a95a28de-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:26 +0000 (UTC) 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 F18201596; Wed, 31 Oct 2018 11:13:25 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E30583F6A8; Wed, 31 Oct 2018 11:13:24 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:57 +0000 Message-Id: <20181031181313.8028-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 05/21] xen/arm: Consolidate CPU identification in cpufeature.{c, h} X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the moment, CPU Identification is spread accross cpu.c, cpufeature.c, processor.h, cpufeature.h. It would be better to keep everything together in a single place. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/Makefile | 1 - xen/arch/arm/cpu.c | 68 -------------------- xen/arch/arm/cpufeature.c | 42 ++++++++++++ xen/arch/arm/vcpreg.c | 1 + xen/include/asm-arm/cpufeature.h | 134 ++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/processor.h | 135 --------------------------------------- 6 files changed, 177 insertions(+), 204 deletions(-) delete mode 100644 xen/arch/arm/cpu.c diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 37fa8268b3..6d91ba7c46 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -6,7 +6,6 @@ subdir-$(CONFIG_ACPI) += acpi obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o obj-y += bootfdt.init.o -obj-y += cpu.o obj-y += cpuerrata.o obj-y += cpufeature.o obj-y += decode.o diff --git a/xen/arch/arm/cpu.c b/xen/arch/arm/cpu.c deleted file mode 100644 index 9595f1d63a..0000000000 --- a/xen/arch/arm/cpu.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include -#include -#include - -#include - -void identify_cpu(struct cpuinfo_arm *c) -{ - c->midr.bits = READ_SYSREG32(MIDR_EL1); - c->mpidr.bits = READ_SYSREG(MPIDR_EL1); - -#ifdef CONFIG_ARM_64 - c->pfr64.bits[0] = READ_SYSREG64(ID_AA64PFR0_EL1); - c->pfr64.bits[1] = READ_SYSREG64(ID_AA64PFR1_EL1); - - c->dbg64.bits[0] = READ_SYSREG64(ID_AA64DFR0_EL1); - c->dbg64.bits[1] = READ_SYSREG64(ID_AA64DFR1_EL1); - - c->aux64.bits[0] = READ_SYSREG64(ID_AA64AFR0_EL1); - c->aux64.bits[1] = READ_SYSREG64(ID_AA64AFR1_EL1); - - c->mm64.bits[0] = READ_SYSREG64(ID_AA64MMFR0_EL1); - c->mm64.bits[1] = READ_SYSREG64(ID_AA64MMFR1_EL1); - - c->isa64.bits[0] = READ_SYSREG64(ID_AA64ISAR0_EL1); - c->isa64.bits[1] = READ_SYSREG64(ID_AA64ISAR1_EL1); -#endif - - c->pfr32.bits[0] = READ_SYSREG32(ID_PFR0_EL1); - c->pfr32.bits[1] = READ_SYSREG32(ID_PFR1_EL1); - - c->dbg32.bits[0] = READ_SYSREG32(ID_DFR0_EL1); - - c->aux32.bits[0] = READ_SYSREG32(ID_AFR0_EL1); - - c->mm32.bits[0] = READ_SYSREG32(ID_MMFR0_EL1); - c->mm32.bits[1] = READ_SYSREG32(ID_MMFR1_EL1); - c->mm32.bits[2] = READ_SYSREG32(ID_MMFR2_EL1); - c->mm32.bits[3] = READ_SYSREG32(ID_MMFR3_EL1); - - c->isa32.bits[0] = READ_SYSREG32(ID_ISAR0_EL1); - c->isa32.bits[1] = READ_SYSREG32(ID_ISAR1_EL1); - c->isa32.bits[2] = READ_SYSREG32(ID_ISAR2_EL1); - c->isa32.bits[3] = READ_SYSREG32(ID_ISAR3_EL1); - c->isa32.bits[4] = READ_SYSREG32(ID_ISAR4_EL1); - c->isa32.bits[5] = READ_SYSREG32(ID_ISAR5_EL1); -} - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c index 3aaff4c0e6..44126dbf07 100644 --- a/xen/arch/arm/cpufeature.c +++ b/xen/arch/arm/cpufeature.c @@ -97,6 +97,48 @@ int enable_nonboot_cpu_caps(const struct arm_cpu_capabilities *caps) return rc; } +void identify_cpu(struct cpuinfo_arm *c) +{ + c->midr.bits = READ_SYSREG32(MIDR_EL1); + c->mpidr.bits = READ_SYSREG(MPIDR_EL1); + +#ifdef CONFIG_ARM_64 + c->pfr64.bits[0] = READ_SYSREG64(ID_AA64PFR0_EL1); + c->pfr64.bits[1] = READ_SYSREG64(ID_AA64PFR1_EL1); + + c->dbg64.bits[0] = READ_SYSREG64(ID_AA64DFR0_EL1); + c->dbg64.bits[1] = READ_SYSREG64(ID_AA64DFR1_EL1); + + c->aux64.bits[0] = READ_SYSREG64(ID_AA64AFR0_EL1); + c->aux64.bits[1] = READ_SYSREG64(ID_AA64AFR1_EL1); + + c->mm64.bits[0] = READ_SYSREG64(ID_AA64MMFR0_EL1); + c->mm64.bits[1] = READ_SYSREG64(ID_AA64MMFR1_EL1); + + c->isa64.bits[0] = READ_SYSREG64(ID_AA64ISAR0_EL1); + c->isa64.bits[1] = READ_SYSREG64(ID_AA64ISAR1_EL1); +#endif + + c->pfr32.bits[0] = READ_SYSREG32(ID_PFR0_EL1); + c->pfr32.bits[1] = READ_SYSREG32(ID_PFR1_EL1); + + c->dbg32.bits[0] = READ_SYSREG32(ID_DFR0_EL1); + + c->aux32.bits[0] = READ_SYSREG32(ID_AFR0_EL1); + + c->mm32.bits[0] = READ_SYSREG32(ID_MMFR0_EL1); + c->mm32.bits[1] = READ_SYSREG32(ID_MMFR1_EL1); + c->mm32.bits[2] = READ_SYSREG32(ID_MMFR2_EL1); + c->mm32.bits[3] = READ_SYSREG32(ID_MMFR3_EL1); + + c->isa32.bits[0] = READ_SYSREG32(ID_ISAR0_EL1); + c->isa32.bits[1] = READ_SYSREG32(ID_ISAR1_EL1); + c->isa32.bits[2] = READ_SYSREG32(ID_ISAR2_EL1); + c->isa32.bits[3] = READ_SYSREG32(ID_ISAR3_EL1); + c->isa32.bits[4] = READ_SYSREG32(ID_ISAR4_EL1); + c->isa32.bits[5] = READ_SYSREG32(ID_ISAR5_EL1); +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c index b04d996fd3..7b783e4bcc 100644 --- a/xen/arch/arm/vcpreg.c +++ b/xen/arch/arm/vcpreg.c @@ -18,6 +18,7 @@ #include +#include #include #include #include diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h index 2d82264427..17de928467 100644 --- a/xen/include/asm-arm/cpufeature.h +++ b/xen/include/asm-arm/cpufeature.h @@ -104,6 +104,140 @@ void update_cpu_capabilities(const struct arm_cpu_capabilities *caps, void enable_cpu_capabilities(const struct arm_cpu_capabilities *caps); int enable_nonboot_cpu_caps(const struct arm_cpu_capabilities *caps); +/* + * capabilities of CPUs + */ +struct cpuinfo_arm { + union { + uint32_t bits; + struct { + unsigned long revision:4; + unsigned long part_number:12; + unsigned long architecture:4; + unsigned long variant:4; + unsigned long implementer:8; + }; + } midr; + union { + register_t bits; + struct { + unsigned long aff0:8; + unsigned long aff1:8; + unsigned long aff2:8; + unsigned long mt:1; /* Multi-thread, iff MP == 1 */ + unsigned long __res0:5; + unsigned long up:1; /* UP system, iff MP == 1 */ + unsigned long mp:1; /* MP extensions */ + +#ifdef CONFIG_ARM_64 + unsigned long aff3:8; + unsigned long __res1:24; +#endif + }; + } mpidr; + +#ifdef CONFIG_ARM_64 + /* 64-bit CPUID registers. */ + union { + uint64_t bits[2]; + struct { + unsigned long el0:4; + unsigned long el1:4; + unsigned long el2:4; + unsigned long el3:4; + unsigned long fp:4; /* Floating Point */ + unsigned long simd:4; /* Advanced SIMD */ + unsigned long gic:4; /* GIC support */ + unsigned long __res0:28; + unsigned long csv2:4; + unsigned long __res1:4; + }; + } pfr64; + + struct { + uint64_t bits[2]; + } dbg64; + + struct { + uint64_t bits[2]; + } aux64; + + union { + uint64_t bits[2]; + struct { + unsigned long pa_range:4; + unsigned long asid_bits:4; + unsigned long bigend:4; + unsigned long secure_ns:4; + unsigned long bigend_el0:4; + unsigned long tgranule_16K:4; + unsigned long tgranule_64K:4; + unsigned long tgranule_4K:4; + unsigned long __res0:32; + + unsigned long hafdbs:4; + unsigned long vmid_bits:4; + unsigned long vh:4; + unsigned long hpds:4; + unsigned long lo:4; + unsigned long pan:4; + unsigned long __res1:8; + unsigned long __res2:32; + }; + } mm64; + + struct { + uint64_t bits[2]; + } isa64; + +#endif + + /* + * 32-bit CPUID registers. On ARMv8 these describe the properties + * when running in 32-bit mode. + */ + union { + uint32_t bits[2]; + struct { + unsigned long arm:4; + unsigned long thumb:4; + unsigned long jazelle:4; + unsigned long thumbee:4; + unsigned long __res0:16; + + unsigned long progmodel:4; + unsigned long security:4; + unsigned long mprofile:4; + unsigned long virt:4; + unsigned long gentimer:4; + unsigned long __res1:12; + }; + } pfr32; + + struct { + uint32_t bits[1]; + } dbg32; + + struct { + uint32_t bits[1]; + } aux32; + + struct { + uint32_t bits[4]; + } mm32; + + struct { + uint32_t bits[6]; + } isa32; +}; + +extern struct cpuinfo_arm boot_cpu_data; + +extern void identify_cpu(struct cpuinfo_arm *); + +extern struct cpuinfo_arm cpu_data[]; +#define current_cpu_data cpu_data[smp_processor_id()] + #endif /* __ASSEMBLY__ */ #endif diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index fcdc0f6375..bdce0df122 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -350,141 +350,6 @@ #ifndef __ASSEMBLY__ -struct cpuinfo_arm { - union { - uint32_t bits; - struct { - unsigned long revision:4; - unsigned long part_number:12; - unsigned long architecture:4; - unsigned long variant:4; - unsigned long implementer:8; - }; - } midr; - union { - register_t bits; - struct { - unsigned long aff0:8; - unsigned long aff1:8; - unsigned long aff2:8; - unsigned long mt:1; /* Multi-thread, iff MP == 1 */ - unsigned long __res0:5; - unsigned long up:1; /* UP system, iff MP == 1 */ - unsigned long mp:1; /* MP extensions */ - -#ifdef CONFIG_ARM_64 - unsigned long aff3:8; - unsigned long __res1:24; -#endif - }; - } mpidr; - -#ifdef CONFIG_ARM_64 - /* 64-bit CPUID registers. */ - union { - uint64_t bits[2]; - struct { - unsigned long el0:4; - unsigned long el1:4; - unsigned long el2:4; - unsigned long el3:4; - unsigned long fp:4; /* Floating Point */ - unsigned long simd:4; /* Advanced SIMD */ - unsigned long gic:4; /* GIC support */ - unsigned long __res0:28; - unsigned long csv2:4; - unsigned long __res1:4; - }; - } pfr64; - - struct { - uint64_t bits[2]; - } dbg64; - - struct { - uint64_t bits[2]; - } aux64; - - union { - uint64_t bits[2]; - struct { - unsigned long pa_range:4; - unsigned long asid_bits:4; - unsigned long bigend:4; - unsigned long secure_ns:4; - unsigned long bigend_el0:4; - unsigned long tgranule_16K:4; - unsigned long tgranule_64K:4; - unsigned long tgranule_4K:4; - unsigned long __res0:32; - - unsigned long hafdbs:4; - unsigned long vmid_bits:4; - unsigned long vh:4; - unsigned long hpds:4; - unsigned long lo:4; - unsigned long pan:4; - unsigned long __res1:8; - unsigned long __res2:32; - }; - } mm64; - - struct { - uint64_t bits[2]; - } isa64; - -#endif - - /* - * 32-bit CPUID registers. On ARMv8 these describe the properties - * when running in 32-bit mode. - */ - union { - uint32_t bits[2]; - struct { - unsigned long arm:4; - unsigned long thumb:4; - unsigned long jazelle:4; - unsigned long thumbee:4; - unsigned long __res0:16; - - unsigned long progmodel:4; - unsigned long security:4; - unsigned long mprofile:4; - unsigned long virt:4; - unsigned long gentimer:4; - unsigned long __res1:12; - }; - } pfr32; - - struct { - uint32_t bits[1]; - } dbg32; - - struct { - uint32_t bits[1]; - } aux32; - - struct { - uint32_t bits[4]; - } mm32; - - struct { - uint32_t bits[6]; - } isa32; -}; - -/* - * capabilities of CPUs - */ - -extern struct cpuinfo_arm boot_cpu_data; - -extern void identify_cpu(struct cpuinfo_arm *); - -extern struct cpuinfo_arm cpu_data[]; -#define current_cpu_data cpu_data[smp_processor_id()] - extern register_t __cpu_logical_map[]; #define cpu_logical_map(cpu) __cpu_logical_map[cpu] From patchwork Wed Oct 31 18:12:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149854 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126834ljp; Wed, 31 Oct 2018 11:15:50 -0700 (PDT) X-Google-Smtp-Source: AJdET5fPLwLTdx50LSHs68g7yDVCbsx0hAexFbS3tF0cv9lI887dDt/JZVnohT7ROBJBdzktz5Bv X-Received: by 2002:a25:3588:: with SMTP id c130-v6mr4313335yba.410.1541009750285; Wed, 31 Oct 2018 11:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009750; cv=none; d=google.com; s=arc-20160816; b=kIwttJ+H12suGpIVNLAYYa+Ycou9+iFCTuTbGvNzLawcWhZh84jNv6/v4GlWEhht6r HgfA7Vsex/M4cX13yl0D05xot6E39/knFQH/f08ttm+3rAa5+btj+wzz+ghm+GM+lZO9 UkFjRW8VmzTyW+ScSN3yS1g1eCdbYmVTW5rmDQtIg8vW9iePUn9JTOxidSaYAVO0lcch 25umPw4inGnRsEfiaVZUYJ8ct4uy2FH0RHqYaWeu3SF8VxVVHIJ0L32gV7b9kPgj+KK0 GfSRucWB9LWBLTxryn7X/G/3epVFcML0o0wXYZxJXl4kT1Ob39Vjd6U5jQ9LK+lYm5Rw EVOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=bwfsNkdCtMrT3xsMqBXy0OXbshatnwPRUa0vj3rX3+o=; b=O2kafBdT9LN2S7tlBu+Ur2eKlkArOthGP4h1OMnwyRFLGHBwEf2Xpg9YIrw7l0pZd0 k19Zj+rInwu4mAzb3B9U/AK0HrIvoUzXbg5rxhQxgS4/904BkMq/zjegq242Ekqtsxil ybrZO0LmmTDVDFEyqisiFb4XZvtmrzrRFkrGdJkYwZ19DQP806Vm2ZyM/U17J5zq7L4W Jzw13fUvUnfGbl8IEtn4STsY4KoVjygeJ0h5mTR63wITzUpLIaa30J2+ZafAYbfrcbrE Xi0nUnl/pn1k3M56VSVvo2BeMzwJ2aTaDpHRPPyned+5VEe4yuQxzmIh4yKAZOjLnriR TuHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g4-v6si9811907ybq.491.2018.10.31.11.15.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzh-0004Ob-Ij; Wed, 31 Oct 2018 18:13:29 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzf-0004O2-Ts for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:27 +0000 X-Inumbo-ID: a9ed21ba-dd38-11e8-ab33-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id a9ed21ba-dd38-11e8-ab33-12d6303a7972; Wed, 31 Oct 2018 18:13:27 +0000 (UTC) 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 264D180D; Wed, 31 Oct 2018 11:13:27 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3A8A03F6A8; Wed, 31 Oct 2018 11:13:26 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:58 +0000 Message-Id: <20181031181313.8028-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 06/21] xen/arm: Move VABORT_GEN_BY_GUEST to traps.h and turned into inline X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The macro VABORT_GEN_BY_GUEST is only used by the trap code. So move it to trap.h. While moving the code, convert is to a static inline to allow typecheck. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/processor.h | 10 ---------- xen/include/asm-arm/traps.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index bdce0df122..3f40468bfd 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -684,16 +684,6 @@ void do_trap_guest_serror(struct cpu_user_regs *regs); register_t get_default_hcr_flags(void); -/* Functions for pending virtual abort checking window. */ -void abort_guest_exit_start(void); -void abort_guest_exit_end(void); - -#define VABORT_GEN_BY_GUEST(r) \ -( \ - ( (unsigned long)abort_guest_exit_start == (r)->pc ) || \ - ( (unsigned long)abort_guest_exit_end == (r)->pc ) \ -) - /* * Synchronize SError unless the feature is selected. * This is relying on the SErrors are currently unmasked. diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h index d30ee1e01e..a0406b5a3c 100644 --- a/xen/include/asm-arm/traps.h +++ b/xen/include/asm-arm/traps.h @@ -45,6 +45,16 @@ void do_trap_hvc_smccc(struct cpu_user_regs *regs); int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); +/* Functions for pending virtual abort checking window. */ +void abort_guest_exit_start(void); +void abort_guest_exit_end(void); + +static inline bool VABORT_GEN_BY_GUEST(const struct cpu_user_regs *regs) +{ + return ((unsigned long)abort_guest_exit_start == regs->pc) || + (unsigned long)abort_guest_exit_end == regs->pc; +} + #endif /* __ASM_ARM_TRAPS__ */ /* * Local variables: From patchwork Wed Oct 31 18:12:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149851 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126548ljp; Wed, 31 Oct 2018 11:15:34 -0700 (PDT) X-Google-Smtp-Source: AJdET5fwiSk23rWlg0IkoSfLiVHTB4DVtXBQh2REPaIsvi8otiXsDr+xx6laBZ4JCR7/j2G7EeEE X-Received: by 2002:a81:190c:: with SMTP id 12-v6mr4274282ywz.387.1541009734168; Wed, 31 Oct 2018 11:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009734; cv=none; d=google.com; s=arc-20160816; b=DXYdqydwGXwM60RJomlh/lTzI9XkcPMMTXvMfWbfWzv0RlqUY5k3zLBFeBuiIMJfrT 3T2fN2CaVvOx4oLrD8wteIUPtzFBBstZ7JxmI7mr41jUySipx1FfE0ZjK/bDrik0KmUr Mw+8Qxo/YhwcPC4uT3pwe2SUE83+7AvmjTHeWqfBMQwgszZEazJtvpA64IkfelBUOMrS jwePM6INVKQNscQBYrduV8zEtCB3l/HxGqemM8mLHpvajSrnCfDlWrqmmuxScBjueu8t ZROl+j6j1bD6AqzvIwTz8xvjRBtrJC3RI0zZoZt6+QLEvBegPrZkw959ZJ91z1JQKl7J WP3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=NkL7v2WblsUaynpKXZjniLfI8e3zaMfs7UW9wt/e9NE=; b=z4SCUzxlb1Z/yaQ+mWgkBY7/YmHg34DlVmQm7GTux7ViYtML57n0D9UNne5Uvt0u7s U4nR71BbIbEvko3gncYU+2FVVQWyEYFe7v4+QiJdsvunClypLNeK3+AN3nzxf6u2CKw1 l/Hjhgk3WZJKPOzE1db3YH1+C4FJJiRe49oDgfkRwL6LHAv3GhBdjeijjMz4Qo4ed/iE GM41qZ8sFTa+yZYRCWomd9jfGhsZH/X7jPd4zFh3/PooykDwWHWoVbNmPuAr/MVz/3At hCfZkiPcpGxaSNRT0p2pra5h2pLFXA82rb7bIMfV0wTu0yzlc+y2vU0s0RZ3TQTEqj6e RZfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id y3-v6si6712525ybo.179.2018.10.31.11.15.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzi-0004P2-1g; Wed, 31 Oct 2018 18:13:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzh-0004OM-3N for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:29 +0000 X-Inumbo-ID: aaa66440-dd38-11e8-a057-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id aaa66440-dd38-11e8-a057-12d6303a7972; Wed, 31 Oct 2018 18:13:28 +0000 (UTC) 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 4E1131596; Wed, 31 Oct 2018 11:13:28 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 62E733F6A8; Wed, 31 Oct 2018 11:13:27 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:59 +0000 Message-Id: <20181031181313.8028-8-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 07/21] xen/arm: gic-3: Remove unused includes X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/gic-v3.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index 2952335d05..8ff4e0f08e 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -33,18 +32,14 @@ #include #include #include -#include #include #include -#include -#include #include #include #include #include #include #include -#include /* Global state */ static struct { From patchwork Wed Oct 31 18:13:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149850 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126573ljp; Wed, 31 Oct 2018 11:15:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5eLyZ6z1FFOWQWEzyhQ2i9/WBm7ttwFhljovgRobTkuu40jlBszQ0QMTfJ8W4YC5huJbohg X-Received: by 2002:a25:cf04:: with SMTP id f4-v6mr4196265ybg.261.1541009735518; Wed, 31 Oct 2018 11:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009735; cv=none; d=google.com; s=arc-20160816; b=YcuK9NZKAJJtnY080/8kIlTKlajHkkPngGZquLL2ta6ZlGLcCIFR5S0O+vUHgOXm/2 xzs+zqL43es1hHRl3tBzhvd0sC57ywnugGJpcK8KS+/dR0/DvN3qk9eWvaQJAO9ijzKE 6tRyEoGczN0U6TBMsimVWmKk3LD05imAqjowtEDE3q3KqqDibKVyKys5TahmxzgElUJj sw4k1KaP0QKyORjVkPjFpU7a6sdQGEVsHsBuuytozKrfou0718q04+GTNDWzNmAFJ5v2 dDRUKImydav3VJZS9C44DuqY/A9MQHZs16iqKliRf/Qta2IOs72AMbIVUmTLi6QLknjl c+Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=E1PlMnP81DnH/ygDaC66KvYFaOZCy6JSwE7C8kgAUSk=; b=cX5kLdcfOaMOL9WVDSvhbRepzmUZnkfCADHZDrldUCWtXkn+MpRiDmP25Lbc/qE+Go QMg7e15IGFNuNWWmE0zIuYQs1XS8J5f/Dobnq0ALKrlhncK7Wgpd4vAE38JdgFlDsEw/ o9vRRK8Eak1Nr5ncU0IQgeCOMc0nLeUTpUjWUMj4SBhWKUJMgbtnI9tZGZsChXHWXMCU i22AAV7Mujsqhp88AJlzsTk9ghlHsaRW9MmQfgltoO1uaDmaLxb80FrVv/4Vum4kmBh3 nUnYuy2lXY1r83VNE0CLJb1reEOzc33smN/xmc/dDhyItrUi0EXlXZMD4oBJYm4fmg3k t9kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g3-v6si12975011ywk.72.2018.10.31.11.15.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzk-0004Pk-Dj; Wed, 31 Oct 2018 18:13:32 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzj-0004PV-Lg for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:31 +0000 X-Inumbo-ID: aba80ac0-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id aba80ac0-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:30 +0000 (UTC) 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 78A5715AB; Wed, 31 Oct 2018 11:13:29 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B9DA3F6A8; Wed, 31 Oct 2018 11:13:28 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:00 +0000 Message-Id: <20181031181313.8028-9-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 08/21] xen/arm: gic-v3: Re-order includes in alphabetical order X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/gic-v3.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index 8ff4e0f08e..a7ce94789c 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -21,25 +21,27 @@ * GNU General Public License for more details. */ -#include +#include +#include +#include +#include #include -#include -#include #include +#include +#include +#include +#include #include -#include -#include -#include #include -#include -#include + #include -#include + +#include #include #include #include #include -#include +#include /* Global state */ static struct { From patchwork Wed Oct 31 18:13:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149848 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126513ljp; Wed, 31 Oct 2018 11:15:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5fmcboCLp6W+2qpZ7FhuQCOKiWZ0kT102usOhTvI9AzRzsUJSXJnOX9nI2xaxBbYAq7pmf4 X-Received: by 2002:a0d:c045:: with SMTP id b66-v6mr4087651ywd.208.1541009731876; Wed, 31 Oct 2018 11:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009731; cv=none; d=google.com; s=arc-20160816; b=RG4ccWh3mYBdEn41VEfAG+lyv5TKhSlc96V7avvlIdAyvq55smYEwipDxiwO0LU6KR suvs5nPE0guEuPImLHgsYrr4d9Rz2v8WQ8l+rYrE5UrcHpIwUKANvLAYi80bVbPb07jg hbnwd6h/FqOURRXD/wv1YZYRWg8j6DT5dJNEu5jEq4fusJwO3/F9gfhN+es3sR4P+CPB JYkUHfbqsPVrn117tKKCDuSfwyvAJNf/a/hiLPL2kUzhB/qXZSGeizX97Brj276HqG25 rbFqnriNTzmbF9f2edNJUu/I9ypYLeQ3W0S3O0iX2k4+priiMoTLUNX0K1CHptDO7YK0 oq1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=mYOJzvyaq2zy4V0BOfVcWRQcN5eHuCZCb16+5a2QM/s=; b=n/wFWskUviez907sk4lFQlZ9XWwkxaFx+aNVWpZWvmFtYpxYT9SU1CPZGxwuFGXCBG ecGhzg0ddor0QqN8VIzFnGbHznSSm/RvVDI7p/nARrzJ/qgcLRJnye8uTT/Ta3oIh9Lu 1HRC146CKaDhOLkvPBv2gMerSk5O4WXiQ0nVqCMjcOTJLhhQ3AO/YodhTRjBKAIvcHXm 3ZbKQlqgXh3BinbwGwh7iJ7nbdBqaWDCkzOlb4p4f0tFulhSNQi0QYWgusAGsrOXbP9o AsmvxoR4ZZgX7oaegPRIwI6XMA1ymMAvp/2XZkgYa8Kr1OdfORU88tCeH+h/BxCi5N0F O/rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 62-v6si8443511ybu.221.2018.10.31.11.15.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzl-0004Q7-Ol; Wed, 31 Oct 2018 18:13:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzj-0004PY-RY for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:31 +0000 X-Inumbo-ID: ac2ba76c-dd38-11e8-be1e-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id ac2ba76c-dd38-11e8-be1e-12d6303a7972; Wed, 31 Oct 2018 18:13:31 +0000 (UTC) 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 C3BDB80D; Wed, 31 Oct 2018 11:13:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B52203F6A8; Wed, 31 Oct 2018 11:13:29 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:01 +0000 Message-Id: <20181031181313.8028-10-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 09/21] xen/arm: Move HSR defines in a new header hsr.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The HSR defines are pretty much self-contained and not necessary to be included everywhere in Xen. So move them in a new header hsr.h. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/arm64/traps.c | 1 + xen/arch/arm/traps.c | 1 + xen/include/asm-arm/arm64/hsr.h | 122 ++++++++++++++++++++ xen/include/asm-arm/arm64/sysregs.h | 109 ------------------ xen/include/asm-arm/hsr.h | 217 ++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/mmio.h | 2 + xen/include/asm-arm/processor.h | 199 --------------------------------- xen/include/asm-arm/traps.h | 1 + 8 files changed, 344 insertions(+), 308 deletions(-) create mode 100644 xen/include/asm-arm/arm64/hsr.h create mode 100644 xen/include/asm-arm/hsr.h diff --git a/xen/arch/arm/arm64/traps.c b/xen/arch/arm/arm64/traps.c index e5240190e6..babfc1d884 100644 --- a/xen/arch/arm/arm64/traps.c +++ b/xen/arch/arm/arm64/traps.c @@ -18,6 +18,7 @@ #include +#include #include #include diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index b9323672fc..0b8d342c1a 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/include/asm-arm/arm64/hsr.h b/xen/include/asm-arm/arm64/hsr.h new file mode 100644 index 0000000000..ca931dd2fe --- /dev/null +++ b/xen/include/asm-arm/arm64/hsr.h @@ -0,0 +1,122 @@ +#ifndef __ASM_ARM_ARM64_HSR_H +#define __ASM_ARM_ARM64_HSR_H + +/* AArch 64 System Register Encodings */ +#define __HSR_SYSREG_c0 0 +#define __HSR_SYSREG_c1 1 +#define __HSR_SYSREG_c2 2 +#define __HSR_SYSREG_c3 3 +#define __HSR_SYSREG_c4 4 +#define __HSR_SYSREG_c5 5 +#define __HSR_SYSREG_c6 6 +#define __HSR_SYSREG_c7 7 +#define __HSR_SYSREG_c8 8 +#define __HSR_SYSREG_c9 9 +#define __HSR_SYSREG_c10 10 +#define __HSR_SYSREG_c11 11 +#define __HSR_SYSREG_c12 12 +#define __HSR_SYSREG_c13 13 +#define __HSR_SYSREG_c14 14 +#define __HSR_SYSREG_c15 15 + +#define __HSR_SYSREG_0 0 +#define __HSR_SYSREG_1 1 +#define __HSR_SYSREG_2 2 +#define __HSR_SYSREG_3 3 +#define __HSR_SYSREG_4 4 +#define __HSR_SYSREG_5 5 +#define __HSR_SYSREG_6 6 +#define __HSR_SYSREG_7 7 + +/* These are used to decode traps with HSR.EC==HSR_EC_SYSREG */ +#define HSR_SYSREG(op0,op1,crn,crm,op2) \ + (((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \ + ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \ + ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \ + ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \ + ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)) + +#define HSR_SYSREG_DCISW HSR_SYSREG(1,0,c7,c6,2) +#define HSR_SYSREG_DCCSW HSR_SYSREG(1,0,c7,c10,2) +#define HSR_SYSREG_DCCISW HSR_SYSREG(1,0,c7,c14,2) + +#define HSR_SYSREG_MDSCR_EL1 HSR_SYSREG(2,0,c0,c2,2) +#define HSR_SYSREG_MDRAR_EL1 HSR_SYSREG(2,0,c1,c0,0) +#define HSR_SYSREG_OSLAR_EL1 HSR_SYSREG(2,0,c1,c0,4) +#define HSR_SYSREG_OSLSR_EL1 HSR_SYSREG(2,0,c1,c1,4) +#define HSR_SYSREG_OSDLR_EL1 HSR_SYSREG(2,0,c1,c3,4) +#define HSR_SYSREG_DBGPRCR_EL1 HSR_SYSREG(2,0,c1,c4,4) +#define HSR_SYSREG_MDCCSR_EL0 HSR_SYSREG(2,3,c0,c1,0) + +#define HSR_SYSREG_DBGBVRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,4) +#define HSR_SYSREG_DBGBCRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,5) +#define HSR_SYSREG_DBGWVRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,6) +#define HSR_SYSREG_DBGWCRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,7) + +#define HSR_SYSREG_DBG_CASES(REG) case HSR_SYSREG_##REG##n_EL1(0): \ + case HSR_SYSREG_##REG##n_EL1(1): \ + case HSR_SYSREG_##REG##n_EL1(2): \ + case HSR_SYSREG_##REG##n_EL1(3): \ + case HSR_SYSREG_##REG##n_EL1(4): \ + case HSR_SYSREG_##REG##n_EL1(5): \ + case HSR_SYSREG_##REG##n_EL1(6): \ + case HSR_SYSREG_##REG##n_EL1(7): \ + case HSR_SYSREG_##REG##n_EL1(8): \ + case HSR_SYSREG_##REG##n_EL1(9): \ + case HSR_SYSREG_##REG##n_EL1(10): \ + case HSR_SYSREG_##REG##n_EL1(11): \ + case HSR_SYSREG_##REG##n_EL1(12): \ + case HSR_SYSREG_##REG##n_EL1(13): \ + case HSR_SYSREG_##REG##n_EL1(14): \ + case HSR_SYSREG_##REG##n_EL1(15) + +#define HSR_SYSREG_SCTLR_EL1 HSR_SYSREG(3,0,c1, c0,0) +#define HSR_SYSREG_ACTLR_EL1 HSR_SYSREG(3,0,c1, c0,1) +#define HSR_SYSREG_TTBR0_EL1 HSR_SYSREG(3,0,c2, c0,0) +#define HSR_SYSREG_TTBR1_EL1 HSR_SYSREG(3,0,c2, c0,1) +#define HSR_SYSREG_TCR_EL1 HSR_SYSREG(3,0,c2, c0,2) +#define HSR_SYSREG_AFSR0_EL1 HSR_SYSREG(3,0,c5, c1,0) +#define HSR_SYSREG_AFSR1_EL1 HSR_SYSREG(3,0,c5, c1,1) +#define HSR_SYSREG_ESR_EL1 HSR_SYSREG(3,0,c5, c2,0) +#define HSR_SYSREG_FAR_EL1 HSR_SYSREG(3,0,c6, c0,0) +#define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1) +#define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2) +#define HSR_SYSREG_MAIR_EL1 HSR_SYSREG(3,0,c10,c2,0) +#define HSR_SYSREG_AMAIR_EL1 HSR_SYSREG(3,0,c10,c3,0) +#define HSR_SYSREG_ICC_SGI1R_EL1 HSR_SYSREG(3,0,c12,c11,5) +#define HSR_SYSREG_ICC_ASGI1R_EL1 HSR_SYSREG(3,1,c12,c11,6) +#define HSR_SYSREG_ICC_SGI0R_EL1 HSR_SYSREG(3,2,c12,c11,7) +#define HSR_SYSREG_ICC_SRE_EL1 HSR_SYSREG(3,0,c12,c12,5) +#define HSR_SYSREG_CONTEXTIDR_EL1 HSR_SYSREG(3,0,c13,c0,1) + +#define HSR_SYSREG_PMCR_EL0 HSR_SYSREG(3,3,c9,c12,0) +#define HSR_SYSREG_PMCNTENSET_EL0 HSR_SYSREG(3,3,c9,c12,1) +#define HSR_SYSREG_PMCNTENCLR_EL0 HSR_SYSREG(3,3,c9,c12,2) +#define HSR_SYSREG_PMOVSCLR_EL0 HSR_SYSREG(3,3,c9,c12,3) +#define HSR_SYSREG_PMSWINC_EL0 HSR_SYSREG(3,3,c9,c12,4) +#define HSR_SYSREG_PMSELR_EL0 HSR_SYSREG(3,3,c9,c12,5) +#define HSR_SYSREG_PMCEID0_EL0 HSR_SYSREG(3,3,c9,c12,6) +#define HSR_SYSREG_PMCEID1_EL0 HSR_SYSREG(3,3,c9,c12,7) + +#define HSR_SYSREG_PMCCNTR_EL0 HSR_SYSREG(3,3,c9,c13,0) +#define HSR_SYSREG_PMXEVTYPER_EL0 HSR_SYSREG(3,3,c9,c13,1) +#define HSR_SYSREG_PMXEVCNTR_EL0 HSR_SYSREG(3,3,c9,c13,2) + +#define HSR_SYSREG_PMUSERENR_EL0 HSR_SYSREG(3,3,c9,c14,0) +#define HSR_SYSREG_PMOVSSET_EL0 HSR_SYSREG(3,3,c9,c14,3) + +#define HSR_SYSREG_CNTPCT_EL0 HSR_SYSREG(3,3,c14,c0,0) +#define HSR_SYSREG_CNTP_TVAL_EL0 HSR_SYSREG(3,3,c14,c2,0) +#define HSR_SYSREG_CNTP_CTL_EL0 HSR_SYSREG(3,3,c14,c2,1) +#define HSR_SYSREG_CNTP_CVAL_EL0 HSR_SYSREG(3,3,c14,c2,2) + +#endif /* __ASM_ARM_ARM64_HSR_H */ + +/* + * 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/sysregs.h b/xen/include/asm-arm/arm64/sysregs.h index 1811234249..f510925a2a 100644 --- a/xen/include/asm-arm/arm64/sysregs.h +++ b/xen/include/asm-arm/arm64/sysregs.h @@ -3,115 +3,6 @@ #include -/* AArch 64 System Register Encodings */ -#define __HSR_SYSREG_c0 0 -#define __HSR_SYSREG_c1 1 -#define __HSR_SYSREG_c2 2 -#define __HSR_SYSREG_c3 3 -#define __HSR_SYSREG_c4 4 -#define __HSR_SYSREG_c5 5 -#define __HSR_SYSREG_c6 6 -#define __HSR_SYSREG_c7 7 -#define __HSR_SYSREG_c8 8 -#define __HSR_SYSREG_c9 9 -#define __HSR_SYSREG_c10 10 -#define __HSR_SYSREG_c11 11 -#define __HSR_SYSREG_c12 12 -#define __HSR_SYSREG_c13 13 -#define __HSR_SYSREG_c14 14 -#define __HSR_SYSREG_c15 15 - -#define __HSR_SYSREG_0 0 -#define __HSR_SYSREG_1 1 -#define __HSR_SYSREG_2 2 -#define __HSR_SYSREG_3 3 -#define __HSR_SYSREG_4 4 -#define __HSR_SYSREG_5 5 -#define __HSR_SYSREG_6 6 -#define __HSR_SYSREG_7 7 - -/* These are used to decode traps with HSR.EC==HSR_EC_SYSREG */ -#define HSR_SYSREG(op0,op1,crn,crm,op2) \ - (((__HSR_SYSREG_##op0) << HSR_SYSREG_OP0_SHIFT) | \ - ((__HSR_SYSREG_##op1) << HSR_SYSREG_OP1_SHIFT) | \ - ((__HSR_SYSREG_##crn) << HSR_SYSREG_CRN_SHIFT) | \ - ((__HSR_SYSREG_##crm) << HSR_SYSREG_CRM_SHIFT) | \ - ((__HSR_SYSREG_##op2) << HSR_SYSREG_OP2_SHIFT)) - -#define HSR_SYSREG_DCISW HSR_SYSREG(1,0,c7,c6,2) -#define HSR_SYSREG_DCCSW HSR_SYSREG(1,0,c7,c10,2) -#define HSR_SYSREG_DCCISW HSR_SYSREG(1,0,c7,c14,2) - -#define HSR_SYSREG_MDSCR_EL1 HSR_SYSREG(2,0,c0,c2,2) -#define HSR_SYSREG_MDRAR_EL1 HSR_SYSREG(2,0,c1,c0,0) -#define HSR_SYSREG_OSLAR_EL1 HSR_SYSREG(2,0,c1,c0,4) -#define HSR_SYSREG_OSLSR_EL1 HSR_SYSREG(2,0,c1,c1,4) -#define HSR_SYSREG_OSDLR_EL1 HSR_SYSREG(2,0,c1,c3,4) -#define HSR_SYSREG_DBGPRCR_EL1 HSR_SYSREG(2,0,c1,c4,4) -#define HSR_SYSREG_MDCCSR_EL0 HSR_SYSREG(2,3,c0,c1,0) - -#define HSR_SYSREG_DBGBVRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,4) -#define HSR_SYSREG_DBGBCRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,5) -#define HSR_SYSREG_DBGWVRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,6) -#define HSR_SYSREG_DBGWCRn_EL1(n) HSR_SYSREG(2,0,c0,c##n,7) - -#define HSR_SYSREG_DBG_CASES(REG) case HSR_SYSREG_##REG##n_EL1(0): \ - case HSR_SYSREG_##REG##n_EL1(1): \ - case HSR_SYSREG_##REG##n_EL1(2): \ - case HSR_SYSREG_##REG##n_EL1(3): \ - case HSR_SYSREG_##REG##n_EL1(4): \ - case HSR_SYSREG_##REG##n_EL1(5): \ - case HSR_SYSREG_##REG##n_EL1(6): \ - case HSR_SYSREG_##REG##n_EL1(7): \ - case HSR_SYSREG_##REG##n_EL1(8): \ - case HSR_SYSREG_##REG##n_EL1(9): \ - case HSR_SYSREG_##REG##n_EL1(10): \ - case HSR_SYSREG_##REG##n_EL1(11): \ - case HSR_SYSREG_##REG##n_EL1(12): \ - case HSR_SYSREG_##REG##n_EL1(13): \ - case HSR_SYSREG_##REG##n_EL1(14): \ - case HSR_SYSREG_##REG##n_EL1(15) - -#define HSR_SYSREG_SCTLR_EL1 HSR_SYSREG(3,0,c1, c0,0) -#define HSR_SYSREG_ACTLR_EL1 HSR_SYSREG(3,0,c1, c0,1) -#define HSR_SYSREG_TTBR0_EL1 HSR_SYSREG(3,0,c2, c0,0) -#define HSR_SYSREG_TTBR1_EL1 HSR_SYSREG(3,0,c2, c0,1) -#define HSR_SYSREG_TCR_EL1 HSR_SYSREG(3,0,c2, c0,2) -#define HSR_SYSREG_AFSR0_EL1 HSR_SYSREG(3,0,c5, c1,0) -#define HSR_SYSREG_AFSR1_EL1 HSR_SYSREG(3,0,c5, c1,1) -#define HSR_SYSREG_ESR_EL1 HSR_SYSREG(3,0,c5, c2,0) -#define HSR_SYSREG_FAR_EL1 HSR_SYSREG(3,0,c6, c0,0) -#define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1) -#define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2) -#define HSR_SYSREG_MAIR_EL1 HSR_SYSREG(3,0,c10,c2,0) -#define HSR_SYSREG_AMAIR_EL1 HSR_SYSREG(3,0,c10,c3,0) -#define HSR_SYSREG_ICC_SGI1R_EL1 HSR_SYSREG(3,0,c12,c11,5) -#define HSR_SYSREG_ICC_ASGI1R_EL1 HSR_SYSREG(3,1,c12,c11,6) -#define HSR_SYSREG_ICC_SGI0R_EL1 HSR_SYSREG(3,2,c12,c11,7) -#define HSR_SYSREG_ICC_SRE_EL1 HSR_SYSREG(3,0,c12,c12,5) -#define HSR_SYSREG_CONTEXTIDR_EL1 HSR_SYSREG(3,0,c13,c0,1) - -#define HSR_SYSREG_PMCR_EL0 HSR_SYSREG(3,3,c9,c12,0) -#define HSR_SYSREG_PMCNTENSET_EL0 HSR_SYSREG(3,3,c9,c12,1) -#define HSR_SYSREG_PMCNTENCLR_EL0 HSR_SYSREG(3,3,c9,c12,2) -#define HSR_SYSREG_PMOVSCLR_EL0 HSR_SYSREG(3,3,c9,c12,3) -#define HSR_SYSREG_PMSWINC_EL0 HSR_SYSREG(3,3,c9,c12,4) -#define HSR_SYSREG_PMSELR_EL0 HSR_SYSREG(3,3,c9,c12,5) -#define HSR_SYSREG_PMCEID0_EL0 HSR_SYSREG(3,3,c9,c12,6) -#define HSR_SYSREG_PMCEID1_EL0 HSR_SYSREG(3,3,c9,c12,7) - -#define HSR_SYSREG_PMCCNTR_EL0 HSR_SYSREG(3,3,c9,c13,0) -#define HSR_SYSREG_PMXEVTYPER_EL0 HSR_SYSREG(3,3,c9,c13,1) -#define HSR_SYSREG_PMXEVCNTR_EL0 HSR_SYSREG(3,3,c9,c13,2) - -#define HSR_SYSREG_PMUSERENR_EL0 HSR_SYSREG(3,3,c9,c14,0) -#define HSR_SYSREG_PMOVSSET_EL0 HSR_SYSREG(3,3,c9,c14,3) - -#define HSR_SYSREG_CNTPCT_EL0 HSR_SYSREG(3,3,c14,c0,0) -#define HSR_SYSREG_CNTP_TVAL_EL0 HSR_SYSREG(3,3,c14,c2,0) -#define HSR_SYSREG_CNTP_CTL_EL0 HSR_SYSREG(3,3,c14,c2,1) -#define HSR_SYSREG_CNTP_CVAL_EL0 HSR_SYSREG(3,3,c14,c2,2) - /* * GIC System register assembly aliases picked from kernel */ diff --git a/xen/include/asm-arm/hsr.h b/xen/include/asm-arm/hsr.h new file mode 100644 index 0000000000..29d4531f40 --- /dev/null +++ b/xen/include/asm-arm/hsr.h @@ -0,0 +1,217 @@ +#ifndef __ASM_ARM_HSR_H +#define __ASM_ARM_HSR_H + +#include + +#if defined(CONFIG_ARM_64) +# include +#endif + +/* HSR data abort size definition */ +enum dabt_size { + DABT_BYTE = 0, + DABT_HALF_WORD = 1, + DABT_WORD = 2, + DABT_DOUBLE_WORD = 3, +}; + +union hsr { + uint32_t bits; + struct { + unsigned long iss:25; /* Instruction Specific Syndrome */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + }; + + /* Common to all conditional exception classes (0x0N, except 0x00). */ + struct hsr_cond { + unsigned long iss:20; /* Instruction Specific Syndrome */ + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } cond; + + struct hsr_wfi_wfe { + unsigned long ti:1; /* Trapped instruction */ + unsigned long sbzp:19; + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } wfi_wfe; + + /* reg, reg0, reg1 are 4 bits on AArch32, the fifth bit is sbzp. */ + struct hsr_cp32 { + unsigned long read:1; /* Direction */ + unsigned long crm:4; /* CRm */ + unsigned long reg:5; /* Rt */ + unsigned long crn:4; /* CRn */ + unsigned long op1:3; /* Op1 */ + unsigned long op2:3; /* Op2 */ + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } cp32; /* HSR_EC_CP15_32, CP14_32, CP10 */ + + struct hsr_cp64 { + unsigned long read:1; /* Direction */ + unsigned long crm:4; /* CRm */ + unsigned long reg1:5; /* Rt1 */ + unsigned long reg2:5; /* Rt2 */ + unsigned long sbzp2:1; + unsigned long op1:4; /* Op1 */ + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } cp64; /* HSR_EC_CP15_64, HSR_EC_CP14_64 */ + + struct hsr_cp { + unsigned long coproc:4; /* Number of coproc accessed */ + unsigned long sbz0p:1; + unsigned long tas:1; /* Trapped Advanced SIMD */ + unsigned long res0:14; + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } cp; /* HSR_EC_CP */ + + /* + * This encoding is valid only for ARMv8 (ARM DDI 0487B.a, pages D7-2271 and + * G6-4957). On ARMv7, encoding ISS for EC=0x13 is defined as UNK/SBZP + * (ARM DDI 0406C.c page B3-1431). UNK/SBZP means that hardware implements + * this field as Read-As-Zero. ARMv8 is backwards compatible with ARMv7: + * reading CCKNOWNPASS on ARMv7 will return 0, which means that condition + * check was passed or instruction was unconditional. + */ + struct hsr_smc32 { + unsigned long res0:19; /* Reserved */ + unsigned long ccknownpass:1; /* Instruction passed conditional check */ + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } smc32; /* HSR_EC_SMC32 */ + +#ifdef CONFIG_ARM_64 + struct hsr_sysreg { + unsigned long read:1; /* Direction */ + unsigned long crm:4; /* CRm */ + unsigned long reg:5; /* Rt */ + unsigned long crn:4; /* CRn */ + unsigned long op1:3; /* Op1 */ + unsigned long op2:3; /* Op2 */ + unsigned long op0:2; /* Op0 */ + unsigned long res0:3; + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; + } sysreg; /* HSR_EC_SYSREG */ +#endif + + struct hsr_iabt { + unsigned long ifsc:6; /* Instruction fault status code */ + unsigned long res0:1; /* RES0 */ + unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ + unsigned long res1:1; /* RES0 */ + unsigned long eat:1; /* External abort type */ + unsigned long fnv:1; /* FAR not Valid */ + unsigned long res2:14; + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } iabt; /* HSR_EC_INSTR_ABORT_* */ + + struct hsr_dabt { + unsigned long dfsc:6; /* Data Fault Status Code */ + unsigned long write:1; /* Write / not Read */ + unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ + unsigned long cache:1; /* Cache Maintenance */ + unsigned long eat:1; /* External Abort Type */ + unsigned long fnv:1; /* FAR not Valid */ +#ifdef CONFIG_ARM_32 + unsigned long sbzp0:5; +#else + unsigned long sbzp0:3; + unsigned long ar:1; /* Acquire Release */ + unsigned long sf:1; /* Sixty Four bit register */ +#endif + unsigned long reg:5; /* Register */ + unsigned long sign:1; /* Sign extend */ + unsigned long size:2; /* Access Size */ + unsigned long valid:1; /* Syndrome Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } dabt; /* HSR_EC_DATA_ABORT_* */ + + /* Contain the common bits between DABT and IABT */ + struct hsr_xabt { + unsigned long fsc:6; /* Fault status code */ + unsigned long pad1:1; /* Not common */ + unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ + unsigned long pad2:1; /* Not common */ + unsigned long eat:1; /* External abort type */ + unsigned long fnv:1; /* FAR not Valid */ + unsigned long pad3:14; /* Not common */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } xabt; + +#ifdef CONFIG_ARM_64 + struct hsr_brk { + unsigned long comment:16; /* Comment */ + unsigned long res0:9; + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } brk; +#endif +}; + +/* HSR.EC == HSR_CP{15,14,10}_32 */ +#define HSR_CP32_OP2_MASK (0x000e0000) +#define HSR_CP32_OP2_SHIFT (17) +#define HSR_CP32_OP1_MASK (0x0001c000) +#define HSR_CP32_OP1_SHIFT (14) +#define HSR_CP32_CRN_MASK (0x00003c00) +#define HSR_CP32_CRN_SHIFT (10) +#define HSR_CP32_CRM_MASK (0x0000001e) +#define HSR_CP32_CRM_SHIFT (1) +#define HSR_CP32_REGS_MASK (HSR_CP32_OP1_MASK|HSR_CP32_OP2_MASK|\ + HSR_CP32_CRN_MASK|HSR_CP32_CRM_MASK) + +/* HSR.EC == HSR_CP{15,14}_64 */ +#define HSR_CP64_OP1_MASK (0x000f0000) +#define HSR_CP64_OP1_SHIFT (16) +#define HSR_CP64_CRM_MASK (0x0000001e) +#define HSR_CP64_CRM_SHIFT (1) +#define HSR_CP64_REGS_MASK (HSR_CP64_OP1_MASK|HSR_CP64_CRM_MASK) + +/* HSR.EC == HSR_SYSREG */ +#define HSR_SYSREG_OP0_MASK (0x00300000) +#define HSR_SYSREG_OP0_SHIFT (20) +#define HSR_SYSREG_OP1_MASK (0x0001c000) +#define HSR_SYSREG_OP1_SHIFT (14) +#define HSR_SYSREG_CRN_MASK (0x00003c00) +#define HSR_SYSREG_CRN_SHIFT (10) +#define HSR_SYSREG_CRM_MASK (0x0000001e) +#define HSR_SYSREG_CRM_SHIFT (1) +#define HSR_SYSREG_OP2_MASK (0x000e0000) +#define HSR_SYSREG_OP2_SHIFT (17) +#define HSR_SYSREG_REGS_MASK (HSR_SYSREG_OP0_MASK|HSR_SYSREG_OP1_MASK|\ + HSR_SYSREG_CRN_MASK|HSR_SYSREG_CRM_MASK|\ + HSR_SYSREG_OP2_MASK) + +/* HSR.EC == HSR_{HVC32, HVC64, SMC64, SVC32, SVC64} */ +#define HSR_XXC_IMM_MASK (0xffff) + +#endif /* __ASM_ARM_HSR_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/include/asm-arm/mmio.h b/xen/include/asm-arm/mmio.h index c8dadb5006..3ed3f82bf7 100644 --- a/xen/include/asm-arm/mmio.h +++ b/xen/include/asm-arm/mmio.h @@ -21,6 +21,8 @@ #include #include + +#include #include #include diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 3f40468bfd..b64ea4e8e4 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -353,207 +353,8 @@ extern register_t __cpu_logical_map[]; #define cpu_logical_map(cpu) __cpu_logical_map[cpu] -/* HSR data abort size definition */ -enum dabt_size { - DABT_BYTE = 0, - DABT_HALF_WORD = 1, - DABT_WORD = 2, - DABT_DOUBLE_WORD = 3, -}; - -union hsr { - uint32_t bits; - struct { - unsigned long iss:25; /* Instruction Specific Syndrome */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - }; - - /* Common to all conditional exception classes (0x0N, except 0x00). */ - struct hsr_cond { - unsigned long iss:20; /* Instruction Specific Syndrome */ - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } cond; - - struct hsr_wfi_wfe { - unsigned long ti:1; /* Trapped instruction */ - unsigned long sbzp:19; - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } wfi_wfe; - - /* reg, reg0, reg1 are 4 bits on AArch32, the fifth bit is sbzp. */ - struct hsr_cp32 { - unsigned long read:1; /* Direction */ - unsigned long crm:4; /* CRm */ - unsigned long reg:5; /* Rt */ - unsigned long crn:4; /* CRn */ - unsigned long op1:3; /* Op1 */ - unsigned long op2:3; /* Op2 */ - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } cp32; /* HSR_EC_CP15_32, CP14_32, CP10 */ - - struct hsr_cp64 { - unsigned long read:1; /* Direction */ - unsigned long crm:4; /* CRm */ - unsigned long reg1:5; /* Rt1 */ - unsigned long reg2:5; /* Rt2 */ - unsigned long sbzp2:1; - unsigned long op1:4; /* Op1 */ - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } cp64; /* HSR_EC_CP15_64, HSR_EC_CP14_64 */ - - struct hsr_cp { - unsigned long coproc:4; /* Number of coproc accessed */ - unsigned long sbz0p:1; - unsigned long tas:1; /* Trapped Advanced SIMD */ - unsigned long res0:14; - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } cp; /* HSR_EC_CP */ - - /* - * This encoding is valid only for ARMv8 (ARM DDI 0487B.a, pages D7-2271 and - * G6-4957). On ARMv7, encoding ISS for EC=0x13 is defined as UNK/SBZP - * (ARM DDI 0406C.c page B3-1431). UNK/SBZP means that hardware implements - * this field as Read-As-Zero. ARMv8 is backwards compatible with ARMv7: - * reading CCKNOWNPASS on ARMv7 will return 0, which means that condition - * check was passed or instruction was unconditional. - */ - struct hsr_smc32 { - unsigned long res0:19; /* Reserved */ - unsigned long ccknownpass:1; /* Instruction passed conditional check */ - unsigned long cc:4; /* Condition Code */ - unsigned long ccvalid:1;/* CC Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } smc32; /* HSR_EC_SMC32 */ - -#ifdef CONFIG_ARM_64 - struct hsr_sysreg { - unsigned long read:1; /* Direction */ - unsigned long crm:4; /* CRm */ - unsigned long reg:5; /* Rt */ - unsigned long crn:4; /* CRn */ - unsigned long op1:3; /* Op1 */ - unsigned long op2:3; /* Op2 */ - unsigned long op0:2; /* Op0 */ - unsigned long res0:3; - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; - } sysreg; /* HSR_EC_SYSREG */ -#endif - - struct hsr_iabt { - unsigned long ifsc:6; /* Instruction fault status code */ - unsigned long res0:1; /* RES0 */ - unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ - unsigned long res1:1; /* RES0 */ - unsigned long eat:1; /* External abort type */ - unsigned long fnv:1; /* FAR not Valid */ - unsigned long res2:14; - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } iabt; /* HSR_EC_INSTR_ABORT_* */ - - struct hsr_dabt { - unsigned long dfsc:6; /* Data Fault Status Code */ - unsigned long write:1; /* Write / not Read */ - unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ - unsigned long cache:1; /* Cache Maintenance */ - unsigned long eat:1; /* External Abort Type */ - unsigned long fnv:1; /* FAR not Valid */ -#ifdef CONFIG_ARM_32 - unsigned long sbzp0:5; -#else - unsigned long sbzp0:3; - unsigned long ar:1; /* Acquire Release */ - unsigned long sf:1; /* Sixty Four bit register */ -#endif - unsigned long reg:5; /* Register */ - unsigned long sign:1; /* Sign extend */ - unsigned long size:2; /* Access Size */ - unsigned long valid:1; /* Syndrome Valid */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } dabt; /* HSR_EC_DATA_ABORT_* */ - - /* Contain the common bits between DABT and IABT */ - struct hsr_xabt { - unsigned long fsc:6; /* Fault status code */ - unsigned long pad1:1; /* Not common */ - unsigned long s1ptw:1; /* Stage 2 fault during stage 1 translation */ - unsigned long pad2:1; /* Not common */ - unsigned long eat:1; /* External abort type */ - unsigned long fnv:1; /* FAR not Valid */ - unsigned long pad3:14; /* Not common */ - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } xabt; - -#ifdef CONFIG_ARM_64 - struct hsr_brk { - unsigned long comment:16; /* Comment */ - unsigned long res0:9; - unsigned long len:1; /* Instruction length */ - unsigned long ec:6; /* Exception Class */ - } brk; -#endif - - -}; #endif -/* HSR.EC == HSR_CP{15,14,10}_32 */ -#define HSR_CP32_OP2_MASK (0x000e0000) -#define HSR_CP32_OP2_SHIFT (17) -#define HSR_CP32_OP1_MASK (0x0001c000) -#define HSR_CP32_OP1_SHIFT (14) -#define HSR_CP32_CRN_MASK (0x00003c00) -#define HSR_CP32_CRN_SHIFT (10) -#define HSR_CP32_CRM_MASK (0x0000001e) -#define HSR_CP32_CRM_SHIFT (1) -#define HSR_CP32_REGS_MASK (HSR_CP32_OP1_MASK|HSR_CP32_OP2_MASK|\ - HSR_CP32_CRN_MASK|HSR_CP32_CRM_MASK) - -/* HSR.EC == HSR_CP{15,14}_64 */ -#define HSR_CP64_OP1_MASK (0x000f0000) -#define HSR_CP64_OP1_SHIFT (16) -#define HSR_CP64_CRM_MASK (0x0000001e) -#define HSR_CP64_CRM_SHIFT (1) -#define HSR_CP64_REGS_MASK (HSR_CP64_OP1_MASK|HSR_CP64_CRM_MASK) - -/* HSR.EC == HSR_SYSREG */ -#define HSR_SYSREG_OP0_MASK (0x00300000) -#define HSR_SYSREG_OP0_SHIFT (20) -#define HSR_SYSREG_OP1_MASK (0x0001c000) -#define HSR_SYSREG_OP1_SHIFT (14) -#define HSR_SYSREG_CRN_MASK (0x00003c00) -#define HSR_SYSREG_CRN_SHIFT (10) -#define HSR_SYSREG_CRM_MASK (0x0000001e) -#define HSR_SYSREG_CRM_SHIFT (1) -#define HSR_SYSREG_OP2_MASK (0x000e0000) -#define HSR_SYSREG_OP2_SHIFT (17) -#define HSR_SYSREG_REGS_MASK (HSR_SYSREG_OP0_MASK|HSR_SYSREG_OP1_MASK|\ - HSR_SYSREG_CRN_MASK|HSR_SYSREG_CRM_MASK|\ - HSR_SYSREG_OP2_MASK) - -/* HSR.EC == HSR_{HVC32, HVC64, SMC64, SVC32, SVC64} */ -#define HSR_XXC_IMM_MASK (0xffff) - /* Physical Address Register */ #define PAR_F (_AC(1,U)<<0) diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h index a0406b5a3c..589fba9cd0 100644 --- a/xen/include/asm-arm/traps.h +++ b/xen/include/asm-arm/traps.h @@ -1,6 +1,7 @@ #ifndef __ASM_ARM_TRAPS__ #define __ASM_ARM_TRAPS__ +#include #include #if defined(CONFIG_ARM_32) From patchwork Wed Oct 31 18:13:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149853 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126734ljp; Wed, 31 Oct 2018 11:15:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5c8CFlRQsSJ52aeds3/+PfX66Fb9EoMYollAhnUa9wQ5p8dq3K0yaWNMI4hJvDUUlQIt8z6 X-Received: by 2002:a0d:e28c:: with SMTP id l134-v6mr4184946ywe.242.1541009745146; Wed, 31 Oct 2018 11:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009745; cv=none; d=google.com; s=arc-20160816; b=q9eKC/I+ChkWvj1/jhcv4kmYtOzeSLljEbt8i7WuJZ+L0PzSn4aUMDuyMegPOvfPyM npuKXSf2EAwSdtm2L6F3L/JB/K8yiXP4HXJtHv5DfQQWJy52CR9Juz2pi1GYmBhR1Ojx Y3qZxvz2L7Ta/V7CAEffxH8nzPMzzfrquwgz55o1btRxszShSb3GJGztlzOM0Sm6DEqi HS/Zgd3cG0bOSGemnFUPIySZmgtyC8LCHFvEqnGH0f7sCCk0R59DlKcBEGGInkq6supb BPhrOMsg3DlA4SgEXwlGjkl1MG1mwt8pbcOfwiZPdwiM90QWTZVoMkUMX72OylsRSAoD bkiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=WVw5ao68efZ7aBPOVI8VEsWvM58ND7SaCN5GChDsKko=; b=vXSeJA4qd05GwQkTCuDCtCjQbtSgH3DSLly/aEfvNEOF93X2M7ve9mXt3WM/iNZRYh rGcpCM4g4ng31hPjDmH9nECJaaybD6FaUfK/vCgTyM+hfsPkL+uAAq3sjj3QxxfHn9qZ 34xygkymwEF3GHH5rzhHK52cAbYEqTfSkppvRhC/UdpzG9Y6PX9T082hi03GgIVoFS2f zZNlErFseLwSIhNU2ZvLpkEK1fOTDb+cFSpdJDv6oH9+gaO4bSRfbqngkzJEDXPPV8SV 37Vyd9eYUWAGMkcaaGXvyjEvx5pW47ik45wUeBG+J1cn36+LlY8FLvILtP/6m5gQV6Lq cXpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id j188-v6si5305785ybc.485.2018.10.31.11.15.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzm-0004R7-Fx; Wed, 31 Oct 2018 18:13:34 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzl-0004Py-3i for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:33 +0000 X-Inumbo-ID: acb946f3-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id acb946f3-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:32 +0000 (UTC) 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 EC7C51596; Wed, 31 Oct 2018 11:13:31 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0CD673F6A8; Wed, 31 Oct 2018 11:13:30 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:02 +0000 Message-Id: <20181031181313.8028-11-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 10/21] xen/arm: Move SYSREG accessors in sysregs.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" System registers accessors are self-contained and should not be included everywhere in Xen. Move the accessors in sysregs.h and include the file when necessary. With that change, it is not necessary to include processor.h in time.h. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/arm32/entry.S | 1 + xen/arch/arm/arm32/proc-v7.S | 1 + xen/arch/arm/gic-v3-lpi.c | 1 + xen/arch/arm/gic-v3.c | 1 + xen/include/asm-arm/arm32/processor.h | 62 ----------------------------- xen/include/asm-arm/arm32/sysregs.h | 74 +++++++++++++++++++++++++++++++++++ xen/include/asm-arm/arm64/processor.h | 25 ------------ xen/include/asm-arm/arm64/sysregs.h | 23 +++++++++++ xen/include/asm-arm/page.h | 1 + xen/include/asm-arm/percpu.h | 8 +--- xen/include/asm-arm/sysregs.h | 22 +++++++++++ xen/include/asm-arm/time.h | 2 +- 12 files changed, 126 insertions(+), 95 deletions(-) create mode 100644 xen/include/asm-arm/arm32/sysregs.h create mode 100644 xen/include/asm-arm/sysregs.h diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/arm/arm32/entry.S index f6908e3f16..0b4cd19abd 100644 --- a/xen/arch/arm/arm32/entry.S +++ b/xen/arch/arm/arm32/entry.S @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/xen/arch/arm/arm32/proc-v7.S b/xen/arch/arm/arm32/proc-v7.S index 2f3ff1e6c9..80a250d8e8 100644 --- a/xen/arch/arm/arm32/proc-v7.S +++ b/xen/arch/arm/arm32/proc-v7.S @@ -19,6 +19,7 @@ #include #include +#include ca15mp_init: ca7mp_init: diff --git a/xen/arch/arm/gic-v3-lpi.c b/xen/arch/arm/gic-v3-lpi.c index efd5cd62fb..e8c6e159ca 100644 --- a/xen/arch/arm/gic-v3-lpi.c +++ b/xen/arch/arm/gic-v3-lpi.c @@ -30,6 +30,7 @@ #include #include #include +#include /* * There could be a lot of LPIs on the host side, and they always go to diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index a7ce94789c..264a981bab 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -42,6 +42,7 @@ #include #include #include +#include /* Global state */ static struct { diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h index fb330812af..4e679f3273 100644 --- a/xen/include/asm-arm/arm32/processor.h +++ b/xen/include/asm-arm/arm32/processor.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_ARM32_PROCESSOR_H #define __ASM_ARM_ARM32_PROCESSOR_H -#include - #define ACTLR_CAXX_SMP (1<<6) #ifndef __ASSEMBLY__ @@ -60,66 +58,6 @@ struct cpu_user_regs #endif -/* Layout as used in assembly, with src/dest registers mixed in */ -#define __CP32(r, coproc, opc1, crn, crm, opc2) coproc, opc1, r, crn, crm, opc2 -#define __CP64(r1, r2, coproc, opc, crm) coproc, opc, r1, r2, crm -#define CP32(r, name...) __CP32(r, name) -#define CP64(r, name...) __CP64(r, name) - -/* Stringified for inline assembly */ -#define LOAD_CP32(r, name...) "mrc " __stringify(CP32(%r, name)) ";" -#define STORE_CP32(r, name...) "mcr " __stringify(CP32(%r, name)) ";" -#define LOAD_CP64(r, name...) "mrrc " __stringify(CP64(%r, %H##r, name)) ";" -#define STORE_CP64(r, name...) "mcrr " __stringify(CP64(%r, %H##r, name)) ";" - -/* Issue a CP operation which takes no argument, - * uses r0 as a placeholder register. */ -#define CMD_CP32(name...) "mcr " __stringify(CP32(r0, name)) ";" - -#ifndef __ASSEMBLY__ - -/* C wrappers */ -#define READ_CP32(name...) ({ \ - register uint32_t _r; \ - asm volatile(LOAD_CP32(0, name) : "=r" (_r)); \ - _r; }) - -#define WRITE_CP32(v, name...) do { \ - register uint32_t _r = (v); \ - asm volatile(STORE_CP32(0, name) : : "r" (_r)); \ -} while (0) - -#define READ_CP64(name...) ({ \ - register uint64_t _r; \ - asm volatile(LOAD_CP64(0, name) : "=r" (_r)); \ - _r; }) - -#define WRITE_CP64(v, name...) do { \ - register uint64_t _r = (v); \ - asm volatile(STORE_CP64(0, name) : : "r" (_r)); \ -} while (0) - -/* - * C wrappers for accessing system registers. - * - * Registers come in 3 types: - * - those which are always 32-bit regardless of AArch32 vs AArch64 - * (use {READ,WRITE}_SYSREG32). - * - those which are always 64-bit regardless of AArch32 vs AArch64 - * (use {READ,WRITE}_SYSREG64). - * - those which vary between AArch32 and AArch64 (use {READ,WRITE}_SYSREG). - */ -#define READ_SYSREG32(R...) READ_CP32(R) -#define WRITE_SYSREG32(V, R...) WRITE_CP32(V, R) - -#define READ_SYSREG64(R...) READ_CP64(R) -#define WRITE_SYSREG64(V, R...) WRITE_CP64(V, R) - -#define READ_SYSREG(R...) READ_SYSREG32(R) -#define WRITE_SYSREG(V, R...) WRITE_SYSREG32(V, R) - -#endif /* __ASSEMBLY__ */ - #endif /* __ASM_ARM_ARM32_PROCESSOR_H */ /* * Local variables: diff --git a/xen/include/asm-arm/arm32/sysregs.h b/xen/include/asm-arm/arm32/sysregs.h new file mode 100644 index 0000000000..b25b59a557 --- /dev/null +++ b/xen/include/asm-arm/arm32/sysregs.h @@ -0,0 +1,74 @@ +#ifndef __ASM_ARM_ARM32_SYSREGS_H +#define __ASM_ARM_ARM32_SYSREGS_H + +#include + +/* Layout as used in assembly, with src/dest registers mixed in */ +#define __CP32(r, coproc, opc1, crn, crm, opc2) coproc, opc1, r, crn, crm, opc2 +#define __CP64(r1, r2, coproc, opc, crm) coproc, opc, r1, r2, crm +#define CP32(r, name...) __CP32(r, name) +#define CP64(r, name...) __CP64(r, name) + +/* Stringified for inline assembly */ +#define LOAD_CP32(r, name...) "mrc " __stringify(CP32(%r, name)) ";" +#define STORE_CP32(r, name...) "mcr " __stringify(CP32(%r, name)) ";" +#define LOAD_CP64(r, name...) "mrrc " __stringify(CP64(%r, %H##r, name)) ";" +#define STORE_CP64(r, name...) "mcrr " __stringify(CP64(%r, %H##r, name)) ";" + +/* Issue a CP operation which takes no argument, + * uses r0 as a placeholder register. */ +#define CMD_CP32(name...) "mcr " __stringify(CP32(r0, name)) ";" + +#ifndef __ASSEMBLY__ + +/* C wrappers */ +#define READ_CP32(name...) ({ \ + register uint32_t _r; \ + asm volatile(LOAD_CP32(0, name) : "=r" (_r)); \ + _r; }) + +#define WRITE_CP32(v, name...) do { \ + register uint32_t _r = (v); \ + asm volatile(STORE_CP32(0, name) : : "r" (_r)); \ +} while (0) + +#define READ_CP64(name...) ({ \ + register uint64_t _r; \ + asm volatile(LOAD_CP64(0, name) : "=r" (_r)); \ + _r; }) + +#define WRITE_CP64(v, name...) do { \ + register uint64_t _r = (v); \ + asm volatile(STORE_CP64(0, name) : : "r" (_r)); \ +} while (0) + +/* + * C wrappers for accessing system registers. + * + * Registers come in 3 types: + * - those which are always 32-bit regardless of AArch32 vs AArch64 + * (use {READ,WRITE}_SYSREG32). + * - those which are always 64-bit regardless of AArch32 vs AArch64 + * (use {READ,WRITE}_SYSREG64). + * - those which vary between AArch32 and AArch64 (use {READ,WRITE}_SYSREG). + */ +#define READ_SYSREG32(R...) READ_CP32(R) +#define WRITE_SYSREG32(V, R...) WRITE_CP32(V, R) + +#define READ_SYSREG64(R...) READ_CP64(R) +#define WRITE_SYSREG64(V, R...) WRITE_CP64(V, R) + +#define READ_SYSREG(R...) READ_SYSREG32(R) +#define WRITE_SYSREG(V, R...) WRITE_SYSREG32(V, R) + +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_ARM_ARM32_SYSREGS_H */ +/* + * 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/processor.h b/xen/include/asm-arm/arm64/processor.h index c18ab7203d..765de1b74b 100644 --- a/xen/include/asm-arm/arm64/processor.h +++ b/xen/include/asm-arm/arm64/processor.h @@ -3,8 +3,6 @@ #include -#include - #ifndef __ASSEMBLY__ /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */ @@ -89,29 +87,6 @@ struct cpu_user_regs #undef __DECL_REG -/* Access to system registers */ - -#define READ_SYSREG32(name) ({ \ - uint32_t _r; \ - asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \ - _r; }) -#define WRITE_SYSREG32(v, name) do { \ - uint32_t _r = v; \ - asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \ -} while (0) - -#define WRITE_SYSREG64(v, name) do { \ - uint64_t _r = v; \ - asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \ -} while (0) -#define READ_SYSREG64(name) ({ \ - uint64_t _r; \ - asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \ - _r; }) - -#define READ_SYSREG(name) READ_SYSREG64(name) -#define WRITE_SYSREG(v, name) WRITE_SYSREG64(v, name) - #endif /* __ASSEMBLY__ */ #endif /* __ASM_ARM_ARM64_PROCESSOR_H */ diff --git a/xen/include/asm-arm/arm64/sysregs.h b/xen/include/asm-arm/arm64/sysregs.h index f510925a2a..08585a969e 100644 --- a/xen/include/asm-arm/arm64/sysregs.h +++ b/xen/include/asm-arm/arm64/sysregs.h @@ -57,6 +57,29 @@ #define ICH_AP1R2_EL2 __AP1Rx_EL2(2) #define ICH_AP1R3_EL2 __AP1Rx_EL2(3) +/* Access to system registers */ + +#define READ_SYSREG32(name) ({ \ + uint32_t _r; \ + asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \ + _r; }) +#define WRITE_SYSREG32(v, name) do { \ + uint32_t _r = v; \ + asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \ +} while (0) + +#define WRITE_SYSREG64(v, name) do { \ + uint64_t _r = v; \ + asm volatile("msr "__stringify(name)", %0" : : "r" (_r)); \ +} while (0) +#define READ_SYSREG64(name) ({ \ + uint64_t _r; \ + asm volatile("mrs %0, "__stringify(name) : "=r" (_r)); \ + _r; }) + +#define READ_SYSREG(name) READ_SYSREG64(name) +#define WRITE_SYSREG(v, name) WRITE_SYSREG64(v, name) + #endif /* _ASM_ARM_ARM64_SYSREGS_H */ /* diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h index bcdea970ca..1a1713ce02 100644 --- a/xen/include/asm-arm/page.h +++ b/xen/include/asm-arm/page.h @@ -4,6 +4,7 @@ #include #include #include +#include #ifdef CONFIG_ARM_64 #define PADDR_BITS 48 diff --git a/xen/include/asm-arm/percpu.h b/xen/include/asm-arm/percpu.h index cdf64e0f77..6263e77251 100644 --- a/xen/include/asm-arm/percpu.h +++ b/xen/include/asm-arm/percpu.h @@ -4,13 +4,7 @@ #ifndef __ASSEMBLY__ #include -#if defined(CONFIG_ARM_32) -# include -#elif defined(CONFIG_ARM_64) -# include -#else -# error "unknown ARM variant" -#endif +#include extern char __per_cpu_start[], __per_cpu_data_end[]; extern unsigned long __per_cpu_offset[NR_CPUS]; diff --git a/xen/include/asm-arm/sysregs.h b/xen/include/asm-arm/sysregs.h new file mode 100644 index 0000000000..5c5c51bbcd --- /dev/null +++ b/xen/include/asm-arm/sysregs.h @@ -0,0 +1,22 @@ +#ifndef __ASM_ARM_SYSREGS_H +#define __ASM_ARM_SYSREGS_H + +#if defined(CONFIG_ARM_32) +# include +#elif defined(CONFIG_ARM_64) +# include +#else +# error "unknown ARM variant" +#endif + +#endif /* __ASM_ARM_SYSREGS_H */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ + + diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h index ea88e76304..9a7071a546 100644 --- a/xen/include/asm-arm/time.h +++ b/xen/include/asm-arm/time.h @@ -1,7 +1,7 @@ #ifndef __ARM_TIME_H__ #define __ARM_TIME_H__ -#include +#include #define DT_MATCH_TIMER \ DT_MATCH_COMPATIBLE("arm,armv7-timer"), \ From patchwork Wed Oct 31 18:13:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149858 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127088ljp; Wed, 31 Oct 2018 11:16:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5cVKTTMXFhkQeij+Gff8+u+8lLsjrl99bIWEf3kh+aKm3pGAUC1rsPf6Cw1rsNA5dJOogNa X-Received: by 2002:a81:9301:: with SMTP id k1-v6mr4192992ywg.507.1541009763633; Wed, 31 Oct 2018 11:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009763; cv=none; d=google.com; s=arc-20160816; b=qCIqAkaIAppA2kgMe4ugRiR7BSB/z/LKxiJfZJXvf4pP89H3bVWwZ7l2hap5qtWj1V E3JCOC2IFVlX7Doa8vBkunyL5C08b0P585LTACc5HOiuek3BpgMZOVUuada5itXwp6+P zVLCPxmWZfDKwY6eBM/rDeJTsvpd6qVyRKN5V+VffNXEarWPn1rIH5og2LK6uST94EIa snVOC6icqDUHOfI/jN0aVQ1BvCV3AYWIXQANunFkJSUK4We5z/8Ho6a3/shrowPrF+2W kIn79fxZACyfdy2HoPTOXmpCkFkCIM+8E7eNHcZ7IhLa7+EkPZybu7IOzkE93Pqf4O4l Oe7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=YZwE6okKBbUdwGJPcdn393QdYQcJYZfxS/voaZapgH4=; b=bc91wEz3JBb+rHKk7e0EPcEyN4ErexHAyotUsZNcRfgXa0gA8YpxrSqZpFKcgLM96n 3edLseGakXMtHx+z3KqQH1293/d0ig8xCj0YaTPb4PegHTsBkmBK80SndNc5m40j2Qij XLO97xmgylvmlEpD/57fdsULiSHhKZZqVO9xK6V0WxuwwJDtELY+bsAvH67qenIa1hv8 H6aNQjLOFXoXtpEVqR51vYBXP08w6DB7RVY6nZ13qZO/BkpO1rRs0kr7r5Sn8A0UtTF5 JMFBQweXrLOBR9N7sISCtrKPKWqXCqqjkRgyL1MCHXOnH39gEMlpKNU0SlGRojjjAFcM FptA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id m68-v6si11126179yba.320.2018.10.31.11.16.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzn-0004SJ-Ud; Wed, 31 Oct 2018 18:13:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzm-0004QV-2X for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:34 +0000 X-Inumbo-ID: ad84f474-dd38-11e8-b347-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id ad84f474-dd38-11e8-b347-12d6303a7972; Wed, 31 Oct 2018 18:13:33 +0000 (UTC) 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 20BCF80D; Wed, 31 Oct 2018 11:13:33 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 358643F6A8; Wed, 31 Oct 2018 11:13:32 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:03 +0000 Message-Id: <20181031181313.8028-12-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 11/21] xen/arm: Move out of processor.h traps related variable/function X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" do_unexpected_traps() is moved to traps.h while init_traps() and hyp_traps_vectors() are moved to setup.h. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Rebase - Add Andrii's reviewed-by --- xen/include/asm-arm/processor.h | 7 ------- xen/include/asm-arm/setup.h | 3 +++ xen/include/asm-arm/traps.h | 3 +++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index b64ea4e8e4..72ddc42778 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -453,10 +453,6 @@ extern register_t __cpu_logical_map[]; #endif #ifndef __ASSEMBLY__ -extern uint32_t hyp_traps_vector[]; - -void init_traps(void); - void panic_PAR(uint64_t par); void show_execution_state(const struct cpu_user_regs *regs); @@ -470,9 +466,6 @@ void show_registers(const struct cpu_user_regs *regs); #define cpu_to_core(_cpu) (0) #define cpu_to_socket(_cpu) (0) -void noreturn do_unexpected_trap(const char *msg, - const struct cpu_user_regs *regs); - struct vcpu; void vcpu_regs_hyp_to_user(const struct vcpu *vcpu, struct vcpu_guest_core_regs *regs); diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h index 5f41ba0cba..11e1b2aacf 100644 --- a/xen/include/asm-arm/setup.h +++ b/xen/include/asm-arm/setup.h @@ -83,6 +83,9 @@ struct bootmodule *add_boot_module(bootmodule_kind kind, struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); const char *boot_module_kind_as_string(bootmodule_kind kind); +extern uint32_t hyp_traps_vector[]; +void init_traps(void); + #endif /* * Local variables: diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h index 589fba9cd0..6d8a43a691 100644 --- a/xen/include/asm-arm/traps.h +++ b/xen/include/asm-arm/traps.h @@ -46,6 +46,9 @@ void do_trap_hvc_smccc(struct cpu_user_regs *regs); int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); +void noreturn do_unexpected_trap(const char *msg, + const struct cpu_user_regs *regs); + /* Functions for pending virtual abort checking window. */ void abort_guest_exit_start(void); void abort_guest_exit_end(void); From patchwork Wed Oct 31 18:13:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149857 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127034ljp; Wed, 31 Oct 2018 11:16:00 -0700 (PDT) X-Google-Smtp-Source: AJdET5ddDZ5Kal2W+5PS7+he7BcrGRv2dUt3vpslcF5MKs4mK3r78m4pGS2kL/yNx+UuQTJ0adfn X-Received: by 2002:a81:5a89:: with SMTP id o131-v6mr4262701ywb.121.1541009760048; Wed, 31 Oct 2018 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009760; cv=none; d=google.com; s=arc-20160816; b=hWogt8gn0gjWTjJWXNUOY5vHGHg9XYeIjTanAYTqEp1wO4DHFY2OHFRo5nLqH4rniS acK12eziMOiUCqBGvY2qXtDlei9JBc12CFacFB2rc9dyhz8hJAUOYIRl+YpC/qJZiQIH Ac1HQwnpWiKtgC3toEwvVlqTMEjA8xkhLOHKuohExb/e9UZ26GCvOXX7Q98x/Gz/48Po 77tpthloPcUJGIcp1ZkB0CeKH33+ZIWMmL7WCkTdC4teByARW7LKs+CSWH2ui2GfZjEt mQjELg5glUxcmeseJt94lMabRw/8WtxpK+ezlWHvZUPcQS2ggbiSORTl3fkcfamrOzkQ JKpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=8sSiuCKCjeYkFYpqGAr3M6ty9WKQcGStwKm2fYNL9TY=; b=Q/QHPuf1KD169T244lvdV9Mr7b/ZlUKWu9Wx1R+Vzh9r5PCmuO8IoAz+/W6s++ukLg hY7U763Q3bgCtB4W1sLQWcr+ayYihExmByU/A4dB88gDyMTZXSRXhTeFOZ6FmHuPpcMm OpchozWpWjXo4S2S/mfYIKADiu7h1oq4Gmh//kO+THo7O9mZw7x4DcVBLCZjLC4kFbnh 3atgPt9IZRMKOhYTJFctnPvVubI+8eCzzTrA+kZq5/ehE9SvGV2OznUJkhTWhzaghmxf 5p1O3wYxJXMPu+3WKGe0tPIEMXEVpz/cqwQSf9VwHUx8G8euCoxu4u62DGFq2Gs1JFKu Yu7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id v189-v6si18641330ybb.434.2018.10.31.11.15.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzo-0004Sg-BI; Wed, 31 Oct 2018 18:13:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzn-0004Ra-8k for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:35 +0000 X-Inumbo-ID: ae2b84ce-dd38-11e8-82cf-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id ae2b84ce-dd38-11e8-82cf-12d6303a7972; Wed, 31 Oct 2018 18:13:34 +0000 (UTC) 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 495FF1596; Wed, 31 Oct 2018 11:13:34 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5DF673F6A8; Wed, 31 Oct 2018 11:13:33 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:04 +0000 Message-Id: <20181031181313.8028-13-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 12/21] xen/arm: Only include stringify.h when necessary X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/arm32/sysregs.h | 1 + xen/include/asm-arm/arm64/processor.h | 2 -- xen/include/asm-arm/cpregs.h | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/include/asm-arm/arm32/sysregs.h b/xen/include/asm-arm/arm32/sysregs.h index b25b59a557..25cdcbfa4e 100644 --- a/xen/include/asm-arm/arm32/sysregs.h +++ b/xen/include/asm-arm/arm32/sysregs.h @@ -1,6 +1,7 @@ #ifndef __ASM_ARM_ARM32_SYSREGS_H #define __ASM_ARM_ARM32_SYSREGS_H +#include #include /* Layout as used in assembly, with src/dest registers mixed in */ diff --git a/xen/include/asm-arm/arm64/processor.h b/xen/include/asm-arm/arm64/processor.h index 765de1b74b..81dfc5e615 100644 --- a/xen/include/asm-arm/arm64/processor.h +++ b/xen/include/asm-arm/arm64/processor.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_ARM64_PROCESSOR_H #define __ASM_ARM_ARM64_PROCESSOR_H -#include - #ifndef __ASSEMBLY__ /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */ diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h index 07e5791983..97a3c6f1c1 100644 --- a/xen/include/asm-arm/cpregs.h +++ b/xen/include/asm-arm/cpregs.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_CPREGS_H #define __ASM_ARM_CPREGS_H -#include - /* * AArch32 Co-processor registers. * From patchwork Wed Oct 31 18:13:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149849 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126566ljp; Wed, 31 Oct 2018 11:15:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5cmBwZihtSG75XP69Km2ql0PtTbRXpMoLCWAIC7F/3vpqR+VHZX6yJbT3pB9VbWK9YrzaSz X-Received: by 2002:a25:9c85:: with SMTP id y5-v6mr4150031ybo.367.1541009735137; Wed, 31 Oct 2018 11:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009735; cv=none; d=google.com; s=arc-20160816; b=yP318qQGNQBip635d3wa/lOWB0Vozhr5orh9+Av+sss4iapEcewmOmY5mUu7pAty6S qE18HqctCgnyiOHuQteEQl35ASCiiGNscnSdEfATAwnRH9BjSuvJkArNu5Qt91E6hynD s5Fs3YA5WJYaotNd9YwAaQnWjYj1wOQmddwequF5jdkqtdZ+uJ7Xu7689Tti84+IPyxK AwioR8kc69jNEwjVzeR2rGujZA8ersByoMFSoG0VfRll8wYEsIOu5N3tLtoMdf2oTu1P JY9y1FAYg5LnLEz1SM0FDB7dOgcWXcP+zXFlAdwlXHiFT6XsBm4kgX4J7Feyf6dX9XR3 rMUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=9fejFjzSBCGgrrnJOdh6hn06EOmRaBoRtQWZ0YvrwT4=; b=JIMba9JqWp+B0uK/xJBXi5cDih8efECI1nuqmUpC52FNbz7Eo5d2WcfVvaGsro5df/ +tdTS1PfrqGGKd7S2KMQAiD6bRUxgMfGd/CAVGR4EqlGuNnnn3MHhf+KUh4j9fFm+Tmo cQbbL1+SHF6A4+Qubrx7usdIQahRhi7oVVSlNvCQF+ZElfiXwKRyt1Pql85Yg5XwYzMh PydD7JQ2ymUF+eC0dopZRSAiDQDyG28Vj4uAvCPWPtXKN7mKLmVQ7RRjwYSFk6O5OyWJ +uAri62gQofzyQg6u+m4AgsmEqye715CKgjgdJ+2aV2702Dx4gCWjD0aM5uGHghqs1vg jbhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 6-v6si4956767ybt.101.2018.10.31.11.15.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzq-0004Wc-Pz; Wed, 31 Oct 2018 18:13:38 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzp-0004TP-5C for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:37 +0000 X-Inumbo-ID: aee3f88c-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id aee3f88c-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:35 +0000 (UTC) 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 71A3D80D; Wed, 31 Oct 2018 11:13:35 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 865FF3F6A8; Wed, 31 Oct 2018 11:13:34 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:05 +0000 Message-Id: <20181031181313.8028-14-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 13/21] xen/arm: Only include vreg.h when necessary X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/vgic-v2.c | 1 + xen/arch/arm/vgic-v3-its.c | 1 + xen/arch/arm/vpl011.c | 1 + xen/include/asm-arm/vgic.h | 1 - xen/include/asm-arm/vpl011.h | 1 - 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index f6c11f1e41..8526f9be04 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -31,6 +31,7 @@ #include #include #include +#include static struct { bool enabled; diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c index 9edd97c4e7..5b73c4ecd7 100644 --- a/xen/arch/arm/vgic-v3-its.c +++ b/xen/arch/arm/vgic-v3-its.c @@ -45,6 +45,7 @@ #include #include #include +#include /* * Data structure to describe a virtual ITS. diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c index a281eabd7e..117e41c760 100644 --- a/xen/arch/arm/vpl011.c +++ b/xen/arch/arm/vpl011.c @@ -33,6 +33,7 @@ #include #include #include +#include /* * Since pl011 registers are 32-bit registers, all registers diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 374fdaa40d..760392f9ef 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -27,7 +27,6 @@ #include #include #include -#include struct pending_irq { diff --git a/xen/include/asm-arm/vpl011.h b/xen/include/asm-arm/vpl011.h index db95ff822f..a82869a53c 100644 --- a/xen/include/asm-arm/vpl011.h +++ b/xen/include/asm-arm/vpl011.h @@ -21,7 +21,6 @@ #include #include -#include #include /* helper macros */ From patchwork Wed Oct 31 18:13:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149846 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126360ljp; Wed, 31 Oct 2018 11:15:24 -0700 (PDT) X-Google-Smtp-Source: AJdET5dWeJXR8wTmnMzt9mMQ5KghD0t1v/64LlMrbES023B0gDic8UgbWYaYlTgUbS+RfI02Nx9V X-Received: by 2002:a5b:9cb:: with SMTP id y11-v6mr4272743ybq.83.1541009724572; Wed, 31 Oct 2018 11:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009724; cv=none; d=google.com; s=arc-20160816; b=nZY0duoHSXHH7rBoc6jIZr3ZS/QfqinGHwGXZBisur/S3N4g9KKlaixauBIXAJFTYW llS0K+VWWC9AmAeu35TeZo9lhFTNTUI2f6yOboCzby5/V8uiIX+psFbCtiVeoSz98mlU Qwwu/f9WhKxriFyG7vPfr7rtVFVxKOymibvYFw190bJzU3bK56w7rq1Jj0kFoz9sdK1D KfpujOYVtfUlkrDayWnuJaTjw74yaMO6kxPTCuOq3psrGqwa7DroKeYwu/apTRwuK+m6 Jeuxlb/Y3HN41y58lPFsH1s7gxzrQJuqUi1sat1UwNLmjNHbBbMDZGfSEnRhUX92kZyS pwiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=Mmfcew2IufMyU1Nwil8Kz853L2QJMLC0VTCqrxiF1MM=; b=Vttl+Ywf1zphZsdQc6BA9NoHmvd7GEm+QF1K9kSFREtV00DFHmjzGaIFNjPGFmytah Mb+SD3AqkOjit6MNGAVSdU2KF4Q7BpKhzTZEoqYD3KJRKS7/L/HYeUpF9YC7KqqXRhjq PhlGJw9pInhkitapFcD0FdRhzr8QyBMu79ZcWCg3U0oV5ZtGQ8E6LxXtYGbxyBcFd2hb /qPshAuYjymwDSfy80MF9clN+YhWNmXq/bw5prkAT96rcSSt5SD2FjTpdBUgT9PhacvB xI/POb5dO1NqZY0iO9Rff6+aLu6VdXHEXcVxuTabD3WI+hBiKApF/Hw7ywcg7Uy4UoPL cOGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id h63-v6si16845577ywd.75.2018.10.31.11.15.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzr-0004XT-BS; Wed, 31 Oct 2018 18:13:39 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzp-0004Te-DW for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:37 +0000 X-Inumbo-ID: af92111e-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id af92111e-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:36 +0000 (UTC) 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 99F511596; Wed, 31 Oct 2018 11:13:36 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AEB293F6A8; Wed, 31 Oct 2018 11:13:35 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:06 +0000 Message-Id: <20181031181313.8028-15-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 14/21] xen/arm: Remove unnecessary includes in asm/vgic.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/vgic.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 760392f9ef..0316d87f66 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -22,11 +22,8 @@ #include #else -#include #include #include -#include -#include struct pending_irq { From patchwork Wed Oct 31 18:13:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149852 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126640ljp; Wed, 31 Oct 2018 11:15:39 -0700 (PDT) X-Google-Smtp-Source: AJdET5ed6nL9z1KBeC3biVO87xmRmCYVvvXTr9N1RFGM/v7Ze6EPYrCOyudW04rk5lPQ0sf9muWS X-Received: by 2002:a25:d908:: with SMTP id q8-v6mr4226146ybg.469.1541009739112; Wed, 31 Oct 2018 11:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009739; cv=none; d=google.com; s=arc-20160816; b=zPq5tVPCW/1FqfdM1uGucZUwOJiubShcFE38nsX8AWpS/7nnVtUIubxS9E0HKLza96 Jw1jn3D9usF5NTgZ5ZJ7bOBxRg3qo210eGIa7fWHSguNC3/iQiOxPvHJ7+OYEyGUVf60 aoRW/8VMSlFFDcuWmgfLZMFCj4l79lRpEvvO9xwJhBfqw9oE45gVkgnD169cBEzj4TCF rnmt9cver0II9RrEJ5gRwlMN6YywboV74FPWVT7vhh941l+RIypBe9IGLYrjSi22e3sl KBR07bgQTkeY6+i5NVWLjF6bILyXE96QhUHpyRsLcHMNrp7PnLCqDuqj50k75DZmzovN JmGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=lpSYI3QaYNC+GkodGiAGoeWYVpTVribAm1kMm4TvNTw=; b=D4QgqLg/PU4r2ND3upIBctBO64mg9fTX7qdeSYvA2wEO2eBkdtw0F3T40wLpn9W+2N rfu0v/FwQE+wF1i4bfjE35l3sW6gPJXo3qPtfiNtLhZqqyrue5QW2mMdobz5PZ8MWWI3 eqWeeyGgg7gMgLKeV9sO3jyFnwOH8YaBBiFwxIKNrb1U3Z5D2r/F9MCXDYNZHwB4fqBH HhGnm1um/Jx+iY3q/+9/8t1gItY/EYGVEBQGjU57zL4tPcuQbhPdLZxT05XV5tFPmS6F 0YzLohvSC2HdauvNv4Ix/rzU7z2ooowijTXHqSo/Q7Z2gUOcHniZ3vmpWjQ9jfBpgcHV G1Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l16-v6si16493365ybl.418.2018.10.31.11.15.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzr-0004YP-VF; Wed, 31 Oct 2018 18:13:39 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzq-0004WM-Om for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:38 +0000 X-Inumbo-ID: b03dc4c2-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id b03dc4c2-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:38 +0000 (UTC) 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 C233B80D; Wed, 31 Oct 2018 11:13:37 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D71733F6A8; Wed, 31 Oct 2018 11:13:36 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:07 +0000 Message-Id: <20181031181313.8028-16-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 15/21] xen/arm: Remove unnecessary includes in asm/mmio.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/mmio.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/include/asm-arm/mmio.h b/xen/include/asm-arm/mmio.h index 3ed3f82bf7..8dbfb27682 100644 --- a/xen/include/asm-arm/mmio.h +++ b/xen/include/asm-arm/mmio.h @@ -23,8 +23,6 @@ #include #include -#include -#include #define MAX_IO_HANDLER 16 From patchwork Wed Oct 31 18:13:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149860 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127184ljp; Wed, 31 Oct 2018 11:16:09 -0700 (PDT) X-Google-Smtp-Source: AJdET5dX4Lx5v85zp/9ErkDGu92Qz1FzaYRCfXTxVcMueXvspef7dM8HJo2Sk/YxzL97mkgpG8Rv X-Received: by 2002:a81:34d0:: with SMTP id b199-v6mr4066765ywa.322.1541009769657; Wed, 31 Oct 2018 11:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009769; cv=none; d=google.com; s=arc-20160816; b=tZounES3MTZyk5EZB1MYfvZr3uw0t3FQ9NUOFZVFJUTVzfMkuD05sXJAiX9UeYDZFl PYokxm61WudOC1wbygBdwqZwEMR4+8yPY9mQbS1ceLPM2i8qufRsZqrvVHl2co5EzEUg K8pi60U4h1HKVDRxVGgOiShk68vww45UGpOCwlMRI+WtaU7I7WKbXIgjMnqocMtGBcyt jfKKG7MMiiUUvbYwjoZ1ekX/BvH1IxZfpux7iQ+FUbtt3KnNfqg/qdoY5csUDQTpm5/l SQJFrCtyFE7SbVstL+EsHAgQNEcpaG4cOaBGaGhA1T1f4H+Lc+lOdWg8iT1PsdfkHIlF PEsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=uJjGQ//NK4LwJA4+Lgg/wF7/M0YEDvBGoUOllNiRPNM=; b=RTpDjkYFEW8kg8jDN1Qy+KHgtdENf5eAjYN2hyqWfBGRkZ+jv6WxR+ArNLqjMfZyCw vW72DigU4e/FKqqce238NnkVUOYdj7LUEcS2YNXKSPi3Z/wyIvqvVw/XKX0wd0G0D1TQ VYqBNJVOaWcCX8Z6hNmMAFd04RCFo7nOdPJiUqpS0py2ILohyxh49hm75NpGDHL5JnqS KImWFBhCJ8ZtJU3drzWbawm+JV37LGvFL8bmr4Gu1eTKkx4l7GvcTkMznV0G+lToPePa tpvyiucNSIwrC0TgN75+0pI8EvRSE2DV4A4CIf4b5RrUx8znwLPCQKZu5EMBgDfLERf1 Q/aQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g133-v6si17223464ywg.53.2018.10.31.11.16.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzt-0004ag-4E; Wed, 31 Oct 2018 18:13:41 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzr-0004YM-Vr for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:40 +0000 X-Inumbo-ID: b0f0d7fa-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id b0f0d7fa-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:39 +0000 (UTC) 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 EAA561596; Wed, 31 Oct 2018 11:13:38 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0B3883F6A8; Wed, 31 Oct 2018 11:13:37 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:08 +0000 Message-Id: <20181031181313.8028-17-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 16/21] xen/arm: Remove unnecessary includes in traps.c X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Also, include smccc.h instead of psci.h. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/traps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 0b8d342c1a..88ffeeb480 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -42,12 +42,10 @@ #include #include #include -#include #include #include -#include -#include #include +#include #include #include #include From patchwork Wed Oct 31 18:13:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149864 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7128262ljp; Wed, 31 Oct 2018 11:17:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5cZt+HpyZXfNLieGIkvfpjkneNHKDruqTYmnX2lL3uavo54MTZJC6rJsOagvoURw5HC04sv X-Received: by 2002:a81:2156:: with SMTP id h83-v6mr4049237ywh.435.1541009826748; Wed, 31 Oct 2018 11:17:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009826; cv=none; d=google.com; s=arc-20160816; b=xdNXTWecPgZQEFOn5z3waMp3UBhjDTHPDUgcOiFKlQzDNGIyMI8QnAhZNlEhbD5MX7 K/Bbkg1ir5EfwbqNkPFPV9KQNfkbeYQVjo0WNoPBwP4dWdLYCkfloJ8/kkytQrkcLB3q 9ISNgUIrjZ+nqrkzO1QoTHeLaQisVY76eclJnRw50iFVfvVgzrSGqZCD6yZ6cjVofMZm qgOlcEeZP9LwraI4IHewF9qo3abD7B/1Mpm4HipR3w0oiMNoTljbf0JH+UeYEZoGA3NH Lv+OJ3Cbsik2gimPPDWq1SozfMnYDJWZKIZahG65JmmDZaq+rszjEzhtD/RneXAQkcz0 mFPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=Xa1X84wEb9rBawJVYGIHCdraWJCVWzGA1mKn+VsrXzc=; b=t3WjMyYGoEXBZBbjPrJQRO94Izy9kqYFsnLxQWDytczu2qz5E5uSHzZSE1hvi6LN9E yFsjnCFAR9jstGyALtP/vCbFbsxHPUBxRT04mCXP3YjLWXj6YC6QLTXBHv6ZfQ4QNpp3 audDDAcCIzblVj8a+ebgffJqYfm8hjhIcDW1FJgd9/zEdgehPsqxRJuTu/Bm8djS0uuR /1fd/0pZKb4pAfaPpcQ6IrMoiyNAILi3KCLQqr6RKXmv4wM+qt1rW2VXcJAZZ5qaDtKv UcM8We9wembz+V8AoFBeOej/Bt7K2V6mri48pFeJkITOSjU/V1d3QNtdE4xNjpe85IUF g1CA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id m204-v6si17774128ybb.61.2018.10.31.11.17.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:17:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzu-0004er-Qo; Wed, 31 Oct 2018 18:13:42 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzt-0004af-5O for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:41 +0000 X-Inumbo-ID: b1b768f6-dd38-11e8-a501-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b1b768f6-dd38-11e8-a501-12d6303a7972; Wed, 31 Oct 2018 18:13:40 +0000 (UTC) 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 1EC3A80D; Wed, 31 Oct 2018 11:13:40 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 33A223F6A8; Wed, 31 Oct 2018 11:13:39 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:09 +0000 Message-Id: <20181031181313.8028-18-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 17/21] xen/arm: Remove unnecessary includes in asm/p2m.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/p2m.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index c03557544a..be58125fb7 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -5,10 +5,7 @@ #include #include #include -#include /* for vm_event_response_t */ -#include #include -#include #define paddr_bits PADDR_BITS From patchwork Wed Oct 31 18:13:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149847 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126387ljp; Wed, 31 Oct 2018 11:15:25 -0700 (PDT) X-Google-Smtp-Source: AJdET5f0jhvcmSeglWLt64M/La/ap1mEWzfCVUPDj4lm/rDNTbLDzrA4FliHiP+s5/zEm3IaoF+K X-Received: by 2002:a25:6947:: with SMTP id e68-v6mr4114694ybc.458.1541009725208; Wed, 31 Oct 2018 11:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009725; cv=none; d=google.com; s=arc-20160816; b=IccyIQqRu7TbefV99XZDgGMrf4TxdPZGwWOUe8FJ63LrmyL5iqRXu1QDoj4mQtVrfZ nSnL+22kQDwZCvItzq4S8xAYyroBRYz3oeqjtkaQTih4ZZC32iK+yiGr3ilqYzsr6Gw1 tQoOaKlUemopDxmHbNi9VGGiP8jaPT23vOonV457LhUPe+Iq0UbO9+EHiAFoP5Wrw1xH BIqiuk8gXCAqgUTnaEnnyXo3lgE9WAC9uSO8kHKzn/49uqZexDFuVzmWkbJWadbwMVQU z/GRlq93qTokbBbGiFI50aeQEq1shVDxRdsFQWEulbforYgZ5BdYsNuWASTk68eB1hSC c/xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=K7X/W4R0dxi7kuvBjM+d/WM0fuJ7DOqZAmybPXuMqOw=; b=eS0SY5gJKKybvZ1hRZGI3Wgmh97FyeXJvmnUldOxsEeoXN0Sx2CNSwzLvcQaDVaxjU 2eYw5fa1AIkP+REvnePI3J95ApVo1a6uG8Nb652HyHox1TszxXBiowqMk3cwIravPg7l G+FbOvut0/FNW0GbVEPAVDj0YvPylSAFp+P0SbYz0CzQ8jp+AtBC0kqw4mNlqth5JEqM IBLwzDFPSHnsMvnVmy+d+gUnmZJt1zRjuie8uWrIpR1itxdI/RzPzBgTwfPIdPgIOPl7 MIqM2UXa8i/Q9hWfUKqaa8xaMhxL15a4HHjlwGjhXLz9MsjBZtdFTmLTe35+JCmzqdb+ QQYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r16-v6si16104257ywg.253.2018.10.31.11.15.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzw-0004hF-B6; Wed, 31 Oct 2018 18:13:44 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzu-0004e0-CN for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:42 +0000 X-Inumbo-ID: b261d728-dd38-11e8-92d6-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b261d728-dd38-11e8-92d6-12d6303a7972; Wed, 31 Oct 2018 18:13:41 +0000 (UTC) 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 46F071596; Wed, 31 Oct 2018 11:13:41 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5BD853F6A8; Wed, 31 Oct 2018 11:13:40 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:10 +0000 Message-Id: <20181031181313.8028-19-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 18/21] xen/arm: Remove unnecessary includes in asm-arm/acpi.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/acpi.h | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h index feec4fb0ac..50340281a9 100644 --- a/xen/include/asm-arm/acpi.h +++ b/xen/include/asm-arm/acpi.h @@ -23,7 +23,6 @@ #ifndef _ASM_ARM_ACPI_H #define _ASM_ARM_ACPI_H -#include #include #define COMPILER_DEPENDENT_INT64 long long From patchwork Wed Oct 31 18:13:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149855 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126907ljp; Wed, 31 Oct 2018 11:15:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5f4e55bzJq8zTzBSAYnZAcPKPyMEf8efx0gE62h3TWg/1SkzFZFWRRkuDQrefRsRFgIBQ/I X-Received: by 2002:a25:b320:: with SMTP id l32-v6mr4395827ybj.65.1541009753459; Wed, 31 Oct 2018 11:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009753; cv=none; d=google.com; s=arc-20160816; b=jecGQvaPBr5+1ufl4EpfDOhi+XFKyXI2nfB+hHppmCCh1Vk0PPoJe/xDCDG3BAKrEQ GVXDMpfGRn2w8UIEw5zpHpfIRrxN8WNP9dnPbrbDIJhNhjIQlXIljtNOooKfx5+rUixy LuokTt4LJzV6lstFZoyaDDrojBHipl6m7mCKrq8PCVg64josMq9nn8RIPs4dbO+IRhSy v1JkOUgtcQqs4txzasS03jOveF92lUNNfmw8FBxFxyh2BVa4TN4uXvR+EtqWcWjX2ByI 47TO/stFTt8E30CON85mxMiIF+/GFP/IElosdxFgPZMe9sytIXa32F0yE5eaD2PaAvJP Tl3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=oQlP9o6irQAqMITFMSMSKi3Gazjq1pnpAoVNagM4w0A=; b=CpxLbAc4vvDhzkDvBqGzkoW2C0X4UOMFPX+RjwxLQo60FDbaptUgr5yrRpEMkbrZKh dKJiha4yvnoOAvQxZfS42yozLVrPV+vBDRxyPeppco4a4WISt3AtkoUZKRQtorWjrnTK sL0TMFdztbmftWep6/UkaGovILKzRayuN+UviuPAwVxpTOpEroEbIQ1KooyxMErEW1DG w149FnsXjyu1z1Svd6Sv4bXHoyLbEv3qQLLs+VaQVG9eeKdBPjwR5zmTblcREbGptRfk Lf8hZdlf3kvtOdly3+Z/4BvnRI1RhKQFSTW6XHv29qrScmE775dOrKPQJicS4ofHkON6 Fsuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x129-v6si17365421ywf.450.2018.10.31.11.15.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzx-0004jd-O8; Wed, 31 Oct 2018 18:13:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzv-0004gA-Kb for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:43 +0000 X-Inumbo-ID: b30ac342-dd38-11e8-a7e9-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b30ac342-dd38-11e8-a7e9-12d6303a7972; Wed, 31 Oct 2018 18:13:42 +0000 (UTC) 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 6F55F80D; Wed, 31 Oct 2018 11:13:42 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 841B03F6A8; Wed, 31 Oct 2018 11:13:41 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:11 +0000 Message-Id: <20181031181313.8028-20-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 19/21] xen/arm: Remove unnecessary includes in asm/current.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/current.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/include/asm-arm/current.h b/xen/include/asm-arm/current.h index f9819b34fc..c4af66fbb9 100644 --- a/xen/include/asm-arm/current.h +++ b/xen/include/asm-arm/current.h @@ -2,9 +2,7 @@ #define __ARM_CURRENT_H__ #include -#include -#include #include /* Tell whether the guest vCPU enabled Workaround 2 (i.e variant 4) */ From patchwork Wed Oct 31 18:13:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149845 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126362ljp; Wed, 31 Oct 2018 11:15:24 -0700 (PDT) X-Google-Smtp-Source: AJdET5dLdspFCII4L4Mib3NlUJ9ODqkWumTCTvP++8v2lieNfR2qvv3NavMNPfpHQME4LaL11NJj X-Received: by 2002:a81:4515:: with SMTP id s21-v6mr4188209ywa.148.1541009724579; Wed, 31 Oct 2018 11:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009724; cv=none; d=google.com; s=arc-20160816; b=kogu25HcjsoL5Vq5+ccBdwnx+UP9hELWhNlvslmtdo//dG8xpZc1rMxTr8CV5tTk9C 9LV1MHPd0rrTs5SriwAykdV9XujSih1lE405B8CqSeQgF2tsHsolQuAKLDTAn+H3jmSw kCNNRk7ZNlZ/RneO0QSgk4fZZEw0o7G1nDm+QpkzjZJBQ2ENhqXGeJtr7cyPBQiCDiQN EmJcgnrz/aggW+MVjSVFCAnJKBd35PNMJTr6Gl4H404CXIlXGjBLdn2RUaLBLPIgjK6k 1uj/0n7tCK4+ltm1R0LcWGeAhgf+LIguMPhnz1PPIkYyWGcpN0JMFKntOejV8dnSUoY5 uIUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=Xw6zW81AVrEcjen2HGh+IcWpId4Xe8Q0KuNjwUcMmFo=; b=Iids12J9SjuVjlJ9CZBOAWzbLeWIfBhU7GjWG4PSodWeAOdtmNBsF96DSvDi7+/QwH OvtnKjdGgiQYCIvCMszRTO/L1YkF0PzlzczJYZ/sw7n3Atpm2LQX2xz7chXpeCBhHFB1 FNkTl3deoYewp+z5HaGDILni1p7qL72Gr9nGy4sKnGLkXNIw1H15WXfq2t9FDCXiLnWH /In3D1QzOYCrRPU7506ct+cq/5MMeL+qpqDTSqFwwpGopCKqxSgaBs5c2/yHlezBdaYU E4kTNf821EcLhIuhd0lEF8TfogQoNKpRCgnw3OLgspBrA/VeazrD3AuiihpbaG4Bg8Em HC3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id b124-v6si16833735ywd.121.2018.10.31.11.15.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzy-0004kc-9n; Wed, 31 Oct 2018 18:13:46 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzx-0004ii-4G for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:45 +0000 X-Inumbo-ID: b3bddcca-dd38-11e8-9fd3-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b3bddcca-dd38-11e8-9fd3-12d6303a7972; Wed, 31 Oct 2018 18:13:43 +0000 (UTC) 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 979E81596; Wed, 31 Oct 2018 11:13:43 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AC6B93F6A8; Wed, 31 Oct 2018 11:13:42 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:12 +0000 Message-Id: <20181031181313.8028-21-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 20/21] xen/arm: platform: Don't include p2m.h in exynos5 and omap5 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" None of the platforms are using the p2m helpers. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/platforms/exynos5.c | 1 - xen/arch/arm/platforms/omap5.c | 1 - 2 files changed, 2 deletions(-) diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c index e2c0b7b878..6560507092 100644 --- a/xen/arch/arm/platforms/exynos5.c +++ b/xen/arch/arm/platforms/exynos5.c @@ -17,7 +17,6 @@ * GNU General Public License for more details. */ -#include #include #include #include diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c index 7dbba95756..aee24e4d28 100644 --- a/xen/arch/arm/platforms/omap5.c +++ b/xen/arch/arm/platforms/omap5.c @@ -17,7 +17,6 @@ * GNU General Public License for more details. */ -#include #include #include #include From patchwork Wed Oct 31 18:13:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149856 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7126932ljp; Wed, 31 Oct 2018 11:15:54 -0700 (PDT) X-Google-Smtp-Source: AJdET5evUh7arohRYAAhuwuWVhBssuRgG8tqReUgXysZZ/USadVLy2c9RpXyoSlltmFsK6QQSb3a X-Received: by 2002:a25:6fd5:: with SMTP id k204-v6mr4261619ybc.82.1541009754328; Wed, 31 Oct 2018 11:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009754; cv=none; d=google.com; s=arc-20160816; b=xA6SYdTX/UAFYm9X9F5wOnsVxXdQGegsQMXNYjTopR5If3s+Jy2xTDhKe7FzUHQdoc b1ZfpHblHyophk2RRHMAtVKG6/m6SwOZjxMGELqL9CLjzjhfaD9+IPpsa452JRyCJX0a Fi8xCP5BkXUPM5//ArCqwuTVodWBvdF2xdtOycZl109MFl3tgV0d9NfbRxkeFz2OBpGE tN81GvzuB3LQtLfDRmvrfwyhQjRk3WyI86Ckclh2xuGIiJe7Vc11ZNakKoCqA+jBYW4w /ul+31kz/77p/YOgkFOvw9G9O3IcpCaXFvFRIBFl+q9AU0tqNdjKCkav75Qv8eQL1XIP OQ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=FcQia29Y22lQlOR97FoYZxxHdrmi82UmIcOYLP9p910=; b=uBQKN7tcPDglYbb0/jHD1BlTymbWzpM2sNQnMfpY0646702QDhII4CySw7Sj/wxzzw nbWNGL7XuSMXO12aSnNp503bAjT0bGiSp+yUscarf1IZ567umc2Z4v1xvD9Ho5p9Ggf1 OmrjFL6/5fET0eWRtZCT9lcWBGygFRzRP7MHB5e6sKgSIWsIGzg4X0MZDAGfCrr9cwSZ u+IRH+S4YtXVjRntqFrDS7hBvjbJrZj/cQXn8xDupTw/3Kb4HiuCrV/McpBNRHO/6K0X 0s4JDkydNc08eVKLxdRrZQH+6cn1iqeKn93H98t63CIAC7Ls15/geoaCA74MA8/HZc8c CCCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id k15-v6si17032512ywe.195.2018.10.31.11.15.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:15:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHv00-0004nW-0R; Wed, 31 Oct 2018 18:13:48 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzy-0004kU-An for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:46 +0000 X-Inumbo-ID: b46ba8fa-dd38-11e8-87f6-12d6303a7972 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b46ba8fa-dd38-11e8-87f6-12d6303a7972; Wed, 31 Oct 2018 18:13:45 +0000 (UTC) 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 C01D380D; Wed, 31 Oct 2018 11:13:44 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4D3D3F6A8; Wed, 31 Oct 2018 11:13:43 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:13:13 +0000 Message-Id: <20181031181313.8028-22-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 21/21] xen/arm: Move vgic_* helpers from gic.h to vgic.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Keep vgic_* helpers in a single place. At the same time remove gic.h from event.h since the helpers has now been moved to vgic.h (included by domain.h). Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Add Andrii's reviewed-by --- xen/include/asm-arm/event.h | 1 - xen/include/asm-arm/gic.h | 3 --- xen/include/asm-arm/vgic.h | 5 +++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-arm/event.h b/xen/include/asm-arm/event.h index 2f51864043..b14c166ad6 100644 --- a/xen/include/asm-arm/event.h +++ b/xen/include/asm-arm/event.h @@ -1,7 +1,6 @@ #ifndef __ASM_EVENT_H__ #define __ASM_EVENT_H__ -#include #include void vcpu_kick(struct vcpu *v); diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index 22fa122e52..fab02f19f7 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -249,9 +249,7 @@ extern int gic_route_irq_to_guest(struct domain *, unsigned int virq, int gic_remove_irq_from_guest(struct domain *d, unsigned int virq, struct irq_desc *desc); -extern void vgic_sync_to_lrs(void); extern void gic_clear_pending_irqs(struct vcpu *v); -extern int vgic_vcpu_pending_irq(struct vcpu *v); extern void init_maintenance_interrupt(void); extern void gic_raise_guest_irq(struct vcpu *v, unsigned int irq, @@ -306,7 +304,6 @@ extern unsigned int gic_number_lines(void); /* IRQ translation function for the device tree */ int gic_irq_xlate(const u32 *intspec, unsigned int intsize, unsigned int *out_hwirq, unsigned int *out_type); -void vgic_sync_from_lrs(struct vcpu *v); struct gic_info { /* GIC version */ diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 0316d87f66..56ed5fe8fe 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -363,6 +363,11 @@ void vgic_v3_setup_hw(paddr_t dbase, unsigned int intid_bits); #endif +void vgic_sync_to_lrs(void); +void vgic_sync_from_lrs(struct vcpu *v); + +int vgic_vcpu_pending_irq(struct vcpu *v); + #endif /* __ASM_ARM_VGIC_H__ */ /*