view xen/include/xen/stop_machine.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents aa0fee8a6ef5
line source
1 #ifndef __XEN_STOP_MACHINE_H__
2 #define __XEN_STOP_MACHINE_H__
4 /**
5 * stop_machine_run: freeze the machine on all CPUs and run this function
6 * @fn: the function to run
7 * @data: the data ptr for the @fn()
8 * @cpu: the cpu to run @fn() on (or any, if @cpu == NR_CPUS).
9 *
10 * Description: This causes every other cpu to enter a safe point, with
11 * each of which disables interrupts, and finally interrupts are disabled
12 * on the current CPU. The result is that none is holding a spinlock
13 * or inside any other preempt-disabled region when @fn() runs.
14 *
15 * This can be thought of as a very heavy write lock, equivalent to
16 * grabbing every spinlock in the kernel. */
17 int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu);
19 #endif /* __XEN_STOP_MACHINE_H__ */