[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 1/3] xen/atomic: Introduce common atomic header and update includes



This patch does reorder the #includes in asm-arm/atomic.h to pull in
definitions in the correct order, which would otherwise cause a build failure
in patch #2 because of struct vcpu_guest_core_regs being referenced before
definition.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
---
 xen/arch/x86/apic.c                 |    2 +-
 xen/arch/x86/cpu/mcheck/barrier.h   |    2 +-
 xen/arch/x86/cpu/mcheck/mce.h       |    2 +-
 xen/arch/x86/crash.c                |    2 +-
 xen/arch/x86/i8259.c                |    2 +-
 xen/arch/x86/mm/mem_sharing.c       |    2 +-
 xen/arch/x86/mm/shadow/private.h    |    2 +-
 xen/arch/x86/traps.c                |    2 +-
 xen/common/kexec.c                  |    2 +-
 xen/common/rcupdate.c               |    2 +-
 xen/common/sched_credit.c           |    2 +-
 xen/common/spinlock.c               |    2 +-
 xen/common/timer.c                  |    2 +-
 xen/common/trace.c                  |    2 +-
 xen/drivers/passthrough/arm/smmu.c  |    2 +-
 xen/include/acpi/platform/aclinux.h |    2 +-
 xen/include/asm-arm/atomic.h        |    2 +-
 xen/include/asm-x86/irq.h           |    2 +-
 xen/include/asm-x86/spinlock.h      |    2 +-
 xen/include/xen/atomic.h            |    6 ++++++
 xen/include/xen/gdbstub.h           |    2 +-
 xen/include/xen/sched.h             |    2 +-
 xen/xsm/flask/avc.c                 |    2 +-
 23 files changed, 28 insertions(+), 22 deletions(-)
 create mode 100644 xen/include/xen/atomic.h

diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 0e5e302..47f8ef9 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -28,7 +28,7 @@
 #include <xen/softirq.h>
 #include <asm/mc146818rtc.h>
 #include <asm/msr.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/mpspec.h>
 #include <asm/flushtlb.h>
 #include <asm/hardirq.h>
