ia64/xen-unstable

view xen/include/xen/smp.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 7dfc0a20fa59
children
line source
1 #ifndef __XEN_SMP_H__
2 #define __XEN_SMP_H__
4 #include <xen/config.h>
5 #include <asm/smp.h>
7 /*
8 * stops all CPUs but the current one:
9 */
10 extern void smp_send_stop(void);
12 extern void smp_send_event_check_mask(const cpumask_t *mask);
13 #define smp_send_event_check_cpu(cpu) \
14 smp_send_event_check_mask(cpumask_of(cpu))
16 /*
17 * Prepare machine for booting other CPUs.
18 */
19 extern void smp_prepare_cpus(unsigned int max_cpus);
21 /*
22 * Bring a CPU up
23 */
24 extern int __cpu_up(unsigned int cpunum);
26 /*
27 * Final polishing of CPUs
28 */
29 extern void smp_cpus_done(unsigned int max_cpus);
31 /*
32 * Call a function on all other processors
33 */
34 extern int smp_call_function(
35 void (*func) (void *info),
36 void *info,
37 int wait);
39 /*
40 * Call a function on a selection of processors
41 */
42 extern int on_selected_cpus(
43 const cpumask_t *selected,
44 void (*func) (void *info),
45 void *info,
46 int wait);
48 /*
49 * Mark the boot cpu "online" so that it can call console drivers in
50 * printk() and can access its per-cpu storage.
51 */
52 void smp_prepare_boot_cpu(void);
54 /*
55 * Call a function on all processors
56 */
57 static inline int on_each_cpu(
58 void (*func) (void *info),
59 void *info,
60 int wait)
61 {
62 return on_selected_cpus(&cpu_online_map, func, info, wait);
63 }
65 #define smp_processor_id() raw_smp_processor_id()
67 /* No Xen contexts can be preempted by CPU hotplug. */
68 #define lock_cpu_hotplug() ((void)0)
69 #define unlock_cpu_hotplug() ((void)0)
71 #endif /* __XEN_SMP_H__ */