# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1308824858 -3600
# Node ID 4e9562c1ce4ecaac40011556c16712aefd47afa6
# Parent d3ac71f22e8621d9a7604f82f3976337e6c97a9a
Simplify preempt.h dependencies by moving in_atomic() to preempt.c
..clean up the ensuing fallout.
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/arch/x86/hvm/vmsi.c
--- a/xen/arch/x86/hvm/vmsi.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/arch/x86/hvm/vmsi.c Thu Jun 23 11:27:38 2011 +0100
@@ -32,6 +32,7 @@
#include <xen/lib.h>
#include <xen/errno.h>
#include <xen/sched.h>
+#include <xen/irq.h>
#include <public/hvm/ioreq.h>
#include <asm/hvm/io.h>
#include <asm/hvm/vpic.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/arch/x86/hvm/vmx/realmode.c
--- a/xen/arch/x86/hvm/vmx/realmode.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/arch/x86/hvm/vmx/realmode.c Thu Jun 23 11:27:38 2011 +0100
@@ -14,6 +14,7 @@
#include <xen/lib.h>
#include <xen/sched.h>
#include <xen/paging.h>
+#include <xen/softirq.h>
#include <asm/event.h>
#include <asm/hvm/emulate.h>
#include <asm/hvm/hvm.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/common/domain.c
--- a/xen/common/domain.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/common/domain.c Thu Jun 23 11:27:38 2011 +0100
@@ -30,6 +30,7 @@
#include <xen/wait.h>
#include <xen/grant_table.h>
#include <xen/xenoprof.h>
+#include <xen/irq.h>
#include <acpi/cpufreq/cpufreq.h>
#include <asm/debugger.h>
#include <public/sched.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/common/preempt.c
--- a/xen/common/preempt.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/common/preempt.c Thu Jun 23 11:27:38 2011 +0100
@@ -21,5 +21,12 @@
*/
#include <xen/preempt.h>
+#include <xen/irq.h>
+#include <asm/system.h>
DEFINE_PER_CPU(unsigned int, __preempt_count);
+
+bool_t in_atomic(void)
+{
+ return preempt_count() || in_irq() || !local_irq_is_enabled();
+}
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/common/radix-tree.c
--- a/xen/common/radix-tree.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/common/radix-tree.c Thu Jun 23 11:27:38 2011 +0100
@@ -22,6 +22,7 @@
#include <xen/config.h>
#include <xen/init.h>
#include <xen/radix-tree.h>
+#include <xen/errno.h>
struct radix_tree_path {
struct radix_tree_node *node;
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/drivers/passthrough/amd/iommu_init.c
--- a/xen/drivers/passthrough/amd/iommu_init.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/drivers/passthrough/amd/iommu_init.c Thu Jun 23 11:27:38 2011 +0100
@@ -22,6 +22,7 @@
#include <xen/errno.h>
#include <xen/pci.h>
#include <xen/pci_regs.h>
+#include <xen/irq.h>
#include <asm/amd-iommu.h>
#include <asm/msi.h>
#include <asm/hvm/svm/amd-iommu-proto.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/drivers/passthrough/io.c Thu Jun 23 11:27:38 2011 +0100
@@ -20,6 +20,7 @@
#include <xen/event.h>
#include <xen/iommu.h>
+#include <xen/irq.h>
#include <asm/hvm/irq.h>
#include <asm/hvm/iommu.h>
#include <asm/hvm/support.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/drivers/passthrough/pci.c Thu Jun 23 11:27:38 2011 +0100
@@ -21,6 +21,7 @@
#include <xen/list.h>
#include <xen/prefetch.h>
#include <xen/iommu.h>
+#include <xen/irq.h>
#include <asm/hvm/iommu.h>
#include <asm/hvm/irq.h>
#include <xen/delay.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/drivers/passthrough/vtd/x86/vtd.c
--- a/xen/drivers/passthrough/vtd/x86/vtd.c Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c Thu Jun 23 11:27:38 2011 +0100
@@ -23,6 +23,7 @@
#include <xen/domain_page.h>
#include <asm/paging.h>
#include <xen/iommu.h>
+#include <xen/irq.h>
#include <xen/numa.h>
#include <asm/fixmap.h>
#include <asm/setup.h>
diff -r d3ac71f22e86 -r 4e9562c1ce4e xen/include/xen/preempt.h
--- a/xen/include/xen/preempt.h Thu Jun 23 11:11:24 2011 +0100
+++ b/xen/include/xen/preempt.h Thu Jun 23 11:27:38 2011 +0100
@@ -10,9 +10,8 @@
#define __XEN_PREEMPT_H__
#include <xen/config.h>
+#include <xen/types.h>
#include <xen/percpu.h>
-#include <xen/irq.h> /* in_irq() */
-#include <asm/system.h> /* local_irq_is_enabled() */
DECLARE_PER_CPU(unsigned int, __preempt_count);
@@ -28,6 +27,6 @@
preempt_count()--; \
} while (0)
-#define in_atomic() (preempt_count() || in_irq() || !local_irq_is_enabled())
+bool_t in_atomic(void);
#endif /* __XEN_PREEMPT_H__ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|