diff --git a/xen/arch/x86/cpu/mcheck/barrier.h 
b/xen/arch/x86/cpu/mcheck/barrier.h
index 87f7550..ca33f5d 100644
--- a/xen/arch/x86/cpu/mcheck/barrier.h
+++ b/xen/arch/x86/cpu/mcheck/barrier.h
@@ -1,7 +1,7 @@
 #ifndef _MCHECK_BARRIER_H
 #define _MCHECK_BARRIER_H
 
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 
 /* MCE handling */
 struct mce_softirq_barrier {
diff --git a/xen/arch/x86/cpu/mcheck/mce.h b/xen/arch/x86/cpu/mcheck/mce.h
index e83d431..2891469 100644
--- a/xen/arch/x86/cpu/mcheck/mce.h
+++ b/xen/arch/x86/cpu/mcheck/mce.h
@@ -7,7 +7,7 @@
 #include <xen/smp.h>
 #include <asm/types.h>
 #include <asm/traps.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/percpu.h>
 
 #include "x86_mca.h"
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index c0b83df..974fd0f 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -8,7 +8,7 @@
  * - Magnus Damm <magnus@xxxxxxxxxxxxx>
  */
 
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/elf.h>
 #include <asm/percpu.h>
 #include <xen/types.h>
diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
index c2c9005..2a8cf76 100644
--- a/xen/arch/x86/i8259.c
+++ b/xen/arch/x86/i8259.c
@@ -12,7 +12,7 @@
 #include <xen/errno.h>
 #include <xen/sched.h>
 #include <xen/irq.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/desc.h>
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 7293f31..92a68eb 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -31,7 +31,7 @@
 #include <asm/string.h>
 #include <asm/p2m.h>
 #include <asm/mem_event.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/rcupdate.h>
 #include <asm/event.h>
 #include <xsm/xsm.h>
diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h
index b778fcf..4958500 100644
--- a/xen/arch/x86/mm/shadow/private.h
+++ b/xen/arch/x86/mm/shadow/private.h
@@ -30,7 +30,7 @@
 #include <xen/domain_page.h>
 #include <asm/x86_emulate.h>
 #include <asm/hvm/support.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 
 #include "../mm-locks.h"
 
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 677074b..45f9ed6 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -52,7 +52,7 @@
 #include <xen/watchdog.h>
 #include <asm/system.h>
 #include <asm/io.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/bitops.h>
 #include <asm/desc.h>
 #include <asm/debugreg.h>
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 2239ee8..5055461 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -20,7 +20,7 @@
 #include <xen/keyhandler.h>
 #include <public/kexec.h>
 #include <xen/cpumask.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/spinlock.h>
 #include <xen/version.h>
 #include <xen/console.h>
diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index e9979cd..5d7a31b 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -39,7 +39,7 @@
 #include <xen/smp.h>
 #include <xen/rcupdate.h>
 #include <xen/sched.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/bitops.h>
 #include <xen/percpu.h>
 #include <xen/softirq.h>
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index 8b02b7b..68caa8f 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -18,7 +18,7 @@
 #include <xen/time.h>
 #include <xen/sched-if.h>
 #include <xen/softirq.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/div64.h>
 #include <xen/errno.h>
 #include <xen/keyhandler.h>
diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index 575cc6d..11a63c7 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -8,7 +8,7 @@
 #include <xen/preempt.h>
 #include <public/sysctl.h>
 #include <asm/processor.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 
 #ifndef NDEBUG
 
diff --git a/xen/common/timer.c b/xen/common/timer.c
index f36aebc..96573ac 100644
--- a/xen/common/timer.c
+++ b/xen/common/timer.c
@@ -23,7 +23,7 @@
 #include <xen/symbols.h>
 #include <asm/system.h>
 #include <asm/desc.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 
 /* We program the time hardware this far behind the closest deadline. */
 static unsigned int timer_slop __read_mostly = 50000; /* 50 us */
diff --git a/xen/common/trace.c b/xen/common/trace.c
index f651cf3..0a7b2c3 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -31,7 +31,7 @@
 #include <xen/percpu.h>
 #include <xen/pfn.h>
 #include <xen/cpu.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <public/sysctl.h>
 
 #ifdef CONFIG_COMPAT
diff --git a/xen/drivers/passthrough/arm/smmu.c 
b/xen/drivers/passthrough/arm/smmu.c
index f4eb2a2..5189d46 100644
--- a/xen/drivers/passthrough/arm/smmu.c
+++ b/xen/drivers/passthrough/arm/smmu.c
@@ -43,7 +43,7 @@
 #include <xen/vmap.h>
 #include <xen/rbtree.h>
 #include <xen/sched.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/device.h>
 #include <asm/io.h>
 #include <asm/platform.h>
diff --git a/xen/include/acpi/platform/aclinux.h 
b/xen/include/acpi/platform/aclinux.h
index 239ced2..4f304c3 100644
--- a/xen/include/acpi/platform/aclinux.h
+++ b/xen/include/acpi/platform/aclinux.h
@@ -54,7 +54,7 @@
 #include <xen/ctype.h>
 #include <xen/spinlock.h>
 #include <asm/system.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/div64.h>
 #include <asm/acpi.h>
 #include <asm/current.h>
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 7d15fb0..ee29d4e 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -2,8 +2,8 @@
 #define __ARCH_ARM_ATOMIC__
 
 #include <xen/config.h>
-#include <xen/prefetch.h>
 #include <asm/system.h>
+#include <xen/prefetch.h>
 
 #define build_atomic_read(name, size, width, type, reg)\
 static inline type name(const volatile type *addr) \
diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h
index 9066d38..9906035 100644
--- a/xen/include/asm-x86/irq.h
+++ b/xen/include/asm-x86/irq.h
@@ -4,7 +4,7 @@
 /* (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar */
 
 #include <xen/config.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/cpumask.h>
 #include <xen/smp.h>
 #include <xen/hvm/irq.h>
diff --git a/xen/include/asm-x86/spinlock.h b/xen/include/asm-x86/spinlock.h
index 6bc044c..a315e88 100644
--- a/xen/include/asm-x86/spinlock.h
+++ b/xen/include/asm-x86/spinlock.h
@@ -3,7 +3,7 @@
 
 #include <xen/config.h>
 #include <xen/lib.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 
 typedef struct {
     volatile s16 lock;
diff --git a/xen/include/xen/atomic.h b/xen/include/xen/atomic.h
new file mode 100644
index 0000000..141f9e9
--- /dev/null
+++ b/xen/include/xen/atomic.h
@@ -0,0 +1,6 @@
+#ifndef __XEN_ATOMIC_H__
+#define __XEN_ATOMIC_H__
+
+#include <asm/atomic.h>
+
+#endif /* __XEN_ATOMIC_H__ */
diff --git a/xen/include/xen/gdbstub.h b/xen/include/xen/gdbstub.h
index 67d7410..6b11425 100644
--- a/xen/include/xen/gdbstub.h
+++ b/xen/include/xen/gdbstub.h
@@ -21,7 +21,7 @@
 #ifndef __XEN_GDBSTUB_H__
 #define __XEN_GDBSTUB_H__
 
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/page.h>
 
 #ifdef CRASH_DEBUG
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index f920e1a..a953469 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -17,7 +17,7 @@
 #include <xen/mm.h>
 #include <xen/smp.h>
 #include <xen/perfc.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <xen/wait.h>
 #include <public/xen.h>
 #include <public/domctl.h>
diff --git a/xen/xsm/flask/avc.c b/xen/xsm/flask/avc.c
index fc6580e..234aaba 100644
--- a/xen/xsm/flask/avc.c
+++ b/xen/xsm/flask/avc.c
@@ -26,7 +26,7 @@
 #include <xen/sched.h>
 #include <xen/init.h>
 #include <xen/rcupdate.h>
-#include <asm/atomic.h>
+#include <xen/atomic.h>
 #include <asm/current.h>
 #include <public/xsm/flask_op.h>
 
-- 
1.7.10.4


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.