From patchwork Thu Sep 14 17:08:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 112585 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1002966qgf; Thu, 14 Sep 2017 10:11:30 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDuQ7waeP3u/uaRbmL1wzxbAi0SupqWXxnWYS83jOoD2LDifDfFxeK81epDzQE2O81ez6Dq X-Received: by 10.107.20.20 with SMTP id 20mr4381288iou.229.1505409090018; Thu, 14 Sep 2017 10:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505409090; cv=none; d=google.com; s=arc-20160816; b=ryvuYATJ8vBxwcf82WtR4Exspk1CT9DqAQ1YU1/gyV53cc8ob4EAs6+Mv/kCVKQN07 8NxKMOqNp7eXIAloL71Etym30ulhOCCqlwcO1U/sm+uGFw7o43UOE9iaCzKjTeSK1uRt jYfU50/QErjZbEiw4r9XaO8/tDUpQpqcz4XCI9/UX7aQ9ZGiD/wACd+ih3FRmT4nPvPh hurVTva4eBv6UIE1MRfS7fu3R1bi1vgsyJT4T042tkJw6IAIhG19rRWKVtWXXLZXgILU VfNdsrMhT+ZsqyF8YXVAUzjUpsUpGsAx0L0pjzvxkVKwk7Hl7GTpTeuCVBk/U2qFyPZw pGOA== 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 :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=oEKH7gBvLmgwetrp7SOWm2QdFrNpUX4SyoJIeg0j9bg=; b=h4tbOaQ8gChh3loDAyltyey0fae55V06IwK9pZ9xU01/TxgXwoNuB2tnxhODCkNl2U msuBF3PMro7n3ED9MECEQZ4JrKpYAbvChTOWMZChDpHTt8XD0kz8Q3KkWotHSrNnS8CX UcLPoiaitwMbWFiNC6Gaq9b00QPM6lwoYq+N8e9PHnISyPKdgxOgn1n0/tl8FECIDlYw h9dsSA6+y7mA2xv7PdS0zhpMiWLlrg/4MxtMgXOnmlFQBFE8CdkIwOSGB5u51iXD/bwA kfpQ+feCZewboP2HHeOUQcwcXBURRQHaeZfhhP55coaXj2KOtTQgN+IeAKYCSB7eBFaR UDvw== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x1si5989310iof.254.2017.09.14.10.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 10:11:29 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsXdb-0008Ga-SF; Thu, 14 Sep 2017 17:09:15 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsXda-0008E7-HJ for xen-devel@lists.xen.org; Thu, 14 Sep 2017 17:09:14 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id A8/C3-02048-9B7BAB95; Thu, 14 Sep 2017 17:09:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysyfVTXfn9l2 RBsevslgs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBltV/ezFpyWqbg97Q9zA+MqiS5GLg4hgc2M Es+uXGGHcE4zSrx/voqti5GTg01AU+LO509MILaIgLTEtc+XGUFsZoE4ifeLGllAbGEBG4lVh 86xdjFycLAIqEoc3xIHYvIKWEocbTUBqZAQkJfY1XaRFcTmFLCS2P37CjOILQRUsuvOV/YJjN wLGBlWMWoUpxaVpRbpGlroJRVlpmeU5CZm5ugaGhjr5aYWFyemp+YkJhXrJefnbmIEereegYF xB+Pv056HGCU5mJREeffq7owU4kvKT6nMSCzOiC8qzUktPsQow8GhJMErBAwWIcGi1PTUirTM HGCYwaQlOHiURHjztgGleYsLEnOLM9MhUqcYdTk6bt79wyTEkpeflyolzvsdpEgApCijNA9uB CzkLzHKSgnzMjIwMAjxFKQW5WaWoMq/YhTnYFQS5v0AMoUnM68EbtMroCOYgI44c3oHyBEliQ gpqQbGjIXG7ZI9LXe/Hl/6fr75FUnF0C65pJ22rck7al199wh18Ht8iLif/VN9qbPva7s1r7j lVt4Q7lEKtl4y9YL9VAsJUd8nu2rFZfz3X5IImD8jyuLUrs1LFHee8jl2Q+iAn9XKB6uO2d// zrKmIsi2/+jhdY1dLt/XXb3Dfjfroab9huJAI59gJZbijERDLeai4kQAq1P2DnQCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1505408952!114150108!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10513 invoked from network); 14 Sep 2017 17:09:12 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-10.tower-31.messagelabs.com with SMTP; 14 Sep 2017 17:09:12 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F1361435; Thu, 14 Sep 2017 10:09:12 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 30BAE3F483; Thu, 14 Sep 2017 10:09:11 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 14 Sep 2017 18:08:59 +0100 Message-Id: <20170914170859.30553-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170914170859.30553-1-julien.grall@arm.com> References: <20170914170859.30553-1-julien.grall@arm.com> Cc: bhupinder.thakur@linaro.org, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH v3 5/5] xen/arm: Limit the scope of cpregs.h X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Currently, cpregs.h is indirectly included every files of the hypervisor even for arm64. However, the only use for arm64 is when emulating co-processors. For arm32, all users of processor.h expect cpregs.h to be included in order to access co-processors. So move the inclusion in asm-arm/arm32/processor.h. cpregs.h will also be directly included in the co-processors emulation to accommodate arm64. This is drastically reducing the exposure of cpregs.h to any source file on arm64. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v3: - Expand the rationale about this patch - Add Stefano's acked-by Changes in v2: - Update commit message --- xen/arch/arm/smp.c | 1 - xen/arch/arm/vcpreg.c | 1 + xen/arch/arm/vgic-v3.c | 1 + xen/arch/arm/vtimer.c | 2 ++ xen/include/asm-arm/arm32/processor.h | 2 ++ xen/include/asm-arm/percpu.h | 1 - xen/include/asm-arm/processor.h | 1 - 7 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/smp.c b/xen/arch/arm/smp.c index e7df0874d6..554f4992e6 100644 --- a/xen/arch/arm/smp.c +++ b/xen/arch/arm/smp.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c index f3b08403fb..e363183ba8 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/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index cbeac28b28..a0cf993d13 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c index 9c7e8f441c..0460962f08 100644 --- a/xen/arch/arm/vtimer.c +++ b/xen/arch/arm/vtimer.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include /* * Check if regs is allowed access, user_gate is tail end of a diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h index 68cc82147e..fb330812af 100644 --- a/xen/include/asm-arm/arm32/processor.h +++ b/xen/include/asm-arm/arm32/processor.h @@ -1,6 +1,8 @@ #ifndef __ASM_ARM_ARM32_PROCESSOR_H #define __ASM_ARM_ARM32_PROCESSOR_H +#include + #define ACTLR_CAXX_SMP (1<<6) #ifndef __ASSEMBLY__ diff --git a/xen/include/asm-arm/percpu.h b/xen/include/asm-arm/percpu.h index 7968532462..cdf64e0f77 100644 --- a/xen/include/asm-arm/percpu.h +++ b/xen/include/asm-arm/percpu.h @@ -4,7 +4,6 @@ #ifndef __ASSEMBLY__ #include -#include #if defined(CONFIG_ARM_32) # include #elif defined(CONFIG_ARM_64) diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index d791c12c9c..cd45e5f48f 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -1,7 +1,6 @@ #ifndef __ASM_ARM_PROCESSOR_H #define __ASM_ARM_PROCESSOR_H -#include #ifndef __ASSEMBLY__ #include #endif