From patchwork Thu Sep 26 18:38:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 174510 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2438531ill; Thu, 26 Sep 2019 11:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSKzxbbXX6tGeCAUrU23csZlBV7vvFyGbllHXywzjP5wz5g0M3MopjyR6RJ7JKXzbdf++d X-Received: by 2002:a92:1756:: with SMTP id u83mr6818ill.264.1569523196011; Thu, 26 Sep 2019 11:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569523196; cv=none; d=google.com; s=arc-20160816; b=MH2p2jESZRS2KEUgx1tyECvPBQkMZo6Ox8YiN/2H9Twm7YwUnEg4WXD5DpnIiY3NeW cAwlz8H3V5Hj6vknRsBGOCIUVpMZ5SwaAxkOWf6HpuTw+fj5THKWxH88edWikZItZg5+ H9tLAHzgIKJWbNpsjMlbLB0PUrtS68BEJFtMC7QoY8TjBGfiGyRLZF5disoDOl8MneCK COJX+FS5eiZoRiY4h+3dwopMhPkZcht+a3vkefqc9lqHD2Iu5sXNeUqyxHO5IS/oJGdE tlJQhGr31Xy3txH3ymQd/fZcugX+boIlcl0Rlv0BKMS05QyzKZtLJ3aG5mli0fDn0GSc HneQ== 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=+A6ioyAOmjeTa+KXW3MQv0dW/wNEUp2hOCZGYYTNeL0=; b=jp1MewfiG+XNNZrKC16Gb8u7vCZO2RiKg5P2oSEaruaam+y9StH9hB/353bLP6pFkS aWW5sNn3ga9+FA98Ciatpdkj/srBePPlc5scmCdK5uPba3Vv9t9k7pmTwowdStweE83a 5Ec3d6I1H4h8Hw8GcM5w7xE2qJdRtksjKXP5MfhqD/c96bLvvXwtanhIogAZHaaBiYv2 Bg9gVM2DAThmxyJbD6QZ1ykuyxMP5CmiickGZGijELVnkIazxQhpbpHx6DQELTxmSrAK ow46onIavJ9Ahx4dI4weP/W7XO5AbdX046xAx+xww1gHVfQ0v2OJHyZSLgtWErvHEn3r QFAA== 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 n18si3849063ion.158.2019.09.26.11.39.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Sep 2019 11:39:56 -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 1iDYep-0002Pe-Lf; Thu, 26 Sep 2019 18:38:27 +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 1iDYeo-0002PL-49 for xen-devel@lists.xenproject.org; Thu, 26 Sep 2019 18:38:26 +0000 X-Inumbo-ID: cfdb28f6-e08c-11e9-965e-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id cfdb28f6-e08c-11e9-965e-12813bfff9fa; Thu, 26 Sep 2019 18:38:19 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A81F815AB; Thu, 26 Sep 2019 11:38:19 -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 A5A503F67D; Thu, 26 Sep 2019 11:38:18 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 26 Sep 2019 19:38:04 +0100 Message-Id: <20190926183808.11630-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190926183808.11630-1-julien.grall@arm.com> References: <20190926183808.11630-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH RFC for-4.13 06/10] xen/arm: Move ARCH_PATCH_INSN_SIZE out of the header livepatch.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: Stefano Stabellini , Konrad Rzeszutek Wilk , andrii.anisov@gmail.com, Ross Lagerwall , Julien Grall , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the moment, ARCH_PATCH_INSN_SIZE is defined in the header livepatch.h. However, this is also used in the alternative code. Rather than including livepatch.h just for using the define, move it in the header insn.h which seems more suitable. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk Reviewed-by: Ross Lagerwall Acked-by: Stefano Stabellini --- xen/arch/arm/alternative.c | 2 -- xen/include/asm-arm/insn.h | 3 +++ xen/include/asm-arm/livepatch.h | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c index 52ed7edf69..237c4e5642 100644 --- a/xen/arch/arm/alternative.c +++ b/xen/arch/arm/alternative.c @@ -30,8 +30,6 @@ #include #include #include -/* XXX: Move ARCH_PATCH_INSN_SIZE out of livepatch.h */ -#include #include /* Override macros from asm/page.h to make them work with mfn_t */ diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h index 3489179826..19277212e1 100644 --- a/xen/include/asm-arm/insn.h +++ b/xen/include/asm-arm/insn.h @@ -11,6 +11,9 @@ # error "unknown ARM variant" #endif +/* On ARM32,64 instructions are always 4 bytes long. */ +#define ARCH_PATCH_INSN_SIZE 4 + #endif /* !__ARCH_ARM_INSN */ /* * Local variables: diff --git a/xen/include/asm-arm/livepatch.h b/xen/include/asm-arm/livepatch.h index 6bca79deb9..026af5e7dc 100644 --- a/xen/include/asm-arm/livepatch.h +++ b/xen/include/asm-arm/livepatch.h @@ -7,9 +7,7 @@ #define __XEN_ARM_LIVEPATCH_H__ #include /* For SZ_* macros. */ - -/* On ARM32,64 instructions are always 4 bytes long. */ -#define ARCH_PATCH_INSN_SIZE 4 +#include /* * The va of the hypervisor .text region. We need this as the