All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: bhupinder.thakur@linaro.org, Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org
Subject: [PATCH v2 7/7] xen/arm: Limit the scope of cpregs.h
Date: Tue, 12 Sep 2017 11:36:22 +0100	[thread overview]
Message-ID: <20170912103622.18562-8-julien.grall@arm.com> (raw)
In-Reply-To: <20170912103622.18562-1-julien.grall@arm.com>

Currently, cpregs.h is included in pretty much every files 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.

Signed-off-by: Julien Grall <julien.grall@arm.com>

---
    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 <asm/system.h>
 #include <asm/smp.h>
-#include <asm/cpregs.h>
 #include <asm/page.h>
 #include <asm/gic.h>
 #include <asm/flushtlb.h>
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 <xen/sched.h>
 
+#include <asm/cpregs.h>
 #include <asm/current.h>
 #include <asm/regs.h>
 #include <asm/traps.h>
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 <xen/softirq.h>
 #include <xen/sizes.h>
 
+#include <asm/cpregs.h>
 #include <asm/current.h>
 #include <asm/gic_v3_defs.h>
 #include <asm/gic_v3_its.h>
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 <xen/sched.h>
 #include <xen/timer.h>
 
+#include <asm/cpregs.h>
 #include <asm/div64.h>
 #include <asm/gic.h>
 #include <asm/irq.h>
@@ -29,6 +30,7 @@
 #include <asm/time.h>
 #include <asm/vgic.h>
 #include <asm/vreg.h>
+#include <asm/regs.h>
 
 /*
  * 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 <asm/cpregs.h>
+
 #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 <xen/types.h>
-#include <asm/cpregs.h>
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/processor.h>
 #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 <asm/cpregs.h>
 #ifndef __ASSEMBLY__
 #include <xen/types.h>
 #endif
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-09-12 10:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 10:36 [PATCH v2 0/7] xen/arm: Clean-up traps.c Julien Grall
2017-09-12 10:36 ` [PATCH v2 1/7] xen/arm: traps: Re-order the includes alphabetically Julien Grall
2017-09-12 20:59   ` Stefano Stabellini
2017-09-12 10:36 ` [PATCH v2 2/7] xen/arm: Move arch/arm/vtimer.h to include/asm-arm/vtimer.h Julien Grall
2017-09-12 21:02   ` Stefano Stabellini
2017-09-12 10:36 ` [PATCH v2 3/7] xen/arm: traps: Export a bunch of helpers to handle emulation Julien Grall
2017-09-12 21:26   ` Stefano Stabellini
2017-09-13  8:52     ` Julien Grall
2017-09-12 10:36 ` [PATCH v2 4/7] xen/arm: Move sysreg emulation outside of traps.c Julien Grall
2017-09-12 21:40   ` Stefano Stabellini
2017-09-12 10:36 ` [PATCH v2 5/7] xen/arm: Move co-processor " Julien Grall
2017-09-12 21:43   ` Stefano Stabellini
2017-09-12 10:36 ` [PATCH v2 6/7] xen/arm: Move sysregs.h in arm64 sub-directory Julien Grall
2017-09-12 21:49   ` Stefano Stabellini
2017-09-12 10:36 ` Julien Grall [this message]
2017-09-12 21:53   ` [PATCH v2 7/7] xen/arm: Limit the scope of cpregs.h Stefano Stabellini
2017-09-13  9:11     ` Julien Grall
2017-09-13 21:13       ` Stefano Stabellini
2017-09-14 16:58         ` Julien Grall
2017-09-12 21:57 ` [PATCH v2 0/7] xen/arm: Clean-up traps.c Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170912103622.18562-8-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=bhupinder.thakur@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.