From patchwork Thu Sep 26 18:38:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 174511 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2438541ill; Thu, 26 Sep 2019 11:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqYhW+0X/Q6L4ow7xCQqB8I4ZS8sjrVsZqsF4mw6LfyeB8MsqjDCzeydH8X0NJdELQadlg X-Received: by 2002:a92:a1d6:: with SMTP id b83mr40159ill.76.1569523196209; 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=lbsIuDK6X4zazekZ+oUsyQPhbGJ2Me35XVeQu5AqyzdHOH94myzLueGAcxnXQc64YM MR+WqjpXpn3p51WpGBITF0QYdMvt7ERc5UZqS/XGVJ+7DgnLjf1bSVSmmO98kCotvM+O rlfAipCLbwShz3OdlxM1XPiE7nYKJ65jaOd/r4h5AvT8W8Zw1xilUGIJX4HDRixjraXi hNgNFGF1J/edS+m2sAbfoTw2Af671Fep7T157FRdP9/jFy5/M8NYiZCQF1C5DDPd+/f3 paDl40P9PSQZZkt//V7R58dSQX45vv7VbcpWWetqi2jk8R+J0m39Xmk2eqCGpZ0/xTQP Avsw== 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=+WNix94WXENy11ScBvtZFxBuZanH1pejqmx0BuMpOHg=; b=U2HoK7/24+mGUQEda9xGLt84z4IrXdCKyWdIWvW2JQpkmW5nI9Ce/TU+jqlS/SPb6k fDdE6qNTP8jRoicnlnUzQlTA+a1GRDKH83P4mJQw96VNdVqyME4OQyJIi5m/SwVmJyET l4jkYjSQOWe8VWkftbfh7dWoN+FyTSZYQjmqPgEKBhc4HGJZxMPmmQb0fnet1KW50536 O2eOnknA4A/B8vGBMSe0adGZk2fQ3uhCb4oxDIcSaHgDm8HpH5xkxyz4DmE2uhe7jDYf A+Y0QXx7g8GWXOMtoD90SejuPEVgotAuh+sd+hfaB5IIbYl0K++CrAfxKyGO5HDZ41nv 6jLg== 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 z13si193429iln.102.2019.09.26.11.39.56 (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 1iDYeu-0002TI-C9; Thu, 26 Sep 2019 18:38:32 +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 1iDYet-0002SL-4A for xen-devel@lists.xenproject.org; Thu, 26 Sep 2019 18:38:31 +0000 X-Inumbo-ID: d0838a78-e08c-11e9-965e-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id d0838a78-e08c-11e9-965e-12813bfff9fa; Thu, 26 Sep 2019 18:38:21 +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 A932A142F; Thu, 26 Sep 2019 11:38:20 -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 DCD553F67D; Thu, 26 Sep 2019 11:38:19 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 26 Sep 2019 19:38:05 +0100 Message-Id: <20190926183808.11630-8-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 07/10] xen/arm: Allow insn.h to be called from assembly 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 , Stefano Stabellini , Volodymyr Babchuk , andrii.anisov@gmail.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" A follow-up patch will require to include insn.h from assembly code. So wee need to protect any C-specific definition to avoid compilation error when used in assembly code. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- xen/include/asm-arm/insn.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h index 19277212e1..00391f83f9 100644 --- a/xen/include/asm-arm/insn.h +++ b/xen/include/asm-arm/insn.h @@ -1,8 +1,14 @@ #ifndef __ARCH_ARM_INSN #define __ARCH_ARM_INSN +#ifndef __ASSEMBLY__ + #include +/* + * At the moment, arch-specific headers contain only definition for C + * code. + */ #if defined(CONFIG_ARM_64) # include #elif defined(CONFIG_ARM_32) @@ -11,6 +17,8 @@ # error "unknown ARM variant" #endif +#endif /* __ASSEMBLY__ */ + /* On ARM32,64 instructions are always 4 bytes long. */ #define ARCH_PATCH_INSN_SIZE 4