From patchwork Thu Oct 18 13:20:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149133 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1972727lji; Thu, 18 Oct 2018 06:23:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV61PLOFFLZJ956IpREbMSOhzWpXasxtRkFb2wS5kLcx0u+/9DtqeR9X1A8QJzkxPhb2tnPDo X-Received: by 2002:a81:5505:: with SMTP id j5-v6mr18615086ywb.186.1539869007203; Thu, 18 Oct 2018 06:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539869007; cv=none; d=google.com; s=arc-20160816; b=x023YcuCTUl0XSUJT9i6aKSW6995ZEKEMUs+pqtbf1rheFPqC7frKyFN0QniGksKJm c2q/7DOvSVtlaWrymelwQBt71GRdfBuWgK1yNxhCJSZt7O/xZGuGLL2cNFrJK8/ZA2ZQ MYAabgw9GDdqzF4xXjS4aI92B7C51g+ZXxjdPL4FVsztiU3rZ8+n7Z+ETqcary6THiWb MehYp5JW76bMvNjvYLDYSuHWynF3FglI/CYjj3sNsfoWvJESH6WinJjxFjDsCmjPb7zT CfOZ8Om57TpIlW1FIBeqyNfSxA4gdLlpcBOop9hxEnAnF7iRJ/cHqnKhd2//PXyj8uWE mX2g== 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=AVecml907P9D1LRLe9cU7gvsl/BMESRS6InQQRsscFM=; b=N2hk37beGxmHjNllPVSnTjmwrCelYfmDysGcjnkWzewdFxsmSyjEVPofAbpNclZLPQ jKSacBM0J7VbP5WNxT/EvKCrrb5WmRQUljzcQKDWIPfgDrJo9/ydZlyjyiCtyy/6SQZP f+LEI4KfRubKe4dj4vf+fqh+BwunSWTtc8fqw7Yd4HcXvpUzB7DkTAv8MoiUztp7XFlu Bjomva2Z6e86ni0yXPOEKEworYbfcKX1658I0qqT1TKNh2tWWV6KtJt9bxo11vHWB1lR FeZ7y9EdUkf5dYGB9U0EPJPjx1N4f3mYP8XJPtnTC1ymUL6H7AwgSoUIPHzs1RNBWJHf Tt8g== 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 s9-v6si7863283ybg.344.2018.10.18.06.23.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 06:23:27 -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 1gD8Er-0002zF-3j; Thu, 18 Oct 2018 13:21:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gD8Ep-0002yw-5V for xen-devel@lists.xen.org; Thu, 18 Oct 2018 13:21:19 +0000 X-Inumbo-ID: e5390d4e-d2d8-11e8-a6a9-d7ebe60f679a Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id e5390d4e-d2d8-11e8-a6a9-d7ebe60f679a; Thu, 18 Oct 2018 13:22: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 E08081596; Thu, 18 Oct 2018 06:21:17 -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 2423A3F59C; Thu, 18 Oct 2018 06:21:17 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 18 Oct 2018 14:20:48 +0100 Message-Id: <20181018132109.31192-2-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181018132109.31192-1-julien.grall@arm.com> References: <20181018132109.31192-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 01/22] xen/arm: traps: Constify show_registers 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 MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" show_registers helpers are not meant to modify any parameters. So constify them. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 14 +++++++------- xen/include/asm-arm/processor.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 51d2e42c77..9eec51ea90 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); diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 8016cf306f..efa33b4665 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -794,7 +794,7 @@ 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_registers(const struct cpu_user_regs *regs); //#define dump_execution_state() run_in_exception_handler(show_execution_state) #define dump_execution_state() WARN()