diff options
author | Keir Fraser <keir@xen.org> | 2011-06-23 11:27:38 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-06-23 11:27:38 +0100 |
commit | eebfd58f212c5fb75e602ac1aa126863452375da (patch) | |
tree | 8f4b07feacf34e316e1cc9a5ff90d3b3ea7eb61a | |
parent | 66b29760bc32964308a5dcd5d8b0d75930d0bff8 (diff) | |
download | xen-eebfd58f212c5fb75e602ac1aa126863452375da.tar.gz xen-eebfd58f212c5fb75e602ac1aa126863452375da.tar.bz2 xen-eebfd58f212c5fb75e602ac1aa126863452375da.zip |
Simplify preempt.h dependencies by moving in_atomic() to preempt.c
..clean up the ensuing fallout.
Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/arch/x86/hvm/vmsi.c | 1 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/realmode.c | 1 | ||||
-rw-r--r-- | xen/common/domain.c | 1 | ||||
-rw-r--r-- | xen/common/preempt.c | 7 | ||||
-rw-r--r-- | xen/common/radix-tree.c | 1 | ||||
-rw-r--r-- | xen/drivers/passthrough/amd/iommu_init.c | 1 | ||||
-rw-r--r-- | xen/drivers/passthrough/io.c | 1 | ||||
-rw-r--r-- | xen/drivers/passthrough/pci.c | 1 | ||||
-rw-r--r-- | xen/drivers/passthrough/vtd/x86/vtd.c | 1 | ||||
-rw-r--r-- | xen/include/xen/preempt.h | 5 |
10 files changed, 17 insertions, 3 deletions
diff --git a/xen/arch/x86/hvm/vmsi.c b/xen/arch/x86/hvm/vmsi.c index 2457fb407e..454619a169 100644 --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -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 --git a/xen/arch/x86/hvm/vmx/realmode.c b/xen/arch/x86/hvm/vmx/realmode.c index 1fd81dd214..5eb0e65c53 100644 --- a/xen/arch/x86/hvm/vmx/realmode.c +++ b/xen/arch/x86/hvm/vmx/realmode.c @@ -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 --git a/xen/common/domain.c b/xen/common/domain.c index dc5a876871..5323c83bae 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -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 --git a/xen/common/preempt.c b/xen/common/preempt.c index e2133ea50a..a02eb6d28d 100644 --- a/xen/common/preempt.c +++ b/xen/common/preempt.c @@ -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 --git a/xen/common/radix-tree.c b/xen/common/radix-tree.c index 6f2d8b68cd..17361c7ffa 100644 --- a/xen/common/radix-tree.c +++ b/xen/common/radix-tree.c @@ -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 --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c index 2633ee2a14..16d934e45a 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -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 --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index ad08833d48..c39a279cef 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -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 --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index d3f5e8fda8..ec253a611a 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -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 --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c index 50d0f7d358..1fe76a383d 100644 --- a/xen/drivers/passthrough/vtd/x86/vtd.c +++ b/xen/drivers/passthrough/vtd/x86/vtd.c @@ -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 --git a/xen/include/xen/preempt.h b/xen/include/xen/preempt.h index 749bc589cb..f4228058e5 100644 --- a/xen/include/xen/preempt.h +++ b/xen/include/xen/preempt.h @@ -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 @@ DECLARE_PER_CPU(unsigned int, __preempt_count); preempt_count()--; \ } while (0) -#define in_atomic() (preempt_count() || in_irq() || !local_irq_is_enabled()) +bool_t in_atomic(void); #endif /* __XEN_PREEMPT_H__ */ |